Skip to content
/ hop Public

bzg/hop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hop - Hush Org Parser

https://img.shields.io/badge/versioning-intver.org-blue.svg?style=for-the-badge

hop.png

Hush Org Parser — render and export Org files to md/html/org/json/edn/yaml/ics.

Built on organ, a Clojure Org parser.

Usage

hop notes.org                               # AST as JSON, contents rendered as Markdown
hop -f html notes.org                       # Export as HTML
hop -f md notes.org                         # Export as Markdown
hop -f org notes.org                        # Export as Org (unwrapped)
hop -f edn notes.org                        # AST as EDN
hop -f yaml notes.org                       # AST as YAML
hop -f ics notes.org                        # Export scheduled items as ICS

Render AST content in a different format:

hop -r html notes.org                       # AST as JSON with HTML-rendered contents
hop -r org notes.org                        # AST as JSON with Org-rendered contents

Filter:

hop -l 2 notes.org                          # Headlines with level <= 2
hop -L 2 notes.org                          # Same, deeper headings rendered as bold
hop -t "TODO" notes.org                     # Title matches regex
hop -T "Projects" notes.org                 # Ancestor title matches regex
hop -i "section[0-9]+" notes.org            # ID or CUSTOM_ID matches regex
hop -I "chapter\d+" notes.org               # Ancestor ID matches regex

Options:

hop -b https://base.io -f html index.org    # Prepend base URL to relative links
hop -c https://example.com/style.css -f html notes.org  # Use a remote CSS URL
hop -c file:///path/to/style.css -f html notes.org      # Inline a local file via file:// URL
hop -c custom.css -f html notes.org                     # Inline a local .css file
hop -c ../styles/theme.css -f html notes.org            # Inline via relative path
hop -c /home/user/theme.css -f html notes.org           # Inline via absolute path
hop -c org -f html notes.org                            # Use "org" pico-theme from CDN
hop -n notes.org                            # Preserve original line breaks
hop -s notes.org                            # Display document statistics

Check hop --help for all options.

Install

Assuming bbin is installed:

bbin install io.github.bzg/hop

Requirements

hop is a Clojure Babashka script.

brew install babashka/brew/bbin

Development

To run hop directly from the source without installing via bbin:

~$ bb -m bzg.hop -f md notes.org

This requires adding the organ dependency to bb.edn:

{:deps {org.clojars.bzg/organ {:mvn/version "1.0.0"}}}

Test

~$ bb test:generate
~$ bb test

Contributing

You can also send me an email and support my work on liberapay.

Intentional Versioning

This project uses Intentional Versioning, here are the three audiences:

  • Users : end users who use hop
  • Integrators : external packagers
  • Maintainers : maintainers to the codebase

Support the Clojure(script) ecosystem

If you like Clojure(script), please consider supporting maintainers by donating to clojuriststogether.org.

License

Copyright © 2026 Bastien Guerry

Distributed under the Eclipse Public License 2.0.

About

Hush Org Parser

Resources

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

 
 
 

Contributors