Automattic / newspack-content-converter

Plugin that enables automated conversion of pre-Gutenberg post content, to Gutenberg blocks content.
GNU General Public License v2.0
46 stars 13 forks source link

Target content by date range #114

Open gamebits opened 1 year ago

gamebits commented 1 year ago

Is your feature request related to a problem? Please describe. On sites with extensive archives of content, running Newspack Content Converter in 100-post batches can still take an interminable duation. One site that recently migrated to Newspack with 20 years of content would require 4,231 batches. 😱

Multiple batches are processed concurrently across several tabs, but it could potentially impact the site's performance to have this many multiples of tabs running for as long as would be needed to convert all posts.

Describe the solution you'd like A setting that allows the administrator to specify date ranges would allow NCC to convert only the most recent months/years of contents, significantly reducing the overall scope of the conversion.

Describe alternatives you've considered NCC currently converts content starting with the oldest, courtesy this code:

        $query_prepare = "SELECT ID FROM $table_name ORDER BY ID ASC LIMIT %d OFFSET %d ;";

Changing ASC to DESC would start the conversion with the newest posts; the administrator could then manually exit the conversion process after sufficiently recent content has been converted.

Additional context More conversation in Slack: p1670528360148449-slack-C013N9S2C7Q

naxoc commented 4 months ago

The ASC to DESC change is already in the newest version. The PR linked to (#132) kinda solves the task of setting a range, but it would be cool to have a way to set in the UI or similar.