[BioRuby-cvs] bioruby/bin br_pmfetch.rb{sVv}
Katayama Toshiaki
k at pub.open-bio.org
Mon Jul 11 05:31:34 EDT 2005
Update of /home/repository/bioruby/bioruby/bin
In directory pub.open-bio.org:/tmp/cvs-serv9790/bin
Modified Files:
br_pmfetch.rb
Log Message:
* --sort page option is now available
Index: br_pmfetch.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/bin/br_pmfetch.rb,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** br_pmfetch.rb 6 Jan 2005 12:28:16 -0000 1.4
--- br_pmfetch.rb 11 Jul 2005 09:31:32 -0000 1.5
***************
*** 168,172 ****
Sort:
! author, journal, pub+date
See the following pages for the PubMed search options:
--- 168,172 ----
Sort:
! author, journal, pub+date, page
See the following pages for the PubMed search options:
***************
*** 248,251 ****
--- 248,254 ----
when /--version/
raise PMFetch::Version
+ when /--sort/
+ @sort = optarg
+ @search_opts["sort"] = @sort unless @sort == "page"
else
optname.delete!('-')
***************
*** 285,290 ****
else
entries = parse_entries(entries)
! if @format == 'report'
entries = sort_entries(entries)
report_format(entries)
else
--- 288,295 ----
else
entries = parse_entries(entries)
! if @sort == 'page'
entries = sort_entries(entries)
+ end
+ if @format == 'report'
report_format(entries)
else
***************
*** 311,319 ****
if RUBY_VERSION > "1.8.0"
entries.sort_by { |x|
! [ x.journal, x.volume, x.issue, x.pages.to_i ]
}
else
entries.map { |x|
! [ x.journal, x.volume, x.issue, x.pages.to_i, x ]
}.sort { |a, b|
a[0..3] <=> b[0..3]
--- 316,324 ----
if RUBY_VERSION > "1.8.0"
entries.sort_by { |x|
! [ x.journal, x.volume.to_i, x.issue.to_i, x.pages.to_i ]
}
else
entries.map { |x|
! [ x.journal, x.volume.to_i, x.issue.to_i, x.pages.to_i, x ]
}.sort { |a, b|
a[0..3] <=> b[0..3]
***************
*** 348,352 ****
= Examples : PubMed search
! These for lines will do the same job.
% PMFetch transcription factor
--- 353,357 ----
= Examples : PubMed search
! These four lines will do the same job.
% PMFetch transcription factor
More information about the bioruby-cvs
mailing list