Compile using any C compiler. Then input html using stdin.
gcc shiny.c
cat html_file.html | ./a.out > output.gmi
At this point, the program assumes a few things:
- You will not nest tags on the same line.
- You will start anchor tag attributes with the href attribute:
<a href=""..... > </a> <---- Correct <a class="" href=""..... > </a> <---- Correct
- One type of tag on one line, if possible.
- Try to keep
tags on seperate lines. - Try to avoid tags inline if possible.
- You will enter html without meta data. It might work with it, but try to input only the stuff that you want to convert and nothing else.