I think that implementing this first, would make the other request "Auto schedule (multi-)threads from a Notion watch folder", easier to implement - essentially just watch the Notion folder and when detecting content, send it to this splitter.
We should have a pre-configuration heading at the very beginning of the text block, that would set values like: hashtag, date, time, pagination footer (how to deal with multi-threads separation), text split mode (split always at the end of phrase, split always at the end of a word)
This should be a robust and easy way to send these configuration values, and how to deal when they are missing - maybe just save a draft if date/time are not properly interpreted/detected.
Something like: {#Hashtag,2024-07-01,18:00,[1/n],word}
Date and time format should support US/EU methods
For the multi-thread pagination, it would be nice to have formatting options like: [1/n], 1/n, n, ⤵️, none
The last value can be "word" or "phrase" (where to split the text).
Then whatever comes next is the actual block of text.
Example of block:
///
{#Hashtag,2024-07-01,18:00,1/n,word}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
\\\
Any links to media (images, videos) existing immediately after the {} should be attached to the first multi-thread. Any links to media at the very end of the text block, should be attached to the final multi-thread.
For nicely formatting the text, there should be a blank line between the text and pagination, so the thread above should look like:
---
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Hashtag
1/1
---
If you need more details, I'll happily elaborate.