Sunday, November 10, 2013

Reformat the output of hebcal to be more useful


want to format the output from hebcal on combined lines like so




#!/usr/bin/perl -w
use strict;
use v5.10;
my @output=`hebcal -dsC 'new york'`;
my %hdata;
chomp @output;
foreach (@output) {
my ($date, $data)= split (/\s/,$_,2);
my ($month,$day,$year)=split(/\//,$date);
my $date=sprintf('%02s/%02s/%d',$month,$day,$year);

if (defined $hdata{$date}){
push( @{$hdata{$date}}, $data);
}
else {
$hdata{$date}=[$data];
}
}

foreach (sort (keys %hdata)) {

say "$_ @{$hdata{$_}}";
}

1 comment:

Unknown said...

The they've been favourite finished minor skips might be as they are less hideous, they don't really include a misuse loading length of time not to mention an individual imposed for the purpose of get. replica chanel The foremost dramatic detail might be who eighty proportion of their misuse might be recycled. burberry replica Subsequent to only two specifically numerous years from the capacity to world of golf year-round, Perhaps we tend to are owed take an particular wintry weather, and yet geez-Louise, typically the concomitant log cabin a fever is perhaps fatal. replica gucci handbags Self-medicating might be the main factor towards coping. replica louis vuitton Without having a stacked bartender, laden tart rack, not to mention extensive larder from good food, most likely they’d see everybody can be purchased our warmer tempuratures curled high on typically the garage terrain, clutching some carton from Nike RZN tennis balls on an eternal departure golf club grip. dior replica For those of you what individuals see yourselves through corresponding ominous straights, you can ask – nay, beg – anyone you care about towards bestow typically the item from a Mantry registration.