Skip to content

jozsefsallai/go-chie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-chie

chie is a Go port of the chie Node.js library which aims to be more performant and cross-platform. It serves a decryption/encryption library and command-line tool for Cave Story's script file format (TSC).

Getting Started

Get the package:

go get -u github.com/jozsefsallai/go-chie

Use it:

package main

import "github.com/jozsefsallai/go-chie"

func main() {
  tsc := chie.NewTSCParser()

  err := tsc.FromFile("./Ballo1.tsc")
  if err != nil {
    panic(err)
  }

  err = tsc.Decrypt().ToFile("./Ballo1.txt")
  if err != nil {
    panic(err)
  }
}

Full docs and reference: https://pkg.go.dev/github.com/jozsefsallai/go-chie

CLI

chie also comes with a CLI. You can either grab a release* or install via go get:

go get github.com/jozsefsallai/go-chie/cmd/chie

*) if you do this, you might want to download it somewhere inside your PATH

Usage:

chie tsc decrypt Ballo1.tsc
# will decrypt to output.txt

chie tsc decrypt Ballo1.tsc -o Ballo1.txt
# will decrypt to Ballo1.txt

chie tsc encrypt Ballo1.txt
# will encrypt to output.tsc

chie tsc encrypt Ballo1.txt -o Ballo1.tsc
# will encrypt to Ballo1.tsc

or decrypt/encrypt multiple files at once:

chie tsc decrypt "Stage/*.tsc" -o "Stage/*.txt"
# will decrypt all files with the extension ".tsc" in the Stage folder
# the quotes are necessary

Encrypt while preserving comments:

chie tsc encrypt Ballo1.tsc -o Ballo1.txt --allow-comments
# or
chie tsc encrypt Ballo1.tsc -o Ballo1.txt -c

License

MIT.