[pmwiki-users] data from wiki page rather than file

Carl Boe boe at demog.berkeley.edu
Wed May 4 23:45:59 CDT 2005


Patrick R. Michaud wrote:
> On Wed, May 04, 2005 at 05:55:01PM -0700, Carl Boe wrote:
> 
>>In general, is there an accepted way to have markup for a page depend upon 
>>and manipulate raw content in another page, not just include it?  Could 
>>this be done with knowledge of modification times, so that a cached page 
>>does not have to regenerate if its dependencies are older than its last 
>>modification date?
> 
> 
> Yes, this can happen -- in general one uses the ReadPage() function
> to get at the wiki page data (or RetrieveAuthFunction() if authorization
> issues need to be handled).  There are several recipes and scripts
> that do this already.  The XLPage routines (in pmwiki.php) load
> translation strings from other wiki pages, the BlockList recipe uses
> a wiki page to maintain a list of forbidden words and addresses, and 
> the URL approvals code (scripts/urlapprove.php) uses a wiki page
> to maintain a list of valid web addresses.
> 
> So, yes, it's doable.
> 
> Caching is a slightly different issue -- generally someone needs a place
> to store cache files.  I'm thinking it might be worthwhile for us to
> designate a standard directory where scripts can store cached files
> of various types.  I'm thinking it should be either cache.d/ or
> wiki.d/cache.d/ , with the latter being slightly more preferable
> because an admin then only has to protect one directory (wiki.d/) 
> and not two.  Any thoughts from others about a cache directory...?
> 
> Pm

Thanks for the quick and comprehensive reply.  I only wish I could keep
up with the conversation these days.  I will take a look at the leads
you suggest, e.g. XLPage, BlockList.  Perhaps easier is to obtain
in-place markup for bibtex items, e.g., like moinmoin's bibtex parser,
that produces http://spot.lip6.fr/wiki/SpotReferences , and where
something like

{{{#!bibtex
@InProceedings{	  duret.04.mascots,
  author	= {Alexandre Duret-Lutz and Denis Poitrenaud},
  title		= {SPOT: an Extensible Model Checking Library using
		  Transition-based Generalized {B\"u}chi Automata},
  booktitle	= {Proceedings of the 12th IEEE/ACM International Symposium
		  on Modeling, Analysis, and Simulation of Computer and
		  Telecommunication Systems (MASCOTS'04)},
  year		= {2004},
  address	= {Volendam, The Netherlands},
  month		= {October},
  publisher	= {IEEE Computer Society Press},
  pages         = {76--83},
  pdf		=
{http://www-src.lip6.fr/homepages/Alexandre.Duret-Lutz/dl/adl/duret.04.mascots.draft.pdf}
}
}}}

becomes formatted in place, with appropriate hyperlinks.  I am not a big
fan of BibTeX ( never made it to version 1.0, horrible to parse, dated
and incomplete fields, etc.) but the alternatives (RIS?) do not have
wide use.

With the introduction of things like Categories that involve scanning
the whole wiki, the idea of cacheing and dirty pages with respect to the
underlying search being done become interesting.  Augment the current
result with the results of recently modified pages, unique-ify and sort
to get updated content?

--cb



More information about the pmwiki-users mailing list