A tool for converting Twitter exports to an Obsidian Vault.
Project description
bird2glass
Introduction
This is a simple command line tool that can be used to turn a Twitter archive into an Obsidian Vault.
[!NOTE] This code was written while working with a Twitter archive created in 2022, in the days before Twitter had the new owner. I've since stopped using Twitter and have no idea if the form of the archive is the same.
Installing
pipx
The package can be installed using pipx
:
$ pipx install bird2glass
Homebrew
The package is available via Homebrew. Use the following commands to install:
$ brew tap davep/homebrew
$ brew install bird2glass
Usage
Prepare for the conversion
- Extract your Twitter archive into a directory.
- Create a directory that will become the vault.
Do the conversion
bird2glass tweets-file obsidian-vault
where tweets-file
is the file that contains all of your tweets (this
should be tweets.js
within the extracted directory) and obsidian-vault
is the directory you created that will be the Obsidian Vault.
Notes and assumptions
This tool was built in part as an experiment in what can be done with Obsidian, in part for fun, and fully for my own needs. As such there might be assumptions and design decisions in here that won't match what you need. Updates to make the code more general are welcome; likewise hacking it to make it work "just so" for you is encouraged.
Some things to note:
- Everything relating to hashtags is left to Obsidian's understanding of hashtags. I don't know if Twitter and Obsidian's "specification" for a hashtag are the same, but I'm working on the assumption they are.
- Every single tweet is turned into its own Markdown file. If you tweeted a lot, expect a lot of files to be created.
- Back in the day, before you could attach media to tweets, I used TwitPic a
lot. This tool attempts to detect TwicPic images and tries to embed them
using an
iframe
. - Where attached media is available and easy to work out, it is stored in the vault as an attachment.
- Currently actual proper videos aren't stored in the archive from Twitter and so aren't easy to grab and handle; this means some video media will be missing. I hope to work on this some more in the future (I seldom attached videos so it's not a huge issue for me).
- This only pulls in Tweets, not DMs, Periscopes, Circles, Moments, etc. I might expand it in the future.
Getting help
If you need help please feel free to raise an issue.
Project details
Release history Release notifications | RSS feed
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 bird2glass-1.0.0.tar.gz
.
File metadata
- Download URL: bird2glass-1.0.0.tar.gz
- Upload date:
- Size: 415.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 849d94fee1ad71fad810d899120b3c2b1430e9830b705c5de0cbcb3c5c91f52a |
|
MD5 | af1a501e624f7afe27dfb68a85c6bc98 |
|
BLAKE2b-256 | 53b45902cb6d866c04296b77f3f785ad6136caabb7a89862098841c0baceafc3 |
File details
Details for the file bird2glass-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: bird2glass-1.0.0-py3-none-any.whl
- Upload date:
- Size: 31.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b3600c3513b2b8e8e7f7a753d292c9808e4d8b47f1b8e1cda16f5357d73a965 |
|
MD5 | 8b7bfd470d26202f4a9dfba12787d8f2 |
|
BLAKE2b-256 | 8861bd5a8e6b33f77618218a6e9ee5b1800c8cd6eff5c685f2f8d8511e6675ba |