From d25c0aa6d49ffaca01526673e3070cacf6552f65 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Mon, 27 Mar 2023 23:06:06 +0300 Subject: Update content for html --- gemfeed/atom.xml | 28 +++++++++++++------------- index.html | 2 +- uptime-stats.html | 60 +++++++++++++++++++++++++++---------------------------- 3 files changed, 45 insertions(+), 45 deletions(-) diff --git a/gemfeed/atom.xml b/gemfeed/atom.xml index 02665890..28c66230 100644 --- a/gemfeed/atom.xml +++ b/gemfeed/atom.xml @@ -1,6 +1,6 @@ - 2023-03-26T15:48:54+03:00 + 2023-03-27T23:05:17+03:00 foo.zone feed To be in the .zone! @@ -37,9 +37,9 @@

This is a new major release, so it contains a breaking change (see "Meta cache made obsolete").

Let's list what's new!

Minimal template engine

-

Gemtexter now supports templating, enabling dynamically generated content to .html files before converting anything to any output format like HTML and Markdown.

-

A template file name must have the suffix . A template must be put into the same directory as the Gemtext .html file to be generated. Gemtexter will generate a Gemtext file index.html from a given template index.html.tpl. A <<< and >>> encloses a multiline template. All lines starting with << will be evaluated as a single line of Bash code and the output will be written into the resulting Gemtext file.

-

For example, the template index.html.tpl:

+

Gemtexter now supports templating, enabling dynamically generated content to .gmi files before converting anything to any output format like HTML and Markdown.

+

A template file name must have the suffix gmi.tpl. A template must be put into the same directory as the Gemtext .gmi file to be generated. Gemtexter will generate a Gemtext file index.gmi from a given template index.gmi.tpl. A <<< and >>> encloses a multiline template. All lines starting with << will be evaluated as a single line of Bash code and the output will be written into the resulting Gemtext file.

+

For example, the template index.gmi.tpl:

 # Hello world
 
@@ -53,7 +53,7 @@ Welcome to this capsule!
   done
 >>>
 

-

... results into the following index.html after running ./gemtexter --generate (or ./gemtexter --template, which instructs to do only template processing and nothing else):

+

... results into the following index.gmi after running ./gemtexter --generate (or ./gemtexter --template, which instructs to do only template processing and nothing else):

 # Hello world
 
@@ -84,10 +84,10 @@ Blablabla...
 
 See more entries about DTail and Golang:
 
-=> ./2022-10-30-installing-dtail-on-openbsd.html 2022-10-30 Installing DTail on OpenBSD
-=> ./2022-04-22-programming-golang.html 2022-04-22 The Golang Programming language
-=> ./2022-03-06-the-release-of-dtail-4.0.0.html 2022-03-06 The release of DTail 4.0.0
-=> ./2021-04-22-dtail-the-distributed-log-tail-program.html 2021-04-22 DTail - The distributed log tail program (You are currently reading this)
+=> ./2022-10-30-installing-dtail-on-openbsd.gmi 2022-10-30 Installing DTail on OpenBSD
+=> ./2022-04-22-programming-golang.gmi 2022-04-22 The Golang Programming language
+=> ./2022-03-06-the-release-of-dtail-4.0.0.gmi 2022-03-06 The release of DTail 4.0.0
+=> ./2021-04-22-dtail-the-distributed-log-tail-program.gmi 2021-04-22 DTail - The distributed log tail program (You are currently reading this)
 
 Blablabla...
 

@@ -101,17 +101,17 @@ declare -xr POST_PUBLISH_HOOK=./post_publish_hook.sh

Use of safer Bash options

Gemtexter now does set -euf -o pipefile, which helps to eliminate bugs and to catch scripting errors sooner. Previous versions only set -e.

Meta cache made obsolete

-

Here is the breaking change to older versions of Gemtexter. The $BASE_CONTENT_DIR/meta directory was made obsolete. meta was used to store various information about all the blog post entries to make generating an Atom feed in Bash easier. Especially the publishing dates of each post were stored there. Instead, the publishing date is now encoded in the .html file. And if it is missing, Gemtexter will set it to the current date and time at first run.

