Skip to content

A ruby script to aid migrating legacy content from old URLs.

Notifications You must be signed in to change notification settings

dave11mj/dh-migration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Manual migration script

A ruby script to aid migrating legacy content from old URLs.

Dependencies

Note: To use the migration script you will need to install Nokogiri and OptionParser by running sudo gem install nokogiri OptionParser Note: To use the --new-url / -n flag you first need to need install launchy by running sudo gem install launchy

Flags / Options

  • --help alias[-h]: Provides available options and usages on the command line
  • --content-html-script alias[-o]: Adds script to paste HTML inside content editor (default: false)
  • --copy-to-clipboard alias[-c]: Copies console script to clipboard (default: true)
  • --original-url alias[-u]: Original url to migrate without user input (default: user input)
  • --new-url alias[-n]: New url to open editing admin page (default: nothing)
  • --base64-img alias[-b]: Encode <img> tags as base64 data (default: false)
  • --update alias[-e]: Updates migration script (default: false)
  • --parse-local alias[-p]: Parses from the local html file parse-option.html (default: false)

Guidelines enforced by script

  • <h2> header directly under <h1> should be regular text size
  • No inline styles (colors, font-size, text-align, etc)
  • Phone numbers should be formatted bold with tel link (<strong><a href="tel:">)
  • Any <h2> or <h1> should be migrated as <h3>
  • Remove (Updated 101316) or (Rev. 101316) from content
  • Inline small images should be floated right
  • Bullet lists should have a padding-left of 40px

Workflow steps

  1. Make sure the content editor template matches the template on the google sheet
  2. On the google sheet mark the item you'll be working on with your name, and In Progress status.
  3. Open the Old URL you'll be migrating.
  4. Open Terminal and change to the directory with manually-migrate.rb (cd /path/to/folder/dh_migration)
  5. Run ruby manually-migrate.rb and paste the Old URL into the input field.
  6. Open the Content Editor and locate the shell page for the content you are migrating.
  7. Open the Developer Tools console and paste the Console Script generated by manually-migrate.rb
  8. Double check that the fields PageHeadTitle, PageHeadDescription and Content Title (Title, or Header) are filled .
  9. Double check that the checkboxes PageAddToSitemap and PageShowInSearch are checked.
  10. Open the Preview mode for the page you are working on.
  11. Edit the rich text editor and paste the Content HTML generated by manually-migrate.rb
  12. Insert / Upload any inline legacy images downloaded by the script.
  13. Add any missing line breaks (shift + enter)
  14. Pick a header image for your content.
  15. Hit Publish and go back to the google sheet to mark it Complete

About

A ruby script to aid migrating legacy content from old URLs.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages