2 # bibtex_to_paper opens the paper corresponding to a bibtex key
3 # and is released under the terms of the GNU GPL version 3, or any
4 # later version, at your option. See the file README and COPYING for
6 # Copyright 2013 by Don Armstrong <don@donarmstrong.com>.
20 bibtex_to_paper - opens the paper corresponding to a bibtex key
24 bibtex_to_paper [options] bibtexkey
27 --bibtex, -b bibtex file to look up key in
28 --bibtex-cache, -c bibtex cache file
29 --pdf-dir pdf directory
30 --pdfviewer, -p pdf viewer to use
31 --debug, -d debugging level (Default 0)
32 --help, -h display this help
33 --man, -m display manual
41 Bibtex file to look key up in
43 =item B<--bibtex-cache, -c>
45 Bibtex cache file; rebuilt if bibtex file changes
47 =item B<--pdfviewer, -p>
49 PDF viewer to use; defaults to evince unless a .xoj exists, in which
54 Debug verbosity. (Default 0)
58 Display brief usage information.
75 my %options = (debug => 0,
81 'debug|d+','help|h|?','man|m');
83 pod2usage() if $options{help};
84 pod2usage({verbose=>2}) if $options{man};
86 $DEBUG = $options{debug};
90 push @USAGE_ERRORS,"You must pass something";
93 pod2usage(join("\n",@USAGE_ERRORS)) if @USAGE_ERRORS;