Skip to main content

A Python tool designed to take a list of Markdown files and merge them into a single document.

Project description

Markdown Merger (md-merge)

A command-line tool to merge multiple Markdown files into a single document.

Installation

uv pip install md-merge

CLI

You can also install it using the uv tool, and run it directly from the command line:

uv tool install md-merge
md-merge --help

Usage

# Merge specific files in order
md-merge file1.md another/file.md docs/intro.md --output combined_manual.md

# Merge all *.md files recursively from a directory (alphabetical order)
md-merge --dir path/to/markdown/docs --output full_docs.md

# Specify a different output file
md-merge file.md --output my_merged_file.md

# Enable verbose logging for debugging
mdmerge --dir my_project --verbose

# Get help
md-merge --help

Features

  • Merges specified files or all .md files in a directory.
  • Inserts a separator between files showing the source path.
  • Adds a header to the merged document with timestamp and file count.
  • Preserves YAML front matter (from the first file only).
  • Configurable output file path (default: merged.md).
  • Verbose logging option (--verbose or -v).
  • Robust error handling and validation.

Future Improvements

  • Add support for custom separators.
  • Implement a GUI for easier file selection.
  • Support for other file formats (e.g., .txt, .rst).
  • Add unit tests for better coverage.

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

md_merge-0.1.1.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

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

md_merge-0.1.1-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file md_merge-0.1.1.tar.gz.

File metadata

  • Download URL: md_merge-0.1.1.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.4.28

File hashes

Hashes for md_merge-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c55be9b283c9ff6756c60a0b257c48ad6e1f85f1430abd9a177a3dfdb6229d01
MD5 d3af5720e02d490bf84e820d91f743c1
BLAKE2b-256 030615186b1a997675cf871681da5910c6652e95614bb65e849a58980a22beef

See more details on using hashes here.

File details

Details for the file md_merge-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: md_merge-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.4.28

File hashes

Hashes for md_merge-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 811efb558bdcc132a710b355ab39fe47ee23c25c8cada392b5662460c8856c1c
MD5 b4b2d797bc0c284d6a2a2cf1659ae2e4
BLAKE2b-256 c1a35543cfd6c720b551c1badd6321ab82b28991ae3159ec25773958e62ec39d

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