txt2html

Converts plaintext to HTML
git clone git://src.gearsix.net/txt2html
Log | Files | Refs | Atom | README

README (1457B)


      1 
      2 txt2html is a tool for converting text files to HTML.
      3 Written as a exercise in writing a simple syntax parser.
      4 
      5 The goal is to be simple and not to create set of syntax rules for
      6 another markup language - just to take conventions commonly found in
      7 .txt files and convert them to HTML.
      8 Which has just resulted in a subset of Markdown anyway.
      9 
     10 If you're looking for a good tool that does the same job, I'd recommend cmark (https://github.com/commonmark/cmark).
     11 
     12 **Remotes:**
     13 
     14 - [git.gearsix.net/txt2html](https://git.gearsix.net/txt2html),
     15 - [notabug.org/gearsix/txt2html](https://notabug.org/gearsix/txt2html),
     16 - [gitlab.com/gearsix/txt2html](https://gitlab.com/gearsix/txt2html)
     17 
     18 
     19 usage
     20 -----
     21 
     22 	usage: txt2html [OPTIONS] FILE...
     23 
     24 	Convert content in txt files to html.
     25 
     26 	FILE...   A list of 1 filepaths that point to files to be converted to HTML
     27 
     28 	OPTIONS
     29 	-br           Treat newlines within paragraphs as line breaks.
     30 	-v            Print verbose logs during runtime
     31 	-h, --help    Print this message
     32 
     33 syntax
     34 ------
     35 
     36 The following rules from Markdown are followed:
     37 
     38 - Paragraphs
     39 - Heading 1
     40 - Heading 2
     41 - Ordered lists
     42 - Unordered lists (using `*` and `-`)
     43 - Pre blocks (only indented blocks)
     44 
     45 building
     46 --------
     47 
     48 Building the tool is easy, just run `make`, or `make debug` debug to include debug symbols.
     49 
     50 Doing it manually is easy too, there are no external dependencies, here's an example using GCC:
     51 `gcc -o txt2html *.c`
     52 
     53 authors
     54 -------
     55 
     56 - gearsix
     57