krang_upload_media - import media from filesystem
krang_upload_media --path /path/to/media
Upload a directory of media into a Krang instance, via the API. Uploaded media will be published. Checked out media will be skipped, as will those for which sites or caregories do not exist in the CMS.
This tool is primarily to aid developers, permitting them to work with media on the filesystem (presumably version controlled by CVS or SVN), as opposed to having to muck around with ``media.kds''.
The script takes the following options:
Path from which to upload media. Note, this will be uploaded verbatim to the site. For example:
/path/to/media/
+--- site1.com/
| +--- bleh.css
| +--- foo/bleh.jpg
+--- site2.com/
+--- bleh.css
+--- foo/bleh.jpg
Sites and Categories will NOT be created. Media files in invalid directories will be ignored.
If specified, media objects which are checked out will be checked in rather than skipped.
If specified, categories which do not exist will be created instead of skipped.
if specified, will be used as a perl regex against the would-be URL of the media to be uploaded. Only matching files will be uploaded.