Dear Discourse Developers,
RE: rake posts:rebake (future feature)
rake posts:rebake # Update each post with latest markdown rake posts:rebake_match[pattern,type,delay] # Rebake all posts matching string/regex and optionally delay the loop
A. Would be great to have a rebake feature which lets the user rebake only if the topic id (or post id) is greater than some integer
rake posts:rebake_incremental['topic_id', 34567] #Rebakes if topic_id >= 34567 rake posts:rebake_incremental['post_id', 364123] #Rebakes if post_id >= 364123
(1) When rebaking, especially when working on migration tasks, developers may have already migrated topics/posts; but then later when they update the migration with new posts (for example in an active forum, when the migration is updated), there is no way (that I am aware of) to specify the starting point in the bake. Pattern matching is not designed for this (unless I am misunderstanding).
(2) When working on fine tuning text from old forums to discourse in migration tasks, for example, fine tuning special char in old forum to work with markdown in a coding forum, or fine tuning recursive bbcode in legacy forums, it is good to rebake, for example, the last 1000 posts (versus the entire DB).
B. Even More Flexible than A (Specify a comparative operator)
rake posts:rebake_incremental['topic_id', '>=',34567] #Rebakes if topic_id >= 34567 rake posts:rebake_incremental['post_id','<' , 364123] #Rebakes if post_id < 364123
rake posts:rebake_incremental[target, operator, id]
- target is either the topic_id or the post_id
- operator is a arithmetic comparison operator
- id is an integer, either topic_id or post_id
Note: Migration tasks often take a lot of interations to get it right; especially the text and encoding from posts in the original forum to discourse. There are many chars which can be used in a non-markdown-based forums which, when migrated to a markdown-processed forum, cause issues. Having more control over the rebaking process, as illustrated, would help.