
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
OPDS parser and maker. OPDS(Open Publication Distribution System) is feed which syndicates information about ebooks.
Why "RSS" rather than "Atom"? Because class for Atom bundled with Ruby uses RSS namespace.
Add this line to your application's Gemfile:
gem 'rss-opds'
And then execute:
$ bundle
Or install it yourself as:
$ gem install rss-opds
require 'open-uri'
require 'rss/opds'
opds = RSS::Parser.parse open(uri)
opds.entries.each do |entry|
price_elem = entry.links.select {|link| link.opds_price}.first
puts price_elem
end
If you need performance, install rss-nokogiri gem and write require 'rss/nokogiri'
before calling RSS::Parser.parse
.
You may make OPDS feeds as well as normal Atom feeds.
require 'rss/opds'
recent = RSS::Maker.make('atom') do |maker|
maker.channel.about = 'http://example.net/'
maker.channel.title = 'Example New Catalog'
maker.channel.description = 'New books in this site'
maker.channel.links.new_link do |link|
link.href = 'http://example.net/new.opds'
link.rel = 'self'
link.type = RSS::OPDS::TYPES['acquisition']
end
maker.channel.links.new_link do |link|
link.href = 'http://example.net/root.opds'
link.rel = RSS::OPDS::RELATIONS['start']
link.type = RSS::OPDS::TYPES['navigation']
end
maker.channel.updated = '2012-08-14T04:23:00'
maker.channel.author = 'KITAITI Makoto'
new_books.each do |book|
maker.items.new_item do |entry|
entry.title = book.title
entry.updated = book.updated
entry.summary = book.summary
entry.link = book.link
end
end
end
puts recent # => output OPDS feed
And now, this library provides utility methods which help you make OPDS navigation feeds.
root = RSS::Maker.make('atom') {|maker|
maker.channel.about = ...
maker.items.add_relation recent, RSS::OPDS::RELATIONS['new']
# or just:
# maker.items.add_new recent
#
# these are equivalent to:
# maker.items.new_item do |item|
# item.id = recent.id
# item.title = recent.title
# # ...
# end
}
puts root # => output XML including entry with 'new' sorting relation
For more examples, see files in examples
directory.
git checkout -b my-new-feature
)git commit -am 'Added some feature'
)git push origin my-new-feature
)#buy
(gets link
element with rel="acquisition/buy"
), #price
(opds:price
element) and so onFAQs
Unknown package
We found that rss-opds demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.