Skip to main content

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.

Graph view of my Tweets

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

  1. Extract your Twitter archive into a directory.
  2. 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.

Release files for bird2glass 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bird2glass 1.0.0
File Size Uploaded
bird2glass-1.0.0.tar.gz 415.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bird2glass 1.0.0
File Interpreter ABI Platform
bird2glass-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 446.7 kB

Release files / bird2glass-1.0.0.tar.gz

Download URL bird2glass-1.0.0.tar.gz
Size 415.5 kB
Tags Source
SHA-256 checksum
How to use checksums
849d94fee1ad71fad810d899120b3c2b1430e9830b705c5de0cbcb3c5c91f52a
BLAKE2b-256 checksum
How to use checksums
53b45902cb6d866c04296b77f3f785ad6136caabb7a89862098841c0baceafc3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Release files / bird2glass-1.0.0-py3-none-any.whl

Download URL bird2glass-1.0.0-py3-none-any.whl
Size 31.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5b3600c3513b2b8e8e7f7a753d292c9808e4d8b47f1b8e1cda16f5357d73a965
BLAKE2b-256 checksum
How to use checksums
8861bd5a8e6b33f77618218a6e9ee5b1800c8cd6eff5c685f2f8d8511e6675ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page