Skip to main content

mdtk (Markdown Toolkit)

Tools for working with markdown files.

PyPI version CI Documentation License: MIT

Installation

pip install mdtk

Requires Python 3.10+.

Usage

Chrome bookmarks to markdown

  1. 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.
  2. 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

MIT

Metadata

Release files for mdtk 0.2.0

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

Source distribution (sdist)

Source distribution for mdtk 0.2.0
File Size Uploaded Provenance Actions
mdtk-0.2.0.tar.gz 10.7 kB With provenance Details for mdtk-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mdtk 0.2.0
File Interpreter ABI Platform Actions
mdtk-0.2.0-py3-none-any.whl Python 3 none any Details for mdtk-0.2.0-py3-none-any.whl

Total release size: 17.8 kB

Release files / mdtk-0.2.0.tar.gz

Download URL mdtk-0.2.0.tar.gz
Size 10.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e635097ad24142325e96502cd29cad064cdc59c0ef73a52f8a494d2d29ae885b
BLAKE2b-256 checksum
How to use checksums
96d7e0dd00aadacfa4bad026e5215d7e59e01bb25af7ffeb94346d209d317598
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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 Jul 19, 2026.

Transparency log

Release files / mdtk-0.2.0-py3-none-any.whl

Download URL mdtk-0.2.0-py3-none-any.whl
Size 7.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0575e4c1acb254a7fa8a206688eae3865a02d2e016f9e0b108d627c6c9e42c7c
BLAKE2b-256 checksum
How to use checksums
5c5ad55c168ee8a71b9fd8679ee02306fae6f1aadb0a602f3d40e2a03380782e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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 Jul 19, 2026.

Transparency log

Security for mdtk 0.2.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mdtk-0.2.0.tar.gz

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 Jul 19, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

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