From 7b6e641ce4267249c3948e732012b89d15d999ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josip=20Ti=C5=A1ljar=20Matau=C5=A1i=C4=87?= Date: Thu, 21 May 2026 17:46:52 +0200 Subject: [PATCH] [feat] Insertion of Gopher specific content and ommition of web-only content --- README.md | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ main.go | 34 +++++++++++++++++++++--- 2 files changed, 107 insertions(+), 4 deletions(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..f710751 --- /dev/null +++ b/README.md @@ -0,0 +1,77 @@ + +### Compiling + +This program compiles like any other ordinary Go project, simply **run** `go build .` in the project directory. + +### Usage +```shell +gemtext2gophermap input.gmi output_gophermap [max line length (default 70)] [preprocessor insertion map file] +``` + +## Example + +### Input Gemtext +_input.gmi_ +````gemtext +Everything until the first in the map file will be put in place of the insert-gopher tag. + +```html + +``` + +The following +``` + +```html + +``` + +> Here, the contents after the first break in the map file will be put + +```html + +``` +```` + +### A map file +_map.txt_ +```gophermap + + +iIf your Gopher server supports running PHP it should have printed the current date. /FAKE NULL 0 +``` + +### Command +```shell +gemtext2gophermap input.gmi - 70 map.txt +``` +If `-` is passed instead of `input/output` file name `stdin/stdout` will be used. Reading the **map file from stdin** is **not supported**. + +### Output +```gophermap +iEverything until the first in the map file will be put in /FAKE NULL 0 +iplace of the insert-gopher tag. /FAKE NULL 0 + + + +iThe following