Cli tool for converting gemini markup text (.gmi) to HTML.
Björn Wärmedal 05e2dfcf3f Inline images without alt text will not have the alt='' attribute | 3 years ago | |
---|---|---|
README.md | 3 years ago | |
gmi2html | 3 years ago |
I couldn't find a tool for converting gemini markup to html. I'm sure there are many, but my searching skills failed me.
Anyways, writing one is trivial, so I did just that. Maybe you don't have to do the same now :D
Download the file gmi2html
, make it executable (chmod +x
on linux). It only requires python3.
usage: gmi2html [-h] [--inline-img] [F [F ...]]
Convert text/gemini to text/html, print to stdout.
positional arguments:
F All files to convert. (Leave empty or '-' for stdin)
optional arguments:
-h, --help show this help message and exit
--inline-img Inline png, jpg/jpeg, gif, webp, svg links.
Both of the following examples produce the same output:
gmi2html testfile.gmi
and
cat testfile.gmi | gmi2html
Link text for inline images will be added as the alt=''
attribute in the img
tag.
It's still going to be a tiny tool, but tell me if you have ideas for improvements.
Thanks to Solène (@solene@bsd.network) for feature suggestions and bug fixes!