Skip to main content

llm-fragments-site-text

A fragment loader for LLM that converts websites into markdown plaintext using Trafilatura.

PyPI Changelog Tests License

Installation

Install this plugin in the same environment as LLM:

llm install llm-fragments-site-text

Usage

Use -f 'site:URL' to fetch and convert a webpage to plaintext markdown with metadata. This plugin uses Trafilatura to extract clean text content and metadata from websites, and formats it as markdown.

Example:

llm -f 'site:https://example.com/article' "What is this article about?"

The output includes:

  • Site name (if available)
  • Title (if available)
  • Author (if available)
  • Date (if available)
  • Description (if available)
  • Main content (as markdown with links preserved)

Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:

cd llm-fragments-site-text
python -m venv venv
source venv/bin/activate

Install the dependencies and test dependencies:

pip install -e '.[test]'

To run the tests:

pytest

Dependencies

  • httpx: For making HTTP requests
  • trafilatura: For extracting clean text and metadata from websites
  • llm: The LLM CLI tool this plugin extends

Metadata

Release files for llm-fragments-site-text 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llm-fragments-site-text 0.1
File Size Uploaded
llm_fragments_site_text-0.1.tar.gz 7.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for llm-fragments-site-text 0.1
File Interpreter ABI Platform
llm_fragments_site_text-0.1-py3-none-any.whl Python 3 none any Details

Total release size: 14.6 kB

Release files / llm_fragments_site_text-0.1.tar.gz

Download URL llm_fragments_site_text-0.1.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
86fd5fa6fed1746bee96089d95404a7f067f992f2bd3d9cef81306c79a361b23
BLAKE2b-256 checksum
How to use checksums
0da8ca96c3b1ecc4761156edc918a6f54244cb113d6afb5aab13689f5f2fcf8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 17, 2025.

Transparency log

Release files / llm_fragments_site_text-0.1-py3-none-any.whl

Download URL llm_fragments_site_text-0.1-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6600e900383ba9f4b85309672f2495009b3c91974322270f0eac3a1b3b1b3491
BLAKE2b-256 checksum
How to use checksums
d57d39c90e0ca834864fb1d7d99565915466dd08540995bd31ede910e39467b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 17, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page