Convert Markdown (CommonMark) to Lorcode markup using Pandoc. Supports CommonMark with some additions:
- headers of any level are converted to
[strong]text[/strong]
; - use SO mention/notify syntax
@maxcom
to produce[user]maxcom[/user]
.
You should have Stack installed.
# Cloning the repo
git clone https://github.com/smaximov/lordown.git
cd lordown
# Setup Stack project
stack setup
# Build
stack build
# Install lorcode binary to ~/.local/bin (use --local-bin-path to specify target directory)
stack install
lordown
provides both a library and an executable.
lordown -h
:
lordown v0.1.1.0 - Markdown to Lorcode converter Reads Markdown from standard input and writes converted markup to standard output Usage: lordown Options: -h --help Show this message -v --version Display version
import Text.Pandoc.Lordown (convert)
main :: IO ()
main = interact convert