computable-pandoc/README.md

99 lines
2.6 KiB
Markdown
Raw Permalink Normal View History

2023-03-16 09:52:04 -06:00
# 👾 Computable Pandoc
2023-02-16 19:19:47 -06:00
2023-03-16 09:52:04 -06:00
Computable Pandoc is a [Pandoc filter] written in [Lua] for [literate] and
[natural] programming (LIN programming), i.e.: "[Programming \[...\] as the
2023-03-11 14:14:24 -06:00
process of creating works of literature][1]".
2023-02-16 19:19:47 -06:00
2023-03-08 21:05:42 -06:00
## Requirements
- [Pandoc] v3
2023-03-08 21:05:42 -06:00
if you decide to use `lin.min.lua` instead of `lin.bundle.lua`, you need to
install and preload the following rocks:
- [fennel]
- [lua-dog]
2023-03-08 21:05:42 -06:00
## Install
2023-03-09 15:52:03 -06:00
1. Go to [Releases].
2. Download the latest version of `lin.bundle.lua` or `lin.min.lua`.
2023-03-09 15:52:03 -06:00
3. Done!
2023-02-17 13:38:38 -06:00
2023-02-16 19:19:47 -06:00
## Usage
With `lin.bundle.lua` or `lin.min.lua` downloaded and Pandoc installed, do:
2023-02-16 19:19:47 -06:00
pandoc -L PATH/TO/lin.bundle.lua -t FORMAT DOC
2023-02-16 19:19:47 -06:00
2023-03-08 21:05:42 -06:00
For example, if `DOC` is `source.md` and the output `FORMAT` is HTML, do:
2023-02-16 19:19:47 -06:00
pandoc -L PATH/TO/lin.bundle.lua -t html source.md
2023-02-16 19:19:47 -06:00
2023-03-08 21:05:42 -06:00
## Manual
2023-02-16 19:19:47 -06:00
2023-03-16 09:52:04 -06:00
Learn how to do LIN programming [here].
2023-02-16 19:19:47 -06:00
2023-03-15 16:12:48 -06:00
## Develop
2023-02-16 19:19:47 -06:00
2023-03-09 15:58:14 -06:00
Clone this repo:
2023-03-16 09:52:04 -06:00
git clone https://git.cuates.net/perro/computable-pandoc.git
2023-03-09 15:58:14 -06:00
Enter the repo:
2023-03-16 09:52:04 -06:00
cd computable-pandoc
2023-03-09 15:58:14 -06:00
2023-03-15 16:12:48 -06:00
Inside, do the tests:
2023-03-08 21:05:42 -06:00
2023-03-22 21:08:06 -06:00
pandoc lua scripts/test.lua
2023-02-16 19:19:47 -06:00
2023-03-15 16:12:48 -06:00
For other kind of tests, do:
2023-02-17 13:38:38 -06:00
2023-03-22 21:08:06 -06:00
pandoc lua scripts/test.lua -h
For make distribution filter, do:
2023-03-22 21:08:06 -06:00
pandoc lua scripts/make_dist.lua
2023-03-22 21:08:06 -06:00
For make JSON (intented for testing asserts), do:
2023-03-22 21:08:06 -06:00
pandoc lua scripts/make_jsons.lua
For update Lua modules (needs [`luarocks`]), do:
sh scripts/get_rocks.sh
2023-03-08 21:05:42 -06:00
2023-03-15 16:12:48 -06:00
Contribute!
2023-03-08 21:05:42 -06:00
## Acknowledgments
2023-02-17 13:38:38 -06:00
2023-03-08 21:05:42 -06:00
This wouldn't be possible without these projects and their collaborators:
2023-02-17 13:38:38 -06:00
2023-03-08 21:05:42 -06:00
- [Pandoc][]: universal document converter and parser; handles the
2023-03-16 09:52:04 -06:00
requirements for LIN.
- [Lua][]: programming language; enables LIN.
- [Fennel][2]: [Lisp] dialect with full Lua compatibility; allows native
evals for Lisp.
2023-02-16 19:19:47 -06:00
2023-03-08 21:05:42 -06:00
## License
2023-03-16 09:52:04 -06:00
Computable Pandoc is under [GPLv3].
2023-03-08 21:05:42 -06:00
Happy hacking :)
2023-02-17 14:45:36 -06:00
2023-03-11 14:14:24 -06:00
[Pandoc filter]: https://pandoc.org/lua-filters.html
2023-02-16 19:19:47 -06:00
[Lua]: https://www.lua.org/
2023-03-08 21:05:42 -06:00
[literate]: https://en.wikipedia.org/wiki/Literate_programming
[natural]: https://en.wikipedia.org/wiki/Natural-language_programming
[1]: https://web.archive.org/web/20170605163729/http://www.desy.de/user/projects/LitProg/Philosophy.html
2023-03-10 21:09:31 -06:00
[Pandoc]: https://pandoc.org/
[fennel]: https://luarocks.org/modules/technomancy/fennel
[lua-dog]: https://luarocks.org/modules/perro/lua-dog
2023-03-16 09:52:04 -06:00
[Releases]: https://git.cuates.net/perro/computable-pandoc/releases
[here]: https://git.cuates.net/perro/computable-pandoc/src/branch/no-masters/man/README.md
[`luarocks`]: https://luarocks.org/
[2]: https://fennel-lang.org
2023-03-08 21:05:42 -06:00
[Lisp]: https://en.wikipedia.org/wiki/Lisp_(programming_language)
2023-03-16 09:52:04 -06:00
[GPLv3]: https://git.cuates.net/perro/computable-pandoc/src/branch/no-masters/LICENSE.txt