+

Here is the breaking change to older versions of Gemtexter. The $BASE_CONTENT_DIR/meta directory was made obsolete. meta was used to store various information about all the blog post entries to make generating an Atom feed in Bash easier. Especially the publishing dates of each post were stored there. Instead, the publishing date is now encoded in the .gmi file. And if it is missing, Gemtexter will set it to the current date and time at first run.

An example blog post without any publishing date looks like this:

-% cat gemfeed/2023-02-26-title-here.html
+% cat gemfeed/2023-02-26-title-here.gmi
 # Title here
 
 The remaining content of the Gemtext file...
 

Gemtexter will add a line starting with > Published at ... now. Any subsequent Atom feed generation will then use that date.

-% cat gemfeed/2023-02-26-title-here.html
+% cat gemfeed/2023-02-26-title-here.gmi
 # Title here
 
 > Published at 2023-02-26T21:43:51+01:00
@@ -1034,7 +1034,7 @@ check_dependencies () {
 

Backticks now produce inline code blocks in the HTML output

The Gemtext format doesn't support inline code blocks, but Gemtexter now produces inline code blocks (means, small code fragments can be placed in the middle of a paragraph) in the HTML output when the code block is enclosed with Backticks. There were no adjustments required for the Markdown output format, because Markdown supports it already out of the box.

Cache for Atom feed generation

-

The Bash is not the most performant language. Gemtexter already takes a couple of seconds only to generate the Atom feed for around two hand full of articles on my slightly underpowered Surface Go 2 Linux tablet. Therefore, I introduced a cache, so that subsequent Atom feed generation runs finish much quicker. The cache uses a checksum of the Gemtext .html file to decide whether anything of the content has changed or not.

+

The Bash is not the most performant language. Gemtexter already takes a couple of seconds only to generate the Atom feed for around two hand full of articles on my slightly underpowered Surface Go 2 Linux tablet. Therefore, I introduced a cache, so that subsequent Atom feed generation runs finish much quicker. The cache uses a checksum of the Gemtext .gmi file to decide whether anything of the content has changed or not.

Input filter support

Once your capsule reaches a certain size, it can become annoying to re-generate everything if you only want to preview the HTML or Markdown output of one single content file. The following will add a filter to only generate the files matching a regular expression:

@@ -3948,7 +3948,7 @@ assert::equals "$(generate::make_link md "$gemtext")" \
 

Future features

I could think of the following features added to a future version of Gemtexter:

    -
  • Templating of Gemtext files so that the .html files are generated from .html.tpl files. The template engine could do such things as an automatic table of contents and sitemap generation. It could also include the output of inlined shell code, e.g. a fortune quote.
  • +
  • Templating of Gemtext files so that the .gmi files are generated from .gmi.tpl files. The template engine could do such things as an automatic table of contents and sitemap generation. It could also include the output of inlined shell code, e.g. a fortune quote.
  • Add support for more output formats, such as Groff, PDF, plain text, Gopher, etc.
  • External CSS file for HTML.
  • Improve speed by introducing parallelism and/or concurrency and/or better caching.
  • diff --git a/index.html b/index.html index 62c65600..195b8e82 100644 --- a/index.html +++ b/index.html @@ -9,7 +9,7 @@

    foo.zone

    -

    This site was generated at 2023-03-26T15:51:46+03:00 by Gemtexter

    +

    This site was generated at 2023-03-27T23:05:59+03:00 by Gemtexter

        |\---/|
        | ,_, |
    diff --git a/uptime-stats.html b/uptime-stats.html
    index b70761dc..b69c6806 100644
    --- a/uptime-stats.html
    +++ b/uptime-stats.html
    @@ -9,7 +9,7 @@
     
     
     

    My machine uptime stats

    -

    This site was last updated at 2023-03-26T15:51:46+03:00

    +

    This site was last updated at 2023-03-27T23:05:59+03:00

    The following stats were collected via uptimed on all of my personal computers over many years and the output was generated by guprecords, the global uptime records stats analyser.

    Uptimed is an uptime record daemon keeping track of the highest uptimes a computer system ever had. It uses the system boot time to keep sessions apart from each other.

    https://github.com/rpodgorny/uptimed
    @@ -25,20 +25,20 @@ | 4. | uranus | 150 | | 5. | dionysus | 136 | | 6. | tauceti-e | 120 | -| 7. | *earth | 106 | +| 7. | *earth | 108 | | 8. | pluto | 51 | -| 9. | *ultramega15289 | 50 | -| 10. | makemake | 50 | -| 11. | ultramega8477 | 40 | -| 12. | phobos | 40 | +| 9. | makemake | 50 | +| 10. | *ultramega15289 | 50 | +| 11. | phobos | 40 | +| 12. | ultramega8477 | 40 | | 13. | sun | 33 | | 14. | *t450 | 25 | | 15. | *vulcan | 19 | -| 16. | tauceti | 16 | -| 17. | *blowfish | 16 | +| 16. | *blowfish | 16 | +| 17. | tauceti | 16 | | 18. | sagittarius | 15 | | 19. | deltavega | 12 | -| 20. | host0 | 10 | +| 20. | fishbone | 10 | +-----+-----------------+-------+

    Top 20 Uptime's by Host:

    @@ -55,7 +55,7 @@ | 7. | tauceti | 2 years, 3 months, 19 days | | 8. | tauceti-f | 1 years, 9 months, 18 days | | 9. | *ultramega15289 | 1 years, 7 months, 29 days | -| 10. | *earth | 1 years, 4 months, 17 days | +| 10. | *earth | 1 years, 4 months, 24 days | | 11. | ultramega8477 | 1 years, 3 months, 25 days | | 12. | *blowfish | 1 years, 3 months, 24 days | | 13. | host0 | 1 years, 3 months, 9 days | @@ -84,9 +84,9 @@ | 9. | tauceti | 141 | | 10. | *ultramega15289 | 122 | | 11. | tauceti-e | 111 | -| 12. | tauceti-f | 108 | -| 13. | callisto | 108 | -| 14. | *earth | 104 | +| 12. | callisto | 108 | +| 13. | tauceti-f | 108 | +| 14. | *earth | 105 | | 15. | makemake | 96 | | 16. | mars | 85 | | 17. | *blowfish | 81 | @@ -141,7 +141,7 @@ | 12. | tauceti-e | 2 years, 1 months, 29 days | | 13. | makemake | 1 years, 11 months, 28 days | | 14. | tauceti-f | 1 years, 9 months, 20 days | -| 15. | *earth | 1 years, 8 months, 24 days | +| 15. | *earth | 1 years, 8 months, 31 days | | 16. | mars | 1 years, 8 months, 19 days | | 17. | host0 | 1 years, 4 months, 10 days | | 18. | ultramega8477 | 1 years, 4 months, 1 days | @@ -163,17 +163,17 @@ | 7. | Darwin 13.4.0 | 40 | | 8. | FreeBSD 10.3-RELEASE-p20 | 39 | | 9. | FreeBSD 10.3-RELEASE-p11 | 39 | -| 10. | FreeBSD 10.0-RELEASE-p7 | 38 | -| 11. | FreeBSD 10.1-RELEASE-p10 | 38 | +| 10. | FreeBSD 10.1-RELEASE-p10 | 38 | +| 11. | FreeBSD 10.0-RELEASE-p7 | 38 | | 12. | FreeBSD 10.1-RELEASE-p35 | 34 | -| 13. | FreeBSD 13.0-RELEASE-p4 | 29 | -| 14. | FreeBSD 10.0-RELEASE-p9 | 29 | +| 13. | FreeBSD 10.0-RELEASE-p9 | 29 | +| 14. | FreeBSD 13.0-RELEASE-p4 | 29 | | 15. | FreeBSD 10.3-RELEASE-p24 | 28 | | 16. | FreeBSD 13.0-RELEASE | 26 | | 17. | *FreeBSD 13.1-RELEASE-p3 | 25 | | 18. | FreeBSD 10.1-RELEASE-p31 | 24 | | 19. | FreeBSD 11.4-RELEASE-p5 | 23 | -| 20. | FreeBSD 10.1-RELEASE-p41 | 20 | +| 20. | FreeBSD 11.3-RELEASE-p9 | 20 | +-----+------------------------------+-------+

Top 20 Uptime's by OS:

@@ -243,16 +243,16 @@ | 6. | *FreeBSD 13... | 123 | | 7. | Darwin 13... | 40 | | 8. | *OpenBSD 7... | 34 | -| 9. | *Linux 6... | 27 | +| 9. | *Linux 6... | 29 | | 10. | FreeBSD 5... | 25 | | 11. | Linux 2... | 22 | | 12. | *Darwin 21... | 20 | | 13. | Darwin 15... | 15 | | 14. | Darwin 18... | 15 | | 15. | Darwin 20... | 12 | -| 16. | OpenBSD 4... | 10 | -| 17. | FreeBSD 7... | 10 | -| 18. | FreeBSD 6... | 10 | +| 16. | FreeBSD 6... | 10 | +| 17. | OpenBSD 4... | 10 | +| 18. | FreeBSD 7... | 10 | | 19. | *Darwin 22... | 2 | | 20. | Darwin 19... | 1 | +-----+----------------+-------+ @@ -276,7 +276,7 @@ | 12. | Darwin 18... | 0 years, 7 months, 30 days | | 13. | Darwin 15... | 0 years, 6 months, 15 days | | 14. | FreeBSD 5... | 0 years, 5 months, 18 days | -| 15. | *Linux 6... | 0 years, 5 months, 10 days | +| 15. | *Linux 6... | 0 years, 5 months, 17 days | | 16. | Darwin 20... | 0 years, 4 months, 22 days | | 17. | *FreeBSD 13... | 0 years, 3 months, 29 days | | 18. | FreeBSD 7... | 0 years, 2 months, 5 days | @@ -293,8 +293,8 @@ | 2. | FreeBSD 10... | 406 | | 3. | Linux 5... | 268 | | 4. | Linux 4... | 178 | -| 5. | *OpenBSD 7... | 159 | -| 6. | FreeBSD 11... | 159 | +| 5. | FreeBSD 11... | 159 | +| 6. | *OpenBSD 7... | 159 | | 7. | Linux 2... | 121 | | 8. | Darwin 13... | 80 | | 9. | FreeBSD 6... | 75 | @@ -303,7 +303,7 @@ | 12. | Darwin 18... | 37 | | 13. | Darwin 15... | 29 | | 14. | *FreeBSD 13... | 28 | -| 15. | *Linux 6... | 27 | +| 15. | *Linux 6... | 28 | | 16. | FreeBSD 5... | 25 | | 17. | Darwin 20... | 20 | | 18. | FreeBSD 7... | 7 | @@ -316,7 +316,7 @@ +-----+----------+-------+ | Pos | Uname | Boots | +-----+----------+-------+ -| 1. | *Linux | 1012 | +| 1. | *Linux | 1014 | | 2. | *FreeBSD | 872 | | 3. | *Darwin | 105 | | 4. | *OpenBSD | 44 | @@ -327,7 +327,7 @@ +-----+----------+-----------------------------+ | Pos | Uname | Uptime | +-----+----------+-----------------------------+ -| 1. | *Linux | 24 years, 7 months, 3 days | +| 1. | *Linux | 24 years, 7 months, 10 days | | 2. | *FreeBSD | 9 years, 11 months, 29 days | | 3. | *Darwin | 3 years, 4 months, 3 days | | 4. | *OpenBSD | 3 years, 1 months, 18 days | @@ -338,7 +338,7 @@ +-----+----------+-----------+ | Pos | Uname | MetaScore | +-----+----------+-----------+ -| 1. | *Linux | 1636 | +| 1. | *Linux | 1637 | | 2. | *FreeBSD | 703 | | 3. | *Darwin | 217 | | 4. | *OpenBSD | 198 | -- cgit v1.2.3