/tweets-to-roam

Project to generate the Json compatible with Roamresearch's import

Primary LanguageClojureEclipse Public License 1.0EPL-1.0

tweets-to-roam

This project was built to format the Twitter data on a importable format for Roamresearch.

Usage

First you need to ask Twitter for your data, and them you can start to use this project.

After get your data you can clone this project:

git clone git@github.com:squiter/tweets-to-roam
cd tweets-to-roam

Generating the CSV file

To generate the CSV you can use a helper function of this project:

bin/generate-csv <unziped-twitter-data>/data/tweets.js generated.csv

Arguments:

  1. The tweet.js file from Twitter
  2. The file that you'll use in the next step

Customizing the content of the CSV

In this bin/generate-csv you have a lot of grep -v statements, you can add anything that you want to exclude for the CSV in a new line.

It's important to notice that the default file is customized for my usage!.

Generating the Roamresearch's compatible json

Run the project directly, via :exec-fn:

clojure -X:run-m <unziped-twitter-data/data/tweet.js> > file-to-import.json

This command will generate a json file with this format:

[
  {
    "title": "September 9th, 2008",
    "children": [
      {
        "string": "21:56 Your tweets #[[My Tweets]]"
      },
      {
        "string": "22:01 Other tweet for the same day. #[[My Tweets]]"
      }
    ]
  },
  {
    "title": "September 5th, 2008",
    "children": [
      {
        "string": "09:01 another day tweet #[[My Tweets]]"
      }
    ]
  }
]

Importing your file into Roamresearch

The import process is the default of Roamresearch, you only need to click on the ... button and follow the instructions.

License

Copyright © 2021 Squiter

EPLv1.0 is just the default for projects generated by clj-new: you are not required to open source this project, nor are you required to use EPLv1.0! Feel free to remove or change the LICENSE file and remove or update this section of the README.md file!

Distributed under the Eclipse Public License version 1.0.