From: Don Armstrong Date: Fri, 24 Jan 2014 00:24:59 +0000 (-0800) Subject: more work on bibtex to paper X-Git-Url: https://git.donarmstrong.com/?p=bin.git;a=commitdiff_plain;h=b538bd95ec63124725f440cdbd49475e8e307b15 more work on bibtex to paper --- diff --git a/bibtex_to_paper b/bibtex_to_paper index b3f5c53..7474ccb 100755 --- a/bibtex_to_paper +++ b/bibtex_to_paper @@ -3,7 +3,7 @@ # and is released under the terms of the GNU GPL version 3, or any # later version, at your option. See the file README and COPYING for # more information. -# Copyright 2013 by Don Armstrong . +# Copyright 2014 by Don Armstrong . use warnings; @@ -26,6 +26,7 @@ bibtex_to_paper [options] bibtexkey Options: --bibtex, -b bibtex file to look up key in --bibtex-cache, -c bibtex cache file + --build-cache, -B build cache using bibtex files --pdf-dir pdf directory --pdfviewer, -p pdf viewer to use --debug, -d debugging level (Default 0) @@ -78,6 +79,10 @@ my %options = (debug => 0, ); GetOptions(\%options, + 'build_cache|build-cache|B!', + 'bibtex|b=s', + 'bibtex_cache|bibtex-cache|c=s', + 'pdfviewer|p=s', 'debug|d+','help|h|?','man|m'); pod2usage() if $options{help}; @@ -86,13 +91,22 @@ pod2usage({verbose=>2}) if $options{man}; $DEBUG = $options{debug}; my @USAGE_ERRORS; -if (1) { - push @USAGE_ERRORS,"You must pass something"; +if (not exists $options{bibtex} and + not exists $options{bibtex_cache}) { + push @USAGE_ERRORS, + "You must give at least one of --bibtex". + "or --bibtex-cache"; } pod2usage(join("\n",@USAGE_ERRORS)) if @USAGE_ERRORS; +sub parse_bibtex_file { + +} +sub initialize_database { + my +} __END__