diff options
| author | Paul Buetow <git@mx.buetow.org> | 2021-05-19 12:41:48 +0100 |
|---|---|---|
| committer | Paul Buetow <git@mx.buetow.org> | 2021-05-19 12:41:48 +0100 |
| commit | 94ba65207cff8b016afa4ba8f378c7a542d28d7c (patch) | |
| tree | fd295870e1a3d6bcdf33157ff414059960b04f37 | |
| parent | 286da6ae439ddedecbeed2ae5020674507af239c (diff) | |
md submodule
| -rw-r--r-- | .gitmodules | 6 | ||||
| -rw-r--r-- | Makefile | 18 | ||||
| -rw-r--r-- | README.md | 29 | ||||
| -rw-r--r-- | _config.yml | 1 | ||||
| -rw-r--r-- | buetow.org.conf | 7 | ||||
| -rwxr-xr-x | buetow.org.sh | 64 | ||||
| -rw-r--r-- | contact-information.md (renamed from content/md/contact-information.md) | 0 | ||||
| m--------- | content/gemtext | 6 | ||||
| m--------- | content/html | 6 | ||||
| -rw-r--r-- | content/meta/gemfeed/2008-06-26-perl-poetry.meta | 5 | ||||
| -rw-r--r-- | content/meta/gemfeed/2010-04-09-standard-ml-and-haskell.meta | 5 | ||||
| -rw-r--r-- | content/meta/gemfeed/2010-05-09-the-fype-programming-language.meta | 5 | ||||
| -rw-r--r-- | content/meta/gemfeed/2011-05-07-perl-daemon-service-framework.meta | 5 | ||||
| -rw-r--r-- | content/meta/gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.meta | 5 | ||||
| -rw-r--r-- | content/meta/gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid.meta | 5 | ||||
| -rw-r--r-- | content/meta/gemfeed/2016-04-03-offsite-backup-with-zfs.meta | 5 | ||||
| -rw-r--r-- | content/meta/gemfeed/2016-04-09-jails-and-zfs-on-freebsd-with-puppet.meta | 5 | ||||
| -rw-r--r-- | content/meta/gemfeed/2016-04-16-offsite-backup-with-zfs-part2.meta | 5 | ||||
| -rw-r--r-- | content/meta/gemfeed/2016-05-22-spinning-up-my-own-authoritative-dns-servers.meta | 5 | ||||
| -rw-r--r-- | content/meta/gemfeed/2016-11-20-methods-in-c.meta | 5 | ||||
| -rw-r--r-- | content/meta/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux.meta | 5 | ||||
| -rw-r--r-- | content/meta/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program.meta | 5 | ||||
| -rw-r--r-- | content/meta/gemfeed/2021-04-24-welcome-to-the-geminispace.meta | 5 | ||||
| -rw-r--r-- | content/meta/gemfeed/2021-05-16-personal-bash-coding-style-guide.meta | 5 | ||||
| -rw-r--r-- | favicon.ico (renamed from content/md/favicon.ico) | bin | 1077 -> 1077 bytes | |||
| -rw-r--r-- | footer.html.part | 2 | ||||
| -rw-r--r-- | gemfeed/2008-06-26-perl-poetry.md (renamed from content/md/gemfeed/2008-06-26-perl-poetry.md) | 0 | ||||
| -rw-r--r-- | gemfeed/2010-04-09-standard-ml-and-haskell.md (renamed from content/md/gemfeed/2010-04-09-standard-ml-and-haskell.md) | 0 | ||||
| -rw-r--r-- | gemfeed/2010-05-09-the-fype-programming-language.md (renamed from content/md/gemfeed/2010-05-09-the-fype-programming-language.md) | 0 | ||||
| -rw-r--r-- | gemfeed/2011-05-07-perl-daemon-service-framework.md (renamed from content/md/gemfeed/2011-05-07-perl-daemon-service-framework.md) | 0 | ||||
| -rw-r--r-- | gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.md (renamed from content/md/gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.md) | 0 | ||||
| -rw-r--r-- | gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid.md (renamed from content/md/gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid.md) | 0 | ||||
| -rw-r--r-- | gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid/Deboroid.png (renamed from content/md/gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid/Deboroid.png) | bin | 576510 -> 576510 bytes | |||
| -rw-r--r-- | gemfeed/2016-04-03-offsite-backup-with-zfs.md (renamed from content/md/gemfeed/2016-04-03-offsite-backup-with-zfs.md) | 0 | ||||
| -rw-r--r-- | gemfeed/2016-04-09-jails-and-zfs-on-freebsd-with-puppet.md (renamed from content/md/gemfeed/2016-04-09-jails-and-zfs-on-freebsd-with-puppet.md) | 0 | ||||
| -rw-r--r-- | gemfeed/2016-04-16-offsite-backup-with-zfs-part2.md (renamed from content/md/gemfeed/2016-04-16-offsite-backup-with-zfs-part2.md) | 0 | ||||
| -rw-r--r-- | gemfeed/2016-05-22-spinning-up-my-own-authoritative-dns-servers.md (renamed from content/md/gemfeed/2016-05-22-spinning-up-my-own-authoritative-dns-servers.md) | 0 | ||||
| -rw-r--r-- | gemfeed/2016-11-20-methods-in-c.md (renamed from content/md/gemfeed/2016-11-20-methods-in-c.md) | 0 | ||||
| -rw-r--r-- | gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux.md (renamed from content/md/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux.md) | 0 | ||||
| -rw-r--r-- | gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure1-ioriot-io-recording.png (renamed from content/md/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure1-ioriot-io-recording.png) | bin | 220247 -> 220247 bytes | |||
| -rw-r--r-- | gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure2-ioriot-test-preparation.png (renamed from content/md/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure2-ioriot-test-preparation.png) | bin | 208235 -> 208235 bytes | |||
| -rw-r--r-- | gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure3-ioriot-replay.png (renamed from content/md/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure3-ioriot-replay.png) | bin | 417034 -> 417034 bytes | |||
| -rw-r--r-- | gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure4-ioriot-read-latency.png (renamed from content/md/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure4-ioriot-read-latency.png) | bin | 39552 -> 39552 bytes | |||
| -rw-r--r-- | gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure5-ioriot-write-latency.png (renamed from content/md/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure5-ioriot-write-latency.png) | bin | 26547 -> 26547 bytes | |||
| -rw-r--r-- | gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure6-iostat.png (renamed from content/md/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure6-iostat.png) | bin | 294346 -> 294346 bytes | |||
| -rw-r--r-- | gemfeed/2021-04-22-dtail-the-distributed-log-tail-program.md (renamed from content/md/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program.md) | 0 | ||||
| -rw-r--r-- | gemfeed/2021-04-22-dtail-the-distributed-log-tail-program/dgrep.gif (renamed from content/md/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program/dgrep.gif) | bin | 142329 -> 142329 bytes | |||
| -rw-r--r-- | gemfeed/2021-04-22-dtail-the-distributed-log-tail-program/dtail.gif (renamed from content/md/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program/dtail.gif) | bin | 1984520 -> 1984520 bytes | |||
| -rw-r--r-- | gemfeed/2021-04-22-dtail-the-distributed-log-tail-program/title.png (renamed from content/md/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program/title.png) | bin | 84933 -> 84933 bytes | |||
| -rw-r--r-- | gemfeed/2021-04-24-welcome-to-the-geminispace.md (renamed from content/md/gemfeed/2021-04-24-welcome-to-the-geminispace.md) | 0 | ||||
| -rw-r--r-- | gemfeed/2021-04-24-welcome-to-the-geminispace/amfora-screenshot.png (renamed from content/md/gemfeed/2021-04-24-welcome-to-the-geminispace/amfora-screenshot.png) | bin | 154951 -> 154951 bytes | |||
| -rw-r--r-- | gemfeed/2021-05-15-buetow.org.sh-one-bash-script-to-rule-it-all.draft.md (renamed from content/md/gemfeed/2021-05-15-buetow.org.sh-one-bash-script-to-rule-it-all.draft.md) | 0 | ||||
| -rw-r--r-- | gemfeed/2021-05-16-personal-bash-coding-style-guide.md (renamed from content/md/gemfeed/2021-05-16-personal-bash-coding-style-guide.md) | 0 | ||||
| -rw-r--r-- | gemfeed/index.md (renamed from content/md/gemfeed/index.md) | 0 | ||||
| -rw-r--r-- | header.html.part | 50 | ||||
| -rw-r--r-- | index.md (renamed from content/md/index.md) | 0 | ||||
| -rw-r--r-- | packages/assert.source.sh | 47 | ||||
| -rw-r--r-- | packages/atomfeed.source.sh | 122 | ||||
| -rw-r--r-- | packages/gemfeed.source.sh | 54 | ||||
| -rw-r--r-- | packages/generate.source.sh | 137 | ||||
| -rw-r--r-- | packages/html.source.sh | 153 | ||||
| -rw-r--r-- | packages/log.source.sh | 29 | ||||
| -rw-r--r-- | packages/md.source.sh | 59 | ||||
| -rw-r--r-- | resources.md (renamed from content/md/resources.md) | 0 |
64 files changed, 0 insertions, 865 deletions
diff --git a/.gitmodules b/.gitmodules index 1d5d0402..e69de29b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +0,0 @@ -[submodule "content/gemtext"] - path = content/gemtext - url = git@github.com:snonux/buetow.org -[submodule "content/html"] - path = content/html - url = git@github.com:snonux/buetow.org diff --git a/Makefile b/Makefile deleted file mode 100644 index 879b7945..00000000 --- a/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -all: generate -generate: - bash ./buetow.org.sh --generate -publish: - ADD_GIT=yes ./buetow.org.sh --generate - cp ./content/md/index.md index.md - git add index.md - git commit -a - git push -test: shellcheck - LOG_VERBOSE=yes ./buetow.org.sh --test -shellcheck: - shellcheck \ - --norc \ - --external-sources \ - --check-sourced \ - --exclude=SC2155,SC2010,SC2154,SC1090 \ - buetow.org.sh diff --git a/README.md b/README.md deleted file mode 100644 index fb8450b5..00000000 --- a/README.md +++ /dev/null @@ -1,29 +0,0 @@ -buetow.org Gemini capsule -========================= - -This is the source code of my Gemini capsule. You can reach the site(s) here: - -* Via Gemini/Gemtext : [gemini://buetow.org](gemini://buetow.org) -* Via HTTP/HTML: [https://buetow.org](https://buetow.org) -* [Gemini Webproxy](https://portal.mozz.us/gemini/buetow.org) -* [GitHub Markdown](https://github.com/snonux/buetow.org/blob/master/content/md/index.md) -* [GitHub Page](https://snonux.github.io/buetow.org/content/md) - -## Software I use to maintain this capsule - -* Text editor: [Vim](https://www.vim.org) -* Gemini server: [a-h/gemini](https://github.com/a-h/gemini) -* Some Bash scripting (GNU Bash probably 5.x or higher required) - -## HTTP fallback software used - -* Web server: [Apache HTTPD](https://httpd.apache.org) - -## TODO - -These are things I want to do with this project in near future: - -* Speed it up a bit: Make it so, that only changed .gmi files (or changed HTML templates) result into re-generating other formats. -* Write a blog post about buetow.org.sh script -* Maybe put the ./content dirs into different git projects and then include them via submodules. This has the benefit that the GitHub page has the resulting index.md in the root folder. -* Custom alt.buetow.org domain for GitHub page. diff --git a/_config.yml b/_config.yml deleted file mode 100644 index fc24e7a6..00000000 --- a/_config.yml +++ /dev/null @@ -1 +0,0 @@ -theme: jekyll-theme-hacker
\ No newline at end of file diff --git a/buetow.org.conf b/buetow.org.conf deleted file mode 100644 index 3d6a73d7..00000000 --- a/buetow.org.conf +++ /dev/null @@ -1,7 +0,0 @@ -declare -xr DOMAIN=buetow.org -declare -xr SUBTITLE='Having fun with computers!' -declare -xr CONTENT_DIR=./content -declare -xr AUTHOR='Paul Buetow' -declare -xr EMAIL='comments@mx.buetow.org' -declare -xr IMAGE_PATTERN='\.(jpg|png|gif)$' -declare -xr ATOM_MAX_ENTRIES=42 diff --git a/buetow.org.sh b/buetow.org.sh deleted file mode 100755 index 57535b99..00000000 --- a/buetow.org.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/env bash -# -# The buetow.org.sh static site generator -# by Paul Buetow 2021 - -declare -r ARG="$1"; shift -declare DATE=date -declare SED=sed -declare GREP=grep -which gdate &>/dev/null && DATE=gdate -which gsed &>/dev/null && SED=gsed -which ggrep &>/dev/null && GREP=ggrep -readonly DATE -readonly SED -readonly GREP - -source buetow.org.conf -source ./packages/assert.source.sh -source ./packages/atomfeed.source.sh -source ./packages/gemfeed.source.sh -source ./packages/generate.source.sh -source ./packages/html.source.sh -source ./packages/log.source.sh -source ./packages/md.source.sh - -help () { - cat <<HELPHERE -$0's possible arguments: - --feed - --publish - --test - --help -HELPHERE -} - -main () { - local -r arg="$1"; shift - - case $ARG in - --test) - html::test - md::test - ;; - --feed) - gemfeed::generate - atomfeed::generate - ;; - --generate) - html::test - md::test - gemfeed::generate - atomfeed::generate - generate::fromgmi html md - ;; - --help|*) - help - ;; - esac - - return 0 -} - -main $ARG -exit $? diff --git a/content/md/contact-information.md b/contact-information.md index 44130ba6..44130ba6 100644 --- a/content/md/contact-information.md +++ b/contact-information.md diff --git a/content/gemtext b/content/gemtext deleted file mode 160000 -Subproject faa2cd392016af9b76a4f40eeb12003785ced15 diff --git a/content/html b/content/html deleted file mode 160000 -Subproject 27ed46c9129db86669052d4e7211340da1081d8 diff --git a/content/meta/gemfeed/2008-06-26-perl-poetry.meta b/content/meta/gemfeed/2008-06-26-perl-poetry.meta deleted file mode 100644 index 9238d83a..00000000 --- a/content/meta/gemfeed/2008-06-26-perl-poetry.meta +++ /dev/null @@ -1,5 +0,0 @@ -local meta_date="2008-06-26T21:43:51+01:00" -local meta_author="Paul Buetow" -local meta_email="comments@mx.buetow.org" -local meta_title="Perl Poetry" -local meta_summary="Here are some Perl Poems I wrote. They don't do anything useful when you run them but they don't produce a compiler error either. They only exists for fun and demonstrate what you can do with Perl syntax.. .....to read on please visit my site." diff --git a/content/meta/gemfeed/2010-04-09-standard-ml-and-haskell.meta b/content/meta/gemfeed/2010-04-09-standard-ml-and-haskell.meta deleted file mode 100644 index 325d65d6..00000000 --- a/content/meta/gemfeed/2010-04-09-standard-ml-and-haskell.meta +++ /dev/null @@ -1,5 +0,0 @@ -local meta_date="2010-04-09T22:57:36+01:00" -local meta_author="Paul Buetow" -local meta_email="comments@mx.buetow.org" -local meta_title="Standard ML and Haskell" -local meta_summary="I am currently looking into the functional programming language Standard ML (aka SML). The purpose is to refresh my functional programming skills and to learn something new too. Since I already know a little Haskell, could I do not help myself and I implemented the same exercises in Haskell too.. .....to read on please visit my site." diff --git a/content/meta/gemfeed/2010-05-09-the-fype-programming-language.meta b/content/meta/gemfeed/2010-05-09-the-fype-programming-language.meta deleted file mode 100644 index a6265580..00000000 --- a/content/meta/gemfeed/2010-05-09-the-fype-programming-language.meta +++ /dev/null @@ -1,5 +0,0 @@ -local meta_date="2010-05-09T12:48:29+01:00" -local meta_author="Paul Buetow" -local meta_email="comments@mx.buetow.org" -local meta_title="The Fype Programming Language" -local meta_summary="Fype is an interpreted programming language created by me for learning and fun. The interpreter is written in C. It has been tested on FreeBSD and NetBSD and may also work on other Unix like operating systems such as Linux based ones. To be honest, besides learning and fun there is really no other use case of why Fype actually exists as many other programming languages are much faster and more powerful.. .....to read on please visit my site." diff --git a/content/meta/gemfeed/2011-05-07-perl-daemon-service-framework.meta b/content/meta/gemfeed/2011-05-07-perl-daemon-service-framework.meta deleted file mode 100644 index e1a36376..00000000 --- a/content/meta/gemfeed/2011-05-07-perl-daemon-service-framework.meta +++ /dev/null @@ -1,5 +0,0 @@ -local meta_date="2011-05-07T22:26:02+01:00" -local meta_author="Paul Buetow" -local meta_email="comments@mx.buetow.org" -local meta_title="Perl Daemon (Service Framework)" -local meta_summary="PerlDaemon is a minimal daemon for Linux and other Unix like operating systems programmed in Perl. It is a minimal but pretty functional and fairly generic service framework. This means that it does not do anything useful other than providing a framework for starting, stopping, configuring and logging. In order to do something a module (written in Perl) bust be provided.. .....to read on please visit my site." diff --git a/content/meta/gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.meta b/content/meta/gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.meta deleted file mode 100644 index 15531fdf..00000000 --- a/content/meta/gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.meta +++ /dev/null @@ -1,5 +0,0 @@ -local meta_date="2014-03-24T21:32:53+00:00" -local meta_author="Paul Buetow" -local meta_email="comments@mx.buetow.org" -local meta_title="The fibonacci.pl.c Polyglot" -local meta_summary="In computing, a polyglot is a computer program or script written in a valid form of multiple programming languages, which performs the same operations or output independent of the programming language used to compile or interpret it. .....to read on please visit my site." diff --git a/content/meta/gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid.meta b/content/meta/gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid.meta deleted file mode 100644 index 9265431c..00000000 --- a/content/meta/gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid.meta +++ /dev/null @@ -1,5 +0,0 @@ -local meta_date="2015-12-05T16:12:57+00:00" -local meta_author="Paul Buetow" -local meta_email="comments@mx.buetow.org" -local meta_title="Run Debian on your phone with Debroid" -local meta_summary="You can use the following tutorial to install a full blown Debian GNU/Linux Chroot on a LG G3 D855 CyanogenMod 13 (Android 6). First of all you need to have root permissions on your phone and you also need to have the developer mode activated. The following steps have been tested on Linux (Fedora 23). .....to read on please visit my site." diff --git a/content/meta/gemfeed/2016-04-03-offsite-backup-with-zfs.meta b/content/meta/gemfeed/2016-04-03-offsite-backup-with-zfs.meta deleted file mode 100644 index e9a6ae5b..00000000 --- a/content/meta/gemfeed/2016-04-03-offsite-backup-with-zfs.meta +++ /dev/null @@ -1,5 +0,0 @@ -local meta_date=2016-04-03T22:43:42+01:00 -local meta_author="Paul Buetow" -local meta_email=comments@mx.buetow.org -local meta_title="Offsite backup with ZFS" -local meta_summary="When it comes to data storage and potential data loss I am a paranoid person. It is not just due to my job but also due to a personal experience I encountered over 10 years ago: A single drive failure and loss of all my data (pictures, music, ....). ...to read on visit my site." diff --git a/content/meta/gemfeed/2016-04-09-jails-and-zfs-on-freebsd-with-puppet.meta b/content/meta/gemfeed/2016-04-09-jails-and-zfs-on-freebsd-with-puppet.meta deleted file mode 100644 index b0990ef7..00000000 --- a/content/meta/gemfeed/2016-04-09-jails-and-zfs-on-freebsd-with-puppet.meta +++ /dev/null @@ -1,5 +0,0 @@ -local meta_date="2016-04-09T18:29:47+01:00" -local meta_author="Paul Buetow" -local meta_email="comments@mx.buetow.org" -local meta_title="Jails and ZFS with Puppet on FreeBSD" -local meta_summary="Over the last couple of years I wrote quite a few Puppet modules in order to manage my personal server infrastructure. One of them manages FreeBSD Jails and another one ZFS file systems. I thought I would give a brief overview in how it looks and feels.. .....to read on please visit my site." diff --git a/content/meta/gemfeed/2016-04-16-offsite-backup-with-zfs-part2.meta b/content/meta/gemfeed/2016-04-16-offsite-backup-with-zfs-part2.meta deleted file mode 100644 index fa372e79..00000000 --- a/content/meta/gemfeed/2016-04-16-offsite-backup-with-zfs-part2.meta +++ /dev/null @@ -1,5 +0,0 @@ -local meta_date=2016-04-16T22:43:42+01:00 -local meta_author="Paul Buetow" -local meta_email=comments@mx.buetow.org -local meta_title="Offsite backup with ZFS (Part 2)" -local meta_summary="I enhanced the procedure a bit. From now on I am having two external 2TB USB hard drives. Both are setup exactly the same way. To decrease the probability that they will not fail at about the same time both drives are of different brands. One drive is kept at the secret location. The other one is kept at home right next to my HP MicroServer. ...to read on visit my site." diff --git a/content/meta/gemfeed/2016-05-22-spinning-up-my-own-authoritative-dns-servers.meta b/content/meta/gemfeed/2016-05-22-spinning-up-my-own-authoritative-dns-servers.meta deleted file mode 100644 index b688ca97..00000000 --- a/content/meta/gemfeed/2016-05-22-spinning-up-my-own-authoritative-dns-servers.meta +++ /dev/null @@ -1,5 +0,0 @@ -local meta_date=2016-05-22T18:59:01+01:00 -local meta_author="Paul Buetow" -local meta_email=comments@mx.buetow.org -local meta_title="Spinning up my own authoritative DNS servers" -local meta_summary="Finally, I had time to deploy my own authoritative DNS servers (master and slave) for my domains 'buetow.org' and 'buetow.zone'. My domain name provider is Schlund Technologies. They allow their customers to manually edit the DNS records (BIND files). And they also give you the opportunity to set your own authoritative DNS servers for your domains. From now I am making use of that option.. .....to read on please visit my site." diff --git a/content/meta/gemfeed/2016-11-20-methods-in-c.meta b/content/meta/gemfeed/2016-11-20-methods-in-c.meta deleted file mode 100644 index 7b306b9f..00000000 --- a/content/meta/gemfeed/2016-11-20-methods-in-c.meta +++ /dev/null @@ -1,5 +0,0 @@ -local meta_date=2016-11-20T18:36:51+01:00 -local meta_author="Paul Buetow" -local meta_email=comments@mx.buetow.org -local meta_title="Methods in C" -local meta_summary="You can do some sort of object oriented programming in the C Programming Language. However, that is very limited. But also very easy and straight forward to use.. .....to read on please visit my site." diff --git a/content/meta/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux.meta b/content/meta/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux.meta deleted file mode 100644 index d831a2df..00000000 --- a/content/meta/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux.meta +++ /dev/null @@ -1,5 +0,0 @@ -local meta_date="2018-06-01T14:50:29+01:00" -local meta_author="Paul Buetow" -local meta_email="comments@mx.buetow.org" -local meta_title="Realistic load testing with I/O Riot for Linux" -local meta_summary="This text first was published in the german IT-Administrator computer Magazine. 3 years have passed since and I decided to publish it on my blog too. . .....to read on please visit my site." diff --git a/content/meta/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program.meta b/content/meta/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program.meta deleted file mode 100644 index 917133d5..00000000 --- a/content/meta/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program.meta +++ /dev/null @@ -1,5 +0,0 @@ -local meta_date=2021-04-22T19:28:41+01:00 -local meta_author="Paul Buetow" -local meta_email=comments@mx.buetow.org -local meta_title="DTail - The distributed log tail program" -local meta_summary="This article first appeared at the Mimecast Engineering Blog but I made it available here in my personal Gemini capsule too. ...to read on visit my site." diff --git a/content/meta/gemfeed/2021-04-24-welcome-to-the-geminispace.meta b/content/meta/gemfeed/2021-04-24-welcome-to-the-geminispace.meta deleted file mode 100644 index d0df1d9a..00000000 --- a/content/meta/gemfeed/2021-04-24-welcome-to-the-geminispace.meta +++ /dev/null @@ -1,5 +0,0 @@ -local meta_date=2021-04-24T19:28:41+01:00 -local meta_author="Paul Buetow" -local meta_email=comments@mx.buetow.org -local meta_title="Welcome to the Geminispace" -local meta_summary="Have you reached this article already via Gemini? You need a special client for that, web browsers such as Firefox, Chrome, Safari etc. don't support the Gemini protocol. The Gemini address of this site (or the address of this capsule as people say in Geminispace) is: ... to read on visit my site." diff --git a/content/meta/gemfeed/2021-05-16-personal-bash-coding-style-guide.meta b/content/meta/gemfeed/2021-05-16-personal-bash-coding-style-guide.meta deleted file mode 100644 index cad0ad7a..00000000 --- a/content/meta/gemfeed/2021-05-16-personal-bash-coding-style-guide.meta +++ /dev/null @@ -1,5 +0,0 @@ -local meta_date="2021-05-16T14:51:57+01:00" -local meta_author="Paul Buetow" -local meta_email="comments@mx.buetow.org" -local meta_title="Personal Bash coding style guide" -local meta_summary="Lately, I have been polishing and writing a lot of Bash code. Not that I never wrote a lot of Bash, but now as I also looked through the 'Google Shell Style Guide' I thought it is time to also write my own thoughts on that. I agree to that guide in most, but not in all points. . .....to read on please visit my site." diff --git a/content/md/favicon.ico b/favicon.ico Binary files differindex 999c023e..999c023e 100644 --- a/content/md/favicon.ico +++ b/favicon.ico diff --git a/footer.html.part b/footer.html.part deleted file mode 100644 index 308b1d01..00000000 --- a/footer.html.part +++ /dev/null @@ -1,2 +0,0 @@ -</body> -</html> diff --git a/content/md/gemfeed/2008-06-26-perl-poetry.md b/gemfeed/2008-06-26-perl-poetry.md index 83376f01..83376f01 100644 --- a/content/md/gemfeed/2008-06-26-perl-poetry.md +++ b/gemfeed/2008-06-26-perl-poetry.md diff --git a/content/md/gemfeed/2010-04-09-standard-ml-and-haskell.md b/gemfeed/2010-04-09-standard-ml-and-haskell.md index 5b9b38d8..5b9b38d8 100644 --- a/content/md/gemfeed/2010-04-09-standard-ml-and-haskell.md +++ b/gemfeed/2010-04-09-standard-ml-and-haskell.md diff --git a/content/md/gemfeed/2010-05-09-the-fype-programming-language.md b/gemfeed/2010-05-09-the-fype-programming-language.md index 05844b4d..05844b4d 100644 --- a/content/md/gemfeed/2010-05-09-the-fype-programming-language.md +++ b/gemfeed/2010-05-09-the-fype-programming-language.md diff --git a/content/md/gemfeed/2011-05-07-perl-daemon-service-framework.md b/gemfeed/2011-05-07-perl-daemon-service-framework.md index e47f407c..e47f407c 100644 --- a/content/md/gemfeed/2011-05-07-perl-daemon-service-framework.md +++ b/gemfeed/2011-05-07-perl-daemon-service-framework.md diff --git a/content/md/gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.md b/gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.md index a422ef1e..a422ef1e 100644 --- a/content/md/gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.md +++ b/gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.md diff --git a/content/md/gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid.md b/gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid.md index 8277601c..8277601c 100644 --- a/content/md/gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid.md +++ b/gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid.md diff --git a/content/md/gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid/Deboroid.png b/gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid/Deboroid.png Binary files differindex f76cf226..f76cf226 100644 --- a/content/md/gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid/Deboroid.png +++ b/gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid/Deboroid.png diff --git a/content/md/gemfeed/2016-04-03-offsite-backup-with-zfs.md b/gemfeed/2016-04-03-offsite-backup-with-zfs.md index 8e0fdfcf..8e0fdfcf 100644 --- a/content/md/gemfeed/2016-04-03-offsite-backup-with-zfs.md +++ b/gemfeed/2016-04-03-offsite-backup-with-zfs.md diff --git a/content/md/gemfeed/2016-04-09-jails-and-zfs-on-freebsd-with-puppet.md b/gemfeed/2016-04-09-jails-and-zfs-on-freebsd-with-puppet.md index c6ef908a..c6ef908a 100644 --- a/content/md/gemfeed/2016-04-09-jails-and-zfs-on-freebsd-with-puppet.md +++ b/gemfeed/2016-04-09-jails-and-zfs-on-freebsd-with-puppet.md diff --git a/content/md/gemfeed/2016-04-16-offsite-backup-with-zfs-part2.md b/gemfeed/2016-04-16-offsite-backup-with-zfs-part2.md index 72445954..72445954 100644 --- a/content/md/gemfeed/2016-04-16-offsite-backup-with-zfs-part2.md +++ b/gemfeed/2016-04-16-offsite-backup-with-zfs-part2.md diff --git a/content/md/gemfeed/2016-05-22-spinning-up-my-own-authoritative-dns-servers.md b/gemfeed/2016-05-22-spinning-up-my-own-authoritative-dns-servers.md index 21237eae..21237eae 100644 --- a/content/md/gemfeed/2016-05-22-spinning-up-my-own-authoritative-dns-servers.md +++ b/gemfeed/2016-05-22-spinning-up-my-own-authoritative-dns-servers.md diff --git a/content/md/gemfeed/2016-11-20-methods-in-c.md b/gemfeed/2016-11-20-methods-in-c.md index 9906dbd5..9906dbd5 100644 --- a/content/md/gemfeed/2016-11-20-methods-in-c.md +++ b/gemfeed/2016-11-20-methods-in-c.md diff --git a/content/md/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux.md b/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux.md index 77ee72ee..77ee72ee 100644 --- a/content/md/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux.md +++ b/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux.md diff --git a/content/md/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure1-ioriot-io-recording.png b/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure1-ioriot-io-recording.png Binary files differindex 43ac852f..43ac852f 100644 --- a/content/md/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure1-ioriot-io-recording.png +++ b/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure1-ioriot-io-recording.png diff --git a/content/md/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure2-ioriot-test-preparation.png b/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure2-ioriot-test-preparation.png Binary files differindex 709d7490..709d7490 100644 --- a/content/md/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure2-ioriot-test-preparation.png +++ b/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure2-ioriot-test-preparation.png diff --git a/content/md/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure3-ioriot-replay.png b/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure3-ioriot-replay.png Binary files differindex 3bd66b6f..3bd66b6f 100644 --- a/content/md/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure3-ioriot-replay.png +++ b/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure3-ioriot-replay.png diff --git a/content/md/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure4-ioriot-read-latency.png b/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure4-ioriot-read-latency.png Binary files differindex 160b2305..160b2305 100644 --- a/content/md/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure4-ioriot-read-latency.png +++ b/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure4-ioriot-read-latency.png diff --git a/content/md/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure5-ioriot-write-latency.png b/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure5-ioriot-write-latency.png Binary files differindex e30efdbb..e30efdbb 100644 --- a/content/md/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure5-ioriot-write-latency.png +++ b/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure5-ioriot-write-latency.png diff --git a/content/md/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure6-iostat.png b/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure6-iostat.png Binary files differindex 0d3fc0d8..0d3fc0d8 100644 --- a/content/md/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure6-iostat.png +++ b/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure6-iostat.png diff --git a/content/md/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program.md b/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program.md index 57eab8db..57eab8db 100644 --- a/content/md/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program.md +++ b/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program.md diff --git a/content/md/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program/dgrep.gif b/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program/dgrep.gif Binary files differindex e2f2ac64..e2f2ac64 100644 --- a/content/md/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program/dgrep.gif +++ b/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program/dgrep.gif diff --git a/content/md/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program/dtail.gif b/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program/dtail.gif Binary files differindex 8f6b56bf..8f6b56bf 100644 --- a/content/md/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program/dtail.gif +++ b/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program/dtail.gif diff --git a/content/md/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program/title.png b/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program/title.png Binary files differindex 4e343c4f..4e343c4f 100644 --- a/content/md/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program/title.png +++ b/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program/title.png diff --git a/content/md/gemfeed/2021-04-24-welcome-to-the-geminispace.md b/gemfeed/2021-04-24-welcome-to-the-geminispace.md index 8b6e229f..8b6e229f 100644 --- a/content/md/gemfeed/2021-04-24-welcome-to-the-geminispace.md +++ b/gemfeed/2021-04-24-welcome-to-the-geminispace.md diff --git a/content/md/gemfeed/2021-04-24-welcome-to-the-geminispace/amfora-screenshot.png b/gemfeed/2021-04-24-welcome-to-the-geminispace/amfora-screenshot.png Binary files differindex 093aec79..093aec79 100644 --- a/content/md/gemfeed/2021-04-24-welcome-to-the-geminispace/amfora-screenshot.png +++ b/gemfeed/2021-04-24-welcome-to-the-geminispace/amfora-screenshot.png diff --git a/content/md/gemfeed/2021-05-15-buetow.org.sh-one-bash-script-to-rule-it-all.draft.md b/gemfeed/2021-05-15-buetow.org.sh-one-bash-script-to-rule-it-all.draft.md index e463d52d..e463d52d 100644 --- a/content/md/gemfeed/2021-05-15-buetow.org.sh-one-bash-script-to-rule-it-all.draft.md +++ b/gemfeed/2021-05-15-buetow.org.sh-one-bash-script-to-rule-it-all.draft.md diff --git a/content/md/gemfeed/2021-05-16-personal-bash-coding-style-guide.md b/gemfeed/2021-05-16-personal-bash-coding-style-guide.md index 4152d937..4152d937 100644 --- a/content/md/gemfeed/2021-05-16-personal-bash-coding-style-guide.md +++ b/gemfeed/2021-05-16-personal-bash-coding-style-guide.md diff --git a/content/md/gemfeed/index.md b/gemfeed/index.md index b314429c..b314429c 100644 --- a/content/md/gemfeed/index.md +++ b/gemfeed/index.md diff --git a/header.html.part b/header.html.part deleted file mode 100644 index d499e512..00000000 --- a/header.html.part +++ /dev/null @@ -1,50 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>%%TITLE%%</title> -<link rel="shortcut icon" type="image/gif" href="/favicon.ico" /> -<style type="text/css"> -body { - margin: auto; - max-width: 900px; - background-color: #FFFFEF; - border: 1px dashed #880000; - border-radius: 8px; - padding: 5px; -} -img { - display:block; - max-width: 80%; -} -a.textlink:before { - content: " ⇒ "; - padding-left: 2px; -} -a.textlink { - text-decoration: none; - color: #FF0000; -} -a.textlink:hover { - text-decoration: underline; -} -i { - color: #48AAAD; -} -pre { - background-color: #F1F8E9; - border: 1px dashed #BB0000; - border-radius: 8px; - padding: 5px; - font-family: "Lucida Console", "Courier New", monospace; -} -h1 { - text-align: center; - color: #880000; -} -h2, h3 { - color: #BB0000; -} -</style> -</head> -<body> diff --git a/content/md/index.md b/index.md index e32b5472..e32b5472 100644 --- a/content/md/index.md +++ b/index.md diff --git a/packages/assert.source.sh b/packages/assert.source.sh deleted file mode 100644 index 5d3a5c5d..00000000 --- a/packages/assert.source.sh +++ /dev/null @@ -1,47 +0,0 @@ -# Unit test for whether 2 given strings equal. -assert::equals () { - local -r result="$1"; shift - local -r expected="$1"; shift - local -r callee=${FUNCNAME[1]} - - if [[ "$result" != "$expected" ]]; then - cat <<ERROR | log::pipe ERROR -In $callee expected - '$expected' -But got - '$result' -ERROR - exit 2 - fi - - log VERBOSE "Result in $callee as expected: '$expected'" -} - -# Unit test for whether a given string is not empty. -assert::not_empty () { - local -r name="$1"; shift - local -r content="$1"; shift - local -r callee=${FUNCNAME[1]} - - if [ -z "$content" ]; then - log ERROR "In $callee expected '$name' not to be empty!" - exit 2 - fi - - log VERBOSE "Result in $callee as expected not empty" -} - -# Unit test for whether a given string matches a regex. -assert::matches () { - local -r name="$1"; shift - local -r content="$1"; shift - local -r regex="$1"; shift - local -r callee=${FUNCNAME[1]} - - if ! $GREP -q -E "$regex" <<< "$content"; then - log ERROR "In $callee expected '$name' to match '$regex'" - exit 2 - fi - - log VERBOSE "Matching in $callee as expected" -} diff --git a/packages/atomfeed.source.sh b/packages/atomfeed.source.sh deleted file mode 100644 index f17b00fb..00000000 --- a/packages/atomfeed.source.sh +++ /dev/null @@ -1,122 +0,0 @@ -# Retrieve meta data of a given blog post. Generate new meta info if not yet exists. -atomfeed::meta () { - local -r gmi_file_path="$1"; shift - local -r meta_file=$($SED 's|gemtext|meta|; s|.gmi$|.meta|;' <<< "$gmi_file_path") - - log VERBOSE "Generating meta info for post $gmi_file_path" - - local is_draft=no - if $GREP -E -q '\.draft\.meta$' <<< "$meta_file"; then - is_draft=yes - fi - - local -r meta_dir=$(dirname "$meta_file") - test ! -d "$meta_dir" && mkdir -p "$meta_dir" - - if [ ! -f "$meta_file" ]; then - # Extract first heading as post title. - local title=$($SED -n '/^# / { s/# //; p; q; }' "$gmi_file_path" | tr '"' "'") - # Extract first paragraph from Gemtext - local summary=$($SED -n '/^[A-Z]/ { p; q; }' "$gmi_file_path" | tr '"' "'") - # Extract the date from the file name. - local filename_date=$(basename "$gmi_file_path" | cut -d- -f1,2,3) - local date=$($DATE --iso-8601=seconds --date "$filename_date $($DATE +%H:%M:%S)") - - cat <<META | tee "$meta_file" -local meta_date="$date" -local meta_author="$AUTHOR" -local meta_email="$EMAIL" -local meta_title="$title" -local meta_summary="$summary. .....to read on please visit my site." -META - test $is_draft == no && git add "$meta_file" - return - fi - - cat "$meta_file" - test $is_draft == yes && rm "$meta_file" -} - -# Retrieve the core content as XHTML of the blog post. -atomfeed::content () { - local -r gmi_file_path="$1"; shift - log VERBOSE "Retrieving feed content from $gmi_file_path" - - # sed: Remove all before the first header - # sed: Make HTML links absolute, Atom relative URLs feature seems a mess - # across different Atom clients. - html::fromgmi < <($SED '/Go back to the main site/d' "$gmi_file_path") | - $SED " - s|href=\"\./|href=\"https://$DOMAIN/gemfeed/|g; - s|src=\"\./|src=\"https://$DOMAIN/gemfeed/|g; - " -} - -# Generate an atom.xml feed file. -atomfeed::generate () { - local -r gemfeed_dir="$CONTENT_DIR/gemtext/gemfeed" - local -r atom_file="$gemfeed_dir/atom.xml" - local -r now=$($DATE --iso-8601=seconds) - log INFO "Generating Atom feed to $atom_file" - - assert::not_empty now "$now" - - cat <<ATOMHEADER > "$atom_file.tmp" -<?xml version="1.0" encoding="utf-8"?> -<feed xmlns="http://www.w3.org/2005/Atom"> - <updated>$now</updated> - <title>$DOMAIN feed</title> - <subtitle>$SUBTITLE</subtitle> - <link href="gemini://$DOMAIN/gemfeed/atom.xml" rel="self" /> - <link href="gemini://$DOMAIN/" /> - <id>gemini://$DOMAIN/</id> -ATOMHEADER - - while read -r gmi_file; do - # Load cached meta information about the post. - source <(atomfeed::meta "$gemfeed_dir/$gmi_file") - - # Get HTML content for the feed - local content="$(atomfeed::content "$gemfeed_dir/$gmi_file")" - - assert::not_empty meta_title "$meta_title" - assert::not_empty meta_date "$meta_date" - assert::not_empty meta_author "$meta_author" - assert::not_empty meta_email "$meta_email" - assert::not_empty meta_summary "$meta_summary" - assert::not_empty content "$content" - - cat <<ATOMENTRY >> "$atom_file.tmp" - <entry> - <title>$meta_title</title> - <link href="gemini://$DOMAIN/gemfeed/$gmi_file" /> - <id>gemini://$DOMAIN/gemfeed/$gmi_file</id> - <updated>$meta_date</updated> - <author> - <name>$meta_author</name> - <email>$meta_email</email> - </author> - <summary>$meta_summary</summary> - <content type="xhtml"> - <div xmlns="http://www.w3.org/1999/xhtml"> - $content - </div> - </content> - </entry> -ATOMENTRY - done < <(gemfeed::get_posts | head -n $ATOM_MAX_ENTRIES) - - cat <<ATOMFOOTER >> "$atom_file.tmp" -</feed> -ATOMFOOTER - - # Delete the 3rd line of the atom feeds (global feed update timestamp) - if ! diff -u <($SED 3d "$atom_file") <($SED 3d "$atom_file.tmp"); then - log INFO 'Feed got something new!' - mv "$atom_file.tmp" "$atom_file" - test "$ADD_GIT" == yes && git add "$atom_file" - else - log INFO 'Nothing really new in the feed' - rm "$atom_file.tmp" - fi -} diff --git a/packages/gemfeed.source.sh b/packages/gemfeed.source.sh deleted file mode 100644 index 33ea0c8d..00000000 --- a/packages/gemfeed.source.sh +++ /dev/null @@ -1,54 +0,0 @@ -# Filter out blog posts from other files in the gemfeed dir. -gemfeed::get_posts () { - local -r gemfeed_dir="$CONTENT_DIR/gemtext/gemfeed" - local -r gmi_pattern='^[0-9]{4}-[0-9]{2}-[0-9]{2}-.*\.gmi$' - local -r draft_pattern='\.draft\.gmi$' - - ls "$gemfeed_dir" | - $GREP -E "$gmi_pattern" | - $GREP -E -v "$draft_pattern" | - sort -r -} - -# Add the links from gemfeed/index.gmi to the main index site. -gemfeed::updatemainindex () { - local -r index_gmi="$CONTENT_DIR/gemtext/index.gmi" - local -r gemfeed_dir="$CONTENT_DIR/gemtext/gemfeed" - - log VERBOSE "Updating $index_gmi with posts from $gemfeed_dir" - - # Remove old gemfeeds from main index - $SED '/^=> .\/gemfeed\/[0-9].* - .*/d;' "$index_gmi" > "$index_gmi.tmp" - # Add current gemfeeds to main index - $SED -n '/^=> / { s| ./| ./gemfeed/|; p; }' "$gemfeed_dir/index.gmi" >> "$index_gmi.tmp" - - mv "$index_gmi.tmp" "$index_gmi" - test "$ADD_GIT" == yes && git add "$index_gmi" -} - -# Generate a index.gmi in the ./gemfeed subdir. -gemfeed::generate () { - local -r gemfeed_dir="$CONTENT_DIR/gemtext/gemfeed" - log INFO "Generating Gemfeed index for $gemfeed_dir" - -cat <<GEMFEED > "$gemfeed_dir/index.gmi.tmp" -# $DOMAIN's Gemfeed - -## $SUBTITLE - -GEMFEED - - gemfeed::get_posts | while read -r gmi_file; do - # Extract first heading as post title. - local title=$($SED -n '/^# / { s/# //; p; q; }' "$gemfeed_dir/$gmi_file" | tr '"' "'") - # Extract the date from the file name. - local filename_date=$(basename "$gemfeed_dir/$gmi_file" | cut -d- -f1,2,3) - - echo "=> ./$gmi_file $filename_date - $title" >> "$gemfeed_dir/index.gmi.tmp" - done - - mv "$gemfeed_dir/index.gmi.tmp" "$gemfeed_dir/index.gmi" - test "$ADD_GIT" == yes && git add "$gemfeed_dir/index.gmi" - - gemfeed::updatemainindex -} diff --git a/packages/generate.source.sh b/packages/generate.source.sh deleted file mode 100644 index 83bf69ee..00000000 --- a/packages/generate.source.sh +++ /dev/null @@ -1,137 +0,0 @@ -# Generate a HTML or Markdown link from given Gemtext link. -generate::make_link () { - local -r what="$1"; shift - local -r line="${1/=> }"; shift - local link - local descr - - while read -r token; do - if [ -z "$link" ]; then - link="$token" - elif [ -z "$descr" ]; then - descr="$token" - else - descr="$descr $token" - fi - done < <(echo "$line" | tr ' ' '\n') - - if $GREP -E -q "$IMAGE_PATTERN" <<< "$link"; then - if [[ "$what" == md ]]; then - md::make_img "$link" "$descr" - else - html::make_img "$link" "$(html::encode "$descr")" - fi - return - fi - - if [[ "$what" == md ]]; then - md::make_link "$link" "$descr" - else - html::make_link "$link" "$(html::encode "$descr")" - fi -} - -# Add other docs (e.g. images, videos) from Gemtext to output format. -generate::fromgmi_add_docs () { - local -r src="$1"; shift - local -r format="$1"; shift - local -r dest=${src/gemtext/$format} - local -r dest_dir=$(dirname "$dest") - - test ! -d "$dest_dir" && mkdir -p "$dest_dir" - cp "$src" "$dest" - test "$ADD_GIT" == yes && git add "$dest" -} - -# Remove docs from output format which aren't present in Gemtext anymore. -generate::fromgmi_cleanup_docs () { - local -r src="$1"; shift - local -r format="$1"; shift - local dest=${src/.$format/.gmi} - dest=${dest/$format/gemtext} - - test ! -f "$dest" && test "$ADD_GIT" == yes && git rm "$src" -} - -# Convert the Gemtext Atom feed to a HTML Atom feed. -generate::convert_gmi_atom_to_html_atom () { - local -r format="$1"; shift - test "$format" != html && return - - log INFO 'Converting Gemtext Atom feed to HTML Atom feed' - - $SED 's|.gmi|.html|g; s|gemini://|https://|g' \ - < $CONTENT_DIR/gemtext/gemfeed/atom.xml \ - > $CONTENT_DIR/html/gemfeed/atom.xml - - test "$ADD_GIT" == yes && git add "$CONTENT_DIR/html/gemfeed/atom.xml" -} - -# Internal helper function for generate::fromgmi -generate::_fromgmi () { - local -r src="$1"; shift - local -r format="$1"; shift - local dest=${src/gemtext/$format} - dest=${dest/.gmi/.$format} - local dest_dir=$(dirname "$dest") - - test ! -d "$dest_dir" && mkdir -p "$dest_dir" - if [[ "$format" == html ]]; then - cat header.html.part > "$dest.tmp" - html::fromgmi < "$src" >> "$dest.tmp" - cat footer.html.part >> "$dest.tmp" - elif [[ "$format" == md ]]; then - md::fromgmi < "$src" >> "$dest.tmp" - fi - - local title=$($SED -n '/^# / { s/# //; p; q; }' "$src" | tr '"' "'") - test -z "title" && title=$SUBTITLE - $SED -i "s|%%TITLE%%|$title|g" "$dest.tmp" - mv "$dest.tmp" "$dest" - test "$ADD_GIT" == yes && git add "$dest" -} - -# Generate a given output format from a Gemtext file. -generate::fromgmi () { - local -i num_gmi_files=0 - local -i num_doc_files=0 - - log INFO "Generating $* from Gemtext" - - while read -r src; do - (( num_gmi_files++ )) - for format in "$@"; do - generate::_fromgmi "$src" "$format" - done - done < <(find "$CONTENT_DIR/gemtext" -type f -name \*.gmi) - - log INFO "Converted $num_gmi_files Gemtext files" - - # Add non-.gmi files to html dir. - log VERBOSE "Adding other docs to $*" - - while read -r src; do - (( num_doc_files++ )) - for format in "$@"; do - generate::fromgmi_add_docs "$src" "$format" - done - done < <(find "$CONTENT_DIR/gemtext" -type f | $GREP -E -v '(.gmi|atom.xml|.tmp)$') - - log INFO "Added $num_doc_files other documents to each of $*" - - # Add atom feed for HTML - for format in "$@"; do - generate::convert_gmi_atom_to_html_atom "$format" - done - - # Remove obsolete files from ./html/ - for format in "$@"; do - find "$CONTENT_DIR/$format" -type f | while read -r src; do - generate::fromgmi_cleanup_docs "$src" "$format" - done - done - - for format in "$@"; do - log INFO "$format can be found in $CONTENT_DIR/$format now" - done -} diff --git a/packages/html.source.sh b/packages/html.source.sh deleted file mode 100644 index 5a292f1c..00000000 --- a/packages/html.source.sh +++ /dev/null @@ -1,153 +0,0 @@ -# Convert special characters to their HTML codes -html::encode () { - $SED ' - s|\&|\&|g; - s|<|\<|g; - s|>|\>|g; - ' <<< "$@" -} - -# Make a HTML paragraph. -html::make_paragraph () { - local -r text="$1"; shift - test -n "$text" && echo "<p>$(html::encode "$text")</p>" -} - -# Make a HTML header. -html::make_heading () { - local -r text=$($SED -E 's/^#+ //' <<< "$1"); shift - local -r level="$1"; shift - echo "<h${level}>$(html::encode "$text")</h${level}>" -} - -# Make a HTML quotation -html::make_quote () { - local -r quote="${1/> }" - echo "<p class=\"quote\"><i>$(html::encode "$quote")</i></p>" -} - -# Make a HTML image -html::make_img () { - local link="$1"; shift - local descr="$1"; shift - - if [ -z "$descr" ]; then - echo -n "<a href=\"$link\"><img src=\"$link\" /></a>" - else - echo -n "<i>$descr:</i>" - echo -n "<a href=\"$link\"><img alt=\"$descr\" title=\"$descr\" src=\"$link\" /></a>" - fi - - echo "<br />" -} - -# Make a HTML hyperlink -html::make_link () { - local link="$1"; shift - local descr="$1"; shift - - $GREP -F -q '://' <<< "$link" || link=${link/.gmi/.html} - test -z "$descr" && descr="$link" - echo "<a class=\"textlink\" href=\"$link\">$descr</a><br />" -} - -# Convert Gemtext to HTML -html::fromgmi () { - local is_list=no - local is_plain=no - - while IFS='' read -r line; do - if [[ "$is_list" == yes ]]; then - if [[ "$line" == '* '* ]]; then - echo "<li>$(html::encode "${line/\* /}")</li>" - else - is_list=no - echo "</ul>" - fi - continue - - elif [[ "$is_plain" == yes ]]; then - if [[ "$line" == '```'* ]]; then - echo "</pre>" - is_plain=no - else - html::encode "$line" - fi - continue - fi - - case "$line" in - '* '*) - is_list=yes - echo "<ul>" - echo "<li>${line/\* /}</li>" - ;; - '```'*) - is_plain=yes - echo "<pre>" - ;; - '# '*) - html::make_heading "$line" 1 - ;; - '## '*) - html::make_heading "$line" 2 - ;; - '### '*) - html::make_heading "$line" 3 - ;; - '> '*) - html::make_quote "$line" - ;; - '=> '*) - generate::make_link html "$line" - ;; - *) - html::make_paragraph "$line" - ;; - esac - done -} - -# Test HTML package. -html::test () { - local line='Hello world! This is a paragraph.' - assert::equals "$(html::make_paragraph "$line")" '<p>Hello world! This is a paragraph.</p>' - - line='' - assert::equals "$(html::make_paragraph "$line")" '' - - line='Foo &<>& Bar!' - assert::equals "$(html::make_paragraph "$line")" '<p>Foo &<>& Bar!</p>' - - line='# Header 1' - assert::equals "$(html::make_heading "$line" 1)" '<h1>Header 1</h1>' - - line='## Header 2' - assert::equals "$(html::make_heading "$line" 2)" '<h2>Header 2</h2>' - - line='### Header 3' - assert::equals "$(html::make_heading "$line" 3)" '<h3>Header 3</h3>' - - line='> This is a quote' - assert::equals "$(html::make_quote "$line")" '<p class="quote"><i>This is a quote</i></p>' - - line='=> https://example.org' - assert::equals "$(generate::make_link html "$line")" \ - '<a class="textlink" href="https://example.org">https://example.org</a><br />' - - line='=> index.gmi' - assert::equals "$(generate::make_link html "$line")" \ - '<a class="textlink" href="index.html">index.html</a><br />' - - line='=> http://example.org Description of the link' - assert::equals "$(generate::make_link html "$line")" \ - '<a class="textlink" href="http://example.org">Description of the link</a><br />' - - line='=> http://example.org/image.png' - assert::equals "$(generate::make_link html "$line")" \ - '<a href="http://example.org/image.png"><img src="http://example.org/image.png" /></a><br />' - - line='=> http://example.org/image.png Image description' - assert::equals "$(generate::make_link html "$line")" \ - '<i>Image description:</i><a href="http://example.org/image.png"><img alt="Image description" title="Image description" src="http://example.org/image.png" /></a><br />' -} diff --git a/packages/log.source.sh b/packages/log.source.sh deleted file mode 100644 index 2c6e1b3f..00000000 --- a/packages/log.source.sh +++ /dev/null @@ -1,29 +0,0 @@ -# Log a message. -log () { - local -r level="$1"; shift - - for message in "$@"; do - echo "$message" - done | log::_pipe "$level" -} - -# Log a stream through a pipe. -log::pipe () { - log::_pipe "$1" -} - -# Internal log implementation. -log::_pipe () { - local -r level="$1"; shift - - if [[ "$level" == VERBOSE && -z "$LOG_VERBOSE" ]]; then - return - fi - - local -r callee=${FUNCNAME[2]} - local -r stamp=$($DATE +%Y%m%d-%H%M%S) - - while read -r line; do - echo "$level|$stamp|$callee|$line" >&2 - done -} diff --git a/packages/md.source.sh b/packages/md.source.sh deleted file mode 100644 index 957b9cf3..00000000 --- a/packages/md.source.sh +++ /dev/null @@ -1,59 +0,0 @@ -# Make a Markdown image. -md::make_img () { - local link="$1"; shift - local descr="$1"; shift - - if [ -z "$descr" ]; then - echo "[]($link) " - else - echo "[]($link) " - fi -} - -# Make a Markdown hyperlink. -md::make_link () { - local link="$1"; shift - local descr="$1"; shift - - $GREP -F -q '://' <<< "$link" || link=${link/.gmi/.md} - test -z "$descr" && descr="$link" - - echo "[$descr]($link) " -} - -# Convert Gemtext to Markdown. -md::fromgmi () { - while IFS='' read -r line; do - case "$line" in - '=> '*) - generate::make_link md "$line" - ;; - *) - echo "$line" - ;; - esac - done -} - -# Test the Markdown package. -md::test () { - local line='=> https://example.org' - assert::equals "$(generate::make_link md "$line")" \ - '[https://example.org](https://example.org) ' - - line='=> index.md' - assert::equals "$(generate::make_link md "$line")" \ - '[index.md](index.md) ' - - line='=> http://example.org Description of the link' - assert::equals "$(generate::make_link md "$line")" \ - '[Description of the link](http://example.org) ' - - line='=> http://example.org/image.png' - assert::equals "$(generate::make_link md "$line")" \ - '[](http://example.org/image.png) ' - - line='=> http://example.org/image.png Image description' - assert::equals "$(generate::make_link md "$line")" \ - '[](http://example.org/image.png) ' -} diff --git a/content/md/resources.md b/resources.md index 635ecabd..635ecabd 100644 --- a/content/md/resources.md +++ b/resources.md |
