Closed ghost closed 4 years ago
I appear to be having some issues on my end with trying out this branch. It's having issues finding the author, and finding the HTML chunk for the chapter choices.
I genuinely think that the devs at writing.com are just messing with us. Things are changing very minutely for no reason whatsoever. Anyway, this works for me now.
Edit: Do not merge! It's actually grabbing too much of the chapter text. I'll be busy for a bit the next few days but I will try to fix this when I can!
After much testing... this works for me! I've gone ahead and converted most of the regex strings into CSharp's verbatim strings, cause it helps readability quite a bit.
I've also made the chapter text a little more specific, so there are less unclosed HTML elements. Unfortunately the regex is limited in that for one-line chapters, the html is different. To solve this, I added three separate .Replace
calls to remove the extra tags that come from that.
Let me know if I missed anything. It's a bunch of trial and error to get this stuff to work right, and it's impossible to make stuff future-proof, haha
One more thing, and I'll do it more if I have to fix it again, but I added \s+
in place of a regular space. This makes it target any amount of any whitespace character, which should help out in the future should they add any more random spaces :P
I've given the stories a test on a handful of stories, and it all seems to be working. I'm happy to merge in these changes.
@infdre: I've been working on a new version of the exporter on-and-off, if you're keen on giving it a go I'd like to hear what your thoughts are. The GUI has some wrinkles to smooth out, but the basic functionality is there. The goal is to have it able to export multiple stories and display desktop alerts when a new chapter is found for a story.
https://github.com/towerofpower256/WritingExporter
You can catch me on Discord: -snip-
Where is the executable and how do I run it?
Since the last commit, several more things have been changed on writing.com. This PR fixes most of them that I have been able to find.