arxiv 0.0.8 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/README.md +40 -0
- data/arxiv.gemspec +9 -9
- data/circle.yml +5 -0
- data/lib/arxiv.rb +0 -7
- data/lib/arxiv/data/category_abbreviation_to_label_mapping.xml +1352 -0
- data/lib/arxiv/models/author.rb +1 -1
- data/lib/arxiv/models/category.rb +27 -3
- data/lib/arxiv/models/link.rb +1 -1
- data/lib/arxiv/models/manuscript.rb +2 -2
- data/lib/arxiv/string_scrubber.rb +1 -1
- data/lib/arxiv/version.rb +1 -1
- data/spec/arxiv/arxiv_spec.rb +13 -11
- data/spec/arxiv/models/author_spec.rb +3 -3
- data/spec/arxiv/models/category_spec.rb +7 -6
- data/spec/arxiv/models/link_spec.rb +3 -3
- data/spec/arxiv/models/manuscript_spec.rb +28 -24
- data/spec/spec_helper.rb +1 -0
- metadata +67 -32
- data/.rvmrc +0 -1
- data/README.rdoc +0 -44
data/.rvmrc
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
rvm use ruby-1.9.2-p290@arxiv --create
|
data/README.rdoc
DELETED
@@ -1,44 +0,0 @@
|
|
1
|
-
http://docs.scholastica.s3.amazonaws.com/scholastica_logo.png
|
2
|
-
|
3
|
-
A Ruby wrapper for the {arXiv API}[http://arxiv.org/help/api/index]. ArXiv is an open access pre-print server used primarily in physics, mathematics, computer science, quantitative biology, quantitative finance and statistics.
|
4
|
-
|
5
|
-
<i>This is not a complete wrapper around the arXiv API. We'll be making improvements as needed for our overlay journals. If you'd like something added, send us a note or make a pull request.</i>
|
6
|
-
|
7
|
-
== Fetching a manuscript
|
8
|
-
Grab a manuscript using the arXiv document id:
|
9
|
-
|
10
|
-
manuscript = Arxiv.get('1202.0819')
|
11
|
-
|
12
|
-
And inspect it:
|
13
|
-
|
14
|
-
manuscript.revision? # => false
|
15
|
-
manuscript.title # => "Laser frequency comb techniques for precise astronomical spectroscopy"
|
16
|
-
manuscript.abstract # => "Precise astronomical spectroscopic analyses routinely assume..."
|
17
|
-
manuscript.arxiv_id # => "1202.0819"
|
18
|
-
manuscript.version # => 1
|
19
|
-
manuscript.pdf_url # => "http://arxiv.org/pdf/1202.0819v1"
|
20
|
-
|
21
|
-
== Authors
|
22
|
-
Look up a manuscript's authors:
|
23
|
-
|
24
|
-
authors = manuscript.authors # => an array of all the manuscript's authors
|
25
|
-
authors.map(&:name) # => ["Michael T. Murphy", "Clayton R. Locke", "Philip S. Light", "Andre N. Luiten", "Jon S. Lawrence"]
|
26
|
-
|
27
|
-
# a single author
|
28
|
-
authors.last.name # => "Jon S. Lawrence"
|
29
|
-
authors.last.affiliations # => ["Australian Astronomical Observatory", "Macquarie University"]
|
30
|
-
|
31
|
-
== Categories
|
32
|
-
Look at a manuscript's categories:
|
33
|
-
|
34
|
-
manuscript.categories # => an array of categories
|
35
|
-
manuscript.categories.map(&:abbreviation) # => ["astro-ph.IM", "astro-ph.CO", "astro-ph.EP"]
|
36
|
-
|
37
|
-
# a single category
|
38
|
-
manuscript.primary_category.name # => "astro-ph.IM"
|
39
|
-
manuscript.primary_category.description # => "Physics - Instrumentation and Methods for Astrophysics"
|
40
|
-
|
41
|
-
== License
|
42
|
-
This is an open source project built by {Scholastica}[https://scholasticahq.com] under the {MIT-LICENSE}[https://github.com/scholastica/timber/blob/master/MIT-LICENSE].
|
43
|
-
|
44
|
-
http://docs.scholastica.s3.amazonaws.com/github_scholastica_footer_logo.png
|