README 1.4 KB

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