https://github.com/rubyonworld/opds
This gem provides a parsing library for OPDS Catalogs.
https://github.com/rubyonworld/opds
catalog gem library opds provide
Last synced: 8 months ago
JSON representation
This gem provides a parsing library for OPDS Catalogs.
- Host: GitHub
- URL: https://github.com/rubyonworld/opds
- Owner: RubyOnWorld
- License: mit
- Created: 2022-09-23T02:45:28.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-09-23T02:45:43.000Z (about 3 years ago)
- Last Synced: 2024-12-28T14:24:41.517Z (9 months ago)
- Topics: catalog, gem, library, opds, provide
- Language: Ruby
- Homepage:
- Size: 51.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
OPDS Parsing library
====================This gem provides a parsing library for [OPDS Catalogs](http://opds-spec.org).
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.access("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.
API documentation can be found on [rdoc.info](http://rdoc.info/github/zetaben/opds/master/frames)
### 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.