A minimalistic make for pandoc
Project description
pandocmk: a minmalist make tool for Pandoc
Writers of complex Pandoc documents often run into three issues:
- Very long command-line options that they need to remember (or copy-paste) all the time
- Need for extensibility, which can be mostly solved via filters (at the cost of #1)
- Pre/post processing tools, which can be solved via more complex one-liners (
pandoc ... && SumatraPDF output.pdf && ...)
The goal of pandocmk is to simplify using Pandoc, by helping with #1 and a little bit with #3 (#2 is covered by e.g. panflute). It uses information from the YAML metadata field to build the command-line arguments, and also has extra arguments for extras I find useful (such as monitoring a file and auto-building as needed, auto-viewing in a PDF viewer, etc.).
Existing tools
There are several good existing tools:
pandocomatic(Ruby)panrun(Ruby; powers panwriter)rmarkdown(R; powers bookdown and RStudio)panzer(Python; inactive)
However, they don't completely fill my needs, which leads to this package.
Usage
pandocmk has a few custom command-line options. Everything else is forwarded to Pandoc (and overrides whatever is set in the YAML metadata). Thus, in practice this is just a Pandoc wrapper with a few extras.
pandocmk [OPTIONS] [FILES]
--view open output file in a viewer such as SumatraPDF for .pdf
--watch monitor the input files for changes, and rebuild as needed
--tex save .tex output besides .pdf
--timeit show build time
--verbose show debugging information
--draft NOT IMPLEMENTED.
When building a Latex PDF, choose faster options (pdflatex, etc)
Note: other options are passed to Pandoc
Installation
To install pandocmk, open the command line and type:
pip install pandocmk
Note: pandocmk requires Python 3.7 or higher.
Uninstall
pip uninstall pandocmk
Dev Install
After cloning the repo and opening the pandocmk folder:
python setup.py install: install the package locally
python setup.py develop: install locally with a symlink so changes are automatically updated
Dev Update PyPI:
python setup.py sdist bdist_wheel
python -m twine upload dist/*
(Ensure README.md has unix line endings)
Roadmap
-
v0.1: use thepandocmetadata to build the CLI arguments -
v0.2: add support for the--viewand--watchoptions -
v0.3: tweaks based on what we learned so far -
v0.4: add support for styles (should we name them output, defaults, etc.?)
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
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 pandocmk-0.2.1.tar.gz.
File metadata
- Download URL: pandocmk-0.2.1.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08080f019c6b84bea878619040f1d71e6b21a505ed6a3307d5c2f81b586c219c
|
|
| MD5 |
d92a89670a13afca2797d36f5895db1a
|
|
| BLAKE2b-256 |
6905cdf34fc0f51ac6e6fd123481faa2b28d2ec28dc1f579039703cefa73dae9
|
File details
Details for the file pandocmk-0.2.1-py3-none-any.whl.
File metadata
- Download URL: pandocmk-0.2.1-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee3b307594769ccc18e271706789ddd5fa79c2c7b146450f82558dd68847a5a8
|
|
| MD5 |
9bbdb8985c207c1a6ad0114495fce7ec
|
|
| BLAKE2b-256 |
1f8d30b5f1f33a2ac6c5f9fcf5874a0984e745db4c0b5d0035fce831983539f8
|