Merge harlowe 3.3.7. files with Tweego

Hi everybody,

I need help to understand an issue with Tweego: my goal (seems quite simple) is to merge my Twine files (html / twee) with Tweego.

Tweego seems to run properly with the Harlowe 3.3.1 files but not with the 3.3.7. ones.

(I’ve several files written with the 3.3.7 and I want to merge theses files into a master file…)

I’ve copied the 3.3.7 files into the storyformats\harlowe-3\ directory and overwrite the existing ones.

When I run the 3.3.7 files I’ve the message “Warning: format harlowe-3: Skipping Format; coould not decode story format json chunk”.

So, I’ve re-overwrited the 3.3.7 files with the 3.3.1 files.

When I run the 3.3.1 files I’ve the message "Story format named ‘Harlowe’ at version ‘3.3.7’ is not available.

FYI :

I’ve installed node.js
I’ve installed Tweego with the Chapelr installer. I didn’t change any settings.
I’ve also desinstalled/reinstalled Tweego - same issue.
I’ve copied the .json and .icon files for Harlowe 3.3.7 from github.
Twine Version: 2.8.0

Anyone knows what’s going on?

1 Like

What do you have in the passage :: StoryData ?

I’m going to assume that you have sourced your Harlowe v3.3.7 format.js template file from public/story-formats/harlowe-3.3.7/ folder of the Twine 2.x application’s GitHub repository.

What version of Harlowe 3.x is listed in your command console / shell when you use Tweego’s --list-formats option?
eg. when I execute the following command…

tweego --list-formats

…I am shown…

Available formats:
  ID                     Name (Version) [Details]
  --------------------   ------------------------------
  chapbook-1             Chapbook (1.0.0)
  harlowe-1              Harlowe (1.2.4)
  harlowe-2              Harlowe (2.1.0)
  harlowe-3              Harlowe (3.3.7)
  paperthin-1            Paperthin (1.0.0) [proofing]
  snowman-1              Snowman (1.4.0)
  snowman-2              Snowman (2.0.2)
  sugarcube-1            SugarCube (1.0.35)
  sugarcube-2            SugarCube (2.36.1)

If you are seeing anything other than Harlowe (3.3.7) associated with the harlowe-3 ID then that means you haven’t correctly updated the associated format.js template file.

If you are seeing Harlowe (3.3.7), then the next thing to test is the project’s StoryData special Passage, which should look something like the following for a Harlowe v3.3.7 based project…

:: StoryData
{
  "ifid": "<the v4 UUID of your project>",
  "format": "Harlowe",
  "format-version": "3.3.7",
  "start": "<the Passage of your project to show first>",
  "zoom": 1
}

If the format and format-version properties in you project’s StoryData Passage are not Harlowe and 3.3.7 respectively then Tweego won’t find the right Story Format template, even if it has been installed successfully.

If all of the above is correct, then what Tweego command are you executing to build your Story HTML file?

1 Like

Hello!
Thank you for your messages.
I’ve installed Tweego on another PC and I have the same issue (!)

Yes, I have sourced my Harlowe v3.3.7 format.js template file from the folder of the Twine 2.x application’s GitHub repository.
When I overwrite the Harlowe 3.3.1 files with the 3.3.7 files, I’ve this message:

tweego --list-formats
warning: format harlowe-3: Skipping format; Could not decode story format JSON chunk.

If you are seeing anything other than Harlowe (3.3.7) associated with the harlowe-3 ID then that means you haven’t correctly updated the associated format.js template file.

Is there a another way to update the Harlowe files than simply overwrite it?

EDIT 1204: I’ve edited my Twine files (html). I’ve replaced “Harlowe” format-version="3.3.7 by “Harlowe” format-version="3.3.1 in all the html files and it seems to work fine with my test files. I’m going to do the same with my story files and keep you updated.

The method I’ve used in the past to “overwrite” the Harlowe 3.x format.js file that comes with Tweego is:

  1. Open my operating system’s File Explorer, and navigate to my local (Tweego related) storyformats\harlowe-3 folder.
  2. Rename the existing format.js file, so I can quickly change back to a previous version as needed.
    eg. format.js => format.js.v3.1.0
  3. Use my File Explorer’s context menu to create a new empty “Text File” in the folder, and name it format.js
  4. Open the empty format.js file in a Text Editor, even one as simple as Notepad will do.
  5. Open the GitHub public/story-formats/harlowe-3.3.7/ folder in my web-browser, then select the format.js entry to see its source code.
  6. Use the Copy raw file button in the source code’s toolbar to transfer a copy into my operating system’s clip-board.
  7. Paste the contents of the clip-board into the open empty format.js file, and then save that file.

At this point the tweego --list-formats command should now show an updated Harlowe 3.x version number.

note: There should be no reason why you can’t directly download the format.js file from the repository, however if the resulting file undergoes some unforeseen transformation (like a change in character encoding) then you can end up with an issue like the one you’re seeing.

Thank you for your time.

I agree :slight_smile: I imagine that I make a mistake somewhere in the process, as I tried multiple times to update the .js, merge my files with Tweego, install-desinstall-reinstall - unsucessfully.
I’ve modified my html story files as I mentionned above, merged it with Tweego and launched it in Twine. All works fine.
I’ll try to copy/paste the format.js code from github (but I’ll be very surprised if this method changes anything).
Anyway, thank you for your help !!