Added gmi2txt.sh tool
This commit is contained in:
@@ -104,3 +104,32 @@ iSee ya! ;
|
||||
```
|
||||
|
||||
Note that this tool hasn't been tested for all possible edge cases yet, so I recommend to always verify the generated maps yourself. But it definitely makes their creation a lot easier than doing it by hand.
|
||||
|
||||
## `gmi2txt.sh`
|
||||
|
||||
This tool converts Gemtexts into CRLF-terminated and preformatted plaintext files ready to be served on Gopher. It has the same parameters as `gmi2map.sh` sans the placeholder character. Link lines are converted to the "[description]: [url]" format and, unlike `gmi2map.sh`, also are subject to reflows like everything else.
|
||||
|
||||
Example - imagine we have this rudimentary Gemtext document in the `example.gmi` file:
|
||||
```
|
||||
I write short Gemtext here.
|
||||
|
||||
I write a bit longer Gemtext here to showcase reflow capabilities of Bopher Tools' gmi2txt.sh script, because it really is cool.
|
||||
|
||||
=> gopher://happynetbox.com:79/1luxferre Visit my Gopher homepage
|
||||
=> https://chronovir.us Or read my blog on Web
|
||||
|
||||
See ya!
|
||||
```
|
||||
|
||||
When running `cat example.gmi | bash gmi2txt.sh 67 5`, this file translates to the following plaintext:
|
||||
```
|
||||
I write short Gemtext here.
|
||||
|
||||
I write a bit longer Gemtext here to showcase reflow capabilities
|
||||
of Bopher Tools' gmi2txt.sh script, because it really is cool.
|
||||
|
||||
Visit my Gopher homepage: gopher://happynetbox.com:79/1luxferre
|
||||
Or read my blog on Web: https://chronovir.us
|
||||
|
||||
See ya!
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user