[OSM-dev] better packaging of Potlatch resource files

Richard Fairhurst richard at systemed.net
Sun Nov 13 11:54:16 GMT 2011


Mikel Maron wrote:
> I'm helping the folks at Sahana out with their Potlatch2 
> integration. Could we make updates of all the resources 
> files a tiny bit easier, and package them up into a single 
> file? A tar file would do it, I think.

Yes, you can, as Tom alludes. Though it's zip files rather than tar files
because normal people understand zip files. :)

Add something like this to your embedding page:

    		args["assets"] =
"assets/icons.zip=icons/;assets/features_pois.zip=features/pois/";

That tells Potlatch 2 to look in "assets/icons.zip" for any file with a path
starting "icons/", and so on. So if your stylesheet references
"icons/motorway.png", P2 will look for motorway.png in assets/icons.zip. If
it references "features/pois/pub.png", P2 will look for pub.png in
assets/features_poi.zip. You get the idea.

Note that this currently only works for images, not any of the .xml or .css
config files.

cheers
Richard



--
View this message in context: http://gis.638310.n2.nabble.com/better-packaging-of-Potlatch-resource-files-tp6988736p6989753.html
Sent from the Developer Discussion mailing list archive at Nabble.com.



More information about the dev mailing list