Restarting A Blog, Of Sorts
I deleted my old blog several years ago.
What stopped me from writing online? Among other things,
- Privacy concerns
- Quality standards / shame
- Blogging is a poor medium
Why have I started writing again?
- Utility of public writing
- Changing my standards / adapting
- Changing the medium
Privacy vs Utility
Privacy is intrinsically important. My fear of losing privacy (from writing online) hasn't been considering the benefits. Public writing has purpose. You can express yourself: make proposals, question a situation, describe a dream. Beyond expressing, though, is to share, and to gather in response.
I need feedback. Please email, blog, text, just get in touch with your response to my ideas.
As far as privacy, I'm learning that personal stories are important in effective communication, but it depends on the audience. This is not a closed room. I will need to practice and work to remain engaging and personal, while not doing myself harm.
Standards vs Adaptation
I'm not a great writer. I can't speak for others, but I experience a vicious cycle of creation:
I produce something, but it's not to my standards, so
- I don't put it out and I get discouraged, reducing further experimentation and improvement. Or,
- I do put it out, and it's ignored, underwhelming, or otherwise embarrassing over time.
My prior online writing tried to embrace the original blog ethos, but it became an embarrassment having old articles around. The amount of work required to maintain and edit them didn't seem worth it at the time.
I'm not going to have quality writing without practice, and it will be on me whether or not that practice is deliberate.
(This section is terrible. To be fixed in the future!)
Blog Medium vs Change
Blogging typically means immutable, hastily written trivialities around forever and searchable under a personal identity. This doesn't feel great to me. I am no longer accepting a blog as immutable. What I want is a blog / wiki hybrid, possibly as part of a larger wiki. For now, I made my own blog generator in bash
in 25 minutes. I can improve it later if I need to. I can break all of the links to old pages if I need to. I can remove content if I need to. I can improve styling as I go. This will be about meeting my needs as well as my readers. In the future, it will probably be more like a wiki, but when that happens is up to me.
Addendum: First Draft Code to Generate Posts (and Change The Medium)
Here's the first version of the generator:
#!/bin/bash
# if i can't write a basic blog generator in 25 minutes, then what am i even doing
# Tracebacks in bash
# https://docwhat.org/tracebacks-in-bash/
#--------->8---------cut here---------8<---------
set -eu
trap _exit_trap EXIT
trap _err_trap ERR
_showed_traceback=f
function _exit_trap
{
local _ec="$?"
if [[ $_ec != 0 && "${_showed_traceback}" != t ]]; then
traceback 1
fi
}
function _err_trap
{
local _ec="$?"
local _cmd="${BASH_COMMAND:-unknown}"
traceback 1
_showed_traceback=t
echo "The command ${_cmd} exited with exit code ${_ec}." 1>&2
}
function traceback
{
# Hide the traceback() call.
local -i start=$(( ${1:-0} + 1 ))
local -i end=${#BASH_SOURCE[@]}
local -i i=0
local -i j=0
echo
echo "Traceback (last called is first):" 1>&2
for ((i=start; i < end; i++)); do
j=$(( i - 1 ))
local function="${FUNCNAME[$i]}"
local file="${BASH_SOURCE[$i]}"
local line="${BASH_LINENO[$j]}"
echo " ${function}() in ${file}:${line}" 1>&2
done
}
#--------->8---------cut here---------8<---------
get_title() {
local slug="$1"
head -1 "$slug.md"
}
gen_chunk_from_slug() {
local slug="$1"
cmark --to html --safe "$slug.md" > "$slug.chunk"
}
gen_header() {
local title="$1"
export HEADER_TITLE_REPLACEMENT_STRING="$title"
# TODO: what about a header title with a " in it?
cat header.chunk | perl -pe 's/HEADER_TITLE_REPLACEMENT_STRING/$ENV{"HEADER_TITLE_REPLACEMENT_STRING"}/'
}
gen_header_from_slug() {
local slug="$1"
local title="$(get_title $slug)"
gen_header "$title"
}
build_page_from_slug() {
local slug="$1"
gen_chunk_from_slug "$slug"
gen_header_from_slug "$slug" > $slug.header
cat $slug.header $slug.chunk footer.chunk > $slug.html
}
export SCRIPTPATH=$0
function usage {
echo
echo "missing function (and possibly params). Options include:"
for func in $(grep -E '^\s*\w+\(\)' $SCRIPTPATH | sed 's/() {//' | sort) ; do
echo -e "\t$func"
done
}
ARGS=${1:-}
if [[ "x$ARGS" = 'x' ]] ; then
usage
else
$@
fi