Skip to content

feat: add download as markdown button to bookmark cards#61

Open
davidorban wants to merge 1 commit intoviperrcrypto:mainfrom
davidorban:feat/download-as-markdown
Open

feat: add download as markdown button to bookmark cards#61
davidorban wants to merge 1 commit intoviperrcrypto:mainfrom
davidorban:feat/download-as-markdown

Conversation

@davidorban
Copy link
Contributor

Summary

Adds a FileText button (visible on hover, left of the existing media download button) that exports any bookmark as a .md file with a single click.

What's exported

# Tweet by @handle

**Author:** Name (@handle)
**Date:** Mar 15, 2026
**URL:** https://twitter.com/handle/status/...
**Categories:** AI & Machine Learning, Dev Tools

---

Full tweet text here (URLs preserved so truncated threads
show their continuation link)

> *This tweet may be part of a longer thread. [Read on X ↗](...)*

---

![Image](https://pbs.twimg.com/media/...)

Design decisions

  • Entirely client-side — no new API routes, no new dependencies, no backend changes
  • URLs preserved — unlike the card display which strips t.co links, the export keeps them so truncated threads include the continuation link
  • Thread hint — when the text ends with a t.co URL (sign of a truncated thread), a blockquote note is appended with a direct link to X
  • Photo media embedded as ![Image](url) for inline display in any Markdown viewer; videos/GIFs become links back to the tweet
  • Named tweet-{tweetId}.md for easy identification

Changes

  • components/bookmark-card.tsx — adds FileText import, handleDownloadMarkdown() function, and the hover button (1 file, +62 lines)

Checklist

  • Tested locally
  • npx tsc --noEmit passes
  • No new warnings
  • No new dependencies
  • No new API routes or backend changes

Adds a FileText button (visible on hover, left of the existing media download
button) that exports a bookmark as a Markdown file.

The exported file contains:
- Author, date, tweet URL, and categories as a header
- Full stored tweet text (with URLs preserved, so truncated threads still
  show their t.co continuation link)
- A note when the text appears to be a truncated thread (ends with t.co URL)
- Embedded image links for photo media; video/GIF as linked references

The download is entirely client-side — no new API routes, no new dependencies.
The file is named tweet-{tweetId}.md.

Co-Authored-By: Oz <oz-agent@warp.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant