Generate a static HTML website from your twitter time line
Project description
What is it?
It’ a tool that makes sure your TL won’t be gone for ever if for some reason twitter decides to no longer play nice.
In a way, it also makes it possible to:
edit your tweets
have them longer than 140 characters
Show me!
Here’s an example of static_tl in action:
How to use it ?
Install Python3 and then install static_tl with pip
Create an app on http://apps.twitter.com
Edit ~/.config/static_tl.toml to have something like:
[auth] api_key = "<Consumer Key>" api_secret = "<Consumer Secret>" token = "<Acces Token>" token_secret = "<Acess Token Secret>" [[users]] [users.user_one] with_replies = false [users.user_two] with_replies = true
Then run:
static-tl get
This will generate some files with your recent tweets in a json folder.
For instance, if your run it on 2016 October 10, you’ll get two files:
json/<user>/2016-09.json (all the tweets from September)
json/<user>/2016-10.json (all the tweets from October so far)
Next time you’ll run static-tl get, we will look at the most recent status ID in the most recent .json file and only fetch new tweets. This means you can edit or even delete the tweets that are older than that :)
Then, when you are ready you can generate a completely static copy of your TL with:
static-tl gen
(By static, we mean that it’s possible to upload those html files wherever you want so it’s extremely easy to publish your new TL on the web)
Permalinks
If you want to generate permalinks, simply add site_url at the top of the .toml file:
site_url = http://example.com/tweets
Tweaking the output
Customization can be done by simply editing the Jinja templates in templates.
From the template you have access to all the fields returned by the official twitter API.
You can also put any file in the static folder : they will get copied into the html folder : useful for images, css files and the like.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file static_tl-0.3.tar.gz
.
File metadata
- Download URL: static_tl-0.3.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bfce5631e59f6a4a2919c2d176ea5b9b5702c9a777cb1160bc2790cc2b41f7b8 |
|
MD5 | e73533f7f31372b8641573d4b1e0b793 |
|
BLAKE2b-256 | affc3df1550c0b45b61a090823f4c7ca8d072989473170f44b27deff0d6cf372 |
File details
Details for the file static_tl-0.3-py3-none-any.whl
.
File metadata
- Download URL: static_tl-0.3-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41a9b9c17fb26c968d43ac59138e6bff6d81d618a103ea0bb6469251b9657df1 |
|
MD5 | 1bb3418916baf848c69e3e8f53e67619 |
|
BLAKE2b-256 | 42414785b9774b86e402dbaced225a7173f136dbb81148ba905710cbbf257aac |