Gwen[Tastic]'s Twee File Splitter

A tool to split huge twee files into smaller ones with a User customizable Folder and File Structure.


Application version: 1.2.7

Download x86

Download x64


This project is maintained by

{Gwen[♡].Tastic}

Welcome to Gwen[Tastic]’s Twee File Splitting Tool!

A self-contained Desktop application for turning the large files, which come from decompiling a Twine html file, into smaller ones with options to define your folder and file structure.

This is an unsigned Application, which accesses the file system so Windows Defender might interfere with this application, if writing the files takes significant longer then it had reading the passages and tags (after inputting a source file) then that's probably due to Windows Defender. Not suggesting turning it off, but doing so can make a difference of the process taking an Hour or less then a Minute depending on file size.

Usage:

Once it’s downloaded and running there are 3 Main things:

  1. The Input file you can choose the file to split as Input File.
  2. An Output folder in which all Files and Folders should be created in.
  3. Separation Rules, the list on the left side shows all current Separation rules, these rules determine how Passages get sorted and/or Merged.

You can type directly in those Textboxes to set an Input file or Output Folder, or use the Open File/Folder buttons. After you selected an Input file, it will read the Passage names and Tags and add them in the lists on the right side.

When you have a Separation-Rule open you can quickly add/remove a Passage/Tag name to the rule using the Listboxes on the right (left/right mouse click).


You can alter Separation Tools by clicking on the Listbox Item on the left, add new ones by clicking the Button “New Rule” under the Listbox for the Separation Rules.

Profiles:

A Profile consist out of:

When creating or editing an existing Profile you can copy existing Seperation Rules from other Existing Profiles.
To delete a profile, select the profile you want to delete from the Combobox, then hit the Edit Profile button on the right of the Profile’s Combobox. This will open a new window for the selected Profile and at the bottom of which is the Delete button to delete the Profile that’s being Edited.

Profiles and Seperation Rules are both stored in a SQLite Database which can be found under:
> .../AppData/Local/TweeFileSplitter/TweeFileSplitter.db
You can type %localappdata% into the File explorer to quickly navigate to the .../AppData/Local Folder.
Do note that this Application will automatically create a SQLite database in the User's AppData/Local folder, BUT it does not automatically delete itself should you want to uninstall or remove the Application from your Computer.
If no Profile exists, then 4 Default Profiles are created (one for each Default Twine StoryFormat) at Startup of the Application. While there are no backups kept you can restore the initial state by either deleting all profiles and restarting the application, or by deleting the database file inside `AppData/Local/TweeFileSplitter` folder, and restarting the application again which will then recreate the default StoryFormat profiles again.
The Application does not create backups for Profiles/Rules.
If you accidentally delete a Profile or Rules there's no way of recovering it other then recreating it manually.

The Default Profile:

The default Profile is the Profile that will be automatically selected to be used when the Application is started up, it will also appear at the top of the dropdown menu of the Profile’s Combobox.
You can quickly switch which profile is used as the default profile by clicking on the Star icon from the dropdown list. Tho there can only be 1 Default Profile.
Demo of quickly switching Profiles:         

Demo Profiles

You can Create, Edit, and Delete Profiles. When creating a new or editing an existing Profile you can create a copy of already exsisting Rules from any other profile that exists. If there are no other Profiles you still get a Default option of StoryData, Story's JavaScript, and Story's Stylesheet.

Should you have made changes that you regret, like accidentally deleting a Rule or even all Rules while editing a Profile. You can hit the X button in the top right corner of the Application to close the Edit Profile Window.
This will not close the application but will disregard all changes that were made and display the Main Window again.
Changes will only be applied when the Save button is clicked or when the Delete button clicked and the deletion confirmed.


Separation Rules:

Once you have selected a rule, a Panel in the middle will open up, in there you’ll find the settings.


Changes to Seperation Rules should get saved automatically to the selected Profile shown at the top.

Once you are done setting up the rules you can hit the red Separate Passages! button.

Setting rules is optional you can also just hit the red "Separate Passages!" button immediately after choosing an Input file.
The default behavior is to split all passages into their own file, and by default the file names will be the passage name.
So by default a passage called Character Editor will end up as a file called Character Editor.tw but invalid characters for file names will be removed.


Showcase:

Here’s an example workflow (left mouse click to enlarge)

News:

Release: v1.2.7 03.11.2024

Fixed all bugs I could find on my own and send the Profiles & Rules Database Update out into the wild!

Changelog: v1.2.4 02.11.2024

Changed: Instead of generating a single Default Profile, it generates a Profile for each default StoryFormat (SugarCube, Harlowe, Chapbook, Snowman).
Currently only SugarCube and Harlowe are having extra special rules added to them.

Changelog: v1.2.2 01.11.2024

Added: Profiles!! Want multiple different Rules for different projects? Now Rules are saved to and loaded from a Profile!

Changelog: v1.1.0 01.10.2024

Rules are now stored inside a SQLite Database in .../AppData/Local/TweeFileSplitter/TweeFileSplitter.db !!

Changelog: v1.0.4 03.05.2024

Fixed .tw3 and .twee file extensions being ignored for populating the Passage/Tags listboxes.