Add semilog option to plot, fix script calls and memecache path - bitreich-memestats - Bitreich meme statistics and graphs. HTML git clone git://bitreich.org/bitreich-memestats git://hg6vgqziawt5s4dj.onion/bitreich-memestats DIR Log DIR Files DIR Refs DIR Tags DIR LICENSE --- DIR commit ab166d8fce54adfe28a0b7245367833a2872a28f DIR parent 78c6772641176ab99c4c39d4fd5a19a139e45a4e HTML Author: Anders Damsgaard <anders@adamsgaard.dk> Date: Mon, 20 Apr 2020 09:30:55 +0200 Add semilog option to plot, fix script calls and memecache path Diffstat: M Makefile | 19 +++++++++++++------ R extract_memeuse.awk -> memeuse.awk | 0 M plot-memecount.sh | 3 +++ 3 files changed, 16 insertions(+), 6 deletions(-) --- DIR diff --git a/Makefile b/Makefile @@ -1,16 +1,22 @@ -memecache = "$HOME/code/memecache" +memecache = "$(HOME)/code/memecache" irclog = ~/.irssi/log/Freenode/\#bitreich-en.log default: memecount memecount: plot-memecount.sh top10 media-stats - plot-memecount.sh > $@ + cat memecount-lin > $@ cat top10 >> $@ cat media-stats >> $@ - plot-memecount.sh semilog >> $@ + cat memecount-semilog > $@ + +memecount-lin: plot-memecount.sh + ./plot-memecount.sh > $@ + +memecount-semilog: plot-memecount.sh + ./plot-memecount.sh semilog > $@ media-stats: media-stats.sh - ./media-stats $(memecache) + ./media-stats.sh $(memecache) > $@ top10: top10.sh all_time_weekly_popularity.tsv ./top10.sh > $@ @@ -26,8 +32,8 @@ all_time_use.tsv: memeuse.tsv awk '{print $$1"\t"$$2}' > $@ # format: day<tab>date<tab>time<tab>user<tab>tag -memeuse.tsv: extract_memeuse.awk - awk -f extract_memeuse.awk $(irclog) > $@ +memeuse.tsv: memeuse.awk + awk -f memeuse.awk $(irclog) > $@ brtv: brtv-start.sh ./brtv-start.sh $(memecache) @@ -38,5 +44,6 @@ clean: rm -f all_time_weekly_popularity.tsv rm -f top10 rm -f media-stats + rm -f memecount{,-lin,-semilog} .PHONY: default brtv clean DIR diff --git a/extract_memeuse.awk b/memeuse.awk DIR diff --git a/plot-memecount.sh b/plot-memecount.sh @@ -37,6 +37,8 @@ git log --pretty='format:%H %cd' --date="format:%Y-%m-%d" | \ fi done > "$statfile" +[ "$1" = "semilog" ] && semilog="set log y" + gnuplot - <<__EOF__ set term dumb set title "annna meme count (total on $(date +%Y-%m-%d): \ @@ -45,5 +47,6 @@ set xdata time set format x "%Y-%m" set timefmt "%Y-%m-%dT%H:%M:%S" set xtics 2592000*4 +$semilog plot '$statfile' u 1:3 w lp t '' pt 13 __EOF__