use vars qw($DEBUG);
my %options = (debug => 0,
- help => 0,
- man => 0,
- color => 1,
- org_mode => 0,
- );
+ help => 0,
+ man => 0,
+ color => 1,
+ org_mode => 0,
+ abstract => 1,
+ );
GetOptions(\%options,
'color|c!',
'org_mode|org-mode',
'pmid_only|pmid-only',
+ 'abstract|a!',
'debug|d+','help|h|?','man|m');
pod2usage() if $options{help};
-term => join(' ',@ARGV),
-retmax => 1000,
)->run();
+if ($result eq '0') {
+ print "No results\n";
+ exit;
+}
my @ids = $result->ids;
if (@ids > 0 and ref($ids[0])) {
@ids = @{$ids[0]};
print BOLD CYAN if $options{color};
print encode_utf8($title->textContent())."\n";
print RESET if $options{color};
- print BOLD MAGENTA if $options{color};
- if (defined $abstract) {
+ if (defined $abstract and $options{abstract}) {
+ print BOLD MAGENTA if $options{color};
if ($options{org_mode}) {
print "*** Abstract\n";
}