summaryrefslogtreecommitdiff
path: root/gemfeed/2021-06-05-gemtexter-one-bash-script-to-rule-it-all.html
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2023-05-28 00:01:27 +0300
committerPaul Buetow <paul@buetow.org>2023-05-28 00:01:27 +0300
commit5b2deaa0e51468a04a3c7c72ad8e5181a8e804e2 (patch)
tree5e4437db2debeecd31686916c2b3bd79d0c78ae5 /gemfeed/2021-06-05-gemtexter-one-bash-script-to-rule-it-all.html
parentde7e5d7c4c6f85a1516b573f471351e6db5c1334 (diff)
Update content for html
Diffstat (limited to 'gemfeed/2021-06-05-gemtexter-one-bash-script-to-rule-it-all.html')
-rw-r--r--gemfeed/2021-06-05-gemtexter-one-bash-script-to-rule-it-all.html60
1 files changed, 30 insertions, 30 deletions
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 @@
<pre>
o .,&lt;&gt;., o
|\/\/\/\/|
- '========'
+ &#39;========&#39;
(_ SSSSSSs
- )a'`SSSSSs
+ )a&#39;`SSSSSs
/_ SSSSSS
.=## SSSSS
.#### SSSSs
###::::SSSSS
.;:::""""SSS
- .:;:' . . \\
- .::/ ' .'|
+ .:;:&#39; . . \\
+ .::/ &#39; .&#39;|
.::( . |
:::) \
/\( /
/) ( |
- .' \ . ./ /
- _-' |\ . |
+ .&#39; \ . ./ /
+ _-&#39; |\ . |
_..--.. . /"---\ | ` | . |
- -=====================,' _ \=(*#(7.#####() | `/_.. , (
- _.-''``';'-''-) ,. \ ' '+/// | .'/ \ ``-.) \
- ,' _.- (( `-' `._\ `` \_/_.' ) /`-._ ) |
- ,'\ ,' _.'.`:-. \.-' / &lt;_L )" |
- _/ `._,' ,')`; `-'`' | L / /
- / `. ,' ,|_/ / \ ( &lt;_-' \
- \ / `./ ' / /,' \ /|` `. |
- )\ /`._ ,'`._.-\ |) \'
- / `.' )-'.-,' )__) |\ `|
- : /`. `.._(--.`':`':/ \ ) \ \
- |::::\ ,'/::;-)) / ( )`. |
- ||::::: . .::': :`-( |/ . |
+ -=====================,&#39; _ \=(*#(7.#####() | `/_.. , (
+ _.-&#39;&#39;``&#39;;&#39;-&#39;&#39;-) ,. \ &#39; &#39;+/// | .&#39;/ \ ``-.) \
+ ,&#39; _.- (( `-&#39; `._\ `` \_/_.&#39; ) /`-._ ) |
+ ,&#39;\ ,&#39; _.&#39;.`:-. \.-&#39; / &lt;_L )" |
+ _/ `._,&#39; ,&#39;)`; `-&#39;`&#39; | L / /
+ / `. ,&#39; ,|_/ / \ ( &lt;_-&#39; \
+ \ / `./ &#39; / /,&#39; \ /|` `. |
+ )\ /`._ ,&#39;`._.-\ |) \&#39;
+ / `.&#39; )-&#39;.-,&#39; )__) |\ `|
+ : /`. `.._(--.`&#39;:`&#39;:/ \ ) \ \
+ |::::\ ,&#39;/::;-)) / ( )`. |
+ ||::::: . .::&#39;: :`-( |/ . |
||::::| . :| |==[]=: . - \
|||:::| : || : | | /\ ` |
- ___ ___ '|;:::| | |' \=[]=| / \ \
-| /_ ||``|||::::: | ; | | | \_.'\_ `-.
-: \_``[]--[]|::::'\_;' )-'..`._ .-'\``:: ` . \
- \___.&gt;`''-.||:.__,' SSt |_______`&gt; &lt;_____:::. . . \ _/
- `+a:f:......jrei'''
+ ___ ___ &#39;|;:::| | |&#39; \=[]=| / \ \
+| /_ ||``|||::::: | ; | | | \_.&#39;\_ `-.
+: \_``[]--[]|::::&#39;\_;&#39; )-&#39;..`._ .-&#39;\``:: ` . \
+ \___.&gt;`&#39;&#39;-.||:.__,&#39; SSt |_______`&gt; &lt;_____:::. . . \ _/
+ `+a:f:......jrei&#39;&#39;&#39;
</pre>
<br />
<span>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.</span><br />
@@ -80,7 +80,7 @@
<li>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).</li>
<li>An HTML Atom feed of my blog posts</li>
</ul><br />
-<span>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.</span><br />
+<span>I could have done all of that with a more robust language than Bash (such as Perl, Ruby, Go...), but I didn&#39;t. The purpose of this exercise was to challenge what I can do with a "simple" Bash script and learn new things.</span><br />
<br />
<h2 style='display: inline'>Taking it as far as I should, but no farther</h2><br />
<br />
@@ -108,7 +108,7 @@ http://www.gnu.org/software/src-highlite -->
<font color="#993399">834</font> total
</pre>
<br />
-<span>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. </span><br />
+<span>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&#39;t produce results instantly but requires few seconds of runtime already. That&#39;s not a problem yet, though. </span><br />
<br />
<h3 style='display: inline'>Bash best practises and ShellCheck</h3><br />
<br />
@@ -120,7 +120,7 @@ http://www.gnu.org/software/src-highlite -->
<br />
<span>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. </span><br />
<br />
-<span>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 &lt; &lt;(some_command)". ShellCheck also pointed out to add a "-r" to "read"; otherwise, there could be an issue with backspaces in the loop data.</span><br />
+<span>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&#39;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 &lt; &lt;(some_command)". ShellCheck also pointed out to add a "-r" to "read"; otherwise, there could be an issue with backspaces in the loop data.</span><br />
<br />
<span>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.</span><br />
<br />
@@ -162,7 +162,7 @@ assert<font color="#990000">::</font>equals <font color="#FF0000">"$(generate::m
<br />
<span>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.</span><br />
<br />
-<span>It's worth mentioning that all generated HTML files and Atom feeds pass the W3C validation tests.</span><br />
+<span>It&#39;s worth mentioning that all generated HTML files and Atom feeds pass the W3C validation tests.</span><br />
<span> </span><br />
<h2 style='display: inline'>Configurability</h2><br />
<br />
@@ -180,14 +180,14 @@ assert<font color="#990000">::</font>equals <font color="#FF0000">"$(generate::m
</ul><br />
<h2 style='display: inline'>Conclusion</h2><br />
<br />
-<span>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. </span><br />
+<span>It was quite a lot of fun writing Gemtexter. It&#39;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. </span><br />
<br />
<span>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. </span><br />
<br />
<span>Other related posts are:</span><br />
<br />
-<a class='textlink' href='./2023-03-25-gemtexter-2.0.0-lets-gemtext-again-2.html'>2023-03-25 Gemtexter 2.0.0 - Let's Gemtext again²</a><br />
-<a class='textlink' href='./2022-08-27-gemtexter-1.1.0-lets-gemtext-again.html'>2022-08-27 Gemtexter 1.1.0 - Let's Gemtext again</a><br />
+<a class='textlink' href='./2023-03-25-gemtexter-2.0.0-lets-gemtext-again-2.html'>2023-03-25 Gemtexter 2.0.0 - Let&#39;s Gemtext again²</a><br />
+<a class='textlink' href='./2022-08-27-gemtexter-1.1.0-lets-gemtext-again.html'>2022-08-27 Gemtexter 1.1.0 - Let&#39;s Gemtext again</a><br />
<a class='textlink' href='./2022-01-01-bash-golf-part-2.html'>2022-01-01 Bash Golf Part 2</a><br />
<a class='textlink' href='./2021-11-29-bash-golf-part-1.html'>2021-11-29 Bash Golf Part 1</a><br />
<a class='textlink' href='./2021-06-05-gemtexter-one-bash-script-to-rule-it-all.html'>2021-06-05 Gemtexter - One Bash script to rule it all (You are currently reading this)</a><br />