From df3b4f797237bcd1716cb81769890d6f8ddedeab Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 13 Jul 2011 18:57:32 +0200 Subject: Add documentation --- bin/db-fakedisplay | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/bin/db-fakedisplay b/bin/db-fakedisplay index 11a2cbe..2e71d55 100755 --- a/bin/db-fakedisplay +++ b/bin/db-fakedisplay @@ -5,6 +5,7 @@ use warnings; use 5.010; use File::ShareDir qw(dist_file); +use Getopt::Long qw(:config no_ignore_case); use HTML::Template; use List::Util qw(first); use Travel::Status::DE::DeutscheBahn; @@ -15,10 +16,18 @@ sub show_help { my ($exit_status) = @_; say 'Usage: db-fakedisplay '; + say 'See also: man db-fakedisplay'; exit $exit_status; } +GetOptions( + + 'h|help' => sub { show_help(0) }, + 'V|version' => sub { say "db-fakedisplay version ${VERSION}"; exit 0 }, + +) or show_help(1); + if (@ARGV < 2) { show_help(1); } @@ -63,20 +72,36 @@ __END__ =head1 NAME +db-fakedisplay - Show train departures, as seen on the displays on most main stations + =head1 SYNOPSIS +B I I + =head1 VERSION +version 0.00 + =head1 DESCRIPTION +B outputs HTML showing the next departure for every +I on I on stdout. The HTML is styled to look like the LCDs +installed on most (major) stations. + =head1 OPTIONS =over +=item B<-V>, B<--version> + +Show version information + =back =head1 EXIT STATUS +Zero. + =head1 CONFIGURATION None. @@ -85,10 +110,18 @@ None. =over +=item * File::ShareDir(3pm) + +=item * HTML::Template(3pm) + +=item * Travel::Status::DE::DeutscheBahn(3pm) + =back =head1 BUGS AND LIMITATIONS +Unknown + =head1 AUTHOR Copyright (C) 2011 by Daniel Friesel Ederf@finalrewind.orgE -- cgit v1.2.3