mdtk (Markdown Toolkit)
Tools for working with markdown files.
Installation
pip install mdtk
Requires Python 3.10+.
Usage
Chrome bookmarks to markdown
- In Chrome, open the bookmark manager (
chrome://bookmarks), put the links you want to export into one folder, and use Export bookmarks to save an HTML file. - Convert that folder to a markdown link list:
mdtk-bookmarks bookmarks.html links.md --folder "Reading List"
$ cat links.md
- [GitHub - Where the world builds software](https://github.com)
- [Welcome to Python.org](https://python.org)
Options:
--folder NAME- the bookmark folder to extract (default:EXPORT_FOLDER)--version- print the mdtk version and exit
Behavior notes:
- Bookmarks inside nested subfolders are included, flattened in document order.
- If several folders share the same name, the first one in the file is used.
- Titles and URLs are escaped so the generated markdown links stay valid.
- If the folder is not found, the error message lists the folders the export does contain.
Python API
from mdtk import BookmarkError, convert_bookmarks
count = convert_bookmarks("bookmarks.html", "links.md", folder_name="Reading List")
print(f"exported {count} bookmarks")
convert_bookmarks returns the number of bookmarks written and raises
BookmarkError for anything that goes wrong (missing file, unknown folder,
input that is not a bookmarks export, ...).
Development
git clone https://github.com/tommcd/mdtk.git
cd mdtk
pip install -e ".[dev]"
pytest # run the tests
ruff check . # lint
ruff format --check . # formatting
tox # everything, on all supported Python versions
Links
License
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 mdtk-0.2.0.tar.gz.
File metadata
- Download URL: mdtk-0.2.0.tar.gz
- Upload date:
- Size: 10.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e635097ad24142325e96502cd29cad064cdc59c0ef73a52f8a494d2d29ae885b
|
|
| MD5 |
35d58fb76d9e5ecfbb8bacbf38a6f7fe
|
|
| BLAKE2b-256 |
96d7e0dd00aadacfa4bad026e5215d7e59e01bb25af7ffeb94346d209d317598
|
Provenance
The following attestation bundles were made for mdtk-0.2.0.tar.gz:
Publisher:
publish.yml on tommcd/mdtk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mdtk-0.2.0.tar.gz -
Subject digest:
e635097ad24142325e96502cd29cad064cdc59c0ef73a52f8a494d2d29ae885b - Sigstore transparency entry: 2203536104
- Sigstore integration time:
-
Permalink:
tommcd/mdtk@264fd6b417537ee1b9b1acc2ecc4b0ae9a667426 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/tommcd
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@264fd6b417537ee1b9b1acc2ecc4b0ae9a667426 -
Trigger Event:
release
-
Statement type:
File details
Details for the file mdtk-0.2.0-py3-none-any.whl.
File metadata
- Download URL: mdtk-0.2.0-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0575e4c1acb254a7fa8a206688eae3865a02d2e016f9e0b108d627c6c9e42c7c
|
|
| MD5 |
3857f92e06026317878c26feb736c493
|
|
| BLAKE2b-256 |
5c5ad55c168ee8a71b9fd8679ee02306fae6f1aadb0a602f3d40e2a03380782e
|
Provenance
The following attestation bundles were made for mdtk-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on tommcd/mdtk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mdtk-0.2.0-py3-none-any.whl -
Subject digest:
0575e4c1acb254a7fa8a206688eae3865a02d2e016f9e0b108d627c6c9e42c7c - Sigstore transparency entry: 2203536138
- Sigstore integration time:
-
Permalink:
tommcd/mdtk@264fd6b417537ee1b9b1acc2ecc4b0ae9a667426 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/tommcd
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@264fd6b417537ee1b9b1acc2ecc4b0ae9a667426 -
Trigger Event:
release
-
Statement type: