Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

[SOLVED] How to get the contents of the Proofing Copy as text?

edited March 2015 in Help! with 2.0
Even a simple copy paste would suffice - but not all text in the Proofing Copy can be selected, when opened in a browser...

Comments

  • You can try the "archive" option from the main story page to get a downloadable copy of the text, though it's a bit spammy without any line breaks or passage titles...

    Though I just tried with my story, and from the proofing copy I can select everything but the passage titles, so it ends up just like the archive.
  • OK, after some playing around, I figured out how to do this:


    1. View proofing copy

    2. Press Control+P to "print"

    3. Change your chosen printer to "Save to Google Drive"

    4. Go to Google Drive, where your story text will now be in PDF form

    5. You can now copy paste everything as long as you don't try and copy paste the story title. Or just use the PDF as-is.
  • That works, thanks!
  • The default proofing format primarily just applies a stylesheet to the exported passage data, and it looks like the underlying cause is that the passage's name attribute is being placed in the content of a ::before pseudo-element, and those elements aren't included when you select all text. I have no idea why that happens, and I don't know offhand of a CSS fix for this - anyone know if there is one?

    If not, I played around with an exported proofing file and threw together a script to include the passage names inline as H3 elements instead of using ::before, and that seems to make it all selectable. I removed the "tw-passagedata:before" rule from the style, and added this script element:
    <script type="text/javascript">
    function addPassageNames() {
    var buffer, passages = window.document.getElementsByTagName("tw-passagedata");
    for (var i = 0; i < passages.length; ++i) {
    (buffer = []).push('<h3>', passages[i].getAttribute('name'), '</h3>', passages[i].innerHTML);
    passages[i].innerHTML = buffer.join('');
    }
    }
    window.onload = addPassageNames;
    </script>
    Don't know if there's a slicker way to accomplish this -- that's just the first thing that came to mind. The text all gets copied, but it seems the spacing before and after passage names and bodies varies by browser and may not be entirely satisfying, so this could end up requiring something a little more involved to get good results.
  • Has there been any change in this issue? I'm asking my students to design games in Twine, and I'd love to ask them to post their Proofing copies as they go. But without the passage names included in a copy/paste, it's really not very useful.

    Any thoughts?

    As for gnustoboz's workaround, I'm happy to have them do it if it's the only workable way right now, but then I'll have to admit my noob-ishness in not understanding how I/we implement it. :)

    I'm using the OSX downloadable of Twine, v 2.0.8

    Brett
Sign In or Register to comment.