Commits

Jakub Wilk  committed 746bfdf

Initial import.

  • Participants
  • Tags 0.20060410

Comments (0)

Files changed (8)

File debian/changelog

+erzvaq (0.20060410) unstable; urgency=low
+
+  * Initial release.
+
+ -- Jakub Wilk <ubanus@users.sf.net>  Mon, 10 Apr 2006 11:09:50 +0200

File debian/compat

+4

File debian/control

+Source: erzvaq
+Section: utils
+Priority: optional
+Maintainer: Jakub Wilk <ubanus@users.sf.net>
+Build-Depends: perl, debhelper (>= 4.0.0)
+Standards-Version: 3.6.2
+
+Package: erzvaq
+Architecture: any
+Depends: remind, ${perl:Depends}, libtimedate-perl, libc6
+Description: a reminder wrapper

File debian/copyright

+This is erzvaq, written and maintained by Jakub Wilk <ubanus@users.sf.net>.
+It was debianized on Mon, 10 Apr 2006 11:09:50 +0200.
+
+Copyright (c) 2006 Jakub Wilk <ubanus@users.sf.net>
+
+License:
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, version 2 of the License.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this package; if not, write to the Free Software
+  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+
+On Debian systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL'.
+usr/bin

File debian/docs

Empty file added.

File debian/rules

+#!/usr/bin/make -f
+
+configure:
+
+build: build-stamp
+
+build-stamp:
+	dh_testdir
+	pod2man erzvaq > erzvaq.1
+	touch $(@)
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f erzvaq.1 build-stamp
+	dh_clean 
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k 
+	dh_installdirs
+	dh_install erzvaq usr/bin/
+	dh_installman erzvaq.1
+
+binary-indep: build install
+
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs 
+	dh_installdocs
+	dh_installexamples
+	dh_compress
+	dh_fixperms
+	dh_perl
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
+#!/usr/bin/perl
+use strict;
+use warnings;
+use Date::Format qw(time2str); 
+use Date::Parse qw(str2time);
+use Getopt::Long qw(:config gnu_getopt no_ignore_case auto_version auto_help);
+
+our $VERSION = '0.20060410';
+
+my $filename = "$ENV{HOME}/.reminders";
+GetOptions('file|f=s' => \$filename) or exit 1;
+
+$filename = "./$filename" if $filename =~ /^-/;
+my $today = time;
+$today = str2time($ARGV[0]) if defined $ARGV[0];
+my @remind_today = split ' ', time2str('%d %b %Y', $today);
+$today = time2str('%Y/%m/%d', $today);
+
+open ICONV, '|-', '/usr/bin/iconv', '-c', '-f', 'UTF-8', '-t', '' or die;
+open REMIND, '-|', '/usr/bin/remind', '-q', '-s+1', '-x10', '-b1', '-g', $filename, @remind_today or die;
+while (<REMIND>)
+{
+  chomp;
+  unless (m'^([0-9]{4}/[0-9]{2}/[0-9]{2}) \* \* (\*|([0-9]+)) (\*|([0-9]+) [0-9]{2}:[0-9]{2}) (.*)$')
+  {
+    print STDERR "Invalid line: $_\n";
+    next;
+  }
+  next unless $1 eq $today;
+  if (defined $5)
+  {
+    print ICONV time2str('[%H:%M', $5 * 60, 'UTC');
+    print ICONV time2str(' - %H:%M', ($3 + $5) * 60, 'UTC') if defined $3;
+    print ICONV '] ';
+  }
+  print ICONV "$6\n";
+}
+close ICONV;
+close REMIND;
+
+__END__
+
+=head1 NAME
+
+erzvaq -- a remind(1) wrapper
+  
+=head1 SYNOPSIS
+  
+  erzvaq [-f filename] [date]
+
+=head1 SEE ALSO
+
+L<remind(1)>
+
+=cut
+
+# vim:ts=2 sw=2 et