From de7479d86131ceb399cfa3a906f8aaf718568dd4 Mon Sep 17 00:00:00 2001 From: Hugo Thunnissen Date: Wed, 25 May 2022 10:50:07 +0200 Subject: [PATCH] Add "assets" dir for accompanying assets of a HTML page and update blog posts --- generate-blog.bash | 4 ++++ .../assets/generate-blog.bash.html | 0 posts/simple-static-blog/index.html | 14 +++++++------- posts/simple-static-blog/last_checksum.txt | 2 +- posts/simple-static-blog/last_edit_date.txt | 1 + .../{ => assets}/scan-to-mailpile.bash | 0 .../{ => assets}/scan-to-mailpile.bash.html | 0 .../index.html | 4 ++-- .../last_checksum.txt | 2 +- .../last_edit_date.txt | 1 + 10 files changed, 17 insertions(+), 11 deletions(-) rename generate-blog.bash.html => posts/simple-static-blog/assets/generate-blog.bash.html (100%) create mode 100644 posts/simple-static-blog/last_edit_date.txt rename posts/use-your-mail-client-for-physical-mail/{ => assets}/scan-to-mailpile.bash (100%) rename posts/use-your-mail-client-for-physical-mail/{ => assets}/scan-to-mailpile.bash.html (100%) create mode 100644 posts/use-your-mail-client-for-physical-mail/last_edit_date.txt diff --git a/generate-blog.bash b/generate-blog.bash index bae2206..b569795 100755 --- a/generate-blog.bash +++ b/generate-blog.bash @@ -201,6 +201,10 @@ publish-html() { printf '%s\n' "$contents" >> "$index_file" print-post-html-bottom "$pubdate" "$last_edit_date" >> "$index_file" fi + + if [[ -d "$source_dir/assets" ]]; then + cp -rv "$source_dir/assets" "$publish_dir/" + fi } publish_dir="$here/publish" diff --git a/generate-blog.bash.html b/posts/simple-static-blog/assets/generate-blog.bash.html similarity index 100% rename from generate-blog.bash.html rename to posts/simple-static-blog/assets/generate-blog.bash.html diff --git a/posts/simple-static-blog/index.html b/posts/simple-static-blog/index.html index 93b7baf..4292e14 100644 --- a/posts/simple-static-blog/index.html +++ b/posts/simple-static-blog/index.html @@ -144,13 +144,13 @@ the RSS feed for the blog. I don't mind typing HTML pages, but typing out a page and an RSS feed containing excerpts/titles from other files gets old soon and I'd be bound to forget updating its content every once in a while. This - seemed like a perfect occasion to write a little bash script, so I did. You - can find the script here (raw) and - here (pretty). What it basically - does is read in a file called posts.txt that has html filenames in it, - separated by newlines. Using those filenames and the contents of the files it - then generates a HTML page (called blog.html) - and an RSS feed (called feed.xml). + seemed like a perfect occasion to write a little bash script, so I did. You can + find the script + here. What it basically does is + read in a file called posts.txt that has html filenames in it, separated by + newlines. Using those filenames and the contents of the files it then generates + a HTML page (called blog.html) and an RSS feed + (called feed.xml).

diff --git a/posts/simple-static-blog/last_checksum.txt b/posts/simple-static-blog/last_checksum.txt index 7a25150..1d4599d 100644 --- a/posts/simple-static-blog/last_checksum.txt +++ b/posts/simple-static-blog/last_checksum.txt @@ -1 +1 @@ -699691065 7458 +3051568591 7396 diff --git a/posts/simple-static-blog/last_edit_date.txt b/posts/simple-static-blog/last_edit_date.txt new file mode 100644 index 0000000..e573f28 --- /dev/null +++ b/posts/simple-static-blog/last_edit_date.txt @@ -0,0 +1 @@ +1653468420 diff --git a/posts/use-your-mail-client-for-physical-mail/scan-to-mailpile.bash b/posts/use-your-mail-client-for-physical-mail/assets/scan-to-mailpile.bash similarity index 100% rename from posts/use-your-mail-client-for-physical-mail/scan-to-mailpile.bash rename to posts/use-your-mail-client-for-physical-mail/assets/scan-to-mailpile.bash diff --git a/posts/use-your-mail-client-for-physical-mail/scan-to-mailpile.bash.html b/posts/use-your-mail-client-for-physical-mail/assets/scan-to-mailpile.bash.html similarity index 100% rename from posts/use-your-mail-client-for-physical-mail/scan-to-mailpile.bash.html rename to posts/use-your-mail-client-for-physical-mail/assets/scan-to-mailpile.bash.html diff --git a/posts/use-your-mail-client-for-physical-mail/index.html b/posts/use-your-mail-client-for-physical-mail/index.html index aa0b1db..4710105 100644 --- a/posts/use-your-mail-client-for-physical-mail/index.html +++ b/posts/use-your-mail-client-for-physical-mail/index.html @@ -74,8 +74,8 @@ anyone is interested in an actual program that does the same thing and doesn't require you to setup postfix, let me know! I might consider authoring one if it's useful to more people than just myself. The script - I'm currently using can be found here - (pretty) and here (raw), but I + I'm currently using can be found here + (pretty) and here (raw), but I don't recommend using it if you don't fully understand its contents, it's not a polished user experience 🤓.

diff --git a/posts/use-your-mail-client-for-physical-mail/last_checksum.txt b/posts/use-your-mail-client-for-physical-mail/last_checksum.txt index 68749be..985be79 100644 --- a/posts/use-your-mail-client-for-physical-mail/last_checksum.txt +++ b/posts/use-your-mail-client-for-physical-mail/last_checksum.txt @@ -1 +1 @@ -3811067194 4500 +1937142314 4514 diff --git a/posts/use-your-mail-client-for-physical-mail/last_edit_date.txt b/posts/use-your-mail-client-for-physical-mail/last_edit_date.txt new file mode 100644 index 0000000..fd1f344 --- /dev/null +++ b/posts/use-your-mail-client-for-physical-mail/last_edit_date.txt @@ -0,0 +1 @@ +1653468565