Automattic / newspack-custom-content-migrator

Custom migration tasks for launching and migrating Newspack sites on Atomic
5 stars 5 forks source link

MinnPost migrator #387

Closed iuravic closed 1 month ago

ronchambers commented 9 months ago

At this latest commit, the command to set CAP Guest Authors from postmeta _mp_subtitle_settings_byline, will process byline names that match first last.

Command: wp newspack-content-migrator minnpost-set-authors-by-subtitle-byline

It is recommended to wait to run this on staging, until the remaining non-first-last bylines are added to the command.

ronchambers commented 9 months ago

Commit https://github.com/Automattic/newspack-custom-content-migrator/pull/387/commits/85f1812dffd4fb3ae4361ce6e6a47bf854f522b4 updates the Set Featured Images CLI to use the "main" (larger) image if exists, else use the "thumbnail" (smaller) image if it exists.

Command: wp newspack-content-migrator minnpost-set-featured-images

Notice: any existing _thumbnail_id values on published posts will be updated if a "main" or "thumb" image was found.

ronchambers commented 8 months ago

( go to updated comment below for command: wp newspack-content-migrator minnpost-convert-categories-to-tags )

ronchambers commented 8 months ago

Commit https://github.com/Automattic/newspack-custom-content-migrator/pull/387/commits/2df75109dff92ee2f2a7a592b012d115d1fd80b2 finalizes CLI command to convert select categories to tags.

Command: wp newspack-content-migrator minnpost-convert-categories-to-tags

Notes:

ronchambers commented 8 months ago

Commit https://github.com/Automattic/newspack-custom-content-migrator/pull/387/commits/30358fa7bb399e36f04b92873461ba83e5beebe5 finalizes command to set Yoast Primary Categories.

Command: wp newspack-content-migrator minnpost-set-primary-category

Based on the discovery in the Asana task, the only way to makes sure the staging primary category matches the live primary category is to do a remote_get of the live url.

ronchambers commented 8 months ago

Commit https://github.com/Automattic/newspack-custom-content-migrator/pull/387/commits/0d6be844bffb7e87d200195b7f151e304407ba44 adds a CLI command to convert string based Bylines into CAP Guest Authors.

Prior to first run, please use the flag --test-regex to test the bylines without updating the DB.

The command also requires 2 files, a known names file and a know suffixes file. These will be shared in GDrive.

Test command: wp newspack-content-migrator minnpost-set-authors-by-subtitle-byline --txt-names=known-names.txt --txt-suffixes=known-suffixes.txt --test-regex

Real command: wp newspack-content-migrator minnpost-set-authors-by-subtitle-byline --txt-names=known-names.txt --txt-suffixes=known-suffixes.txt

iuravic commented 1 month ago

Moved to archive in separate https://github.com/Automattic/newspack-custom-content-migrator/pull/528