Howdy, Stranger!

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

Does anyone use Twee's merge feature?

The Twee command line tool has an option to merge passages from a Twee/Twine-produced HTML file into the story being compiled. I'm wondering why anyone would want to do that, rather than putting the passages in Twee format source files.

If you're using this feature, please tell me what you use it for. If no-one speaks up, I'll remove the feature.

Comments

  • You mean like this?

    story1.twee + story2.html ==> full_story.html


    I don't know if it's used. I'm sure no one know that it's even possible to do this (I didn't before now).

    I can't think of a use case right now, but maybe there is one that we just can't see now.
  • narF wrote:

    You mean like this?

    story1.twee + story2.html ==> full_story.html


    Yes. I can imagine someone wanting to put a story in multiple Twee source files, but I don't see a use case for using an HTML file as a source file.
  • If there were a change I wanted to make to header-provided code--changing default messages, say, or altering the default CSS directly for some reason, or inserting a javascript library--it might make sense to output a minimal story file, edit it directly, and then merge it with my actual working twee files. That way I only make one hand-edit to the html, but compile as often as I like.

    However, it would surely be better practice to just create a customized version of the header file.
  • Erik wrote:

    If there were a change I wanted to make to header-provided code--changing default messages, say, or altering the default CSS directly for some reason, or inserting a javascript library--it might make sense to output a minimal story file, edit it directly, and then merge it with my actual working twee files. That way I only make one hand-edit to the html, but compile as often as I like.


    That won't work: the merge feature only loads passages from the HTML, it ignores the rest of the file.
  • Oh. In that case, the clear use-case is to revive an old project when you no longer have access to your original twee source files. But, as you said in the original post, a tool to generate twee source code from an existing html makes more sense.
  • There's already an online tool that I uses all the time to convert html to twee:
    http://www.glorioustrainwrecks.com/files/Twine_HTML_Twee_Converter_0.html

    Very useful to explore a story and look at how some of the tricks work.
  • There is also the "untwee" tool to go from HTML to Twee. I've got it in branch in my github repo, but it needs some polishing before I want to offer it for inclusion into the main repo.
  • Looking back over the original source, this had kind of a wild use case that was related to RSS. The idea is that you could merge a twee source code file into an HTML file to update it, and simultaneously generate an RSS feed of the passages you changed. Since there's no metadata like that in twee, there's no way to tell what changed except by comparing it to the last published HTML version.

    I used this to generate the RSS feed on the the home page of gimcrackd.com (which I no longer update, so I took the feed link off -- but it's here). I imagine approximately zero other people ever did this.
  • klembot wrote:

    Looking back over the original source, this had kind of a wild use case that was related to RSS. The idea is that you could merge a twee source code file into an HTML file to update it, and simultaneously generate an RSS feed of the passages you changed. Since there's no metadata like that in twee, there's no way to tell what changed except by comparing it to the last published HTML version.


    I already removed the RSS feature when importing Twee into the Twine repository, but I kept the merge feature then since I thought it might be useful for story authors. Like Erik, I originally assumed it allowed custom HTML to be added to a story. After learning what it actually did, I had doubts if it was actually useful for story authors.

    klembot wrote:

    I used this to generate the RSS feed on the the home page of gimcrackd.com (which I no longer update, so I took the feed link off -- but it's here). I imagine approximately zero other people ever did this.


    I'll remove it then. Thanks for explaining its origins.
Sign In or Register to comment.