-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
28 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,32 @@ | ||
= opds | ||
OPDS Parsing library | ||
==================== | ||
|
||
Description goes here. | ||
This gem provides a parsing library for [OPDS Catalogs](http://opds-spec.org). | ||
|
||
== Note on Patches/Pull Requests | ||
|
||
* Fork the project. | ||
* Make your feature addition or bug fix. | ||
* Add tests for it. This is important so I don't break it in a | ||
future version unintentionally. | ||
* Commit, do not mess with rakefile, version, or history. | ||
(if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull) | ||
* Send me a pull request. Bonus points for topic branches. | ||
It also has the ability to discover catalogs in html feeds. | ||
|
||
Installation | ||
------------ | ||
|
||
gem install opds | ||
|
||
|
||
Usage | ||
----- | ||
|
||
Parsing a feed is simply done. | ||
|
||
require "opds" | ||
OPDS::Feed.parse_url("http://catalog.com/catalog.atom") | ||
|
||
This method will return an instance of the Feed or Entry classes. Each Atom element is accessible directly via a dedicated method (ex: `feed.title`). Entry also provides a method to directly access any embeded Dublin Core metadata (`dcmeta`). The `raw_doc` attribute gives access to the Nokogiri parsed source. | ||
|
||
### Complete atom entries ### | ||
|
||
Complete atom entries are available if detected as another instance of the Entry class. Just call `entry.complete` on the partial entry to access it. | ||
|
||
### Links ### | ||
|
||
Every links are automatically parsed in feeds and entries. They are made available in a collection called `links`. Relative links should be transformed in their absolute equivalent. On each link there is a `navigate` method which will proxy a call to OPDS::Feed.parse_url. | ||
|
||
== Copyright | ||
|
||
Copyright (c) 2010 Benoit Larroque. See LICENSE for details. |