A minimal visualization of the past year as a list of lists.
Python 2.6+ and PyYAML.
- Create a file
data/summary.yaml
which looks like this:
- Category One:
- (jan 22) Did a thing
- (sep 3) Did another thing
- (oct 1) Early October thing
- (oct 30) Late October thing
- Category Two:
- (feb 29) Leap day party
- "(apr 1) Don't forget: follow YAML rules to use symbols like \":\""
- Run
make
from the command line, then openyear.html
in a browser. You should see a page like this:
The count and activity graph in the top-right of each category are automatically generated. You can toggle between "boxes" and "table" view:
- (Optional) Set
make
to run automatically while you edit the YAML file. Use one of these methods, or, if you have Ruby andwatchr
installed, runwatchr automake.rb
.
The YAML-and-make process above provides an easy-ish way to create content by hand. The YAML file is converted to JSON to represent the "summary" page. Optionally, for additional pages, you can programatically generate JSON in the same format using other data sources (git commits, calendar entries, etc.). For each additional page, create a JS file which adds a new key to window.Review
, then include it:
In data/commits.js
:
window.Review.commits = [
{
"title": "repo one",
"entries": ["(mar 9) Initial commit", "(jul 4) Refactor everything"],
},
// and/or:
{
"title": "repo two, in a different format",
"entries": [{"time": "Jan 6", "event": "First commit"}, {"time": "May 9": "Last commit"}],
},
// ...
];
In year.html
:
<script src="data/commits.js"></script>
A link to the "commits" page will appear at the top, next to "summary".
I wrote this code quickly, a long time ago, and have looked at it about once a year since then.