Introduction
Introduction Statistics Contact Development Disclaimer Help
2022-03-23
__l_i_t_e_r_a_t_u_r_e__c_l_o_c_k____________________________________
have been marvelling at the literature clock [0] idea for quite a
hile. Then I found the source code [1] and thought whether that
ould be done in a small shell script.
urns out it does:
``
!/usr/bin/env bash
RL="https://raw.githubusercontent.com/JohannesNE/literature-clock/master/litclo…
ime_file+=$HOME/.litclock_annotated.csv
f [ ! -f "$time_file" ]; then
curl $URL -o "$time_file"
i
hile true;
o
clear
awk 'BEGIN {
FS = "|";
results=0;
srand();
time = strftime("%H:%M") };
$0~time{
sub($2, "\033[1m"$2"\033[0m",$3);
res[results++]=$3"\n\n"$4" -- "$5 };
END {
l=int(rand()*results);
print res[l]}' "$time_file" | fmt
sleep 10;
one
``
am sure it can be done a bit cleaner but it works for me right now.
ell me about it!
__References________________________________________________________
0]: https://literature-clock.jenevoldsen.com/
1]: https://github.com/JohannesNE/literature-clock
You are viewing proxied material from vernunftzentrum.de. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.