A Python tool to fix broken Markdown links in files
Project description
Feathercarver
Feathercarver is a Python tool designed to fix broken Markdown links in files. It can handle various types of Markdown links, including those with titles, and can process multiple files or directories at once.
Features
- Fixes broken Markdown links split across multiple lines
- Preserves code blocks and inline code
- Handles links with titles (both single and double quotes)
- Processes multiple files or directories in a single run
- Maintains the original file structure and content outside of links
Installation
To install Feathercarver, you can use pip:
pip install feathercarver
Usage
Feathercarver supports two main subcommands: processfiles
and processdirs
.
Processing Individual Files
To process individual files, use the processfiles
subcommand:
feathercarver processfiles file1.md file2.md file3.md
This will process all the specified Markdown files, fixing any broken links it finds.
Processing Directories
To process entire directories, use the processdirs
subcommand:
feathercarver processdirs path/to/directory1 path/to/directory2
By default, this will process all .md
files in the specified directories and their subdirectories.
You can specify which file extensions to process using the --ext
option:
feathercarver processdirs path/to/directory --ext md txt
This will process both .md
and .txt
files in the specified directory although this
link checker was meant to process only markdown files.
Verbosity
You can increase the verbosity of the output using the -v
or --verbose
option:
feathercarver -v processfiles file1.md
feathercarver -vv processdirs path/to/directory
Use -v
for info-level logging, -vv
for debug-level logging, and -vvv
for the most detailed logging.
Development
To set up the development environment:
-
Clone the repository:
git clone https://github.com/gkwa/feathercarver.git cd feathercarver
-
Install dependencies:
rye sync . .venv/bin/activate
-
Run tests:
pytest
Project details
Release history Release notifications | RSS feed
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
File details
Details for the file feathercarver-0.1.26.tar.gz
.
File metadata
- Download URL: feathercarver-0.1.26.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 654eef439758043e9f1ca584f635ca25148ec77be3e3b4b73b3cc14b6402b993 |
|
MD5 | a7dd8192aecd38a51099b41d74697d03 |
|
BLAKE2b-256 | 28d14e4edf7d7778e6967cc5f4029fe018751ec79badc931d14dedde0a0f2d1a |
File details
Details for the file feathercarver-0.1.26-py3-none-any.whl
.
File metadata
- Download URL: feathercarver-0.1.26-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7aa28fa42252804554a6fda210d81ae624d97219b4ef7fe3c398f732f6d66359 |
|
MD5 | bc86b3cad7b30ed093f054879ab35427 |
|
BLAKE2b-256 | d000cceed55399609980c7bff62d9b61faf3bf0b1f48b6fea7afcc4dd71020e7 |