wiki:GettingStartedWithFeeds

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

Information for new 0.55 openguides feeds

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 onto a normal url is all that is required to get an RSS 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

Everything

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

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