link handling

trunk
vilmibm 2022-05-28 01:23:50 +01:00
parent 5b6c1d3beb
commit 64b434986b
2 changed files with 16 additions and 7 deletions

17
make.sh
View File

@ -19,7 +19,13 @@ gopherIndex="${gopherPath}/gophermap"
geminiPath=$HOME/public_gemini/blog geminiPath=$HOME/public_gemini/blog
geminiIndex="${geminiPath}/index.gmi" geminiIndex="${geminiPath}/index.gmi"
cd $postDir > /dev/null # attempt compilation
if [ ! -e "linkpost" ]
then
go build -o linkpost main.go
fi
lp="$(pwd)/linkpost"
# backup HTML index # backup HTML index
if [ -e "${htmlIndex}" ] if [ -e "${htmlIndex}" ]
@ -40,6 +46,8 @@ echo >> $gopherIndex
echo "the gemblog of vilmibm as it were" > $geminiIndex echo "the gemblog of vilmibm as it were" > $geminiIndex
echo >> $geminiIndex echo >> $geminiIndex
cd $postDir > /dev/null
for p in $(ls *.md | sort -r) for p in $(ls *.md | sort -r)
do do
pubdate=$(grep "pubdate:" $p | sed 's/pubdate: //') pubdate=$(grep "pubdate:" $p | sed 's/pubdate: //')
@ -53,16 +61,17 @@ do
echo "<h2 class=\"title\">${title}</h2>" >> $htmlIndex echo "<h2 class=\"title\">${title}</h2>" >> $htmlIndex
echo "<a class=\"pubdate\" name=\"${slug}\" href=\"https://tilde.town/~vilmibm/blog#${slug}\">${pubdate}</a>" >> $htmlIndex echo "<a class=\"pubdate\" name=\"${slug}\" href=\"https://tilde.town/~vilmibm/blog#${slug}\">${pubdate}</a>" >> $htmlIndex
echo "<div class=\"post\">" >> $htmlIndex echo "<div class=\"post\">" >> $htmlIndex
grep -v "pubdate:" $p | grep -v "title:" | grep -v "slug:" | pandoc -fmarkdown -thtml >> $htmlIndex grep -v "pubdate:" $p | grep -v "title:" | grep -v "slug:" | $lp --mode "html" | pandoc -fmarkdown -thtml >> $htmlIndex
echo "</div>" >> $htmlIndex echo "</div>" >> $htmlIndex
# Gopher # Gopher
echo "0${title} ${slug}.txt" >> $gopherIndex echo "0${title} ${slug}.txt" >> $gopherIndex
gopherPostPath="${gopherPath}/${slug}.txt" gopherPostPath="${gopherPath}/${slug}.txt"
echo "# ${title}" > $gopherPostPath echo "# ${title}" > $gopherPostPath
echo >> $gopherPostPath echo >> $gopherPostPath
echo "_published ${pubdate}_" >> $gopherPostPath echo "_published ${pubdate}_" >> $gopherPostPath
grep -v "pubdate:" $p | grep -v "title:" | grep -v "slug:" >> $gopherPostPath grep -v "pubdate:" $p | grep -v "title:" | grep -v "slug:" | $lp --mode "gopher" >> $gopherPostPath
# Gemini # Gemini
echo "=> gemini://tilde.town/~vilmibm/blog/${slug}.gmi ${title}" >> $geminiIndex echo "=> gemini://tilde.town/~vilmibm/blog/${slug}.gmi ${title}" >> $geminiIndex
@ -70,7 +79,7 @@ do
echo "# ${title}" > $geminiPostPath echo "# ${title}" > $geminiPostPath
echo >> $geminiPostPath echo >> $geminiPostPath
echo "_published ${pubdate}_" >> $geminiPostPath echo "_published ${pubdate}_" >> $geminiPostPath
grep -v "pubdate:" $p | grep -v "title:" | grep -v "slug:" >> $geminiPostPath grep -v "pubdate:" $p | grep -v "title:" | grep -v "slug:" | $lp --mode "gemini" >> $geminiPostPath
fi fi
done done

