{"id":23430154,"url":"https://github.com/softplus/twitter_export","last_synced_at":"2025-04-09T14:18:34.293Z","repository":{"id":155417268,"uuid":"584872180","full_name":"softplus/twitter_export","owner":"softplus","description":"Some scripts to work with the Twitter data export files","archived":false,"fork":false,"pushed_at":"2023-01-03T19:59:20.000Z","size":15,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-15T08:15:49.367Z","etag":null,"topics":["twitter","twitter-api"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/softplus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-03T18:26:05.000Z","updated_at":"2024-06-04T12:12:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"a7236006-d728-4579-9502-db07b7c4a30c","html_url":"https://github.com/softplus/twitter_export","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softplus%2Ftwitter_export","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softplus%2Ftwitter_export/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softplus%2Ftwitter_export/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softplus%2Ftwitter_export/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/softplus","download_url":"https://codeload.github.com/softplus/twitter_export/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248054196,"owners_count":21039952,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["twitter","twitter-api"],"created_at":"2024-12-23T08:16:01.509Z","updated_at":"2025-04-09T14:18:34.265Z","avatar_url":"https://github.com/softplus.png","language":"Python","readme":"# twitter_export\n\nTakes your Twitter export file and turns it into CSV files.\nEveryone loves CSV files.\n\nMIT license (see file LICENSE).\n(c) 2023 John Mueller / johnmu.com\n## Setup\n\n```bash\n# get repo\ngit clone https://github.com/softplus/twitter_export\ncd twitter_export\n\n# setup python stuff, virtualenv -- recommended\nvirtualenv .venv \u0026\u0026 source .venv/bin/activate\npip install -r requirements.txt\n# ... run things now ...\n\n# ... when done ...\ndeactivate\n```\n\n## Setup\n\n### Twitter API setup\n\n1. Make a copy of `_settings_sample.py` and call it `_settings.py`\n2. Follow the guide at https://python-twitter.readthedocs.io/en/latest/getting_started.html to create a new Twitter app, and to get your tokens.\n3. When creating an app, you can use any URL.\n4. Copy `API Key`, `API Key Secret`, and `Bearer Token` into the appropriate fields in `_settings.py`\n\nThat's all. I think\n\n### Twitter archive\n\nExtract your Twitter archive and place it in the `twitter` folder here.\nThis folder should include sub-directories for `assets` and `data`.\n\n## Usage\n\n```bash\nsource .venv/bin/activate\n# ...\n\n# read all your own tweets, store Q\u0026A as CSV in files in /output/\npython3 json_to_csv.py\n\n# compile threads where you reply to your own tweets\npython3 csv_to_threads.py\n\n# create Q\u0026A CSV file to feed your NLG\n# This takes a long time, it fetches the tweets you replied to via Twitter API.\n# Note: you must set up the Twitter API first.\n# Tweepy will pause when your API quota needs it. \npython3 csv_to_qa.py\n\n# that's all folks\ndeactivate\n```\n\n## Dependencies\n\nSome of the code uses `tweepy` to access the Twitter API. \n\n## todos\n\n* compile popular threads to drop onto blog\n* export all tweets to csv\n* export all posts with images\n* stats on tweets/month, tweets/daytime, time-to-reply\n\n## Questions?\n\nDrop me a post at https://johnmu.com/+\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftplus%2Ftwitter_export","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoftplus%2Ftwitter_export","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftplus%2Ftwitter_export/lists"}