Pinjontall94 / bluebird_tree

Save your Twitter follows' and followers' bios and pinned tweets

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bluebird Tree

Installation

This software is very much in pre-alpha, but it should work if you adhere to the following workflow:

  1. Download python, if not already installed on your system
  • If you're not sure, open a terminal and run python --version
  • If you don't see something like "Python 3.x.x" check here
  1. Download poetry and git
  2. Git clone this repository:
    • Click the green button in the upper right of this page labelled "Code" and copy the url
    • Open a terminal in a folder on your computer (doesn't matter what folder), and run: git clone <copied-url>
    • Run cd bluebird_tree

How To Run The Scripts

  1. Run poetry install to install dependencies
  2. Get an api key from twitter, copy the bearer token, and run: export 'BEARER_TOKEN'='<your_bearer_token>'
  3. Configure the scripts as needed (explained below)
  4. Run the scripts in the bluebird_tree folder from the project root like so: poetry run python bluebird_tree/<name-of-script>.py > some_name.json

(Note: Ofc this only gives you the json, but that's the most important thing at this point. We can always clean the data later, considering both scripts tag each relevant datum (pinned tweet text, bio text) with the same user ids)

Configuration (i.e. "Twitter might die before I can write a nice UI for this")

So considering time is of the essence, the followers_lookup.py file is configured by:

  • Editing the followers_or_following variable to either "followers" or "following"

Likewise the pinned_tweets_lookup.py script reads "bluebird_tree/pinned_tweet_ids.txt" (a file containing only one id per line; an example file is already there if you just cloned this repository).

How do I find the tweet ids? I'm working on it, but in the meantime you can help me find a way to get the ids out of the json from followers_lookup.py (it actually already grabs the ids of your follows/followers pinned tweets by default! I just need to monkey with the json to get it to work.)

About

Save your Twitter follows' and followers' bios and pinned tweets


Languages

Language:Python 100.0%