DEV Community

Alex Towell
Alex Towell

Posted on • Originally published at metafunctor.com

Long Echo in Practice: 5,874 Bookmarks in a Single File

I wrote about Long Echo and the Long Echo Toolkit earlier. Here's what it actually looks like.

View the live demo: 5,874 bookmarks in a single file

The Export

btk --db bookmarks.db export bookmarks.html \
    --format html-app \
    --query "(reachable != 0 OR reachable IS NULL)"
Enter fullscreen mode Exit fullscreen mode

Result: 5,874 bookmarks in a single 4MB HTML file.

What You Get

Open it in any browser. No server. No internet. No dependencies. Just a file.

The html-app export includes:

  • Search: Full-text filtering across titles, URLs, descriptions, tags
  • Multiple views: Grid, list, table layouts
  • Tag sidebar: Hierarchical tag navigation
  • Dark mode: Toggle button
  • Keyboard shortcuts: Navigate without a mouse
  • Sorting: By date, title, visits, stars
  • Filtering: By starred, archived, has-content

Everything is embedded: CSS, JavaScript, all 5,874 bookmark records as JSON. One file.

Why This Matters

Graceful degradation, concretely:

Level What Works Requirements
1. BTK CLI Full features, auto-tagging, content caching Python, btk installed
2. SQLite Direct queries, scripting sqlite3 binary
3. HTML App Visual browsing, search, filtering Any browser
4. View source Raw JSON data, greppable Text editor

The HTML app is level 3. It works when BTK is gone, when Python is gone. Someone in 2074 can double-click the file and browse my bookmarks.

The Data Inside

View source and you'll find:

const BOOKMARKS = [
    {
        "id": 1,
        "url": "https://example.com/article",
        "title": "Interesting Article",
        "description": "Notes about the article...",
        "tags": ["programming", "python"],
        "stars": 1,
        "created_at": "2023-05-12T14:32:00Z",
        "visited_count": 42
    },
    // ... 5,873 more
];
Enter fullscreen mode Exit fullscreen mode

Plain JSON. No encoding tricks. Grep it, parse it with jq, import it into another tool. The data survives the interface.

Try It

Install BTK:

pip install bookmark-tk
Enter fullscreen mode Exit fullscreen mode

Export your bookmarks:

# From browser exports
btk import bookmarks.html --format html

# To self-contained app
btk export archive.html --format html-app
Enter fullscreen mode Exit fullscreen mode

You now have a permanent, searchable copy of your bookmarks that will outlive every cloud service you currently depend on.

Links

Top comments (0)