[pmwiki-users] extra guidelines for recipe publishing
Kathryn Andersen
kat_lists at katspace.homelinux.org
Tue Apr 10 06:59:03 CDT 2007
On Tue, Apr 10, 2007 at 02:00:41AM -0700, H. Fox wrote:
> On 4/10/07, Hans <design5 at softflow.co.uk> wrote:
> > Tuesday, April 10, 2007, 8:34:24 AM, H. wrote:
> > But speaking as recipe author I trying it first time I found it was a lot
> > of extra work to get a packed recipe version ready for upload.
> > Basically I have to keep the files for the upload release version
> > synchronised with my actual installed recipe files. Maybe I will get
> > used to it, but it doubles the work and ther eare possibilities of
> > errors due to forgetting synchronising some part of the recipe.
>
> That's probably the hardest part and I agree it requires some effort
> on the part of the author. Perhaps one way to make it easier would be
> to use symlinks (shortcuts) as the installed recipe files (server
> configuration permitting). Maybe not, since the directory name would
> be changing and that might break the symlinks.
Revision control to the rescue!
All my recipes and skins are put in sub-directories of a development
directory (such as /home/kat/kat_dev/pmwiki)
So I have things like
/home/kat/kat_dev/pmwiki/bonny
/home/kat/kat_dev/pmwiki/cluster
/home/kat/kat_dev/pmwiki/handytoc
For single-file recipes such as cluster, I use a symlink from my
pmwiki/cookbook directory to the relevant PHP file (e.g. cluster.php)
For more complicated recipes, I use darcs as a revision-control system.
One of the nice things about darcs is that it can create distribution
archives for you (.tar.gz files), which give you the name-version
directory when you unpack it. I then wrote myself a quick script to
convert the tarball into a zip archive (since that seems to be the
preferred format).
So, for example, in /home/kat/kat_dev/pmwiki/handytoc, I have a
"cookbook" sub-directory which contains handytoc.php, and a
"pub/handytoc" directory, which contains handytoc.css and handytoc.js
So then in my pmwiki installation, I would have a symlink inside
pmwiki/cookbook to
/home/kat/kat_dev/pmwiki/handytoc/cookbook/handytoc.php
and similarly another symlink inside pmwiki/pub
Because I'm using darcs, the directory name
(/home/kat/kat_dev/pmwiki/handytoc) isn't changing, because the
"versioned" directory (handytoc-20070218) is temporarily created by
darcs when I use the "darcs dist" command.
I do something similar with my "Bonny" skin, but there, rather than
using a symlink, I have a quick script which uses rsync to copy the
"development" skin into the pmwiki/pub/skins directory. I can't
remember why, now. Oh, I remember! It's because I have another
directory with "extra" bonny themes which aren't part of the released
recipe, so in that case it's easier to copy the kat_dev/pmwiki/bonny
directory and then copy the kat_dev/pmwiki/bonny_extras directory over
the top of it.
Of course, darcs isn't the only revision-control system around, I just
find I like it. One could do something similar with the subversion tag
system, for example. One could have something like this:
myrecipe/
- trunk/
-- cookbook/
--- myrecipe.php
...
- tags/
-- myrecipe-20070318/
--- cookbook/
---- myrecipe.php
and so on.
Kathryn Andersen
--
_--_|\ | Kathryn Andersen <http://www.katspace.com>
/ \ |
\_.--.*/ | GenFicCrit mailing list <http://www.katspace.com/gen_fic_crit/>
v |
------------| Melbourne -> Victoria -> Australia -> Southern Hemisphere
Maranatha! | -> Earth -> Sol -> Milky Way Galaxy -> Universe
More information about the pmwiki-users
mailing list