A very specific use tool.
When I make improvements to Renga, I usually want to share some screenshots of it. However, being a chat client, the easiest thing I can do is taking screenshots of existing chatrooms that I take part in. Which means I would need approval from every participants to make a screenshot.
I heard that other XMPP client developers have similar problems. Everyone either does this, or spend a considerable amount of time running fake accounts and creating fake conversations just for a few screenshots.
As I am lazy, I decided to write a tool to automate this. And since I'm very lazy, I based it on public domain text from a screenplay. XMPP traditions would point to using a Shalespeare play, but I think it's time to have some more cultural diversity, so I picked something else, namely Karel Capek's R.U.R (Rossum's Univeral Robots), which involves human-looking robots and some confusion about who's a robot or not. Also it ends up with the robots extracting all resources from Earth, and causing the disappearance of the humans. Seems fitting to the modrn day, and also to the fact that this will be chat logs generated from a computer.
I wrote a Python script that parses the HTML from a gutenprint edition of the stageplay script. It manages to skip over everything that's not dialogue, and converts the dialogue into a XEP-0227 XML file, that I understand should be importable into an XMPP server. Then any XMPP client should be able to log to that server and access the dialogue as a MAM archive. I have not tested that yet.
I have not fully figured that out, yet.
Here are some ideas:
(<i>...</i>)
sequences. Maybe the parentheses would be enough. They are inlined in the dialogue, and sometimes include the name of another character than the one talking. Not sure how much of this can be automated.The code in main.py is distributed under the WTFPL.
The RUR script is distributed as specified by the Gutenprint license info included therein. I think that applies to the exported file as well?