getdata [transport_name] [reference command] [id]A typical call might be:
getdata media currentAll data is computed from a specific transport. Each transport accepts a number of commands, which vary accord to the transport.
The transports are held in:
/usr/local/minerva/etc/transportand currently include media, minerva, tv, weather, and imdb. The result to each command is always in XML.
Transport name: media
Available commands: current
This retrieves full album/artist/song information about the currently playing MP3 or OGG, provided it has been tagged as such.
Transport name: minerva
Available commands: cooking
This wrappers the plain text from the cooking applet into XML.
$ getdata minerva cooking temperature <minerva info='cooking'> <data field="temperature"> |Fahenheit|Gas Mark|Celsius| |225 |1/4 |110 | |250 |1/2 |120 | |275 |1 |140 | |300 |2 |150 | |325 |3 |160 | |350 |4 |175 | |375 |5 |190 | |400 |6 |205 | |425 |7 |220 | |450 |8 |230 | |475 |9 |240 | |500 |10 |260 | </data> </minerva>
Transport name: tv
Available commands: showing
Simple details from tvonnow
, formatted more effectively.
getdata tv showing bbc1Or you can retrieve the standard (non-XML) version by omitting the channel reference ID.
Transport name: weather
Available commands: description, high, low, image
Let's you get the individual components of the weathers textual description is formatted XML. The 'image' parameter is unqualified filename (i.e. no path or extension) for the type of shortcut image that should be used for rendering.
You can query for today, tomorrow, or any named day (provided the data has been downloaded) by including it as an additional parameter. e.g. getdata weather low monday
Transport name: movie
Available commands: film person
Intended primarily for 3rd party control apps, this allows commands like:
getdata movie film "star wars"To retrieve a full breakdown of the film, including writers, composers, actors, and directors. You can then use the reference IDs included in the results to find out more about the person.
# Work out what else have I seen Alec Guinness in... getdata movie person 0000027
Note for third party apps: this command requires two invocations of the database to retrieve its data: once to find the film ID from the name, and again for the data. You will note the ID is returned in the XML with the first result, allowing you to cache this data.