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.
Publish all content (stories and media) in a Krang installation.
Using the --everything flag will cause krang_publish to ignore the
--site-id, --category-id, --story-id and --media-id options.
The definition of ``everything'' can be altered with the --skip-stories
and --skip-media flags.
If true, then media files will be skipped from publishing. This does not however prevent media files that are related to stories from getting published.
If true, then stories will be skipped from publishing.
If true, do not publish related stories or media.
WARNING: Use with care! This option is mainly meant for development purposes.
Normally we just publish the content for a single instance:
either the one specified in the 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.
Publish all content (stories and media) under the site specified by the site-id. May only be specified once.
Using the --site-id flag will cause krang_publish to ignore the
--story-id and --media-id options.
An option addendum to --site-id, any related stories or media that are
outside of the specified site will not be published.
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.
Publish all content (stories and media) under the category specified by the category_id. May only be specified once.
Using the --category-id flag will cause krang_publish to ignore the
--story-id and --media-id options.
Publish all content (stories and media) below the given category and its child categories. May only be specified once.
An option addendum to --category-id and --below-category-id, any
related stories or media that are outside of the specified category
will not be published.
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.
Publishes the story and related media objects associated with the
story_id. Supports multiple --story-id arguments, or a single
--story-id argument with a comma-separated list of IDs to publish more
than one story.
Using the --story-id flag will cause krang_publish to ignore the
--site-id, --category-id and --below-category-id options.
Publishes only those stories that are of the specified element class. You can specify this option multiple times to publish stories from multiple element classes.
Publish a single media object, specified by its media-id. CURRENTLY BROKEN
This modifier will limit the publish process to assets that have been published previously.
Adding this to a --republish-only will cause the last-published
version of each asset to be republished (instead of the
latest version). This mode is not available when publishing to
preview.
This modifier will limit the publish process to assets that are not currently on a desk (associated with a Krang::Desk object).
This modifier will force krang_publish to check the last published/previewed version of all assets related to the ones being published. Those that haven't changed since the last time they were published/previewed will be skipped.
Publish files to preview rather than the publish location.
When publishing to preview with the preview editor enabled, the Apache flavor must be specified. It may be 'root' or 'instance'. Croaks with different values.
Run the publish without using Krang::Cache to speed things up.
Increases the level of output to STDOUT to give a more in-depth explanation of what is going on.