Skip to main content

gradientgrove

Local Python scripts for reusable Markdown, LaTeX, and publishing workflows.

Command-line help

Both scripts use argparse, so pass -h or --help to see the current usage and options:

gradientgrove-publish --help
gradientgrove-latex-to-markdown --help

After installation, setuptools exposes the console scripts shown above. When running from a source checkout instead of an installed package, use the equivalent module form and prefix commands with PYTHONPATH=src:

PYTHONPATH=src python -m gradientgrove.markdown_publish --help
PYTHONPATH=src python -m gradientgrove.markdown_ast --help

Publishing Markdown documents

gradientgrove.markdown_publish converts Markdown files into HTML, Reveal.js slides, LaTeX articles, LaTeX handouts, and Beamer slides.

Basic usage:

gradientgrove-publish [path] [options]

The optional path can be:

  • omitted: treat the current directory as a MkDocs project, merge Markdown pages from mkdocs.yml navigation, write all generated outputs in .publish_cache, and package them into one .publish_cache/mkdocs.zip file;
  • a Markdown file: convert that single file, write all generated outputs in .publish_cache beside it, and package them into one ZIP file there;
  • a directory: recursively convert every *.md file below that directory, write all generated outputs in that directory's .publish_cache, and package them into one ZIP file there.

If no output option is supplied, the script generates the base HTML document by default.

Available output options:

  • HTML output

    • --base Numbered base HTML document.
    • --handout Numbered HTML handout with answer environments omitted.
    • --revealjs Numbered Reveal.js slide deck.
    • --html All HTML outputs: base, handout, and Reveal.js.
  • LaTeX and PDF have similar options to output latex source and to compile it using with lualatex: --tex, --tex_handout , --beamer .

  • --all generates all output formats, including HTML, LaTeX article, LaTeX handout, and Beamer outputs.

  • --version VERSION, -v VERSION Add the version string to generated output filenames and ZIP names.

  • --no-mkdocs-page-zip In no-argument MkDocs mode, only include the merged MkDocs output in .publish_cache/mkdocs.zip.

  • -h, --help Show command help and exit.

Examples:

# Merge a MkDocs project from the current directory, generate every output format,
# and package generated HTML, TeX, and PDF files in .publish_cache/mkdocs.zip.
gradientgrove-publish --all

# Build and package only the merged MkDocs output.
gradientgrove-publish --no-mkdocs-page-zip


# Generate the default base HTML for a single Markdown file in .publish_cache.
gradientgrove-publish examples/testfile.md

# Generate all HTML variants for one file.
gradientgrove-publish examples/testfile.md --html

# Generate a versioned Beamer deck and TeX handout.
gradientgrove-publish examples/testfile.md --beamer --tex_handout --version week1

Generated HTML, TeX, and PDF outputs are written in .publish_cache and packaged together into one ZIP file. LaTeX outputs require lualatex on PATH if you want the compilation step to produce PDFs.

Converting LaTeX to Markdown

gradientgrove-latex-to-markdown converts a LaTeX file to Markdown using the package's LaTeX parser.

Basic usage:

gradientgrove-latex-to-markdown input.tex [output.md]

If output.md is omitted, the command writes beside the input file with a .md suffix. By default, Beamer \mode<...>{...} blocks are normalized before parsing; pass --no-dump-modes to skip that preprocessing step.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gradientgrove-0.1.4.tar.gz (43.3 kB view details)

Uploaded Source

Built Distribution

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

gradientgrove-0.1.4-py3-none-any.whl (45.1 kB view details)

Uploaded Python 3

File details

Details for the file gradientgrove-0.1.4.tar.gz.

File metadata

  • Download URL: gradientgrove-0.1.4.tar.gz
  • Upload date:
  • Size: 43.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for gradientgrove-0.1.4.tar.gz
Algorithm Hash digest
SHA256 407a86ff0ff8ae5e86775d7a80a508296fb2f854bc229297499b3bebb2748388
MD5 a6d6f4aff01ce35a347ffb776350194c
BLAKE2b-256 92b1b85e38c169a4a2837ea0c06efeb3ff55750fe7f99d197f6d38ed46faf710

See more details on using hashes here.

Provenance

The following attestation bundles were made for gradientgrove-0.1.4.tar.gz:

Publisher: publish-to-pypi.yml on stephen-flood/gradientgrove

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gradientgrove-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: gradientgrove-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 45.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for gradientgrove-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a6b822c7f22bc32fd9fe5d46f0d53634b438b4333f8c7e71a79b0eb795f65709
MD5 e81d8082a5a4f11f7ba1c5cfb646b7c7
BLAKE2b-256 bc81e193403c541e8fad52656a6e83f8276079d08539aaeffc0b5a1edd018053

See more details on using hashes here.

Provenance

The following attestation bundles were made for gradientgrove-0.1.4-py3-none-any.whl:

Publisher: publish-to-pypi.yml on stephen-flood/gradientgrove

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.6

2 files

0.1.5

2 files

This release

0.1.4 This release

2 files

0.1.3

2 files

0.0.1

2 files

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