Skip to main content

Literate Programming Tool

Project description

Project HOME





It’s very simple, art-of-concept literate programming (LP) tool. Main idea is too avoid processing document (LP source) format, so input document format is supported by it’s traditional external tool. So it’s possible to have favourite workflow: WYSIWYG editing/text processing/converting with you favourite tool/suite (OpenOffice/Markdown tool/TeX/etc.).

General workflow schemes are:

                       |            ||
                       | LP Library ||
                       |            |'
     local/WEB:        +------------+
 ------->>---------         /
|                  |      use
|                  v      /
|          some format with  --> 1. extract sources...
^             LP commands    --> 2. cross-references
^                  |         --> 3. use as library
|                  v
|                  |


  |            ||
  | LP Library ||
  |            |'
      /            READY TO PUBLISH  --> 1. online documentation
'some-lp.html' -->      ON WEB       --> 2. extract sources...
      \                              --> 3. cross-references
       \                             --> 4. use as library
             + embeeded Javascript configuration
             + linked 'nanolp-pub.js'
             + linked 'nanolp-pub.css'

So, this kind of LP tool knows about LP input format only how to extract LP commands and code chunks - tangle, weaving is not needed, input format is ready for printing, publishing, reading, etc.

At the moment, supported input formats are:

  • Markdown/MultiMarkdown
  • OpenOffice/LibreOffice
  • Creole
  • reStructuredText
  • TeX/LaTeX
  • Txt2Tags
  • Asciidoc
  • … and any compatible

Main features

  • definition of command (macros) with placeholders in the body (code chunk)
  • variables dictionaries (for substitution of placeholders)
  • pasting command code chunk with substitution of placeholders
  • definition of multiple parts code-chunks (for wrapping, etc.)
  • joining, ‘ending’, etc. several code chunks
  • ‘globbing’ commands when paste
  • including one file to another (library)
  • custom event handlers (filters in chain/pipe manner)
  • supporting URLs in file names (read via HTTP)
  • prepare of HTML files (with LP commands) for Web publishing
  • generating cross-references file
  • auto-detecting of cycles
  • configurable via simple .INI like file
  • works with Python 2.7 - Python 3+
  • works with Unicode (UTF8)
  • extendible


Install Python (2.7 or 3+) first, then run:

$ python install

Then run:

$ -h


$ python path-to-scripts/ -h

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for nanolp, version 1.0i
Filename, size File type Python version Upload date Hashes
Filename, size (188.1 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page