Skip to content

BwendyGames/twinepy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3,102 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TWINE

by Chris Klimas, Lorenzo Ancora, Leon Arnott, Daithi O Crualaoich, Ingrid Cheung, Thomas Michael Edwards, Micah Fitch, Juhana Leinonen, Michael Savich, and Ross Smith

THIS FORK

by Brendon Sutherland

With this fork, I have made a few changes/additions to support development with the storyformat PyCube, as well as some quality of life features I always wanted to see added.

  • PyCube 0.2.5 is loaded as a built-in format.
  • The passage-editor better supports the typing style of PyCube, with increased support for lots of indenting/unindenting.
  • Syntax highlighting for PyCube.
  • I also added Catppuccin themes because why not lol, all four versions are available as an option in (top bar) twine->preferences->theme.
  • A control+f keybind that opens up a searchbar in the passage editor, that allows you to search for keywords, and then cycle through them by pressing enter.

And more to come as I work on PyCube and use Twine!

I was careful to not impede development in other formats or what have you, so every change/addition is enitrely optional, opt-in in preferences, or is specific to when you have the PyCube storyformat selected in your story settings. This is all to say, this fork has something to offer even if you don't use PyCube!

SYNOPSIS

This is a port of Twine to a browser and Electron app. See twinery.org for more info.

The story formats in minified format under story-formats/ exist in separate repositories:

BUILDS

FOR THIS FORK:

Check out the Releases, unforunately, as of now, the installer is only available for Windows. Feel free to self-compile, or if you have a different OS and would like to contribute by building for other operating-systems, please reach out!

FOR THE BASE TWINE EDITOR:

Binary packages for Twine are available on the Releases tab for Windows, MacOS and Linux. Community-created builds exist on other platforms, such as the Snap Store or Arch User Repository. As always, only install from sources you trust.

INSTALL

Run npm install at the top level of the directory to install all goodies.

Working with the documentation requires installing mdbook, which is not a Node-based project. You can either install it directly from the project web site or use your operating system's package manager.

BUILDING

Run npm start to begin serving a development version of Twine locally. This server will automatically update with changes you make.

Run npm run start:electron to run a development version of the Electron app. Running this can damage files in your Twine storied folder. Take a backup copy of this folder before proceeding. Most of the app will automatically update as you work, but if you want the app to read story files initially again, you will need to restart the process.

To create a release, run npm run build. Finished files will be found under dist/. In order to build Windows apps on macOS or Linux, you will need to have Wine and makensis installed. A file named 2.json is created under dist/ which contains information relevant to the autoupdater process, and is currently posted to https://twinery.org/latestversion/2.json.

The build process looks for these environment variables when notarizing a macOS build:

  • APPLE_APP_ID: The app ID to use. The convention is country.company.appname.
  • APPLE_ID: User name of the Apple account to use for notarization.
  • APPLE_ID_PASSWORD: App-specific password for the Apple account to use for notarization.
  • APPLE_TEAM_ID: ID of the Apple team account to use for notarization.

If any of these environment variables are not set, the build process will skip notarizing. This means users will need to right-click the application and open it manually.

You must have the full Xcode app installed to notarize the app, not just the Xcode command line tools.

npm test will test the source code respectively.

npm run clean will delete existing files in electron-build/ and dist/.

About

Twine, a tool for telling interactive, nonlinear stories. This fork comes with a number of quality of life additions and increased support for PyCube.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • TypeScript 92.4%
  • CSS 4.1%
  • JavaScript 3.5%