Add pearl generation to gopher lawn. - gopher-lawn - The gopher lawn gopher directory project.
git clone git://bitreich.org/gopher-lawn/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/gopher-lawn/
Log
Files
Refs
Tags
---
commit c5927bfe4b5654ad7141d202bc02e39ce0c4f170
parent 8c8c4d7198368ff3f2a9d5c9a98652ebffa53383
Author: Christoph Lohmann <20h@r-36.net>
Date:   Tue,  8 Aug 2023 22:50:19 +0200

Add pearl generation to gopher lawn.

Diffstat:
  A mk-pearls                           |      56 +++++++++++++++++++++++++++++++
  A pearls/footer.gph                   |       9 +++++++++
  A pearls/header.gph                   |      15 +++++++++++++++
  A pearls/pearls.gph.orig              |      27 +++++++++++++++++++++++++++

4 files changed, 107 insertions(+), 0 deletions(-)
---
diff --git a/mk-pearls b/mk-pearls
@@ -0,0 +1,56 @@
+#!/bin/sh
+
+{
+        cat pearls/header.gph
+
+        find db -name "pearl-*" -type f \
+        | while read -r pearl;
+        do
+                cat $pearl \
+                | while read -r line;
+                do
+                        fieldval="$(printf "%s\n" "${line}" \
+                                | cut -d':' -f2- | xargs)"
+                        case "${line}" in
+                        Type:*)
+                                if [ "${fieldval}" != "text" ];
+                                then
+                                        break;
+                                fi
+                                ;;
+                        Selector:*)
+                                selector="${fieldval}"
+                                ;;
+                        Server:*)
+                                server="${fieldval}"
+                                ;;
+                        Port:*)
+                                port="${fieldval}"
+                                ;;
+                        LinkName:*)
+                                linkname="${fieldval}"
+                                ;;
+                        *)
+                                ;;
+                        esac
+
+                        if [ -n "${selector}" ] \
+                        && [ -n "${server}" ] \
+                        && [ -n "${port}" ] \
+                        && [ -n "${linkname}" ];
+                        then
+                                printf "[0|     (_) %s|%s|%s|%s]\n" \
+                                        "${linkname}" \
+                                        "${selector}" \
+                                        "${server}" \
+                                        "${port}"
+                                selector=""
+                                server=""
+                                port=""
+                                linkname=""
+                        fi
+                done
+        done
+
+        cat pearls/footer.gph
+} > pearls.gph
diff --git a/pearls/footer.gph b/pearls/footer.gph
@@ -0,0 +1,9 @@
+     (_) ... Send your pearls please. ...
+     (_)
+      (_)
+ _   _  (_)_  _  _  _  _  _  _  _  _  _  _  _  _  _  _
+(_))(_)   (_)(_)(_)(_)(_)(_)(_)(_)(_)(_)(_)(_)(_)(_)(_)@<
+                                                     ~VK
+
+[1|<< back to bitreich.org||server|port]
+
diff --git a/pearls/header.gph b/pearls/header.gph
@@ -0,0 +1,15 @@
+
+           /
+          / GOPHER 2007 PEARL PROJECT
+        _/
+[1|       (_) Here you go! >> Enter the Archive <<|archive|server|port]
+       /
+      /    
+      | The fun in gopherspace is discovery.  
+      | Many treasures are out there to be found by you.
+      | Keep on discovering!
+      | And here is a challenge.
+      | Can you find the pearls in gopherspace 2007?
+[h|      \| Please send them to 20h@r-36.net.|URL:mailto:20h@r-36.net|server|port]
+      | The pearls will be presented here.
+      |
diff --git a/pearls/pearls.gph.orig b/pearls/pearls.gph.orig
@@ -0,0 +1,27 @@
+
+           /
+          / GOPHER 2007 PEARL PROJECT
+        _/
+[1|       (_) Here you go! >> Enter the Archive <<|archive|server|port]
+       /
+      /    
+      | The fun in gopherspace is discovery.  
+      | Many treasures are out there to be found by you.
+      | Keep on discovering!
+      | And here is a challenge.
+      | Can you find the pearls in gopherspace 2007?
+[h|      \| Please send them to 20h@r-36.net.|URL:mailto:20h@r-36.net|server|port]
+      | The pearls will be presented here.
+      |
+[0|     (_) gopher-manifesto.txt - The Gopher Manifesto|archive/seanm.ca/70/0/nerd/gopher-manifesto.txt|server|port]
+[0|     (_) language_parable.txt - Well parse this, you little markup asshole!|archive/seanm.ca/70/0/nerd/language_parable.txt|server|port]
+[0|     (_) 500mileemail.txt - How E-Mail only is sent 500 miles.|archive/seanm.ca/70/0/nerd/500mileemail.txt|server|port]
+     (_) ... Send your pearls please. ...
+     (_)
+      (_)
+ _   _  (_)_  _  _  _  _  _  _  _  _  _  _  _  _  _  _
+(_))(_)   (_)(_)(_)(_)(_)(_)(_)(_)(_)(_)(_)(_)(_)(_)(_)@<
+                                                     ~VK
+
+[1|<< back to bitreich.org||server|port]
+