Small Python utilities for two recurring workflows:
- Exporting and organizing X/Twitter bookmarks
- Checking whether GitHub fork policy files drift from upstream
check_fork_policy_files.pyCompareLICENSE,COPYING,NOTICE, andREADMEbetween a fork and its upstream repository.export_twitter_bookmarks.pyExport bookmarks from the authenticated X/Twitter account into a local archive.sync_twitter_bookmarks.pyIncrementally sync new bookmarks into the same archive.organize_twitter_bookmarks.pyBuild a browsable local library from an export snapshot.clip_twitter_bookmarks_to_obsidian.pymacOS Safari automation helper for clipping bookmark pages into Obsidian with manual confirmation.twitter_bookmarks_common.pyShared helpers for the bookmark scripts.
- Python 3.11+
- For bookmark export/sync:
twitter-cliinstalled in the same Python environment- a valid authenticated X/Twitter session
- For
clip_twitter_bookmarks_to_obsidian.py:- macOS
- Safari
- Obsidian Web Clipper
- Safari permission:
Allow JavaScript from Apple Events - Accessibility permission for the terminal if you use
quickorpopupmodes
- For
check_fork_policy_files.py:- GitHub API access
- recommended:
gh auth login
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtIf you prefer uv:
uv venv
source .venv/bin/activate
uv pip install -r requirements.txtTWITTER_BOOKMARKS_ROOTDefault root for bookmark exports. Defaults to~/twitter_bookmarks.OBSIDIAN_CLIP_DIRDefault Obsidian target directory for the clipper helper. Defaults to~/Obsidian/twitter_bookmarks.GITHUB_TOKENorGH_TOKENOptional GitHub token for higher API rate limits incheck_fork_policy_files.py.
Export all bookmarks:
python3 export_twitter_bookmarks.pyIncrementally sync bookmarks:
python3 sync_twitter_bookmarks.pyBuild the local bookmark library:
python3 organize_twitter_bookmarks.pyCheck fork policy file drift for a GitHub account:
python3 check_fork_policy_files.py --user your-github-handle --pause-seconds 0.1Clip one specific X/Twitter bookmark into Obsidian:
python3 clip_twitter_bookmarks_to_obsidian.py \
--clip-mode pause \
--tab-mode reuse \
--only-url 'https://x.com/example/status/1234567890'- These scripts are practical utilities, not a polished product.
- Some scripts depend on external tools and local permissions by design.
- Bookmark clipping is intentionally semi-automated: the
pausemode is the safest workflow.
This repository is licensed under Apache-2.0. See LICENSE.
Third-party dependencies and attributions are listed in THIRD_PARTY_NOTICES.md.