From: Nicolas Boisselier Date: Mon, 17 Nov 2014 23:13:50 +0000 (+0100) Subject: fix bug realpath X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=e91cff41f4a2ddecca1a87d12f169ead660509a0;p=nb.git fix bug realpath --- diff --git a/bin/nico-quittances b/bin/nico-quittances new file mode 100755 index 00000000..f33392cc --- /dev/null +++ b/bin/nico-quittances @@ -0,0 +1,234 @@ +#!/usr/bin/env perl +use strict; +use warnings; +################################################################################# +# +# VERSION +# +################################################################################# +my $VERSION = '0.0.1'; +# NB 22.07.14 +# - create script + +################################################################################# +# +# GLOBALS +# +################################################################################# +my ($NAME) = $0 =~ m,([^/]+)$,; + +################################################################################# +# +# ARGS +# +################################################################################# +my $VERBOSE = $main::VERBOSE = 0; +my $DEBUG = $main::DEBUG = 0; +my $DATE_FORMAT = '%d/%m/%Y'; +my $TEMPLATE = $ENV{HOME}.'/doc/Rent/Quittance.html'; +my $LODGER = 'Stephane Boutiot'; +my $ADDR1 = '174 Avenue Raymond Naves'; +my $ADDR2 = '31300 Toulouse'; + +my %Opt; get_options(\%Opt); +help() unless @ARGV; +$main::_DATA_ = undef; + +################################################################################# +# +# BEGIN +# +################################################################################# +use Data::Dumper; +use Date::Manip qw(ParseDate UnixDate DateCalc); + use File::Basename; + +open(TEMPLATE,$TEMPLATE) or die "$NAME: can't read $TEMPLATE"; +my $template = join('',