Closed dcsan closed 8 years ago
I was able to import this format http://cau.li/TwineJson/format.js
from https://github.com/cauli/TwineJson
so at least the format importer is working on twinery/web
FWIW it seems current version of twine has broken the format outputting anyway.
I'm able to reproduce your issue in Chrome, but not Firefox or Safari. What browser are you using?
I was using chrome, but you're right it works fine in Safari.
another thread here: https://github.com/cauli/TwineJson/issues/4#issuecomment-165648355 these two projects are related?
They're not explicitly related; I basically couldn't get TwineJson to work, and ended up writing this as a result of that (see https://github.com/cauli/TwineJson/issues/2). Similar techniques and approaches, different codebases.
@dcsan Think I've figured this out.
When trying to load external JS, Chrome (unlike Safari and Firefox) by default enforces MIME type checking to only allow execution of scripts that are of an executable type. Since GitHub doesn't expect you to use their raw file URLs as a CDN (slash probably actively wants to discourage it), they send all files served that way as "text/plain", which then sets off Chrome's security checks. Hosting this file elsewhere seems to clean up the issue for me.
tl;dr: try adding http://lazerwalker.com/twison/format.js as your story format instead.
Let me know if that works?
yep, that works!
so the main difference of your project vs cauli/TwineJson - seems yours is a bit more robust, solving cyclic dependencies etc?
I'd characterize Twison as more focused. It's focused on providing first and foremost a basic dump of Twine's internal XML format into JSON, and then augmenting it with what data we can safely extract without introducing complexity like cyclic dependencies (e.g. parsing links).
On top of that, I'd say there's an emphasis on documentation, stability, and ease of development. Things like up-to-date documentation on the expected output format, unit tests connected to a CI server, well-documented scripts to compile development versions of the script into production builds, etc.
(Also, closing this issue for now, since it seems like the issue itself has been solved)
I also got this error
which is pointing to another format - SugarCube - which in fact does seem to be loaded for me.
but it seems you are calling that method: http://github.com/lazerwalker/twison/raw/master/dist/format.js