wiki:GettingStartedWithFeeds

Version 8 (modified by nick, 15 years ago) (diff)

More on locales/categories, and also the all nodes link

It is really very easy to get feeds out of openguides. In fact, many openguides will include RSS links all over the place, just to help you.

Generally speaking, just adding ;format=rss or ;format=atom onto a normal url is all that is required to get an RSS or Atom feed of that page.

Recent Changes

You can get to the recent changes list by adding ?action=rc onto the wiki link, and then the RSS feed by adding ?action=rc;format=rss or the Atom feed by adding ?action=rc;format=atom . For example, http://cotswolds.openguides.org/wiki/wiki.cgi?action=rc becomes http://cotswolds.openguides.org/wiki/wiki.cgi?action=rc;format=rss.

The RSS version contains lots of useful information. Firstly, it contains a list of the links to the recently changes pages. Then, for each changed page, it contains lots of metadata, including:

  • A link to the page
  • The title of the page
  • Who edited the page, and what comment they included on the change
  • When it was edited
  • If this was a new page, a minor edit or a major edit
  • What categories the page belongs to (held in dc:subject)
  • A link to the rdf of the page

The Atom version doesn't contain quite as much information as the RSS version (we're still waiting on a ModWiki extension for Atom). You get metadata including:

  • A link to the page
  • The title of the page
  • When it was edited
  • What categories the page belongs to
  • A link to the rdf of the page

It is also possible to constrain recent edits to just one user. Such feeds will contain all the information above, but be specific to just one editor. Simply add ;username=(User) to the link, eg http://cotswolds.openguides.org/wiki/wiki.cgi?action=rc;format=rss;username=NickBurch

Searches

When searching, like with recent changes, you can request the RSS version of the search results. Details to follow

Normal Pages (Nodes)

Metadata

For any node, you can request the RDF version of the node, simply by adding ;format=rdf to the url, such as http://cotswolds.openguides.org/wiki/wiki.cgi?The_Bull_Inn,_Charlbury becomes http://cotswolds.openguides.org/wiki/wiki.cgi?id=The_Bull_Inn%2C_Charlbury;format=rdf.

The RDF version again contains lots of useful information, such as:

  • What categories the node belongs to
  • What locales the node belongs to
  • What the address, phone number etc of the place are
  • What the lat and long of the place are (and what the OSGB x and y values are, UK only)
  • Who last edited the node
  • What hours the place is open

In fact, the RDF version should contain all the metadata in some format or other.

Node content

You can get the raw wikitext (the canonical version of the node content - ie everything else but the metadata) by adding ;format=raw to the URL, such as http://cotswolds.openguides.org/wiki/wiki.cgi?The_Bull_Inn,_Charlbury becomes http://cotswolds.openguides.org/wiki/wiki.cgi?id=The_Bull_Inn%2C_Charlbury;format=raw.

Node Versions

You can get a feed in the style of "recent changes" for all the versions of a node. It contains the metadata on the versions, but not the content (see above for how to do that).

To request this, just add ;format=rss or ;format=atom to the end of the node versions url. For example, http://cotswolds.openguides.org/wiki/wiki.cgi?action=list_all_versions;id=John_Brain_Butchers becomes http://cotswolds.openguides.org/wiki/wiki.cgi?action=list_all_versions;id=John_Brain_Butchers;format=atom

Locale / Category Listings

It is possibly to get a feed of all the nodes in a locale or category, or even a list of all the locales and categories. This is done through action=index . These listings are available as rss, atom or rdf, with a suitable format parameter. Use the parameter index_type=.... to select either category or locale, an put the category/locale name in index_value=.....

Everything

Sometimes, you want to dump out a whole guide in an XML format, eg when importing into something else. Details to follow

It is possible to get a list of all the different nodes in the system from action=index , in rss, rdf or atom formats. From this list, you can get the rdf urls for all the nodes, and fetch those. An example link is http://cotswolds.openguides.org/wiki/wiki.cgi?action=index;format=atom

Ivor has also written a script to import a complete guide (minus revision history) using the RDF feeds and raw output mode.