2023-03-18 18:49:43 +00:00
|
|
|
# gmisite2html
|
2023-03-05 18:57:50 +00:00
|
|
|
|
2023-03-05 19:01:59 +00:00
|
|
|
A small perl script to convert a gemini site to html to show it as a
|
|
|
|
replacement when someone visits the site with http instead of gemini.
|
|
|
|
|
|
|
|
This is currently relying on both gemtext2md and pandoc. The first is
|
|
|
|
available from https://github.com/mk270/gemtext2md and requires ocaml,
|
2023-03-05 19:04:48 +00:00
|
|
|
the second is available from https://pandoc.org and requires Haskell
|
|
|
|
(though when the program is installed as a system package it like does
|
|
|
|
not have any runtime requirements)
|
2023-03-05 19:01:59 +00:00
|
|
|
|
|
|
|
The script takes the source dir and the target dir as arguments,
|
|
|
|
e.g. I run it as
|
2023-03-05 19:04:48 +00:00
|
|
|
````
|
|
|
|
perl gemini2html.pl ~/gemini-site target
|
|
|
|
````
|
2023-03-05 19:01:59 +00:00
|
|
|
|
|
|
|
The script converts gmi files to html and puts a redirect file into
|
|
|
|
place to preserve the .gmi links, all other files are copied as is.
|
|
|
|
|
|
|
|
The files header.md and template.html can be edited to change the
|
2023-03-05 19:04:48 +00:00
|
|
|
surrounding html, currently this lists my site as target.
|
2023-03-05 19:01:59 +00:00
|
|
|
|
|
|
|
The script likely does not handle all cases correctly, it works for my
|
2023-03-05 19:04:48 +00:00
|
|
|
site at http://gemini.lehmann.cx/ reasonabaly ok (but the site has
|
|
|
|
only a few files)
|
2023-03-05 19:01:59 +00:00
|
|
|
|
|
|
|
I should say that the stylesheet comes from rawtext.club, my design
|
|
|
|
capabilities are non-existent, that is why I like markdown and similar
|
|
|
|
tools.
|
|
|
|
|
2023-03-18 18:49:43 +00:00
|
|
|
https://https://tildegit.org/alexlehm/gmisite2html
|
2023-03-05 19:01:59 +00:00
|
|
|
|
|
|
|
alexlehm@gmail.com
|
|
|
|
|