Skip to content

Self-contained markdown compiler generating self-contained HTML documents

License

Notifications You must be signed in to change notification settings

h3rald/hastyscribe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

a4799ca · Oct 9, 2016
Jun 24, 2016
Oct 9, 2016
Jun 11, 2016
Aug 7, 2014
Jun 11, 2016
Oct 9, 2016
Jun 11, 2016
Jun 11, 2016
Oct 9, 2016
Jun 11, 2016
Oct 9, 2016
Jun 11, 2016
Jun 11, 2016

Repository files navigation

Nimble

Release License Build Status

HastyScribe

HastyScribe is a simple command-line program able to convert markdown files into HTML files.

Usage

hastyscribe filename-or-glob-expression [ <options> ]

Where:

  • filename-or-glob-expression is a valid file or glob expression that will be compiled into HTML.
  • The following options are supported:
    • --field/<field>=<value> causes {{hs}} to set a custom field to a specific value.
    • --notoc causes {{hs}} to output HTML documents without automatically generating a Table of Contents at the start.
    • --user-css=<file> causes {{hs}} inserts the contents of the specified local file as a CSS stylesheet.
    • --output-file=<file> causes {{hs}} to write output to a local file (Use --output-file=- to output to standard output).
    • --watermark=<file> causes {{hs}} to embed and display an image as a watermark throughout the document.

FAQs

Why is HastyScribe different from other markdown converters?

Because:

  • It is a cross-platform, self-contained executable file
  • It comes with its own stylesheet, which is automatically embedded into every HTML document, along with all the needed web fonts
  • It is built on top of Discount, which means that besides standard markdown you also get:
    • strikethrough
    • automatic Table of Contents generation
    • SmartyPants substitutions
    • paragraph centering
    • image sizes
    • definition lists
    • alphabetic lists
    • pseudo-protocols to generate span tags with arbitrary CSS classes, abbr tags, and anchors
    • class blocks
    • tables
    • fenced code blocks
    • Pandoc-style document headers
  • It automatically embeds any referenced image via data URI
  • It has supports for text snippets

What can I use it for?

HastyScribe is best suited to produce self-contained documents such as essays, meeting notes, project status documents, and articles.

What language is HastyScribe implemented in?

HastyScribe is implemented in Nim, a very expressive language that compiles to C and is able to generate small, standalone and self-contained executable files.

How do I build HastyScribe from source?

First of all you need a libmarkdown.a static library. You can either grab one precompiled (for Windows or Mac OS X) from the vendor folder of the HastyScribe repository or build your own.

If you choose to build your own:

  1. Clone the discount repository.

  2. In the directory containing the Discount source code, run the following commands:

    ./configure.sh --with-tabstops=2 --with-dl=both --with-id-anchor --with-github-tags --with-fenced-code --enable-all-features
    
    make
    

Tip: If you are on Windows, you can compile Discount using MinGW-w64.

Once you have a libmarkdown.a static library for your platform:

  1. Download and install Nim.
  2. Clone the HastyScribe repository.
  3. Put your libmarkdown.a file in the vendor directory.
  4. Run nim c hastyscribe.nim

About

Self-contained markdown compiler generating self-contained HTML documents

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published