Explorar o código

Adds dumb wc plot

Caleb Fangmeier %!s(int64=5) %!d(string=hai) anos
pai
achega
a1c7f2a25a
Modificáronse 4 ficheiros con 150 adicións e 0 borrados
  1. 16 0
      scripts/git_wc_history.sh
  2. 114 0
      scripts/wc_log.txt
  3. BIN=BIN
      scripts/wc_v_time.png
  4. 20 0
      scripts/wc_v_time.py

+ 16 - 0
scripts/git_wc_history.sh

@@ -0,0 +1,16 @@
+#!/usr/bin/env zsh
+
+git checkout master
+
+while [ true ];
+do
+    # Get the date
+    git log | grep Date | head -n1
+    # Get the total word count
+    wc content/*.md -w | tail -n1 | sed -e 's/^[[:space:]]*//' | cut -d " " -f1
+    git checkout 'HEAD^1' &> /dev/null
+    if [ $? != 0 ]
+    then
+        break
+    fi
+done

+ 114 - 0
scripts/wc_log.txt

@@ -0,0 +1,114 @@
+Fri Nov 22 15:32:11 2019 -0600
+29334
+Fri Nov 22 15:29:22 2019 -0600
+29334
+Fri Nov 22 14:22:48 2019 -0600
+29271
+Thu Nov 21 16:09:41 2019 -0600
+29271
+Thu Nov 21 16:09:24 2019 -0600
+29271
+Mon Nov 18 13:40:50 2019 -0600
+29252
+Mon Nov 18 10:39:51 2019 -0600
+29289
+Sun Nov 17 20:21:26 2019 -0600
+29312
+Sun Nov 17 20:20:56 2019 -0600
+29312
+Sun Nov 17 20:03:45 2019 -0600
+29319
+Sat Nov 16 08:14:10 2019 -0600
+28584
+Wed Nov 13 20:18:15 2019 -0600
+27751
+Sun Nov 10 14:20:35 2019 -0600
+26189
+Sun Nov 10 11:19:04 2019 -0600
+25788
+Wed Nov 6 20:23:10 2019 -0600
+24878
+Wed Nov 6 20:19:13 2019 -0600
+24846
+Wed Nov 6 16:07:59 2019 -0600
+23763
+Wed Nov 6 11:27:57 2019 -0600
+22633
+Tue Nov 5 22:11:49 2019 -0600
+21543
+Tue Nov 5 11:42:40 2019 -0600
+18737
+Fri Nov 1 19:12:52 2019 -0500
+18420
+Fri Nov 1 19:03:56 2019 -0500
+18422
+Thu Oct 31 12:13:04 2019 -0500
+16718
+Wed Oct 30 22:44:34 2019 -0500
+16718
+Wed Oct 30 22:37:43 2019 -0500
+16709
+Mon Oct 28 16:02:50 2019 -0500
+17223
+Fri Oct 25 18:27:40 2019 -0500
+16278
+Fri Oct 18 19:40:59 2019 -0500
+13673
+Thu Oct 17 18:29:37 2019 -0500
+12661
+Thu Oct 17 18:28:58 2019 -0500
+10302
+Tue Oct 15 18:40:48 2019 -0500
+10302
+Tue Oct 15 18:35:07 2019 -0500
+10302
+Tue Oct 15 08:45:25 2019 -0500
+7480
+Mon Oct 14 16:57:31 2019 -0500
+6752
+Mon Oct 14 16:57:03 2019 -0500
+6752
+Mon Oct 14 13:12:42 2019 -0500
+6752
+Sun Oct 13 15:05:46 2019 -0500
+6752
+Thu Oct 3 15:13:08 2019 -0500
+4836
+Thu Oct 3 13:18:33 2019 -0500
+4293
+Mon Sep 30 18:13:31 2019 -0500
+4293
+Mon Sep 30 18:06:49 2019 -0500
+3941
+Mon Sep 30 18:03:25 2019 -0500
+3941
+Mon Sep 30 18:02:06 2019 -0500
+3941
+Mon Aug 26 17:33:10 2019 -0500
+3941
+Tue Aug 20 17:04:16 2019 -0500
+3299
+Fri Aug 16 16:18:30 2019 -0500
+2905
+Tue Aug 6 17:10:53 2019 -0500
+2857
+Wed May 29 17:34:21 2019 -0500
+2965
+Wed May 29 17:24:52 2019 -0500
+2965
+Wed May 15 13:45:54 2019 -0500
+2817
+Wed May 15 13:39:39 2019 -0500
+2817
+Fri Sep 14 17:57:37 2018 -0500
+1507
+Wed Sep 12 18:30:45 2018 -0500
+1091
+Wed Aug 8 17:23:25 2018 -0500
+756
+Wed Jun 27 19:04:54 2018 -0500
+732
+Fri Jun 22 17:39:04 2018 -0500
+1056
+Fri Jun 22 17:33:12 2018 -0500
+1056

BIN=BIN
scripts/wc_v_time.png


+ 20 - 0
scripts/wc_v_time.py

@@ -0,0 +1,20 @@
+from datetime import datetime as dt
+
+dat = open('wc_log.txt').readlines()
+
+wcs = []
+dts = []
+while dat:
+    date_string = dat.pop(0).strip()
+    # print(f"\"{date_string}\"")
+    date_obj = dt.strptime(date_string, "%c %z")
+    # print(f"\"{date_obj}\"")
+    dts.append(date_obj)
+    wcs.append(int(dat.pop(0)))
+
+
+import matplotlib.pyplot as plt
+
+
+plt.plot(dts, wcs)
+plt.show()