iftechfoundation / twine-specs

Specs related to Twine
69 stars 5 forks source link

Historical Twine 1 HTML Documentation #20

Closed videlais closed 1 year ago

videlais commented 1 year ago

This commit adds documentation on Twine 1 HTML as best as I could reverse-engineer it from the Twine 1 Python code and many examples from the IFDB. This probably won't be used by many people, but as someone who has been trying to analyze older Twine 1 works this week, a document like this would have been really useful to consult.

If there is anything wrong, please let me know or edit before committing. I'd like it to be as accurate as possible for future historical work.

tmedwards commented 1 year ago

Any updates on this?

videlais commented 1 year ago

@tmedwards If you are asking me, the only thing remaining, I think, is how best to handle the cases I've seen where some stories made with Twine 1.4.2 have ROT13 encoding of their passage names. I have not checked, but does Tweego support parsing those? Is there something you might recommend for other parsing HTML elements with ROT-encoding of passage names where the "Start" passage might not be obvious?

tmedwards commented 1 year ago

@videlais I was referring to the issues I raised, in comments, the day after you made the PR.


[…] the only thing remaining, I think, is how best to handle the cases I've seen where some stories made with Twine 1.4.2 have ROT13 encoding of their passage names.

You may already know this, but I'll cover it anyway to make sure.

Obfuscation had two distinct flavors in Twine ≥v1.4.0:

IIRC, when enabled, both flavors affected most passages. Both excluded the StorySettings special passage, since it contains the obfuscation settings. The ≥v1.4.2 flavor additionally excluded image passages, presumably since Base64 was considered obfuscated enough.

 

I have not checked, but does Tweego support parsing those?

No. I decided early on that I was not supporting either flavor of obfuscation at all.

I could have supported deobfuscation only, but IIRC I decided that if I wasn't going to offer full bidirectional support, then it would be better to not have it at all.

 

Is there something you might recommend for other parsing HTML elements with ROT-encoding of passage names where the "Start" passage might not be obvious?

My apologies, but I couldn't parse that very well. 😵‍💫

If you are not asking how I'd suggest decoding obfuscated passages, then please rephrase?

If you are asking how I'd suggest decoding obfuscated passages, then the easiest thing would probably be to check the unobfuscated StorySettings special passage for the obfuscation settings. IIRC:

Both flavors encoded the tiddler's title, tags, and content.

For the exact code details, you'll need to check the tweecode/twine repository. You'll find the custom obfuscation method there and, in both cases, the precise steps the original code used.

videlais commented 1 year ago

@tmedwards I'm confused. I did not and still do not see any comments.

screenshot

They would appear under the Conversation tab and trigger a notification. I would be happy to address them, but I don't see them.

conversations

From my perspective, the question "Any updates on this?" was the first response I had seen in three weeks.


Yes, thank you. I was asking about if Tweego did (it does not, for a good reason) and how you might recommend others do it. I do not know if your comments addressed it, probably they did, but that was my last item to include in the documentation. Like you mentioned, different versions of Twine obfuscated things in different ways, and I wanted to make sure that was recorded.

tmedwards commented 1 year ago

I'm confused. I did not and still do not see any comments.

Odd. I can see them in both the mobile client and on the website, somewhat obviously. I don't think I've done anything to cause them to be hidden, but stranger things have happened.

Apologizes for the poke, but is anyone else having issues seeing the comments?

Cc: @klembot @greyelf @mcdemarco

Screenshots

Mobile client

image

Website

image

greyelf commented 1 year ago

@tmedwards (and @videlais ) I don't see your "tmedwards has pending changes" entry, or the related 6 comments, in the flow of this pull request, except in the screen capture you supplied. Nor did I find anything similar in the committed file itself.

mcdemarco commented 1 year ago

@tmedwards (and @videlais ) I don't see your "tmedwards has pending changes" entry, or the related 6 comments, in the flow of this pull request, except in the screen capture you supplied. Nor did I find anything similar in the committed file itself.

I think the six comments are in this thread (before greyelf's, in the conversation on the pull request). I assume there's some review of tme's that I also cannot see despite clicking around the github website a bit, that he quotes later on in this thread.

klembot commented 1 year ago

@tmedwards I think you fell afoul of GH’s review feature. The idea is you can batch comments together as a single review except it’s very easy to not realize what’s going on (this has happened to me multiple times). Try going to the “Files changed” tab and click the green “Review changes” button. If you submit your review in that pop up, I bet they’ll show for everyone.

tmedwards commented 1 year ago

That seems to have worked. 🤞 Thanks, @klembot .

You used to be able to simply comment on commits and PRs. I wonder if you cannot anymore or if I accidentally started a review.

videlais commented 1 year ago

Thanks, @tmedwards! I can now see the comments and I will start to make corrections and clarifications within the next few days.

tmedwards commented 1 year ago

LGTM. 👍🏻

Sorry for the delay.