No Description

gearsix e4acca5452 noticed TODO was out of date 1 month ago
BUGS 5ba278807f massive rewrite to txt2html.c (see below): 9 months ago
Makefile b76435c83b suped up Makefile 6 months ago
README 6687c8d1a9 upates to README 6 months ago
TODO e4acca5452 noticed TODO was out of date 1 month ago
ast.txt 748a36930a minor tidy to ast 9 months ago
node.c e4acca5452 noticed TODO was out of date 1 month ago
parse.c d689bdd2d8 fixed all the issues that started from the split refactor 6 months ago
rule.c d689bdd2d8 fixed all the issues that started from the split refactor 6 months ago
test.txt 9ed4ee13f7 added PRE handling 8 months ago
test2.txt da5d0a7100 mostly tidyup - see below 9 months ago
txt2html.c d689bdd2d8 fixed all the issues that started from the split refactor 6 months ago
txt2html.h d689bdd2d8 fixed all the issues that started from the split refactor 6 months ago

README


txt2html is a tool for converting text files to HTML.
Written as a exercise in writing a simple syntax parser.

The goal is to be simple and not to create set of syntax rules for
another markup language - just to take conventions commonly found in
.txt files and convert them to HTML.
Which has just resulted in a subset of Markdown anyway.

If you're looking for a good tool that does the same job, I'd recommend cmark (https://github.com/commonmark/cmark).

**Remotes:**

- [git.gearsix.net/txt2html](https://git.gearsix.net/txt2html),
- [notabug.org/gearsix/txt2html](https://notabug.org/gearsix/txt2html),
- [gitlab.com/gearsix/txt2html](https://gitlab.com/gearsix/txt2html)


usage
-----

usage: txt2html [OPTIONS] FILE...

Convert content in txt files to html.

FILE... A list of 1 filepaths that point to files to be converted to HTML

OPTIONS
-br Treat newlines within paragraphs as line breaks.
-v Print verbose logs during runtime
-h, --help Print this message

syntax
------

The following rules from Markdown are followed:

- Paragraphs
- Heading 1
- Heading 2
- Ordered lists
- Unordered lists (using `*` and `-`)
- Pre blocks (only indented blocks)

building
--------

Building the tool is easy, just run `make`, or `make debug` debug to include debug symbols.

Doing it manually is easy too, there are no external dependencies, here's an example using GCC:
`gcc -o txt2html *.c`

authors
-------

- gearsix