krang_publish - command-line publishing utility for Krang.
Publish everything (all stories & media for all sites) in a krang installation
$ krang_publish --everything
Only publish assets that have been published before (but publish their latest versions)
$ krang_publish --everything --republish-only
Only publish assets that have been published before (and re-publish their last-published versions)
$ krang_publish --everything --republish-only --maintain-versions
Publish all assets of a single site, specified by site-id
$ krang_publish --site-id 10
Publish all assets for a given category, specified by category-id
$ krang_publish --category-id 10
Publish a specific story and all related assets (linked stories and media)
$ krang_publish --story-id 10
Publish a series of stories and their related assets
$ krang_publish --story-id 10,11,12
The alternative form for multiple-story publish
$ krang_publish --story-id 10 --story-id 11 --story-id 12
This script provides a command-line tool for publishing content in Krang. Large-scale publish jobs (e.g. entire sites, or moreso, entire installations) should use this tool rather than the web UI, as the web UI is not well-suited to larger publish runs.
Using the --everything flag will cause krang_publish to ignore the --site-id, --category-id, --story-id and --media-id options.
KRANG_INSTANCE environment
variable, or, if there's only one specified in krang.conf, for
that. But sometimes after an upgrade (or installation
of a new addon or element library uprade) it's convenient to be able
to publish everything in all instances.
This only works along with the --everything flag.
Using the --site-id flag will cause krang_publish to ignore the --story-id and --media-id options.
WARNING: The intended use case for this option would be an installation that is already in production and underwent template changes to a specific site, requiring a re-publish for that site *only*. This option should not be used unless you are absolutely sure that stories and media outside of this site are in place in the publish path, or broken links in the publish path may result.
Using the --category-id flag will cause krang_publish to ignore the --story-id and --media-id options.
WARNING: The intended use case for this option would be an installation that is already in production and underwent template changes to a specific category, requiring a re-publish for that category *only*. This option should not be used unless you are absolutely sure that stories and media outside of this category are in place in the publish path, or broken links in the publish path may result.
Using the --story-id flag will cause krang_publish to ignore the --site-id, --category-id and --below-category-id options.