Skip to main content

A CLI tool to execute commands inside Markdown files

Project description

Maked: A Command-Line Tool to Automate Markdown Processing

Makedown is a simple yet powerful command-line tool that automates the execution of shell commands embedded within Markdown files. By reading the YAML front matter, Makedown extracts and runs commands, making it perfect for use cases like automating document generation or code execution from Markdown.

Features

  • Command Extraction: Extracts shell commands from the YAML front matter in Markdown files.
  • Flexible Input: Supports both file-based input and stdin for seamless integration into any workflow.
  • Automation: Automatically executes the command defined in the YAML front matter (e.g., pandoc for converting Markdown to PDF).
  • Easy Setup: Installable via pip and can be run locally or as part of any CI/CD pipeline.

Installation

Makedown can be easily installed using Poetry, Python’s dependency management tool.

Install via Poetry

poetry add maked

Alternatively, you can install it globally using pip:

pip install maked

Usage

Once installed, you can use Makedown directly from the command line.

Run with a File

maked example.md

Run with Stdin

You can also pipe content to Makedown:

echo -e "---\nmaked: 'pandoc example.md -o output.pdf'\n---\nSome content here" | maked

What It Does

The script looks for the maked field in the YAML front matter of a Markdown file or stdin. It executes the corresponding shell command (e.g., pandoc, make, etc.). If the front matter is missing or incorrectly formatted, Makedown gracefully handles errors and displays relevant messages.

Why Makedown?

  • Simplicity: Easily integrate Markdown document processing into your workflow.
  • Versatility: Use with any shell command, from documentation generation to running scripts.
  • Automation: Automate your Markdown file processing, reducing manual effort.

Example Markdown with YAML Front Matter

---
maked: 'pandoc example.md -o example.pdf'
---

# Example Markdown File

This is an example of a Markdown file with a YAML front matter that includes a `maked` field to execute a shell command.

Contributing

We welcome contributions to make Makedown even better! Feel free to fork the repository, open issues, or submit pull requests.

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

maked-0.1.0.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

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

maked-0.1.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file maked-0.1.0.tar.gz.

File metadata

  • Download URL: maked-0.1.0.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.13.2 Darwin/24.3.0

File hashes

Hashes for maked-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fcefb1e596b1f86595c80e99bb58af07ad550c8f0a77b32c1b187d078c255bca
MD5 99fa1bc9b06e3803f7e7537428c2af21
BLAKE2b-256 35dcf4e8977e730e36b510ff6f102b126263fdf2aa6eaf52bba836b89bebd941

See more details on using hashes here.

File details

Details for the file maked-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: maked-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.13.2 Darwin/24.3.0

File hashes

Hashes for maked-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5f2ff29278708d66ec5a6d964665e64edbe5113ccd8ab7c03ca98ef333d6ce20
MD5 ecee8053021974a3d014ac0bc1e21e84
BLAKE2b-256 c2ee46c3f946f917b99b4fa0c1df9ab7db7610126384f575a23ddbc764c5b6b4

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