Last active
August 29, 2015 14:17
-
-
Save artbikes/7aee4f1b281e4e51987f to your computer and use it in GitHub Desktop.
Plot your CD ripping progress
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat > album.gnu << EOF | |
set terminal png size 900, 300 | |
set output "album-chart.png" | |
set xdata time | |
set timefmt "%Y%m%d" | |
set xrange ["20130101":"20150330"] | |
set grid | |
set xtics format "%b %d %y" | |
set xtics "201303105", 29030400, "20150330" | |
plot [:][:] '< cat -' using 1:2 title "Albums Ripped" | |
EOF | |
find . -type d -mindepth 2 -maxdepth 2 -exec stat {} \;|\ | |
awk '{print $14$13$16}' |\ | |
sed 's/^\([0-9]\)"/0\1"/'|\ | |
sed 's/"//g' |\ | |
sed 's/Jan/01/' |\ | |
sed 's/Feb/02/' |\ | |
sed 's/Mar/03/' |\ | |
sed 's/Apr/04/' |\ | |
sed 's/May/05/' |\ | |
sed 's/Jun/06/' |\ | |
sed 's/Jul/07/' |\ | |
sed 's/Aug/08/' |\ | |
sed 's/Sep/09/' |\ | |
sed 's/Oct/10/' |\ | |
sed 's/Nov/11/' |\ | |
sed 's/Dec/12/' |\ | |
sed 's/\([0-9][0-9]\)\([0-9][0-9]\)\([0-9][0-9][0-9][0-9]\)/\3\2\1/' |\ | |
sort -n |\ | |
uniq -c |\ | |
awk '{print $2 " " $1}' |\ | |
gnuplot album.gnu | |
open album-chart.png |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment