From c7332459b92232ac4ad254ae194d15fef8b494d1 Mon Sep 17 00:00:00 2001 From: stev Date: Mon, 27 Feb 2023 12:30:17 +0100 Subject: [PATCH] add footer feature in gmirator for gemtext files --- content/gemlog/2021-05-01_windowssucks.gmi | 5 ++ .../gemlog/2021-05-04_networking_school.gmi | 5 ++ content/gemlog/index.gmi | 9 ++- content/index.gmi | 38 ++++------- content/projects.gmi | 24 +++++++ content/tinylog.gmi | 4 ++ footer.gmi | 5 ++ gmirator.sh | 42 +++++++++---- .../gemlog/2021-05-01_windowssucks.html | 7 +++ .../gemlog/2021-05-04_networking_school.html | 7 +++ html-output/gemlog/index.html | 11 +++- html-output/index.html | 52 ++++++--------- html-output/projects.html | 45 +++++++++++++ html-output/tinylog.html | 8 ++- html-parts/footer-part.html | 7 +++ in.gmi | 63 ------------------- 16 files changed, 194 insertions(+), 138 deletions(-) create mode 100644 content/projects.gmi create mode 100644 footer.gmi create mode 100644 html-output/projects.html delete mode 100644 in.gmi diff --git a/content/gemlog/2021-05-01_windowssucks.gmi b/content/gemlog/2021-05-01_windowssucks.gmi index a2eed25..bd1438f 100644 --- a/content/gemlog/2021-05-01_windowssucks.gmi +++ b/content/gemlog/2021-05-01_windowssucks.gmi @@ -7,3 +7,8 @@ I discovered that back in 2018 I tried to prevent MS from spying on me by disabl All this was so I could play Minecraft with my SO. I had not played Minecraft in many years, Mojang had not been bought by MS last time I played. I was so angry when I learnt about the bedrock edition and that I had to buy it even though I already had the java edition (I don't intend to play the bedrock edition but the fact that you have to pay twice to have both is infuriating to me). The worst part is that by the end of the year if I want to continue playing I have to use a MS account with Minecraft instead of my Mojang account and that also pisses my off very much. Unfortunately these are not the only reasons I hate MS, they were just new reasons that added to the others. +--- +=> /index.gmi + +contact me by mail: steven.gibone at zaclys dot net +=> https://mastodon.zaclys.com/@lonion @lonion@mastodon.zaclys.com on mastodon diff --git a/content/gemlog/2021-05-04_networking_school.gmi b/content/gemlog/2021-05-04_networking_school.gmi index 8601a99..a54efe6 100644 --- a/content/gemlog/2021-05-04_networking_school.gmi +++ b/content/gemlog/2021-05-04_networking_school.gmi @@ -1,3 +1,8 @@ # I'm learning networking I'm currently learning networking stuff to become a sysadmin on my own waiting for the formation to start. I'm looking at a free Coursera course and videos on Youtube and I'm having a blast learning all this but it makes me want to buy all kind of things that would be way overkill both for my wallet and for my home network... +--- +=> /index.gmi + +contact me by mail: steven.gibone at zaclys dot net +=> https://mastodon.zaclys.com/@lonion @lonion@mastodon.zaclys.com on mastodon diff --git a/content/gemlog/index.gmi b/content/gemlog/index.gmi index 1fc3a24..a0da290 100644 --- a/content/gemlog/index.gmi +++ b/content/gemlog/index.gmi @@ -20,5 +20,10 @@ there's a list of ideas: ## logs -=> gemlog/2021-05-04_networking_school.gmi 2021-05-04 - I'm learning networking -=> gemlog/2021-05-01_windowssucks.gmi 2021-05-01 - I hate Microsoft +=> /gemlog/2021-05-04_networking_school.gmi 2021-05-04 - I'm learning networking +=> /gemlog/2021-05-01_windowssucks.gmi 2021-05-01 - I hate Microsoft +--- +=> /index.gmi + +contact me by mail: steven.gibone at zaclys dot net +=> https://mastodon.zaclys.com/@lonion @lonion@mastodon.zaclys.com on mastodon diff --git a/content/index.gmi b/content/index.gmi index 2aaac29..6ef0110 100644 --- a/content/index.gmi +++ b/content/index.gmi @@ -6,8 +6,6 @@ Est. 17th of February 2021. # stevengibone.com => gibone-CV.pdf my resume (in french) -=> mailto:steven.gibone@zaclys.net -=> https://mastodon.zaclys.com/@lonion @lonion@mastodon.zaclys.com on mastodon Hello, my name is Steven Gibone and welcome to my gemini capsule. I used to study mathematics but quit due to me realizing I don't want to teach to an entire class. The public education system is far too broken for me and I really cannot accept to work in these conditions. @@ -31,39 +29,29 @@ And sportswise: * rock climbing (mostly bouldering in Arkose) * rollerblading -## finished projects -### 2021 -* built my website using PicoCMS -* installed Pi-Hole on my Raspberry Pi -* installed Gogs on my Raspberry Pi now with remote access -* bought a domain name for my website. -* migrated from Gogs to Gitea because it was easy and Gitea has a mobile UI contrary to Gogs. Lives at the same address. -* installed agate to serve this gemini capsule :) -* migrate website from PicoCMS to 11ty -### 2022 -* multiple things of which I didn't keep records -* a lot of testing of different minecraft servers and frontend to manage them. I finaly dicided to keep it simple by using cronjobs and tmux. I found that web dashboards are to cumbersome and not flexible enough. -* tried *gitolite* and *cgit* replacement of *Gitea* -* settle to *Onedev* -### 2023 -* resuscitate my gemini capsule again after reading an article by Ploum -=> gemini://ploum.net/2022-12-04-fin-du-blog-et-derniere-version.gmi +=> projects.gmi my differents projects ## what I'm reading * ~~The Lord of the Rings: The Two Towers, J.R.R. Tolkien~~ * ~~Clit Révolution, Sarah Constantin & Elvire Duvelle-Charles~~ * En Travail, Bernard Friot et Frédéric Lordon -* Sortir de l'hétérosexualité, Juliet Drouart +* ~~Sortir de l'hétérosexualité, Juliet Drouart~~ +* Beaufs et Barbares, Houria Bouteldja ## what I'm playing -* Skul: The Hero Slayer +* Bloodstained: Ritual of the Night * Hades -* PokeMon: Shining Pearl +* Pokemon: Shining Pearl ## logs - => tinylog.gmi tinylogs go here => gemlog/index.gmi full gemlogs here -=> gemlog/2021-05-04_networking_school.gmi 2021-05-04 - I'm learning networking -=> gemlog/2021-05-01_windowssucks.gmi 2021-05-01 - I hate Microsoft +=> /gemlog/2021-05-04_networking_school.gmi 2021-05-04 - I'm learning networking +=> /gemlog/2021-05-01_windowssucks.gmi 2021-05-01 - I hate Microsoft + +--- +=> /index.gmi + +contact me by mail: steven.gibone at zaclys dot net +=> https://mastodon.zaclys.com/@lonion @lonion@mastodon.zaclys.com on mastodon diff --git a/content/projects.gmi b/content/projects.gmi new file mode 100644 index 0000000..fea38bc --- /dev/null +++ b/content/projects.gmi @@ -0,0 +1,24 @@ +# Current or finished projects +sorted in reverse chronological order so that the most recent projects appears first: +## 2023 +* resuscitate my gemini capsule again after reading an article by Ploum +=> gemini://ploum.net/2022-12-04-fin-du-blog-et-derniere-version.gmi +## 2022 +* settle to *Onedev* +* tried *gitolite* and *cgit* replacement of *Gitea* +* a lot of testing of different minecraft servers and frontend to manage them. I finaly dicided to keep it simple by using cronjobs and tmux. I found that web dashboards are to cumbersome and not flexible enough. +* multiple things of which I didn't keep records +## 2021 +* migrate website from PicoCMS to 11ty +* installed agate to serve this gemini capsule :) +* migrated from Gogs to Gitea because it was easy and Gitea has a mobile UI contrary to Gogs. Lives at the same address. +* bought a domain name for my website. +* installed Gogs on my Raspberry Pi now with remote access +* installed Pi-Hole on my Raspberry Pi +* built my website using PicoCMS + +--- +=> /index.gmi + +contact me by mail: steven.gibone at zaclys dot net +=> https://mastodon.zaclys.com/@lonion @lonion@mastodon.zaclys.com on mastodon diff --git a/content/tinylog.gmi b/content/tinylog.gmi index ed97d53..28cf020 100644 --- a/content/tinylog.gmi +++ b/content/tinylog.gmi @@ -1 +1,5 @@ --- +=> /index.gmi + +contact me by mail: steven.gibone at zaclys dot net +=> https://mastodon.zaclys.com/@lonion @lonion@mastodon.zaclys.com on mastodon diff --git a/footer.gmi b/footer.gmi new file mode 100644 index 0000000..28cf020 --- /dev/null +++ b/footer.gmi @@ -0,0 +1,5 @@ +--- +=> /index.gmi + +contact me by mail: steven.gibone at zaclys dot net +=> https://mastodon.zaclys.com/@lonion @lonion@mastodon.zaclys.com on mastodon diff --git a/gmirator.sh b/gmirator.sh index 2d7828c..67dc0e8 100755 --- a/gmirator.sh +++ b/gmirator.sh @@ -14,8 +14,9 @@ make_gemlogs_index() { | while read fname; do local date=$(echo "$fname" | sed "s/_.*//") local title=$(head -1 $LGMI/gemlog/$fname | sed "s/# //") - echo "=> gemlog/$fname $date - $title" >> $WORKDIR/articles.gmi.temp + echo "=> /gemlog/$fname $date - $title" >> $WORKDIR/articles.gmi.temp done + head $WORKDIR/articles.gmi.temp > $WORKDIR/head-articles.gmi.temp echo "generating gemlog/index.gmi" sed -i -e "/^## logs/,//{ @@ -26,24 +27,43 @@ make_gemlogs_index() { }" $LGMI/gemlog/index.gmi echo "generating index.gmi" - printf ' -=> tinylog.gmi tinylogs go here -=> gemlog/index.gmi full gemlogs here -\n%s' "$(head $WORKDIR/articles.gmi.temp)" \ - | cat $WORKDIR/in.gmi - > $LGMI/index.gmi - echo "" >> $LGMI/index.gmi - + sed -i -e "/^## logs/,//{ + /^#/!d + }" -e "/^## logs/{ + a => tinylog.gmi tinylogs go here + a => gemlog/index.gmi full gemlogs here + a + r $WORKDIR/head-articles.gmi.temp + a + }" $LGMI/index.gmi + + echo "generate footer for every .gmi" + while read -r file; do + sed -i -e "/^---/,//{ + d + }" $file + cat $WORKDIR/footer.gmi >> $file + done < <(find $LGMI -type f -name \*.gmi) echo "DONE :)" } +inline_parsing() { + sed -E 's|\*([^\*]+)\*|\1|g' | + sed -E 's|~~(.*)~~|\1|g' +} + gmi2html() { local in_list=no local in_preformated=no while read -r line; do + if [[ $line == "---" ]]; then + break + fi + if [[ "$in_list" == yes ]]; then if [[ "$line" == '* '* ]]; then - printf "
  • %s
  • \n" "${line/\* /}" + printf "
  • %s
  • \n" "${line/\* /}" | inline_parsing continue else in_list=no @@ -64,7 +84,7 @@ gmi2html() { ;; '* '*) in_list=yes - printf "