Hardware Reference
In-Depth Information
without writing a single line of code; you only need to overload the renderFileLine and renderDirectoryLine
methods to generate appropriate actionable links. Additionally, Warp_Static_Text_Applet can be used select and
render one of many given HTML files, as demonstrated with the cooking applet.
Caching is one of many utilities provided by the appletUtils class, located in warp/warplib/appletutils.inc .
Code like this will download the contents of $url to the local data file but only if the file doesn't exist or is older than
6,000 seconds:
$contents = appletUtils::getContents($url, "local_data_file", 6000);
The cache contents are stored in /var/log/minerva/cache .
Release
If you're developing an applet for yourself, then the job is now done! Otherwise, you should package it ready for
others. The addminervaapplet script is used to install new applets into the correct locations. Because there can be
several components to an applet (Bearskin, WARP, and Zinc), you should create directories for each so that it matches
those used already. Here's an example of the FM radio applet:
fmradio/example.php
fmradio/Readme
fmradio/version
fmradio/fmradio/bearskin/fmradio
fmradio/fmradio/install/install.sh
fmradio/fmradio/warp/app/ [contents of applet directory go here]
fmradio/fmradio/zinc/conf/ [Zinc configuration here]
fmradio/fmradio/zinc/cmd
Manifest
The Manifest system is a method of presenting multiple elements in a sequential pattern in a way that can be
interactively terminated, interrupted, or extended, with the commands stop , next , and more , respectively. This is better
explained by working through the two supplied examples, News and Music, whose audio-based output is typical of the
usage of Manifest.
The news manifest reads headlines from a given news feed one at a time. If the more command is given at any
point during the headline, the full story is then read, before continuing with the next headline. (In the case of the music
manifest, the more command is a null operation but could be used to speak the title and artist of the previous track.)
The manifests can be invoked with a simple command like the following:
manifest default start music 10
and, because the current manifest is known, can be controlled without naming it:
manifest default next
Note that the start command is synchronous and doesn't return until all the items have been played, which will
be either when there is no news left or the maximum number of items have been read, in this case 10.
Search WWH ::




Custom Search