Skip to main content

manuals-publisher: Rake tasks

These rake tasks come from the desc descriptions in manuals-publisher’s lib/tasks folder. To change what’s shown here, change the description in the code.

delete_draft_manual

Delete draft manual (supply EITHER manual_slug OR manual_id)

k exec deploy/manuals-publisher -- rake delete_draft_manual[manual_slug,manual_id]

View source (lib/tasks/delete_draft_manual.rake)

delete_duplicate_drafts

Delete duplicate drafts

k exec deploy/manuals-publisher -- rake delete_duplicate_drafts

View source (lib/tasks/delete_duplicate_drafts.rake)

dev:setup

Ensure that a dev environment is setup correctly (create default user etc)

k exec deploy/manuals-publisher -- rake dev:setup

View source (lib/tasks/dev.rake)

republish_all_manuals

Republish all manuals

k exec deploy/manuals-publisher -- rake republish_all_manuals

View source (lib/tasks/republish_all_manuals.rake)

republish_manuals

Republish manuals

k exec deploy/manuals-publisher -- rake republish_manuals[user_email,slug]

View source (lib/tasks/republish_manuals.rake)

reslug_organisation

Republish manuals

k exec deploy/manuals-publisher -- rake reslug_organisation[old_slug,new_slug]

View source (lib/tasks/reslug_organisation.rake)

reslug_section

Reslug section

k exec deploy/manuals-publisher -- rake reslug_section[manual_slug,old_section_slug,new_section_slug]

View source (lib/tasks/reslug_section.rake)

sections:report

Identifies manual sections which do not match the section title.

k exec deploy/manuals-publisher -- rake sections:report[manual_slug]

View source (lib/tasks/sections.rake)

sections:synchronise

Synchronises manual section slugs with their titles.

k exec deploy/manuals-publisher -- rake sections:synchronise[manual_slug]

View source (lib/tasks/sections.rake)

update_manual_organisation

Update organisation of a Manual

k exec deploy/manuals-publisher -- rake update_manual_organisation[manual_base_path,organisation_slug]

View source (lib/tasks/update_manual_organisation.rake)

withdraw_and_redirect_manual

Withdraw and redirect manual, e.g withdraw_and_redirect_manual[‘guidance/manual,/redirect/blah,true,true’]

k exec deploy/manuals-publisher -- rake withdraw_and_redirect_manual[manual_path,redirect,include_sections,discard_drafts]

View source (lib/tasks/withdraw_and_redirect_manual.rake)

withdraw_and_redirect_manuals_to_multiple_paths:real

Withdraw and redirect manual to multiple paths, e.g withdraw_and_redirect_manuals_to_multiple_paths[‘lib/tasks/tmp_redirect.csv,true’]

k exec deploy/manuals-publisher -- rake withdraw_and_redirect_manuals_to_multiple_paths:real[csv_path,discard_drafts]

View source (lib/tasks/withdraw_and_redirect_manuals_to_multiple_paths.rake)

withdraw_and_redirect_manuals_to_multiple_paths:dry_run

Dry run to check all base_paths in CSV exist

k exec deploy/manuals-publisher -- rake withdraw_and_redirect_manuals_to_multiple_paths:dry_run[csv_path]

View source (lib/tasks/withdraw_and_redirect_manuals_to_multiple_paths.rake)

withdraw_and_redirect_section

Withdraw and redirect section. WARNING: discard_draft will destroy drafts, usage: withdraw_and_redirect_section[‘guidance/manual/section,/redirect/blah,false’]

k exec deploy/manuals-publisher -- rake withdraw_and_redirect_section[section_path,redirect,discard_draft]

View source (lib/tasks/withdraw_and_redirect_section.rake)

withdraw_manual

Withdraw a manual

k exec deploy/manuals-publisher -- rake withdraw_manual[manual_id]

View source (lib/tasks/withdraw_manual.rake)