View File

@ -6,15 +6,15 @@ I made a blog. I haven't had one in years. When I did it was mostly for dream lo
Another reason I'm making one of these again is self-actualization. Historically I've thought very poorly of myself and agonized over anyone actually caring what I posted. Now, I'm just excited to share whatever I'm excited about or mentally chewing on, not out of self-aggrandizement, but because the stuff I find interesting is interesting because I find it interesting. It's a very cozy tautology. I'm not interested in building a following or crafting a brand: just sharing what inspires me in an honest way while still keeping some of myself to myself. Another reason I'm making one of these again is self-actualization. Historically I've thought very poorly of myself and agonized over anyone actually caring what I posted. Now, I'm just excited to share whatever I'm excited about or mentally chewing on, not out of self-aggrandizement, but because the stuff I find interesting is interesting because I find it interesting. It's a very cozy tautology. I'm not interested in building a following or crafting a brand: just sharing what inspires me in an honest way while still keeping some of myself to myself.
Finally, I like to mark time with the discovery of artifacts. I'm always hunting for inspiring things--books, sites, objects, people--and feel an urge to catalogue them so I can be re-inspired in the future. I post on social media about these things sometimes, but social media is uniquely unsuited to reflection and later perusal. I liked Tumblr for this to an extent but never got comfy posting there; too many numbers and buttons and noise there for me to feel like I could collect my thoughts or feel like I was posting for myself instead of a hypothetical audience that might "like" something. I also don't like being beholden to corporate platforms. Finally, I like to mark time with the discovery of artifacts. I'm always hunting for inspiring things--books, sites, objects, people--and feel an urge to catalogue them so I can be re-inspired in the future. I post on social media about these things sometimes, but social media is uniquely unsuited to reflection and later perusal. I liked Tumblr for this to an extent but never got comfy posting there; too many numbers and buttons and noise there for me to feel like I could collect my thoughts or feel like I was posting for myself instead of a hypothetical audience that might "like" something. I also don't like being beholden to (LINK https://twitter.com/nate_smith corporate platforms).
Some initial posting fodder: Some initial posting fodder:
* Going through a decade's worth of unsorted bookmarks and posting interesting finds * Going through a decade's worth of unsorted bookmarks and posting interesting finds
* Reviews or pre-reviews of 1990s primary "cyber media" that I collect like old academic books on hypertext culture and trashy web magazines * Reporting on 1990s primary "cyber media" that I collect like academic books on hypertext and trashy web magazines
* Project ideas that I'll never get to * Project ideas that I'll never get to
* Project ideas that I have gotten to * Project ideas that I have gotten to
* My "religious" interests in Discordianism and Hermeticism * My "religious" interests in Discordianism and Hermeticism
* Fiction/poetry/essays * Fiction/poetry/essays
Technically speaking, this is all powered by some markdown files with custom metadata embedded in it and a <100 line (LINK https://git.tilde.town/vilmibm/blog/src/branch/trunk/make.sh bash script). I considered a static site generator...but I prefer scripting my own thing wrt blogging. It keeps me humble and I find that I don't use most of the features of off the shelf things. I wanted to take an idiosyncratic approach to drafting posts and have control over posting to all three of html, gemini, and gopher. Technically speaking, this is all powered by some markdown files with custom metadata embedded in it, a <100 line bash script, and a Go program for handling a little linking macro. I wanted to be able to author links in a consistent way but have sensible renderings in HTML, Gemini, and Gopher. All of this, including posts, can be found in (LINK https://git.tilde.town/vilmibm/blog this repository). I considered a static site generator...but I prefer scripting my own thing wrt blogging. It keeps me humble and I find that I don't use most of the features of off the shelf things.