How would people here compare two twine files to see differences and combine them?
I’m quite new to using Twine. I have it installed on two devices, and pointed at a shared folder. This was working fine, but it seems one didn’t device stayed unsynced for a bit and I didn’t realize this. Now I have 2 files with a different number of passages and some passages that are no longer identical due to edits.
I could try LibreOffice . . . I could take raw html, save them in odt files, and then use LibreOffice’s compare document feature to combine changes, save it back to html.
That seems . . . maybe not ideal.
Any other ideas?
I’m also curious about people’s general editing workflow.
I’m sure there are graphical tools for this too; in general what you’re looking for is a diff(ing) program/tool, so you could google that term.
On Linux I use the Vim text editor, which has diff functionality built in (vimdiff). I don’t know which editor you use, but it might have something similar; Visual Studio Code, Sublime Text and Notepad++ should all have it too, for example. I would not use LibreOffice for this, since I wouldn’t trust the ODT conversion to not alter my document (especially since it’s HTML).
To your more general workflow question, I use version control software (in my case, Git) to keep track of all my changes. That way I can always see the diff between my last version and my current in-progress work (or between my last version and any other version, for that matter), I can roll back to any older version at any point, see what lines were added in what version, etc. I never start to develop anything without putting it in a Git repository first. And I also use GitHub to store my Git repository in the cloud, so I don’t have to put my code in a shared folder like you did (I’ve also had syncing problems with that in the past); the GitHub repo is the source of truth.
Twine can be annoying for that, since it leaves out the line breaks in its HTML, so if you have a difference on the first or last lines of a passage, you may get a bunch of HTML tags and a line of the next or previous passage as well, but it’s a lot better than nothing.
People who care about versioning often (usually?) will eventually move on from the Twine editor to using the Tweego compiler, usually with the Twee 3 Language Tools extension for the VS Code editor…
I ended up using a different version control system with a graphical user interface. I knew basically nothing about version control, but the blog post and the GUI made it approachable for me.
try beyond compare. It lets you copy changes from one file to another really easily. Which is great for fixing this kind of thing. BC is commercial, but you get 30 days free.