Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xiaq/poorweb
A poor man's literate programming tool
https://github.com/xiaq/poorweb
Last synced: 21 days ago
JSON representation
A poor man's literate programming tool
- Host: GitHub
- URL: https://github.com/xiaq/poorweb
- Owner: xiaq
- Created: 2014-10-21T20:54:47.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-10-21T20:54:55.000Z (about 10 years ago)
- Last Synced: 2024-12-02T08:56:43.065Z (23 days ago)
- Language: Python
- Size: 97.7 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# A poor man's literate programming tool
Write your documentation and code in one file. Usage:
poorweb.py
# How it works
poorweb looks for code chunks enclosed by a line beginning with `>>` and a
line beginning with `<<`. It then collects those code chunks into the file
named after the starting `>>` (the name after `<<` is ignored). When no file
is named, it collects them into the default code file.# An example
Write the following in `hello.web`:
\documentclass{article}
\begin{document}
Hello world in \textsf{Python}:>>
print 'Hello world!'
<<Hello world in \textsf{PHP}:
>>hello.php
<>
print 'Hello world again!'
<<
\end{document}Run:
python twoweb.py hello.web hello.tex hello.py
`hello.php`, which is named in the source, will also be created.