No description
Find a file
2021-10-27 05:58:04 -04:00
docs Removed duplicated docs 2021-10-21 07:02:59 -04:00
example updated example/page.nim 2021-10-21 07:15:44 -04:00
src Version 0.3.1 2021-10-27 05:58:04 -04:00
.gitattributes added .gitattributes 2021-10-21 07:12:58 -04:00
.gitignore Version 0.1.0 2021-10-19 18:14:45 -04:00
changelog.md Version 0.3.1 2021-10-27 05:58:04 -04:00
config.nims Version 0.1.0 2021-10-19 18:14:45 -04:00
license Version 0.1.0 2021-10-19 18:14:45 -04:00
readme.md Added todo 2021-10-25 07:05:02 -04:00
tokarax.nimble Version 0.3.1 2021-10-27 05:58:04 -04:00

tokarax

Converts HTML to Karax representation

Usage

Lib

import pkg/tokarax
echo toKarax parseHtml """
<h1 id="title">Hello world</h1>
<button class="btn btn-danger">Click me</button>
<!-- I am a comment -->
<!-- ]#
Multiline
comment
#[ -->
"""

CLI

Example

$ tokarax -i index.html -o main.nim

Help

$ tokarax --help
Usage:
  main [required&optional-params]
Converts HTML to Karax representation
Options:
  -h, --help                        print this cligen-erated help
  --help-syntax                     advanced: prepend,plurals,..
  -i=, --input=   string  REQUIRED  Set input
  -o=, --output=  string  ""        Set output; Leave it blank to print in stdout
  -j, --justBody  bool    true      Use this to parse all tags (not just `body`)

TODO

  • Add tests
  • Create an vscode extension with this

License

GPL-3