.NET Parser for The Sims Online's CST format.
Find a file
Tony Bark 0e6ba4f99d Added more package metadata
- Removed RC suffix
2020-12-09 17:07:58 -05:00
.github/workflows Added more package metadata 2020-12-09 17:07:58 -05:00
.vscode Added VSCode tasks 2020-12-08 19:09:34 -05:00
CSTNet Added more package metadata 2020-12-09 17:07:58 -05:00
CSTNet.Tests Proper unit tests 2020-12-08 20:13:18 -05:00
notebooks Initial WIP of argument parsing 2020-12-09 02:14:14 -05:00
.editorconfig Add project files. 2020-12-08 17:56:38 -05:00
.gitattributes Add .gitignore and .gitattributes. 2020-12-08 17:56:36 -05:00
.gitignore Add project files. 2020-12-08 17:56:38 -05:00
code_of_conduct.md Migrated CST notebook from .NET Labs 2020-12-08 18:46:52 -05:00
CSTNet.sln Publish using .NET CLI 2020-12-08 21:57:55 -05:00
CSTNet.sln.licenseheader Add project files. 2020-12-08 17:56:38 -05:00
LICENSE Add project files. 2020-12-08 17:56:38 -05:00
README.md Initial WIP of argument parsing 2020-12-09 02:14:14 -05:00

CST.NET

License: MIT Contributor Covenant

Caret-Separated Text (or CST) is a key-value pair format represented by numbers or words as keys and the value is the string enclosed between carets (^) that contains the contents. CST.NET is a library for parsing the CST format.

Usage

using System;
using System.IO;
using CSTNet;

var file = File.ReadAllText("example.cst");
var example = CaretSeparatedText.Parse(file, 1);

Console.WriteLine(example);

In production, CST files were used in The Sims Online to provide translations. Each translation was split into their respective directories:

  • uitext/english.dir/hints/toolbar.cst
  • uitext/swedish.dir/hints/toolbar.cst

As long as the key remained the same, it didn't matter what directory the file was located in.

To-do

  • Support for arguments (e.g. %1)

Requirements

Prerequisites

License

I license this project under the MIT license - see LICENSE for details.