[pmwiki-users] extra guidelines for recipe publishing
Dominique Faure
dominique.faure at gmail.com
Mon Apr 9 07:33:35 CDT 2007
On 4/9/07, Hans <design5 at softflow.co.uk> wrote:
> Monday, April 9, 2007, 10:18:41 AM, Hans wrote:
>
> > Maybe all I am missing is some tricks how to construct a zip archive
> > with the correct path information for all files, which can unzip into
> > several folders, i.e. into cookbook/ and pub/ and creating a subfolder
> > in each.
>
> I like Hagan's package (=your recipe name) proposal from
> http://www.pmwiki.org/wiki/Cookbook/ModuleGuidelines :
>
> package-0.01/
> |-- cookbook
> | |-- package.php Single script for recipe
> | `-- package Additional recipe files
> | |-- README.txt Documentation template
> | |-- LICENSE.txt GNU General Public License (GPL)
> | |-- bundlepages.php Script to add a page storage location
> | |-- .htaccess Deny access (security)
> | |-- index.html Redirect to ../ (security)
> | |-- index.php Redirect to ../ (security)
> | `-- wikilib.d Custom page storage location
> | |-- PmWiki.BundledPage Bundled page
> | |-- index.html Redirect to ../ (security)
> | `-- index.php Redirect to ../ (security)
> `-- pub
> `-- package Directory for "servable" content
> |-- xhtml-valid.png Sample image file
> |-- .htaccess Prevent listing (security)
> |-- index.html Redirect to ../ (security)
> `-- index.php Redirect to ../ (security)
>
>
> And I just did not know how to construct the zip archive from the
> folders and files in their working location on my local computer.
> I see now that I can construct it by creating an archive recipe
> folder and copying the reelvant subfolders from cookbook and pub,
> and then zipping it. I will try this method. It has some extra steps
> but should have the right zip file as an end product.
> Thanks Hagan for publishing this suggestion! And I thought I knew the
> module guidelines....
>
> okay I have not understood the sentence below,
> I don't know what that command is, nor how to execute it. Perhaps Unix?
> I am on a Windoze machine. (I also often get confused with terminology like
> bar.php, baz.php and the foo things.)
>
Personally, I'm used to make my recipes/skins distributions on Windows
with the help of small batch files like the one below:
===8<---
@echo off
set _=%cd%
cd ..\..
set arch=uploads\Cookbook\asciimath.zip
echo nul > incl.txt
rem v------ included -----v
echo cookbook\asciimath.php >> incl.txt
echo cookbook\asciimath\*.* >> incl.txt
echo docs\Cookbook.ASCIIMath*.txt >> incl.txt
echo pub\asciimath\*.xsl >> incl.txt
rem ^---------------------^
echo nul > excl.txt
rem v------ excluded -----v
rem ^---------------------^
"C:\Program Files\7-zip\7z" a -tzip %arch% -i at incl.txt -x at excl.txt
del incl.txt excl.txt
cd /d %_%
ping -n 5 -w 1000 127.0.0.1 > nul
===8<---
The script reside into the /uploads/Cookbook directory of my local
development pmwiki installation.
Each recipe has its own version script version, edited with the
archive name to produce and their particular files specifications to
include/exclude.
It relies on the excellent free 7zip archiver to build the distribution archive.
Tips#1
------
set _=%cd%
cd somewhere
do_some_work
cd /d %_%
is a trick to remember the launching directory.
Tips#2
------
ping -n 5 -w 1000 127.0.0.1 > nul
is a tricky but effective way to have a parametrized pause in a batch script.
Hope this help,
Dom
More information about the pmwiki-users
mailing list