Metadata-Version: 2.4
Name: litpd
Version: 0.3.1b0
Summary: Literate programming tools for Pandoc Markdown
Author-email: Abhishek Mishra <abhishekmishra3@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/abhishekmishra/litpd
Project-URL: Documentation, https://abhishekmishra.github.io/litpd/
Project-URL: Repository, https://github.com/abhishekmishra/litpd
Project-URL: Issues, https://github.com/abhishekmishra/litpd/issues
Keywords: literate-programming,markdown,pandoc
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development :: Build Tools
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

<!-- vim: set tw=80: -->

# litpd

Tools for literate programming using pandoc's markdown format.

* Write a program and its design/description in one markdown document.
* Generate a printable/publishable document from the markdown document.
* Generate one or more programs from the markdown document which can be used to
  run the program.

This program is written as a "literate program" in markdown. See
[litpd.md](litpd.md).

# Getting Started

**litpd** is a command-line application to be used in your own build or document
generation process. Install it with [pipx](https://pipx.pypa.io/):

```bash
pipx install litpd
```

Pandoc is still required and must be available on `PATH`.

See the [Getting Started](https://abhishekmishra.github.io/litpd/#getting-started) page.

## Build

**Pre-requisites for build:**

1. Python 3.8 or newer in path.
2. GNU Make in path.
3. Pandoc in path.

In the directory containing the **litpd** source, run the following command:

```bash
$ make clean all
```

This will create a **build** directory and generate all the build artifacts in
this directory. Run `make dist` to create a release archive in **dist**, or
`make package` to build the PyPI wheel and source distribution (requires the
[`build`](https://pypa-build.readthedocs.io/) package).

## Example

If the markdown program is a simple hello world like this one...

**hello.md**

*notice the options to the code block inside curly braces.*

<pre>
# Hello World!

This is a simple hello world program in lua.

```lua { code_file = "hello.lua" }
print('hello')
```
</pre>

If we run the following litpd command...

```powershell
litpd hello.md
```

Two files will be generated in the current folder:

1. **program.html** - the markdown document converted to html by pandoc.
2. **hello.lua** - the program with the source code in the code block.
