[pmwiki-devel] New Recipe: Content
Martin Fick
mogulguy at yahoo.com
Sun Jun 3 02:53:58 CDT 2007
I would like to announce the new Content recipe:
http://www.pmwiki.org/wiki/Cookbook/Content
This recipe is an API and is not useful to you unless: you are a recipe
developer or you use another recipe which requires this recipe.
This recipe is a building block meant primarily to be used by other recipes,
recipes which need to create content external to a wiki page but related to
data in a wiki page. This related data will either take the form of a
separate file that can be accessed through a link in the current page or an
image embedded in the current wiki page. The Content recipe provides a
mechanism for recipe builders to define content types along with conversion
mechanisms between these content types (filters/converters). This recipe also
provides wiki authors with the markup to provide the source data (text) to
these content types along with the markup to reference this content using a
simple abstract syntax.
Lastly, this recipe provides many underlying technical mechanisms to help
recipe builders with common tasks needed to manage dynamic content freeing
them from much of this burden allowing them to focus on the specific issues
of their types and converters. These mechanisms include: temporary file
management for converters, cache management, temporary content preview
generation, content page splitting (allowing a large file to be split into
multiple files/links) and content protection (using pmwiki's built in
authorization scheme for pages).
If this sounds a little vague maybe an example would help. This new recipe:
http://www.pmwiki.org/wiki/Cookbook/Music
(announced in the users list) was implemented very easily with this recipe and
it highlights many of the targeted uses of this new API.
I hope that others can make use of this recipe to create many more recipes
that create file formats from wiki markup. I plan on creating a few more
myself... If you have an external filter that you want to integrate into
pmwiki it may well only take two lines of code using this recipe, that is
what it took for most of the file converters in the music recipe.
As always, feedback appreciated,
-Martin
More information about the pmwiki-devel
mailing list