Skip to main content

Extract URLs from markdown files and fetch their content into a consolidated document

Project description

Link Weaver 🕸️

Extract URLs from markdown files and fetch their content into a consolidated document. Useful for feeding your notes to LLMs!

✨ Features

  • 📝 Markdown URL Extraction: Automatically finds all URLs in your markdown documents
  • 🌐 Multi-format Support: Handles web pages, PDFs, YouTube videos, and more thanks to MarkItDown
  • 📋 Consolidated Output: Creates a single document with your notes + all external content
  • 🏷️ Clear Separation: Uses XML-style tags to distinguish between original notes and fetched content
  • 💻 CLI Interface: Simple command-line interface for easy integration into workflows

📦 Installation

pip install linkweaver

🚀 Quick Start

# Process a single markdown file
lw my-notes.md

# Process with custom output
lw my-notes.md --output consolidated-notes.md

# Process multiple files
lw notes/*.md --output research-compilation.md

🔧 CLI API

Basic Usage

$ lw --help
usage: lw [-h] [--output OUTPUT] input_files [input_files ...]

Extract URLs from markdown files and fetch their content into a consolidated document

positional arguments:
  input_files          One or more markdown files to process

options:
  -h, --help           show this help message and exit
  --output, -o OUTPUT  Output file path (default: stdout)

📄 Output Format

The output includes your original markdown content with fetched URL content clearly marked:

<main-note source="my-notes.md">
# Your Original Note Title

Your original markdown content here with [links](https://example.com).
</main-note>
<url-content source="https://example.com" title="Example Page">
# Example Page Content

The markdown-converted content from the URL appears here...
</url-content>
<url-content source="https://another-link.com" title="Another Page">
# Another Page Content

More fetched content...
</url-content>

📜 License

MIT License - see LICENSE for details.

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

linkweaver-0.1.0.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

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

linkweaver-0.1.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file linkweaver-0.1.0.tar.gz.

File metadata

  • Download URL: linkweaver-0.1.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.9

File hashes

Hashes for linkweaver-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9a80f656e939230de16e9216674f48ce2c5c96743f52f6a3a362189792d6f26a
MD5 63a10ee3437dd53a536603b5c77e6e75
BLAKE2b-256 fbd1bad549d58fe2a0f6cc9333258969eb4078fa06ef40a965c340f6ac249a61

See more details on using hashes here.

File details

Details for the file linkweaver-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for linkweaver-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 724faf8b59d79558f7a12dfcb9b87e8847c79fb144840c61f4881970c44b1e1e
MD5 c82a0f635b5fcf2747ad4ed8607accd7
BLAKE2b-256 156e11b1fa43c4c5f844aedc69715cd5e0354ec1765a8dc22e24c4ac3cc4e1f3

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