Note taking on the job
Many are calling the benefits of a good attitude towards writing. The benefits are difficult to deny. I see a lot of strange advice in this area, tough. While writing can actually be for everybody, not everybody enjoys the same setup. I read of some people storing their toughts in a Zettelkasten. I read of people implementing digital equivalents of such a device. I see strange software, flashy buttons, arcane GUI components that are supposed to make you feel confortable, productive(?). Some people is happy to spin up a full office suite for that... I believe most of those are just distractions.
Actually as a digital user, I find most things happening outside the text terminal to be basically an attention waste. If it can work outside the terminal, it doesn't mean it has to, just for the sake of blinking lights.
Therefore, since I learned over time that we have to value our attention, our ability to gain and stay in focus, I ended up figuring out that all I need is just a 10 cents script that works with my editor of choice, that is, of course: ${EDITOR}
#! /bin/bash
EDIT_COMMAND="${EDITOR}"
DIARY_HOME=$HOME/.diary
test -d ${DIARY_HOME} || ( mkdir -p ${DIARY_HOME}/topic; mkdir -p ${DIARY_HOME}/time )
date_readable=$(date --iso-8601=seconds)
date_epoch=$(date -d "${date_readable}" "+%s")
if [ $# == 1 ]; then
xtopic=$1
else
echo "Topic:"
read xtopic
fi
echo "Title:"
read xtitle
echo "Summary:"
read xdescription
seo_topic=$(echo ${xtopic} | sed -e 's/ /-/g')
seo_description=$(echo ${xdescription} | sed -e 's/ /-/g')
seo_title=$(echo ${xtitle} | sed -e 's/ /-/g')
test -f ${DIARY_HOME}/${date_epoch} && (echo "File exists!"; exit 1)
diary_file="${DIARY_HOME}/time/${date_epoch}"
echo "Creating file: [${diary_file}]"
echo "topic:${xtopic}" > ${diary_file}
echo "title:${xtitle}" >> ${diary_file}
echo "date:${date_readable}" >> ${diary_file}
echo "description:${xdescription}" >> ${diary_file}
echo "" >> ${diary_file}
test -d ${DIARY_HOME}/topic/${seo_topic} || mkdir ${DIARY_HOME}/topic/${seo_topic}
ln -s ${diary_file} ${DIARY_HOME}/topic/${seo_topic}/${seo_title}
eval "${EDIT_COMMAND} ${diary_file}"
This will make sure everytime you spin up the editor, you save the date and a couple of informations that will help you sort the content in a relevant way (different directories for different topics,i.e.: meeting,notes,diary,work,personal,etc.) Plus, it uses dynamic links creatively, so that you can get a clue later on what's in it. Example:
tree ~/.diary/
/home/user/.diary/
├── time
│ ├── 1621588788
│ ├── 1623141808
│ └── 7623141808
└── topic
└── meeting
├── About-taking-notes -> /home/user/.diary/time/1723141808
├── on-the-importance-of-something -> /home/user/.diary/time/1721588788
└── philosophical
└── lack-of-meaning-in-life -> /home/user/.diary/time/7623141808
The source for my diary is here.
Paolo Lulli 2021
[git]