From 5b2deaa0e51468a04a3c7c72ad8e5181a8e804e2 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 28 May 2023 00:01:27 +0300 Subject: Update content for html --- ...5-gemtexter-one-bash-script-to-rule-it-all.html | 60 +++++++++++----------- 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'gemfeed/2021-06-05-gemtexter-one-bash-script-to-rule-it-all.html') diff --git a/gemfeed/2021-06-05-gemtexter-one-bash-script-to-rule-it-all.html b/gemfeed/2021-06-05-gemtexter-one-bash-script-to-rule-it-all.html index 5148d1e0..03991c89 100644 --- a/gemfeed/2021-06-05-gemtexter-one-bash-script-to-rule-it-all.html +++ b/gemfeed/2021-06-05-gemtexter-one-bash-script-to-rule-it-all.html @@ -15,42 +15,42 @@
                                                                o .,<>., o
                                                                |\/\/\/\/|
-                                                               '========'
+                                                               '========'
                                                                (_ SSSSSSs
-                                                               )a'`SSSSSs
+                                                               )a'`SSSSSs
                                                               /_   SSSSSS
                                                               .=## SSSSS
                                                               .####  SSSSs
                                                               ###::::SSSSS
                                                              .;:::""""SSS
-                                                            .:;:'  . .  \\
-                                                           .::/  '     .'|
+                                                            .:;:'  . .  \\
+                                                           .::/  '     .'|
                                                           .::( .         |
                                                           :::)           \
                                                           /\(            /
                                                          /)            ( |
-                                                       .'  \  .       ./ /
-                                                    _-'    |\  .        |
+                                                       .'  \  .       ./ /
+                                                    _-'    |\  .        |
                                   _..--..   .  /"---\      | ` |      . |
-          -=====================,' _     \=(*#(7.#####()   |  `/_..   , (
-                      _.-''``';'-''-) ,.  \ '  '+/// |   .'/   \  ``-.) \
-                    ,'  _.-  ((    `-'  `._\    `` \_/_.'  )    /`-._  ) |
-                  ,'\ ,'  _.'.`:-.    \.-'                 /   <_L   )"  |
-                _/   `._,' ,')`;  `-'`'                    |     L  /    /
-               / `.   ,' ,|_/ / \                          (    <_-'     \
-               \ / `./  '  / /,' \                        /|`         `. |
-               )\   /`._   ,'`._.-\                       |)            \'
-              /  `.'    )-'.-,' )__)                      |\            `|
-             : /`. `.._(--.`':`':/ \                      ) \             \
-             |::::\     ,'/::;-))  /                      ( )`.            |
-             ||:::::  . .::':  :`-(                       |/    .          |
+          -=====================,' _     \=(*#(7.#####()   |  `/_..   , (
+                      _.-''``';'-''-) ,.  \ '  '+/// |   .'/   \  ``-.) \
+                    ,'  _.-  ((    `-'  `._\    `` \_/_.'  )    /`-._  ) |
+                  ,'\ ,'  _.'.`:-.    \.-'                 /   <_L   )"  |
+                _/   `._,' ,')`;  `-'`'                    |     L  /    /
+               / `.   ,' ,|_/ / \                          (    <_-'     \
+               \ / `./  '  / /,' \                        /|`         `. |
+               )\   /`._   ,'`._.-\                       |)            \'
+              /  `.'    )-'.-,' )__)                      |\            `|
+             : /`. `.._(--.`':`':/ \                      ) \             \
+             |::::\     ,'/::;-))  /                      ( )`.            |
+             ||:::::  . .::':  :`-(                       |/    .          |
              ||::::|  . :|  |==[]=:                       .        -       \
              |||:::|  : ||  :  |  |                      /\           `     |
- ___ ___     '|;:::|  | |'   \=[]=|                     /  \                \
-|   /_  ||``|||:::::  | ;    | |  |                     \_.'\_               `-.
-:   \_``[]--[]|::::'\_;'     )-'..`._                 .-'\``:: ` .              \
- \___.>`''-.||:.__,'     SSt |_______`>              <_____:::.         . . \  _/
-                                                           `+a:f:......jrei'''
+ ___ ___     '|;:::|  | |'   \=[]=|                     /  \                \
+|   /_  ||``|||:::::  | ;    | |  |                     \_.'\_               `-.
+:   \_``[]--[]|::::'\_;'     )-'..`._                 .-'\``:: ` .              \
+ \___.>`''-.||:.__,'     SSt |_______`>              <_____:::.         . . \  _/
+                                                           `+a:f:......jrei'''
 

You might have read my previous blog posts about entering the Geminispace, where I pointed out the benefits of having and maintaining an internet presence there. This whole site (the blog and all other pages) is composed in the Gemtext markup language.
@@ -80,7 +80,7 @@
  • A Gemfeed for my blog posts (a particular feed format commonly used in Geminispace. The Gemfeed can be used as an alternative to the Atom feed).
  • An HTML Atom feed of my blog posts

  • -I could have done all of that with a more robust language than Bash (such as Perl, Ruby, Go...), but I didn't. The purpose of this exercise was to challenge what I can do with a "simple" Bash script and learn new things.
    +I could have done all of that with a more robust language than Bash (such as Perl, Ruby, Go...), but I didn't. The purpose of this exercise was to challenge what I can do with a "simple" Bash script and learn new things.

    Taking it as far as I should, but no farther



    @@ -108,7 +108,7 @@ http://www.gnu.org/software/src-highlite --> 834 total
    -This way, the script could grow far beyond 1000 lines of code and still be maintainable. With more features, execution speed may slowly become a problem, though. I already notice that Gemtexter doesn't produce results instantly but requires few seconds of runtime already. That's not a problem yet, though.
    +This way, the script could grow far beyond 1000 lines of code and still be maintainable. With more features, execution speed may slowly become a problem, though. I already notice that Gemtexter doesn't produce results instantly but requires few seconds of runtime already. That's not a problem yet, though.

    Bash best practises and ShellCheck



    @@ -120,7 +120,7 @@ http://www.gnu.org/software/src-highlite -->
    ShellCheck, a shell script analysis tool written in Haskell, is run on Gemtexter ensuring that all code is acceptable. I am pretty impressed with what ShellCheck found.

    -It, for example, detected "some_command | while read var; do ...; done" loops and hinted that these create a new subprocess for the while part. The result is that all variable modifications taking place in the while-subprocess won't reflect the primary Bash process. ShellSheck then recommended rewriting the loop so that no subprocess is spawned as "while read -r var; do ...; done < <(some_command)". ShellCheck also pointed out to add a "-r" to "read"; otherwise, there could be an issue with backspaces in the loop data.
    +It, for example, detected "some_command | while read var; do ...; done" loops and hinted that these create a new subprocess for the while part. The result is that all variable modifications taking place in the while-subprocess won't reflect the primary Bash process. ShellSheck then recommended rewriting the loop so that no subprocess is spawned as "while read -r var; do ...; done < <(some_command)". ShellCheck also pointed out to add a "-r" to "read"; otherwise, there could be an issue with backspaces in the loop data.

    Furthermore, ShellCheck recommended many more improvements. Declaration of unused variables and missing variable and string quotations were the most common ones. ShellSheck immensely helped to improve the robustness of the script.

    @@ -162,7 +162,7 @@ assert::equals "$(generate::m
    For now, I have to re-generate all HTML files whenever the CSS changes. That should not be an issue now, but I might move the CSS into a separate file one day.

    -It's worth mentioning that all generated HTML files and Atom feeds pass the W3C validation tests.
    +It's worth mentioning that all generated HTML files and Atom feeds pass the W3C validation tests.

    Configurability



    @@ -180,14 +180,14 @@ assert::equals "$(generate::m

    Conclusion



    -It was quite a lot of fun writing Gemtexter. It's a relatively small project, but given that I worked on that in my spare time once in a while, it kept me busy for several weeks.
    +It was quite a lot of fun writing Gemtexter. It's a relatively small project, but given that I worked on that in my spare time once in a while, it kept me busy for several weeks.

    I finally revamped my personal internet site and started to blog again. I wanted the result to be exactly how it is now: A slightly retro-inspired internet site built for fun with unconventional tools.

    Other related posts are:

    -2023-03-25 Gemtexter 2.0.0 - Let's Gemtext again²
    -2022-08-27 Gemtexter 1.1.0 - Let's Gemtext again
    +2023-03-25 Gemtexter 2.0.0 - Let's Gemtext again²
    +2022-08-27 Gemtexter 1.1.0 - Let's Gemtext again
    2022-01-01 Bash Golf Part 2
    2021-11-29 Bash Golf Part 1
    2021-06-05 Gemtexter - One Bash script to rule it all (You are currently reading this)
    -- cgit v1.2.3