Evaluate the code written in your documents with Pandoc and Lua
Go to file
perro tuerto 328cca695b Tests changed 2023-03-14 14:40:43 -07:00
dist From reader to filter... again 2023-03-11 12:14:24 -08:00
man Repo ordering 2023-03-08 19:05:42 -08:00
opt From filter to reader... again 2023-03-09 18:13:01 -08:00
scripts From reader to filter... again 2023-03-11 12:14:24 -08:00
src From reader to filter... again 2023-03-11 12:14:24 -08:00
tests Tests changed 2023-03-14 14:40:43 -07:00
LICENSE.txt Repo ordering 2023-03-08 19:05:42 -08:00
README.md From reader to filter... again 2023-03-11 12:14:24 -08:00

README.md

Literate Pandoc

Literate Pandoc is a Pandoc filter written in Lua for literate and natural programming (LiNP or just Linp), i.e.: "Programming [...] as the process of creating works of literature".

Requirements

Install

  1. Go to Releases.
  2. Download the latest version of linp.lua.
  3. Done!

Usage

With linp.lua downloaded and Pandoc installed, do:

pandoc -L PATH/TO/linp.lua -t FORMAT DOC

For example, if DOC is source.md and the output FORMAT is HTML, do:

pandoc -L PATH/TO/linp.lua -t html source.md

Manual

Learn how to do LiNP here.

Test

Clone this repo:

git clone https://git.cuates.net/perro/literate-pandoc.git

Enter the repo:

cd literate-pandoc

Inside, do:

sh scripts/test.sh FORMAT1 FORMAT2

For example, if FORMAT1 is Markdwon and FORMAT2 is HTML, do:

sh tests/test.sh markdown html

For distribution tests, do:

sh scripts/test.sh FORMAT1 FORMAT2

Acknowledgments

This wouldn't be possible without these projects and their collaborators:

  • Pandoc: universal document converter and parser; handles the requirements for LiNP.
  • Lua: programming language; enables LiNP.
  • Fennel: Lisp dialect with full Lua compatibility; allows to go from LiNP to Lisp or Lua.

License

Literate Pandoc is under GPLv3.

Happy hacking :)