Skip to content

jeffanddom/ink2txt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ink2txt

Emits all user-visible text in an Ink project, including choices. This is useful any time you want bulk access to the text, e.g. for automated spelling and grammar checks.

Usage

First, install dependencies:

yarn

Then run the program:

yarn -q x path/to/compiled/ink/story.json

Remarks

  • This program works by traversing the story's compiled JSON file and emitting any string that satisfies the following criteria:
    • Starts with a ^ character.
    • Contains alphanumeric characters.
  • Known false negative: user-visible text that does not contain alphanumeric characters, e.g., non-ASCII Unicode.
  • I'm unsure if there are any false positives.
  • A more robust algorithm would parse the JSON structure using the true set of Ink rules, but that would add a lot of complexity.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published