Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shtanton/gmi2html
Translate text/gemini into HTML
https://github.com/shtanton/gmi2html
Last synced: 3 months ago
JSON representation
Translate text/gemini into HTML
- Host: GitHub
- URL: https://github.com/shtanton/gmi2html
- Owner: shtanton
- License: mit
- Created: 2021-01-04T11:34:06.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2023-09-16T17:28:31.000Z (about 1 year ago)
- Last Synced: 2024-04-22T03:52:50.178Z (7 months ago)
- Language: Zig
- Size: 42 KB
- Stars: 28
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome-gemini - gmi2html - tiny gemtext to HTML converter with a focus on performance. (Tools / Gemtext converters)
README
# gmi2html
A tiny executable that does one job well.
## Why?
Currently, it is nice to be able to serve content on gemini on the web too. Writing everything twice is a waste of time, so just write it for gemini and then translate it to HTML.
## Usage
Input is accepted from stdin and output written to stdout.
```
$ gmi2html < input.gmi > output.html
```## Building and Installing
To build
```
$ zig build
```Build options:
- `-Doptimize=ReleaseSafe` leaves safety checks so bugs lead to errors instead of undefined behaviour.
- `-Doptimize=ReleaseSmall` slightly slower but much smaller binary, especially with `-Dstrip`.
- `-Doptimize=ReleaseFast` fastest possible binary.To install, you need zig 0.11.0 (other versions might work but I haven't tested them) then run
```
$ zig build --prefix /usr install
```Use one of the build modes when installing so the debug code isn't left in.
To build and install the man pages you need `scdoc`:
```
$ scdoc < doc/gmi2html.scdoc > doc/gmi2html.1
# install doc/gmi2html.1 /usr/share/man/man1/gmi2html.1
```It is also available on the AUR as `gmi2html`.
## Contributing
See CONTRIBUTING.md.
## Licensing
gmi2html is released under the MIT license.