Skip to main content

Organize bookmarks and browsing history with automated tagging and categorization.

Project description

bookmark-analyzer

PyPI version License: MIT Downloads LinkedIn

bookmark-analyzer is a lightweight Python package that turns unstructured bookmark titles or user‑written descriptions into structured tags, categories, or summaries. It leverages a LLM (by default ChatLLM7) to understand the meaning of a bookmark and return machine‑readable metadata, making it far easier to search, filter, and rediscover saved content.

🚀 Installation

pip install bookmark_analyzer

📖 Quick Start

from bookmark_analyzer import bookmark_analyzer

# Simple usage – the default ChatLLM7 will be used
tags = bookmark_analyzer(
    user_input="How to bake a perfect sourdough loaf – an in‑depth guide with photos"
)

print(tags)   # e.g. ['baking', 'sourdough', 'cooking', 'guide']

Using Your Own LLM

If you prefer another LangChain‑compatible model (OpenAI, Anthropic, Google, …) just pass the instance:

OpenAI

from langchain_openai import ChatOpenAI
from bookmark_analyzer import bookmark_analyzer

llm = ChatOpenAI(model="gpt-4o-mini")
tags = bookmark_analyzer(
    user_input="Why the 2024 election matters for climate policy",
    llm=llm,
)
print(tags)

Anthropic

from langchain_anthropic import ChatAnthropic
from bookmark_analyzer import bookmark_analyzer

llm = ChatAnthropic(model="claude-3-haiku-20240307")
tags = bookmark_analyzer(
    user_input="Best practices for micro‑frontends in a large SaaS product",
    llm=llm,
)
print(tags)

Google Gemini

from langchain_google_genai import ChatGoogleGenerativeAI
from bookmark_analyzer import bookmark_analyzer

llm = ChatGoogleGenerativeAI(model="gemini-1.5-flash")
tags = bookmark_analyzer(
    user_input="Top 10 must‑read sci‑fi novels of the 21st century",
    llm=llm,
)
print(tags)

🛠️ Parameters

Parameter Type Description
user_input str The bookmark title or free‑form description you want to analyze.
llm Optional[BaseChatModel] A LangChain chat model. If omitted, the package creates a default ChatLLM7 instance.
api_key Optional[str] API key for ChatLLM7. If not supplied, the function looks for LLM7_API_KEY in the environment; if still missing, it falls back to a placeholder "None" (which will trigger an authentication error from the service).

🔑 API Key for the Default Model

  • ChatLLM7 is the out‑of‑the‑box model used by bookmark-analyzer.
  • Free tier rate limits are sufficient for typical personal use.
  • To obtain a free key, register at https://token.llm7.io/.
  • You can provide the key either:
    • Via the environment variable LLM7_API_KEY, or
    • Directly when calling the function:
tags = bookmark_analyzer(
    user_input="My favorite podcasts about AI",
    api_key="sk-xxxxxx"
)

📚 How It Works

bookmark_analyzer builds a prompt (see the internal prompts module) and sends it to the LLM together with a regular‑expression pattern that describes the expected output format. The response is validated against that pattern and the extracted tags are returned as a list of strings.

🐞 Issues & Contributions

If you encounter any bugs or have feature requests, please open an issue:

https://github.com/chigwell/bookmark-analyzer/issues

Feel free to fork the repository, submit pull requests, or improve documentation.

✍️ Author

Eugene Evstafev
📧 Email: hi@euegne.plus
🐙 GitHub: chigwell


Happy bookmarking! 🎉

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_analyzer-2025.12.22110020.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

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

bookmark_analyzer-2025.12.22110020-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file bookmark_analyzer-2025.12.22110020.tar.gz.

File metadata

File hashes

Hashes for bookmark_analyzer-2025.12.22110020.tar.gz
Algorithm Hash digest
SHA256 c06e4132c3002402834e4a44c79f18b300fc41670f74913bbf767ebe034fe07e
MD5 27789f7a1a9aa7efb05b02d74c73ffae
BLAKE2b-256 fd168ffe6dcecc7ccf481d00a1a28b4e40e667b48ea39e3c221f7d8d21e3dea1

See more details on using hashes here.

File details

Details for the file bookmark_analyzer-2025.12.22110020-py3-none-any.whl.

File metadata

File hashes

Hashes for bookmark_analyzer-2025.12.22110020-py3-none-any.whl
Algorithm Hash digest
SHA256 3a1aa42275c150e727a33e41b08b45122cb17d06827d2d7e5f003691cf11a8b4
MD5 cb2840d9c799011af0fe5e7f50c6ff21
BLAKE2b-256 0ef57058bb44b3269687a387819afbd64e189c4e0d8d06ef5174e220b2027e6c

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