mirror of
https://github.com/tonytins/cstdotnet.git
synced 2026-02-10 12:14:47 -05:00
.NET Parser for The Sims Online's CST format.
| .github/workflows | ||
| .vscode | ||
| CSTNet | ||
| CSTNet.Tests | ||
| notebooks | ||
| .editorconfig | ||
| .gitattributes | ||
| .gitignore | ||
| code_of_conduct.md | ||
| CSTNet.sln | ||
| CSTNet.sln.licenseheader | ||
| LICENSE | ||
| README.md | ||
CST.NET
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:
en/hints/toolbar.cstsv/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
- .NET 5+ or Core 3.1
- .NET Interactive for notebooks
- VSCode Extension (does not require Jupyter)
- nteract (requires Jupyter)
License
I license this project under the MIT license - see LICENSE for details.