Promise(d) me
As promised here, I wrote a better version of the quickviewer for the vim calendar plugin. It now properly wraps around year ends.
#!/usr/bin/env perl
use Date::Calc;
$dir = "~/diary";
for ($i = 0; $i < 90; $i++) {
$fn = "$dir/$y/$m/$d.cal"
if(($y,$m,$d)=Add_Delta_Days(Today(),$i));
if (-f $fn) {
printf "%2d %s", $d, substr(Month_to_Text($m),0,3);
open IN, $fn; while (<IN>) {print "\t$_" if (! /^\s*$/);}
close IN;
}
}
Compared to last year's entry you could say I was far more efficient in 2005 than in 2004, but also a lot lazier. I leave it to you to assess the correctness of this statement.
Happy 2006 everyone!
[Permalink] -- Filed under: [linux] [web]
Posted by jochem on 2005-12-29, last update on 2005-12-29