[sword-devel] Script to generate SWORD module zipfiles (was: Re: InstallMgr)

Jonathan Marsden jmarsden at fastmail.fm
Thu May 14 18:49:40 MST 2009

Chris said:

 >>>> The ZIPs are only created by the download servlet.

If this is correct, then none of:

>> for module in $(cat /usr/share/sword/mods.d./*.conf | grep -e
>> '^\[.*\]$' | sed -e 's/\[(.*)\]/\1/'); do
>>    installmgr -ri CrossWire $module;
>> done

>> for module in $(cat /path/to/zips); do
>>       wget -O /dev/null ftp://path/to/file/$module;
>> done

> I believe what is needed is to request the raw zip files, not the
> modules via ftp. wget would work for that, but I believe over http.

will really do the trick.  None of them go anywhere near the servlet :)

Unless I am totally misunderstanding Chris, the (still trivial) script 
needs to wget each known module from the *web page* that has a "download 
servlet", so that the servlet runs against that module, and so does the 
necessary work to create the corresponding .zip file.

So (WARNING: totally untested!!) something closer to:

   wget -O /dev/null -m --no-parent http://crosswire.org/sword/modules/

is what I was thinking should work, because it recurses down the tree of 
links from that page (and throws the resulting files away!).

Am I misunderstanding the issue?


P.S. I currently use a little script to do:

wget -m --no-parent -nH -nd \
rm index.html* robots.txt # Get rid of junk that is not .zip modules

to maintain my local cache of rawzip SWORD modules, but that won't
generate any new or updated .zip files, if I'm understanding this right, 
because nothing it does will trigger the servelet to create them.

More information about the sword-devel mailing list