App-PDFLibrarian
view release on metacpan or search on metacpan
Any modifications are then written back to the PDF files given by the _file_ field in each BibTeX entry, and the PDF library links rebuilt as needed.
## **pdf-lbr-output-bib** - Output BibTeX bibliographic metadata from PDF files.
### SYNOPSIS
**pdf-lbr-output-bib** **--version**
**pdf-lbr-output-bib** **--help**|**-h**
**pdf-lbr-output-bib** \[ **--clipboard**|**-c** \] \[ **--max-authors**|**-m** _count_ \[ **--only-first-author**|**-f** \] \] \[ **--filter**|**-F** \[_type_**:**\]_field_\[**?**_iffield_|**!**_ifnotfield_...\]**=**_spec_ ... \] \[ **--no-default-f...
... _files_|_directories_ ... **|** **pdf-lbr-output-bib** ...
### DESCRIPTION
**pdf-lbr-output-bib** reads BibTeX bibliographic metadata embedded in PDF _files_ and/or any PDF files in _directories_. If _files_|_directories_ are not given on the command line, they are read from standard input, one per line.
The BibTeX metadata is then printed to standard output; if **--clipboard** is given, it is instead copied to the clipboard.
### OPTIONS
- **--max-authors**|**-m** _count_ \[ **--only-first-author**|**-f** \]
If the number of authors is greater than _count_, and
- If **--only-first-author** is given, output only the first author, followed by "and others".
- Otherwise, output the first _count_ authors, followed by "and others".
Instead of outputting a BibTeX entry, output plain text, formatting entries with formats given in the configuration file.
## **pdf-lbr-output-key** - Output BibTeX bibliographic keys from PDF files.
### SYNOPSIS
**pdf-lbr-output-key** **--version**
**pdf-lbr-output-key** **--help**|**-h**
**pdf-lbr-output-key** \[ **--clipboard**|**-c** \] _files_|_directories_ ...
... _files_|_directories_ ... **|** **pdf-lbr-output-key** ...
### DESCRIPTION
**pdf-lbr-output-key** reads BibTeX bibliographic keys for PDF _files_ and/or any PDF files in _directories_. If _files_|_directories_ are not given on the command line, they are read from standard input, one per line.
The BibTeX keys are then printed to standard output, separated by commas; if **--clipboard** is given, they are instead copied to the clipboard.
## **pdf-lbr-replace-pdf** - Replace a PDF file in the PDF library with a new PDF file.
### SYNOPSIS
**pdf-lbr-replace-pdf** **--version**
**pdf-lbr-replace-pdf** **--help**|**-h**
**pdf-lbr-replace-pdf** \[**-o** _output-directory_\] _old-link_ _new-file_
### SYNOPSIS
**pdf-lbr-iso4-abbr** **--version**
**pdf-lbr-iso4-abbr** **--help**|**-h**
**pdf-lbr-iso4-abbr** \[ **--separator**|**-s** \] _words_ ...
### DESCRIPTION
**pdf-lbr-iso4-abbr** outputs the ISO4 abbreviation of _words_ using the ISSN List of Title Word Abbreviations. The abbreviation is also copied to the clipboard.
### OPTIONS
- **--separator**|**-s**
Separate the abbreviated words with the given character. Default is space.
# COPYRIGHT AND LICENSE
Copyright (C) 2016--2026 Karl Wette. Licensed under the GNU General Public License, version 3 or later.
bin/pdf-lbr-iso4-abbr view on Meta::CPAN
=head1 SYNOPSIS
B<pdf-lbr-iso4-abbr> B<--version>
B<pdf-lbr-iso4-abbr> B<--help>|B<-h>
B<pdf-lbr-iso4-abbr> [ B<--separator>|B<-s> ] I<words> ...
=head1 DESCRIPTION
B<pdf-lbr-iso4-abbr> outputs the ISO4 abbreviation of I<words> using the ISSN List of Title Word Abbreviations. The abbreviation is also copied to the clipboard.
=head1 OPTIONS
=over 4
=item B<--separator>|B<-s>
Separate the abbreviated words with the given character. Default is space.
=back
bin/pdf-lbr-output-bib view on Meta::CPAN
=head1 NAME
B<pdf-lbr-output-bib> - Output BibTeX bibliographic metadata from PDF files.
=head1 SYNOPSIS
B<pdf-lbr-output-bib> B<--version>
B<pdf-lbr-output-bib> B<--help>|B<-h>
B<pdf-lbr-output-bib> [ B<--clipboard>|B<-c> ] [ B<--max-authors>|B<-m> I<count> [ B<--only-first-author>|B<-f> ] ] [ B<--filter>|B<-F> [I<type>B<:>]I<field>[B<?>I<iffield>|B<!>I<ifnotfield>...]B<=>I<spec> ... ] [ B<--no-default-filter>|B<-N> ] [ B<-...
... I<files>|I<directories> ... B<|> B<pdf-lbr-output-bib> ...
=head1 DESCRIPTION
B<pdf-lbr-output-bib> reads BibTeX bibliographic metadata embedded in PDF I<files> and/or any PDF files in I<directories>. If I<files>|I<directories> are not given on the command line, they are read from standard input, one per line.
The BibTeX metadata is then printed to standard output; if B<--clipboard> is given, it is instead copied to the clipboard.
=head1 OPTIONS
=over 4
=item B<--max-authors>|B<-m> I<count> [ B<--only-first-author>|B<-f> ]
If the number of authors is greater than I<count>, and
=over 4
bin/pdf-lbr-output-bib view on Meta::CPAN
App::PDFLibrarian
=head1 COPYRIGHT AND LICENSE
Copyright (C) 2016--2026 Karl Wette. Licensed under the GNU General Public License, version 3 or later.
=cut
# handle help options
my ($version, $help, $clipboard, $max_authors, $only_first_author, %filter, $no_default_filter, @abbreviate_schemes, $pdf_file_comment, %output_text_format, $output_text);
$max_authors = 0;
$pdf_file_comment = 0;
GetOptions(
"version" => \$version,
"help|h" => \$help,
"clipboard|c" => \$clipboard,
"max-authors|m=i" => \$max_authors,
"only-first-author|f" => \$only_first_author,
"filter|F=s" => \%filter,
"no-default-filter|N" => \$no_default_filter,
"abbreviate|a=s" => \@abbreviate_schemes,
"pdf-file-comment|P" => \$pdf_file_comment,
"output-text-format|o=s" => \%output_text_format,
"output-text|O" => \$output_text,
) or croak "$Script: could not parse options";
if ($version) { print "App::PDFLibrarian version $App::PDFLibrarian::VERSION\n"; exit 1; }
bin/pdf-lbr-output-bib view on Meta::CPAN
write_bib_to_fh({
fh => $fh,
pdf_file => $pdf_file_comment ? "comment" : "none"
},
@bibentries);
close($fh);
}
# output BibTeX entries
if ($clipboard) {
Clipboard->copy_to_all_selections($bibstring);
printf STDERR "$Script: BibTeX metadata has been copied to the clipboard\n";
} else {
print "$bibstring";
}
exit 0;
bin/pdf-lbr-output-key view on Meta::CPAN
=head1 NAME
B<pdf-lbr-output-key> - Output BibTeX bibliographic keys from PDF files.
=head1 SYNOPSIS
B<pdf-lbr-output-key> B<--version>
B<pdf-lbr-output-key> B<--help>|B<-h>
B<pdf-lbr-output-key> [ B<--clipboard>|B<-c> ] I<files>|I<directories> ...
... I<files>|I<directories> ... B<|> B<pdf-lbr-output-key> ...
=head1 DESCRIPTION
B<pdf-lbr-output-key> reads BibTeX bibliographic keys for PDF I<files> and/or any PDF files in I<directories>. If I<files>|I<directories> are not given on the command line, they are read from standard input, one per line.
The BibTeX keys are then printed to standard output, separated by commas; if B<--clipboard> is given, they are instead copied to the clipboard.
=head1 PART OF
App::PDFLibrarian
=head1 COPYRIGHT AND LICENSE
Copyright (C) 2016--2026 Karl Wette. Licensed under the GNU General Public License, version 3 or later.
=cut
# handle help options
my ($version, $help, $clipboard);
GetOptions(
"version" => \$version,
"help|h" => \$help,
"clipboard|c" => \$clipboard,
) or croak "$Script: could not parse options";
if ($version) { print "App::PDFLibrarian version $App::PDFLibrarian::VERSION\n"; exit 1; }
pod2usage(-verbose => 2, -exitval => 1) if ($help);
# iterate over arguments to preserve order
my %keys;
my $keycount = 0;
foreach my $arg (get_file_list()) {
# get list of PDF files
bin/pdf-lbr-output-key view on Meta::CPAN
# store key, pruning duplicates
$keys{$key} = $keycount++ unless defined($keys{$key});
}
}
# make comma-separated list of keys
my $keystring = join(", ", sort({$keys{$a} <=> $keys{$b}} keys(%keys)));
# output BibTeX keys
if ($clipboard) {
Clipboard->copy_to_all_selections($keystring);
printf STDERR "$Script: BibTeX keys have been copied to the clipboard\n";
} else {
print "$keystring\n";
}
exit 0;
share/title_abbr_iso4.csv view on Meta::CPAN
"clignotant";"clign.";"fre"
"clima";"n.a.";"spa"
"climacterium";"climact.";"dut"
"climat-";"clim.";"fre, eng"
"climatolog-";"climatol.";"fre, eng"
"climax";"n.a.";"eng"
"climber";"climb.";"eng"
"clinic-";"clin.";"eng"
"clinique-";"clin.";"fre"
"Clinton";"Clint.";"eng"
"clipboard";"n.a.";"eng"
"clipper";"clipp.";"eng"
"clipping";"clipp.";"eng"
"clique";"n.a.";"mul"
"cloche";"n.a.";"mul"
"clocher";"n.a.";"fre"
"clockmak-";"clockmak.";"eng"
"clockwise";"clockw.";"eng"
"Clogher";"n.a.";"eng"
"Clonfert";"n.a.";"eng"
"cloning";"n.a.";"eng"
( run in 1.079 second using v1.01-cache-2.11-cpan-2398b32b56e )