I would like to manipulate a text with Processing in this way:
Enter a text from a file .doc or .odt;
Run this rule: place the last letter of the text at the beginning of the text and, than, swipe toward right all the letters maintaining the same puntuaction and word length
Save the new text as a new page .doc or .odt
Continue this rule until the text return to the original one.
Exemple :
He is tall, isn’t he? (original text inserted)
Eh ei stal, lis’n th? (new text with the rule applied and saved in a new page (step 3)
He he ista, lli’s nt? (the same rule in step 2 applied to the new text until the loop is closed).
If you are using p5.js, take a look on the documentation for “regular expressions”. They can help you split on both spaces and punctuators.
For the “open a word document” part, I don’t know if you can import a word reading class from other library (hummm… libreoffice?). That would work on java mode only.