]> git.donarmstrong.com Git - bin.git/commitdiff
add no-abstract option
authorDon Armstrong <don@donarmstrong.com>
Mon, 4 May 2015 19:58:28 +0000 (12:58 -0700)
committerDon Armstrong <don@donarmstrong.com>
Mon, 4 May 2015 19:58:28 +0000 (12:58 -0700)
pubmed_search

index 778960a7f187db49f5eaa4c8d8934a6d8bcb1cec..435f75392c9f61aca496c7c7229744b4e45c5e65 100755 (executable)
@@ -59,16 +59,18 @@ Display this manual.
 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};
@@ -128,8 +130,8 @@ for my $article ($xml->findnodes(q{//*[local-name()='MedlineCitation']})) {
     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";
         }