-----Original Message-----
From: openguides-dev-bounces(a)openguides.org
[mailto:openguides-dev-bounces@openguides.org]On Behalf Of Bob Walker
Sent: 25 November 2005 17:51
To: openguides-dev(a)openguides.org
Subject: [OGDev] extension to mirror.pl
Whilst out shopping today my mind started thinking about things.
While its great that we can now mirror an entire guide it
would be great
if we could mirror only bits of it. For example mirror only
pages about
croydon and set up
croydon.openguides.org. then fiddle with
the templates
so thats edits (and possibly new pages) get sent back to the
main guide
(
london.openguides.org).
Admittledy this new guide would then have to create soem of the pages
itself for instance the category_pubs page would need to say
different
things to the original so in fact you might need to have two edit
functions. im sure it oculd work or soemthing.
So the extension would be to tell mirror.pl that you want to
mirror only
certainy categories or locales and disregard anything else.
That should be easy enough to code. og_mirror is a fairly small script, and you are
welcome to produce a custom version of it. Add filtering logic into sub
populate_local_wiki. You probably want to test @{$metadata->{locale}} to see if any
entries in the array contain 'Croydon'.
Shame i cant code :)
No time like the present to start :).
You can always get some help. Buy a copy of the Llama (Learning Perl by Randall Schwarz)
and post your questions to #perl-help on
irc.perl.org or
http://perlmonks.org
If this is a common requirement from others hosting guides, I'll look at enhancing
og_mirror to provide select options.
Anyway, I'm looking to write a "pull" function to grab individual pages from
another guide.
Hope this helps,
Ivor.