20251221204224 push

This commit is contained in:
2025-12-21 20:42:24 -08:00
parent acc0b6545a
commit 40234617dd
44 changed files with 153 additions and 52 deletions

View File

@@ -54,6 +54,28 @@ build_feed() {
printf '%s' "$POST_CONTENT" >> "$OUTPUT_FILE"
printf ']]></description></item>\n' >> "$OUTPUT_FILE"
done
if [[ -d "$NOW_DIR" ]]; then
local POST_FILE
POST_FILE="$NOW_DIR/index.html"
local POST_LINK
POST_LINK="$(basename "$NOW_DIR")"
local POST_GUID
POST_GUID="$POST_LINK/#$(grep "<p id=" $NOW_DIR/index.html | sed 's!^.*<p id="!!' | sed 's!"><i class.*$!!')"
local POST_DATE
POST_DATE="$(date -d "$(grep "class=\"date\"" "$POST_FILE" | head -n 1 | sed 's!^[^>]*>!!' | sed 's!<.*$!!')" '+%a, %d %b %Y %H:%M:%S %Z')"
local POST_CONTENT
POST_CONTENT="$(tail -n +3 "$POST_FILE" | head -n -1 | sed 's/^\t//g')"
printf '<item><author>%s</author>' "$AUTHOR" >> "$OUTPUT_FILE"
printf '<pubDate>%s</pubDate>' "$POST_DATE" >> "$OUTPUT_FILE"
printf '<title>%s has updated Now</title>' "$AUTHOR" >> "$OUTPUT_FILE"
printf '<guid>%s' "$DOMAIN" >> "$OUTPUT_FILE"
printf '/%s</guid>' "$POST_GUID" >> "$OUTPUT_FILE"
printf '<link>%s' "$DOMAIN" >> "$OUTPUT_FILE"
printf '/%s/</link>' "$POST_LINK" >> "$OUTPUT_FILE"
printf '<description><![CDATA[\n' >> "$OUTPUT_FILE"
printf '%s\n' "$POST_CONTENT" >> "$OUTPUT_FILE"
printf ']]></description></item>\n' >> "$OUTPUT_FILE"
fi
printf '</channel></rss>\n' >> "$OUTPUT_FILE"
}
draft_post() {

View File

@@ -8,4 +8,5 @@ TEMPLATES_DIR="templates"
DRAFTS_DIR="drafts"
CONTENT_DIR="content"
BLOG_DIR="$CONTENT_DIR/blog"
NOW_DIR="$CONTENT_DIR/now"
OUTPUT_DIR="_output"

View File

@@ -4,7 +4,7 @@
<h1 class="title">Website Changes - 01</h1>
</header>
<p>I have decided to make a significant change to my website/blog. For the last some years, I have had two sections of my website sharing links and information, <a href="/blog/index.html">my blog section</a> and <a href="/notes/index.html">my notes section</a> (deprecated link).</p>
<p>My blog posts are (were?) considered to be permanent and my notes were (are?) considered ephemeral. his means that I tried to refrain from editing a blog post after the publish date, but notes were meant to be updated whenever needed. But I still would edit blog posts when the need arises. And my notes are practically just lists of different links, which has become secondary as a location to store links to <a href="https://links.0x212.com/bookmarks/shared?user=iiogama%400x212.com">my Linkding instance</a>.</p>
<p>My blog posts are (were?) considered to be permanent and my notes were (are?) considered ephemeral. This means that I tried to refrain from editing a blog post after the publish date, but notes were meant to be updated whenever needed. But I still would edit blog posts when the need arises. And my notes are practically just lists of different links, which has become secondary as a location to store links to <a href="https://links.0x212.com/bookmarks/shared?user=iiogama%400x212.com">my Linkding instance</a>.</p>
<p>As an effort to simplify my website and workflow, I will make sure that all of the links shared the notes section of my website are bookmarked and shared in my Linkding instance, and I will have a blog post that links to those bookmarks and gets updated when a change is needed to be shared.</p>
<p>I am trying to reduce redundant steps with updating my website, which I hope will lead to more quality updates.</p>
</article>

View File

@@ -4,6 +4,7 @@
</header>
<h2 id="2025">2025</h2>
<!--BREAK-->
<p><i class="date">2025-12-21 18:00:00 -08:00</i><br class="ssbr"> <a href="/blog/now.html">A Now Page</a></p>
<p><i class="date">2025-12-21 17:00:00 -08:00</i><br class="ssbr"> <a href="/blog/changes-03.html">Website Changes - 03</a></p>
<p><i class="date">2025-12-21 16:00:00 -08:00</i><br class="ssbr"> <a href="/blog/re-old_browser_new_tricks.html">Re: Old browser, new tricks</a></p>
<p><i class="date">2025-12-20 00:00:00 -08:00</i><br class="ssbr"> <a href="/blog/links-hosting_services.html">Hosting Services</a></p>

55
content/blog/now.html Normal file
View File

@@ -0,0 +1,55 @@
<article>
<header id="title-block-header">
<p class="date">2025-12-21 18:00:00 -08:00</p>
<h1 class="title">A Now Page</h1>
</header>
<p>I have decided to create <a href="/now/">a Now page</a> for my website. Here is <a href="https://indieweb.org/now">the official documentation</a> for Now pages, but I decided to put my own spin on the idea. I have been considering adding a microblog page for my website, which would be a place that I can quickly add posts, something like <a href="https://github.com/buckket/twtxt">a twtxt file</a>, but I don&#39;t particularly like a permanent, endlessly long file for a microblog. I prefer treating microblog posts as temporary and ephemeral, that&apos;s the reason why I have my Mastodon posts delete themselves after a year.</p>
<p>I have created the following script for quickly and easily updating to my Now page and Mastodon at the same time from my terminal. This script compliments the <pre>blog.sh</pre> script I have created for building this website, which you can look at in <a href="https://git.0x212.com/iiogama/website">the git repo</a>.</p>
<p>All I need to do is run <pre>post.sh &quot;Extremely thoughtful message for my thousands of followers&quot;</pre> and my scripts will post my thoughts to Mastodon, update my Now page, update <a href="/index.xml">my RSS feed</a>, and upload the files to my web server.</p>
<h2>Post.sh script</h2>
<pre>
#!/usr/bin/env bash
TIMESTAMP=&quot;$(date &apos;+%Y-%m-%d %H:%M:%S %:z&apos;)&quot;
ID=&quot;$(date -d &quot;$TIMESTAMP&quot; &apos;+%Y%m%d%H%M%S&apos;)&quot;
POST=&quot;$*&quot;
CHARCOUNT=&quot;$(printf &apos;%s&apos; &quot;$POST&quot; | wc -c)&quot;
CHARLIMIT=&quot;500&quot;
if [[ &quot;$CHARCOUNT&quot; -gt &quot;$CHARLIMIT&quot; ]]; then
if [[ &quot;$(command -v vipe)&quot; = &quot;&quot; ]]; then
printf &apos;Error: Unable to create post. Character count is %s/%s&apos; &quot;$CHARCOUNT&quot; &quot;$CHARLIMIT&quot;
printf &apos;Tip: Install moreutils for vipe command.&apos;
exit 1
else
printf %s &quot;$POST&quot; | vipe
fi
fi
masto() {
if [[ &quot;$(command -v toot)&quot; = &quot;&quot; ]]; then
printf &quot;Error: Unable to post to Mastodon, toot command not found.\n&quot;
else
toot post &quot;$POST&quot;
fi
}
now() {
local THIS_BLOG_DIR
THIS_BLOG_DIR=&quot;$HOME/Documents/blog&quot;
source &quot;$THIS_BLOG_DIR/config.env&quot;
local THIS_NOW_DIR
THIS_NOW_DIR=&quot;$THIS_BLOG_DIR/$NOW_DIR&quot;
local THIS_TEMPLATES_DIR
THIS_TEMPLATES_DIR=&quot;$THIS_BLOG_DIR/$TEMPLATES_DIR&quot;
test -d &quot;$THIS_NOW_DIR&quot; || mkdir -p &quot;$THIS_NOW_DIR&quot;
local HTML_DATE
HTML_DATE=&quot;&lt;p&gt;&lt;i class=\&quot;date\&quot;&gt;$TIMESTAMP&lt;/i&gt;&lt;/p&gt;&quot;
local HTML_POST
HTML_POST=&quot;&lt;p&gt;$(echo &quot;$POST&quot; | sed &apos;s!\n!&lt;/p&gt;&lt;p&gt;!g&apos;)&lt;/p&gt;&quot;
printf &apos;&lt;article&gt;\n%s\n%s\n&lt;/article&gt;&apos; &quot;$HTML_DATE&quot; &quot;$HTML_POST&quot; &gt; &quot;$THIS_NOW_DIR/index.html&quot;
cp &quot;$THIS_NOW_DIR/index.html&quot; &quot;$THIS_NOW_DIR/$ID.html&quot;
cd &quot;$THIS_BLOG_DIR&quot;
just _push_blog
}
masto
now
</pre>
</article>

View File

@@ -0,0 +1,4 @@
<article>
<p><i class="date">2025-12-21 19:30:03 -08:00</i></p>
<p>I am working on script for updating my now page and posting to Mastodon at the same time. If it works, then you are reading the proof right meow.</p>
</article>

View File

@@ -0,0 +1,4 @@
<article>
<p><i class="date">2025-12-21 19:36:57 -08:00</i></p>
<p>Muahahahaaaaa, and now I can post quickly with rofi!</p>
</article>

View File

@@ -0,0 +1,4 @@
<article>
<p id="20251221201058"><i class="date">2025-12-21 20:10:58 -08:00</i></p>
<p>This is a test to see if the guid works correctly in the RSS index</p>
</article>

View File

@@ -0,0 +1,4 @@
<article>
<p id="20251221203302"><i class="date">2025-12-21 20:33:02 -08:00</i></p>
<p>Okay, this should be my last test post for my script, just fixed some weirdness</p>
</article>

4
content/now/index.html Normal file
View File

@@ -0,0 +1,4 @@
<article>
<p id="20251221203302"><i class="date">2025-12-21 20:33:02 -08:00</i></p>
<p>Okay, this should be my last test post for my script, just fixed some weirdness</p>
</article>

View File

@@ -62,7 +62,7 @@ JPEG Quality : 98
<br>
<footer class="footer mt-auto py-3 bg-light">
<div class="container">
<span class="text-muted">Some dude taking photos - 2025-12-22 01:09:48 UTC</span>
<span class="text-muted">Some dude taking photos - 2025-12-22 04:42:01 UTC</span>
</div>
</footer>
</body>

View File

@@ -62,7 +62,7 @@ JPEG Quality : 98
<br>
<footer class="footer mt-auto py-3 bg-light">
<div class="container">
<span class="text-muted">Some dude taking photos - 2025-12-22 01:09:48 UTC</span>
<span class="text-muted">Some dude taking photos - 2025-12-22 04:42:01 UTC</span>
</div>
</footer>
</body>

View File

@@ -62,7 +62,7 @@ JPEG Quality : 98
<br>
<footer class="footer mt-auto py-3 bg-light">
<div class="container">
<span class="text-muted">Some dude taking photos - 2025-12-22 01:09:48 UTC</span>
<span class="text-muted">Some dude taking photos - 2025-12-22 04:42:01 UTC</span>
</div>
</footer>
</body>

View File

@@ -62,7 +62,7 @@ JPEG Quality : 92
<br>
<footer class="footer mt-auto py-3 bg-light">
<div class="container">
<span class="text-muted">Some dude taking photos - 2025-12-22 01:09:48 UTC</span>
<span class="text-muted">Some dude taking photos - 2025-12-22 04:42:01 UTC</span>
</div>
</footer>
</body>

View File

@@ -61,7 +61,7 @@ JPEG Quality : 95
<br>
<footer class="footer mt-auto py-3 bg-light">
<div class="container">
<span class="text-muted">Some dude taking photos - 2025-12-22 01:09:48 UTC</span>
<span class="text-muted">Some dude taking photos - 2025-12-22 04:42:01 UTC</span>
</div>
</footer>
</body>

View File

@@ -62,7 +62,7 @@ JPEG Quality : 92
<br>
<footer class="footer mt-auto py-3 bg-light">
<div class="container">
<span class="text-muted">Some dude taking photos - 2025-12-22 01:09:48 UTC</span>
<span class="text-muted">Some dude taking photos - 2025-12-22 04:42:01 UTC</span>
</div>
</footer>
</body>

View File

@@ -61,7 +61,7 @@ JPEG Quality : 91
<br>
<footer class="footer mt-auto py-3 bg-light">
<div class="container">
<span class="text-muted">Some dude taking photos - 2025-12-22 01:09:48 UTC</span>
<span class="text-muted">Some dude taking photos - 2025-12-22 04:42:01 UTC</span>
</div>
</footer>
</body>

View File

@@ -61,7 +61,7 @@ JPEG Quality : 97
<br>
<footer class="footer mt-auto py-3 bg-light">
<div class="container">
<span class="text-muted">Some dude taking photos - 2025-12-22 01:09:48 UTC</span>
<span class="text-muted">Some dude taking photos - 2025-12-22 04:42:01 UTC</span>
</div>
</footer>
</body>

View File

@@ -62,7 +62,7 @@ JPEG Quality : 98
<br>
<footer class="footer mt-auto py-3 bg-light">
<div class="container">
<span class="text-muted">Some dude taking photos - 2025-12-22 01:09:48 UTC</span>
<span class="text-muted">Some dude taking photos - 2025-12-22 04:42:01 UTC</span>
</div>
</footer>
</body>

View File

@@ -63,7 +63,7 @@ JPEG Quality : 98
<br>
<footer class="footer mt-auto py-3 bg-light">
<div class="container">
<span class="text-muted">Some dude taking photos - 2025-12-22 01:09:48 UTC</span>
<span class="text-muted">Some dude taking photos - 2025-12-22 04:42:01 UTC</span>
</div>
</footer>
</body>

View File

@@ -63,7 +63,7 @@ JPEG Quality : 95
<br>
<footer class="footer mt-auto py-3 bg-light">
<div class="container">
<span class="text-muted">Some dude taking photos - 2025-12-22 01:09:48 UTC</span>
<span class="text-muted">Some dude taking photos - 2025-12-22 04:42:01 UTC</span>
</div>
</footer>
</body>

View File

@@ -61,7 +61,7 @@ JPEG Quality : 93
<br>
<footer class="footer mt-auto py-3 bg-light">
<div class="container">
<span class="text-muted">Some dude taking photos - 2025-12-22 01:09:48 UTC</span>
<span class="text-muted">Some dude taking photos - 2025-12-22 04:42:01 UTC</span>
</div>
</footer>
</body>

View File

@@ -63,7 +63,7 @@ JPEG Quality : 95
<br>
<footer class="footer mt-auto py-3 bg-light">
<div class="container">
<span class="text-muted">Some dude taking photos - 2025-12-22 01:09:48 UTC</span>
<span class="text-muted">Some dude taking photos - 2025-12-22 04:42:01 UTC</span>
</div>
</footer>
</body>

View File

@@ -63,7 +63,7 @@ JPEG Quality : 98
<br>
<footer class="footer mt-auto py-3 bg-light">
<div class="container">
<span class="text-muted">Some dude taking photos - 2025-12-22 01:09:48 UTC</span>
<span class="text-muted">Some dude taking photos - 2025-12-22 04:42:01 UTC</span>
</div>
</footer>
</body>

View File

@@ -63,7 +63,7 @@ JPEG Quality : 98
<br>
<footer class="footer mt-auto py-3 bg-light">
<div class="container">
<span class="text-muted">Some dude taking photos - 2025-12-22 01:09:48 UTC</span>
<span class="text-muted">Some dude taking photos - 2025-12-22 04:42:01 UTC</span>
</div>
</footer>
</body>

View File

@@ -63,7 +63,7 @@ JPEG Quality : 98
<br>
<footer class="footer mt-auto py-3 bg-light">
<div class="container">
<span class="text-muted">Some dude taking photos - 2025-12-22 01:09:48 UTC</span>
<span class="text-muted">Some dude taking photos - 2025-12-22 04:42:01 UTC</span>
</div>
</footer>
</body>

View File

@@ -63,7 +63,7 @@ JPEG Quality : 98
<br>
<footer class="footer mt-auto py-3 bg-light">
<div class="container">
<span class="text-muted">Some dude taking photos - 2025-12-22 01:09:48 UTC</span>
<span class="text-muted">Some dude taking photos - 2025-12-22 04:42:01 UTC</span>
</div>
</footer>
</body>

View File

@@ -64,7 +64,7 @@ JPEG Quality : 98
<br>
<footer class="footer mt-auto py-3 bg-light">
<div class="container">
<span class="text-muted">Some dude taking photos - 2025-12-22 01:09:48 UTC</span>
<span class="text-muted">Some dude taking photos - 2025-12-22 04:42:01 UTC</span>
</div>
</footer>
</body>

View File

@@ -63,7 +63,7 @@ JPEG Quality : 98
<br>
<footer class="footer mt-auto py-3 bg-light">
<div class="container">
<span class="text-muted">Some dude taking photos - 2025-12-22 01:09:48 UTC</span>
<span class="text-muted">Some dude taking photos - 2025-12-22 04:42:01 UTC</span>
</div>
</footer>
</body>

View File

@@ -63,7 +63,7 @@ JPEG Quality : 98
<br>
<footer class="footer mt-auto py-3 bg-light">
<div class="container">
<span class="text-muted">Some dude taking photos - 2025-12-22 01:09:48 UTC</span>
<span class="text-muted">Some dude taking photos - 2025-12-22 04:42:01 UTC</span>
</div>
</footer>
</body>

View File

@@ -61,7 +61,7 @@ JPEG Quality : 95
<br>
<footer class="footer mt-auto py-3 bg-light">
<div class="container">
<span class="text-muted">Some dude taking photos - 2025-12-22 01:09:48 UTC</span>
<span class="text-muted">Some dude taking photos - 2025-12-22 04:42:01 UTC</span>
</div>
</footer>
</body>

View File

@@ -61,7 +61,7 @@ JPEG Quality : 95
<br>
<footer class="footer mt-auto py-3 bg-light">
<div class="container">
<span class="text-muted">Some dude taking photos - 2025-12-22 01:09:48 UTC</span>
<span class="text-muted">Some dude taking photos - 2025-12-22 04:42:01 UTC</span>
</div>
</footer>
</body>

View File

@@ -61,7 +61,7 @@ JPEG Quality : 95
<br>
<footer class="footer mt-auto py-3 bg-light">
<div class="container">
<span class="text-muted">Some dude taking photos - 2025-12-22 01:09:48 UTC</span>
<span class="text-muted">Some dude taking photos - 2025-12-22 04:42:01 UTC</span>
</div>
</footer>
</body>

View File

@@ -62,7 +62,7 @@ JPEG Quality : 95
<br>
<footer class="footer mt-auto py-3 bg-light">
<div class="container">
<span class="text-muted">Some dude taking photos - 2025-12-22 01:09:48 UTC</span>
<span class="text-muted">Some dude taking photos - 2025-12-22 04:42:01 UTC</span>
</div>
</footer>
</body>

View File

@@ -61,7 +61,7 @@ JPEG Quality : 95
<br>
<footer class="footer mt-auto py-3 bg-light">
<div class="container">
<span class="text-muted">Some dude taking photos - 2025-12-22 01:09:48 UTC</span>
<span class="text-muted">Some dude taking photos - 2025-12-22 04:42:01 UTC</span>
</div>
</footer>
</body>

View File

@@ -61,7 +61,7 @@ JPEG Quality : 95
<br>
<footer class="footer mt-auto py-3 bg-light">
<div class="container">
<span class="text-muted">Some dude taking photos - 2025-12-22 01:09:48 UTC</span>
<span class="text-muted">Some dude taking photos - 2025-12-22 04:42:01 UTC</span>
</div>
</footer>
</body>

View File

@@ -61,7 +61,7 @@ JPEG Quality : 92
<br>
<footer class="footer mt-auto py-3 bg-light">
<div class="container">
<span class="text-muted">Some dude taking photos - 2025-12-22 01:09:48 UTC</span>
<span class="text-muted">Some dude taking photos - 2025-12-22 04:42:01 UTC</span>
</div>
</footer>
</body>

View File

@@ -62,7 +62,7 @@ JPEG Quality : 93
<br>
<footer class="footer mt-auto py-3 bg-light">
<div class="container">
<span class="text-muted">Some dude taking photos - 2025-12-22 01:09:48 UTC</span>
<span class="text-muted">Some dude taking photos - 2025-12-22 04:42:01 UTC</span>
</div>
</footer>
</body>

View File

@@ -61,7 +61,7 @@ JPEG Quality : 96
<br>
<footer class="footer mt-auto py-3 bg-light">
<div class="container">
<span class="text-muted">Some dude taking photos - 2025-12-22 01:09:48 UTC</span>
<span class="text-muted">Some dude taking photos - 2025-12-22 04:42:01 UTC</span>
</div>
</footer>
</body>

View File

@@ -63,7 +63,7 @@ JPEG Quality : 98
<br>
<footer class="footer mt-auto py-3 bg-light">
<div class="container">
<span class="text-muted">Some dude taking photos - 2025-12-22 01:09:48 UTC</span>
<span class="text-muted">Some dude taking photos - 2025-12-22 04:42:01 UTC</span>
</div>
</footer>
</body>

View File

@@ -63,7 +63,7 @@ JPEG Quality : 98
<br>
<footer class="footer mt-auto py-3 bg-light">
<div class="container">
<span class="text-muted">Some dude taking photos - 2025-12-22 01:09:48 UTC</span>
<span class="text-muted">Some dude taking photos - 2025-12-22 04:42:01 UTC</span>
</div>
</footer>
</body>

View File

@@ -191,7 +191,7 @@
<br>
<footer class="footer mt-auto py-3 bg-light">
<div class="container">
<span class="text-muted">Some dude taking photos - 2025-12-22 01:09:48 UTC</span>
<span class="text-muted">Some dude taking photos - 2025-12-22 04:42:01 UTC</span>
</div>
</footer>
</body>

View File

@@ -6,6 +6,7 @@
<a href="/blog/">Blog</a>
<a href="/feeds/">Feeds</a>
<a href="/mixes/">Mixes</a>
<a href="/now/">Now</a>
<a href="/photos/">Photos</a>
<a href="/index.xml">RSS</a>
<a href="/songs/">Songs</a>

View File

@@ -3,6 +3,7 @@
<a href="/about/">About</a>
<a href="/blog/">Blog</a>
<a href="/mixes/">Mixes</a>
<a href="/now">Now</a>
<a href="/photos/">Photos</a>
<a href="/songs/">Songs</a>
</nav>