Skip to content
This repository has been archived by the owner on Nov 18, 2020. It is now read-only.

Large stories don't always export #10

Open
grahamearley opened this issue Jan 26, 2017 · 11 comments
Open

Large stories don't always export #10

grahamearley opened this issue Jan 26, 2017 · 11 comments

Comments

@grahamearley
Copy link

I'm trying to export a story with 89 passages and 149 links.

With TwineJson installed, I press "Play" and it opens the TwineJson download page. However, the JSON text on the page is blank, and nothing gets downloaded.

It looks like this error is getting raised in the Javascript:

Uncaught RangeError: Invalid string length
    at JSON.stringify (<anonymous>)
    at Object.convert (twinery.org/:41)
    at twinery.org/:41
    at Object.execCb (twinery.org/:41)
    at x.check (twinery.org/:41)
    at x.enable (twinery.org/:41)
    at Object.enable (twinery.org/:41)
    at x.<anonymous> (twinery.org/:41)
    at twinery.org/:41
    at each (twinery.org/:41)

And it looks like this error might occur because we run out of memory: nodejs/node-v0.x-archive#14170

Is there a different route you could take instead of stringify? Something that doesn't prevent the file from downloading if it runs out of memory?

Also, thanks for developing this!!

@calebebrim
Copy link

Any news ?
palliative solution ?

@grahamearley
Copy link
Author

@calebebrim My project's solution has been to switch to the Twison format, which seems to work for larger stories.

@cauli
Copy link
Owner

cauli commented Mar 3, 2017

Will improve the tests and try to find out what is going on this weekend.

Sorry about that!

@kevinbravo
Copy link

Hey ! do you have any new infos ? :)

@cauli
Copy link
Owner

cauli commented Jul 12, 2017

@kevinbravo Have you considered using twinejson-cli? It offers different (simpler) functionality but it is lacking testers.

This project is quite old, but pull requests are welcome. I can't work on this issue right now.

@cauli cauli closed this as completed Jul 12, 2017
@cauli cauli reopened this Jul 12, 2017
@kevinbravo
Copy link

@cauli thank you, I'll try twinejson-cli and let you know.
I'm using twinejson to write a game story and then parse it to a json, I'm using a bunch of attributes so I'm not sure twinejson-cli will do the trick :(

I'll still check it and hope I can use it !
I understand you don't have much time to work on this, i'm a SWIFT Dev so I can't help..
you already did a great work, thank you !

@cauli
Copy link
Owner

cauli commented Jul 12, 2017

@kevinbravo If I added the attributes functionality to twinejson-cli would that solve it for you? Can you test exporting your story with twinejson-cli first to see if at least you get a viable base story in json?

@cauli
Copy link
Owner

cauli commented Jul 12, 2017

The true story is that this project is too old and I'm not proud of the code.
Beyond that, I'm tired of Twine breaking story formats from time to time. Exporting from a Story Format is not maintainable.
Because of that the CLI tool has potential to be much more powerful, I just need to take a few hours to make all the features that this project provides! But I'm not sure when I would be able to do that.

@kevinbravo
Copy link

@cauli I'm going to take some time to test my story with twinejson-cli and see if it could work with attributes, but I think it would definitely do the trick :)

I'm currently using SwiftyJson (Swift library) and parsing this kind of json: https://api.myjson.com/bins/iu503

I'm building a game which looks like life line (https://itunes.apple.com/app/lifeline/id982354972)
So you make choices and the "AI bot (which is a person in the story)" answers it (bases on twine three). Depending on your choices, there are consequences in the story.
(If you want to know about how I proceed with code, I can show you.)

Anyway, I use the attributes to say who is writing the messages, if the message is a text, a picture, etc.. also if the message is going to be displayed after specific delay.

When the app is in beta, I'll show you, I'm sure you'll be proud about the work we achieved with your script ahah ;)

The true story is that this project is too old and I'm not proud of the code.
Beyond that, I'm tired of Twine breaking story formats from time to time. Exporting from a Story Format is not maintainable.
Because of that the CLI tool has potential to be much more powerful, I just need to take a few hours to make all the features that this project provides! But I'm not sure when I would be able to do that.

I understand, I'm still using Twine 2.0.11 for this project.
Thank you once more for the time and work you already gave us, writers and developers ! Good luck, I understand that it's not your priority :)

I'll let you know when I tried CLI version.
Thanks !

@cauli
Copy link
Owner

cauli commented Jul 12, 2017

@kevinbravo Thanks for sharing this! I really bumps up my motivation to keep creating stuff like this This time I'll try to do a better job :)

Would you mind me sending me some sample stories from your application that are not currently working via email ([email protected])? I promise I'll take care to not commit or use any of them. I'll use it just to create similar test cases (w/o any sensitive information) to make sure stories like yours works as expected.

@kevinbravo
Copy link

kevinbravo commented Jul 12, 2017

@cauli no problem,

sure, I trust you :) I just sent you an example.

You can use it as an example, no sensitive information in it !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants