No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
an 5b2f063579 Changed feed.go 11 months ago
testdata Add newline to error message 3 years ago
LICENSE Switch to more liberal CC0 Public Domain license. 7 years ago
README.md Fix outdated path in readme 3 years ago
atom.go 'atom.go' ändern 11 months ago
author.go Making package easily usable with goinstall. Including the reference to go-pkg-xmlx and the build target in the makefile. 8 years ago
category.go Making package easily usable with goinstall. Including the reference to go-pkg-xmlx and the build target in the makefile. 8 years ago
channel.go added Extension to channel 5 years ago
cloud.go Making package easily usable with goinstall. Including the reference to go-pkg-xmlx and the build target in the makefile. 8 years ago
content.go Making package easily usable with goinstall. Including the reference to go-pkg-xmlx and the build target in the makefile. 8 years ago
database.go Removed logging 4 years ago
databaseHandler.go Ensured that New() feed function is functionally equivalent still 4 years ago
enclosure.go Making package easily usable with goinstall. Including the reference to go-pkg-xmlx and the build target in the makefile. 8 years ago
feed.go Changed feed.go 11 months ago
feed_test.go Fixes #44, crash when no handlers 4 years ago
generator.go Making package easily usable with goinstall. Including the reference to go-pkg-xmlx and the build target in the makefile. 8 years ago
image.go Making package easily usable with goinstall. Including the reference to go-pkg-xmlx and the build target in the makefile. 8 years ago
input.go Making package easily usable with goinstall. Including the reference to go-pkg-xmlx and the build target in the makefile. 8 years ago
item.go differentiate between published and updated 3 years ago
link.go Making package easily usable with goinstall. Including the reference to go-pkg-xmlx and the build target in the makefile. 8 years ago
notes.md Used lists 4 years ago
rss.go Changed rss.go 11 months ago
source.go Making package easily usable with goinstall. Including the reference to go-pkg-xmlx and the build target in the makefile. 8 years ago
subtitle.go Making package easily usable with goinstall. Including the reference to go-pkg-xmlx and the build target in the makefile. 8 years ago
timeparser.go go fmt 4 years ago
timeparser_test.go go fmt 4 years ago

README.md

RSS

This package allows us to fetch Rss and Atom feeds from the internet. They are parsed into an object tree which is a hybrid of both the RSS and Atom standards.

Supported feeds are:

  • Rss v0.91, 0.92 and 2.0
  • Atom 1.0

The package allows us to maintain cache timeout management. This prevents us from querying the servers for feed updates too often and risk ip bans. Apart from setting a cache timeout manually, the package also optionally adheres to the TTL, SkipDays and SkipHours values specified in the feeds themselves.

Note that the TTL, SkipDays and SkipHour fields are only part of the RSS spec. For Atom feeds, we use the CacheTimeout in the Feed struct.

Because the object structure is a hybrid between both RSS and Atom specs, not all fields will be filled when requesting either an RSS or Atom feed. I have tried to create as many shared fields as possible but some of them simply do not occur in either the RSS or Atom spec.

The Feed object supports notifications of new channels and items. This is achieved by passing 2 function handlers to the feeder.New() function. They will be called whenever a feed is updated from the remote source and either a new channel or a new item is found that previously did not exist. This allows you to easily monitor a feed for changes. See feed_test.go for an example of how this works.

DEPENDENCIES

github.com/jteeuwen/go-pkg-xmlx

USAGE

An idiomatic example program can be found in testdata/example.go.