You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
2 months ago | |
---|---|---|
example_templates | 2 months ago | |
twakeout | 2 months ago | |
.gitignore | ||
LICENSE.txt | ||
README.md | 2 months ago | |
poetry.lock | 2 months ago | |
pyproject.toml | 2 months ago |
README.md
Twakeout
Tools for interacting with Twitter archive/takeout files.
Goal
For now:
- Be able to create a web page that contains links to all of the tweets in the archive. The idea is to then point Save Page Now to that page and have it archive everything. Not sure whether that’s gonna work at all for large datasets.
Status
Work in progress. Not yet ready for general use, you need to be somewhat tech-savvy. It helps to be a Python programmer.
That being said, currently it can:
- access tweets inside the ZIP file, i.e. without unpacking first (in fact it doesn’t work with extracted data)
- gather really basic statistics
- print the permalinks to the tweets in the archive
- render arbitrary Jinja templates with your Tweets as input
- sort by creation date
- group by year/month/date
- work with large archives that contain
tweets-partN.js
files
Installation
- Clone this repo.
- Run
poetry install
. (You need Poetry, of course.) - Done.
If you don’t want to install Poetry and know what you’re doing, you might get away with installing the dependencies listed in pyproject.toml
manually.
Running
# Get an overview of the available commands.
poetry run python -m twakeout --help
# Get help on a subcommand.
poetry run python -m twakeout render --help
# Create one HTML file per year, containing links to all of your tweets from that year.
poetry run python -m twakeout render --jinja example_templates/tweet_links.html --for-each year --output '{username}-{year}.tweets.html' --archive twitter-archive.zip
Bugs
- The CLI interface isn’t well documented.
- In fact, this whole project isn’t well documented. I’m sorry, I’m in a bit of a hurry.
- We should probably provide an entrypoint script instead of relying on
python -m
. - Sorting/grouping currently doesn’t work with large archives (i.e. those having
tweets-partN.js
files). This will be fixed ASAP.