• Stars
    star
    188
  • Rank 199,067 (Top 5 %)
  • Language
    Nim
  • License
    MIT License
  • Created over 10 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Self-contained markdown compiler generating self-contained HTML documents

Nimble

release license

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 HastyScribe to set a custom field to a specific value.
    • --notoc causes HastyScribe to output HTML documents without automatically generating a Table of Contents at the start.
    • --user-css=<file> causes HastyScribe to insert the contents of the specified local file as a CSS stylesheet.
    • --user-js=<file> causes HastyScribe to insert the contents of the specified local file as a Javascript script.
    • --output-file=<file> causes HastyScribe to write output to a local file (Use --output-file=- to output to standard output).
    • --watermark=<file> causes HastyScribe to embed and display an image as a watermark throughout the document.
    • --fragment causes HastyScribe to output just an HTML fragment instead of a full document, without embedding any image, font or stylesheet.
    • --dump=all|styles|fonts causes HastyScribe to dump all resources/stylesheets/fonts to the current directory.
    • --help causes HastyScribe to display the usage information and quit.

FAQs

Why is HastyScribe different from other markdown converters?

Because:

  • It is a cross-platform, self-contained executable file.
  • It can generate standalone HTML files.
  • 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 as data URI.
  • It has supports for text snippets, custom fields, and substitution macros.

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?

  1. Download and install Nim.
  2. Download and build Nifty, and put it somewhere in your $PATH.
  3. Clone the HastyScribe repository.
  4. Navigate to the HastyScribe repository local folder.
  5. Run nifty install to download HastyScribe's dependencies.
  • Note: Some users may need to install libmarkdown2-dev
  1. Run nifty build discount to build the Discount markdown library.
  2. Run nim c -d:release hastyscribe.nim.

Quick Installation

nimble install nifty
&& sudo apt install libmarkdown2-dev
&& nimble install hastyscribe

If you are using another operating system without apt you can install libmarkdown2 here

More Repositories

1

min

A small but practical concatenative programming language and shell
Nim
296
star
2

litestore

A lightweight, self-contained, RESTful, searchable, multi-format NoSQL document store.
Nim
200
star
3

nimhttpd

A tiny static file web server written in Nim
Nim
80
star
4

glyph

A Ruby-powered Rapid Document Authoring Framework
Ruby
76
star
5

hastysite

A small but powerful static site generator
CSS
65
star
6

h3

A tiny, extremely minimalist JavaScript microframework.
JavaScript
57
star
7

nifty

A decentralised (pseudo) package manager and script runner
Nim
43
star
8

h3rald

H3RALD Web Site
HTML
38
star
9

rawline

RawLine is a 100% Ruby library able to provide some of the functionality offered by ReadLine, plus additional features such as a more intuitive way to bind characters to specific keys or key sequences.
Ruby
35
star
10

ruby-compendium

An Essential Guide to the Ruby Ecosystem
CSS
21
star
11

minline

A line editing library in pure Nim.
Nim
18
star
12

mn

A truly minimal concatenative programming language
Nim
18
star
13

concatenative

A Ruby DSL for concatenative programming
Ruby
14
star
14

nim-miniz

Nim wrapper for the miniz library.
C
10
star
15

litepad

A simple notepad written in H3
JavaScript
9
star
16

pls

A polite but determined task runner
Nim
5
star
17

fae

Find and Replace Utility
Nim
4
star
18

nimtools

A collection of tiny commands and tools implemented using the Nimrod programming language.
Nim
4
star
19

redbook

Multi-purpose personal logging system written in Ruby
Ruby
3
star
20

vscode-min-lang

A Visual Studio Code extension to support the min programming language.
2
star
21

hastystyles

Less
1
star