Extract URLs from markdown files and convert them to individual markdown documents.
Project description
LinkWeaver 🕸️
LinkWeaver finds URLs in Markdown files and uses MarkItDown to turn the URL content into a local Markdown file.
📦 Install
Use uvx if you only want to run LinkWeaver once.
uvx linkweaver notes.md
If you use uv tools, install LinkWeaver once and run it from anywhere.
uv tool install linkweaver
You can also install the package from PyPI.
pip install linkweaver
🚀 Quick start
Process one file.
linkweaver notes.md
When you run this command, LinkWeaver creates a notes-resources/ folder next to notes.md. LinkWeaver saves one .md file in that folder for each URL.
Run it with uvx without installing anything too!
uvx linkweaver notes.md
List all unique URLs in your files.
linkweaver --list-links notes/*.md
Save all resource files to one folder.
linkweaver -o resources notes.md
Download files again even when they already exist.
linkweaver --force notes.md
Preview the work without writing files or fetching URLs.
linkweaver --dry-run notes.md
🧰 Common tasks
Preview the first 10 URLs across Markdown files.
linkweaver --list-links *.md | head -10
See which URLs LinkWeaver would fetch or skip.
linkweaver --dry-run notes.md
Preview a run that would download existing files again.
linkweaver --force --dry-run notes.md
Turn off retries.
linkweaver --retries 0 notes.md
Run with less output and 5 retries.
linkweaver --quiet --retries 5 notes.md
Process several files.
linkweaver *.md
📁 Output files
For each input file, LinkWeaver creates a resource folder. When you process notes.md, you get this folder.
notes.md
notes-resources/
├── example.com-page-title.md
├── github.com-user-repo.md
└── youtube.com-watch-v-abc123.md
Use -o DIR or --output-dir DIR to put all resource files in one folder.
In each resource file, you get:
- The file name is based on the URL.
- You can see the source URL.
- You can read the content as Markdown.
- You can see error details if the download failed.
A resource file looks like this.
# Example Page Title
**Source:** https://example.com/page/title
[Converted markdown content here...]
📜 License
MIT. See LICENSE.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file linkweaver-0.6.0.tar.gz.
File metadata
- Download URL: linkweaver-0.6.0.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d7a9a0db0ef87e9ea23b828d6c6fbdaa2373c8dbbcac1ef7d6dfadbe9f039a5
|
|
| MD5 |
0756da4325794aa100e29b14dda3450a
|
|
| BLAKE2b-256 |
9b20a3c150fa39f12255c782c57fe9c36e6f19ca6f24cbe31f13dac07935fd05
|
File details
Details for the file linkweaver-0.6.0-py3-none-any.whl.
File metadata
- Download URL: linkweaver-0.6.0-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9cd4fa4b92902b639b7122b2e3a3a84210fa8c129e8d8b385c519bd9f4db3f32
|
|
| MD5 |
b72854a02d0b48d569144b25395a0837
|
|
| BLAKE2b-256 |
4ac8094700fc2b5a9a7e9724a857621e13f2364e83a566a32730b36b64c3f116
|