Skip to main content

Bookmark Toolkit. Helps manage, analyze, and visualize bookmarks

Project description

Bookmark Toolkit (btk)

Bookmark Toolkit (btk) is a command-line tool for managing and analyzing bookmarks. It provides features for importing, searching, editing, and exporting bookmarks, as well as querying them using JMESPath.

Installation

To install bookmark-tk, you can use pip:

pip install bookmark-tk

Usage

It installs a command-line took, btk. To see how to use it, type:

btk --help

Commands

  • import: Import bookmarks from various formats, e.g., Netscape Bookmark Format HTML file.

    btk import oldbookmarks --format netscape --output bookmarks
    
  • search: Search bookmarks by query.

    btk search mybookmarks "statistics"
    
  • list-index: List the bookmarks with the given indices.

    btk list-index mybookmarks 1 2 3
    
  • add: Add a new bookmark.

    btk add mybookmarks --title "My Bookmark" --url "https://example.com"
    
  • edit: Edit a bookmark by its ID.

    btk edit mybookmarks 1 --title "Updated Title"
    
  • remove: Remove a bookmark by its ID.

    btk remove mybookmarks 2
    
  • list: List all bookmarks (including metadata).

    btk list mybookmarks
    
  • visit: Visit a bookmark by its ID.

    btk visit mybookmarks 103
    
  • merge: Perform merge (set) operations on bookmark libraries.

    btk merge union lib1 lib2 lib3 --output merged
    
  • cloud: Generate a URL mention graph from bookmarks.

    btk cloud mybookmarks --output graph.png
    
  • reachable: Check and mark bookmarks as reachable or not.

    btk reachable mybookmarks
    
  • purge: Remove bookmarks marked as not reachable.

    btk purge mybookmarks --output purged
    
  • export: Export bookmarks to a different format.

    btk export mybookmarks --output bookmarks.csv
    
  • jmespath: Query bookmarks using JMESPath.

    btk jmespath mybookmarks "[?visit_count > `0`].title"
    
  • stats: Get statistics about bookmarks.

    btk stats mybookmarks
    
  • about: Get information about the tool.

    btk about
    
  • version: Get the version of the tool.

    btk version
    
  • llm: Use a large language model (LLM) to automatically generate appropriate queries from natural language prompts.

    btk llm mybookmarks "Find bookmarks that are starred and have a visit count greater than 0."
    

    Or, more complex:

    btk llm bookmarks "search for bookmarks with chatgpt in the title and has been visited at least once or it also has awesome in the title in addition to chatgpt. or, finally, it was added after 2022"
    

Example JMESPath Queries

  • Get all starred bookmarks:
    btk jmespath mybookmarks "[?stars == `true`].title"
    
  • Get URLs of frequently visited bookmarks:
    btk jmespath mybookmarks "[?visit_count > `5`].url"
    
  • Get bookmarks that contain 'wikipedia' in the URL:
    btk jmespath mybookmarks "[?contains(url, 'wikipedia')].{title: title, url: url}"
    

License

This project is licensed under the MIT License.

Contributing

Contributions are welcome! Please submit a pull request or open an issue if you have suggestions or improvements.

Author

Developed by Alex Towell.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bookmark_tk-0.3.0.tar.gz (16.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bookmark_tk-0.3.0-py3-none-any.whl (19.6 kB view details)

Uploaded Python 3

File details

Details for the file bookmark_tk-0.3.0.tar.gz.

File metadata

  • Download URL: bookmark_tk-0.3.0.tar.gz
  • Upload date:
  • Size: 16.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.8.20

File hashes

Hashes for bookmark_tk-0.3.0.tar.gz
Algorithm Hash digest
SHA256 dae4694e4dee1d1e766c23ecccbd910da7f4d1a016f3f87ac284efb58f77193f
MD5 7845299070b50b1a982d8dc9cc56d049
BLAKE2b-256 23d3907e76785090e3d211074a49278380425758f29d77d75248d80968acdd54

See more details on using hashes here.

File details

Details for the file bookmark_tk-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: bookmark_tk-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 19.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.8.20

File hashes

Hashes for bookmark_tk-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a9514d219953f37c2f343247dd87d024912fc66b946f001010e50a73e5555f2e
MD5 e91f0e870b24269b97bd33718db37519
BLAKE2b-256 25a975808ec24045738a6964c3bd40a7b9e7f0f3d78a045515425693a4b0c02f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page