babelshift-ci - SourceSchemaParser 2.0.3
Parses Valve Source Engine game schema files into easy to use object oriented structures.
PM> Install-Package SourceSchemaParser -Version 2.0.3 -Source https://www.myget.org/F/babelshift-ci/api/v3/index.json
> nuget.exe install SourceSchemaParser -Version 2.0.3 -Source https://www.myget.org/F/babelshift-ci/api/v3/index.json
> dotnet add package SourceSchemaParser --version 2.0.3 --source https://www.myget.org/F/babelshift-ci/api/v3/index.json
source https://www.myget.org/F/babelshift-ci/api/v3/index.json
nuget SourceSchemaParser ~> 2.0.3
Copy to clipboard
> choco install SourceSchemaParser --version 2.0.3 --source https://www.myget.org/F/babelshift-ci/api/v2
Import-Module PowerShellGet
Register-PSRepository -Name "babelshift-ci" -SourceLocation "https://www.myget.org/F/babelshift-ci/api/v2"
Install-Module -Name "SourceSchemaParser" -RequiredVersion "2.0.3" -Repository "babelshift-ci"
Copy to clipboard
SourceSchemaParser
This is a .NET library that attempts to make reading Valve's Source-engine schema files a little easier. The intention is to be able to consume .vdf and .txt (in VDF format) files into JSON and in memory objects.
About this Library
This library was created to read various schema files in Valve's source-engine games. Schema files contain details about items, heroes, classes, and more. Unfortunately, the schema files are in VDF format, which is JSON-like, but significantly worse than JSON.
These are the rules on which the library was built:
- Make the library as easy and user friendly as possible.
- Document everything as thoroughly as possible.
- Allow for conversion from VDF to JSON.
- Replace string tokens with localized text where appropriate and possible.
- Provide "flattened" objects from schemas such as "Items" and "Leagues" (still in progress).
Install the Library from NuGet
See the library in the NuGet gallery here. You can install the library into your project directly from the package manager.
How to Use the Library
- Read the
About
section so you understand why this library exists - Install the library from NuGet
- Convert whatever VDF you have into JSON and use it however you want
- (future) Call methods to get "flattened" objects from schemas for easier consumption
Sample Usage
// this will return a collection of schema items which describe "Dota League" specific items like league images, web page, and more
var leagues = SchemaFactory.GetDotaLeaguesFromText(schema, languageToLoad);
// this will convert VDF format to JSON from a VDF file
var vdf = File.ReadAllLines("path/to/file.vdf");
var json = VDFConverter.ToJson(vdf);
// this will get the latest dota 2 game item schema and convert it to JSON
HttpClient client = new HttpClient();
var schema = await client.GetStringAsync(schemaUrl);
var json = VDFConverter.ToJson(schema);
-
.NETFramework 4.5
- AutoMapper (>= 5.2.0)
- Newtonsoft.Json (>= 9.0.1)
- Steam.Models (>= 3.0.2)
-
.NETStandard 1.3
- AutoMapper (>= 5.2.0)
- NETStandard.Library (>= 1.6.1)
- Newtonsoft.Json (>= 9.0.1)
- Steam.Models (>= 3.0.2)
- .NETFramework 4.5: 4.5.0.0
- .NETStandard 1.3: 1.3.0.0
Ownersjskiles |
AuthorsJustin Skiles |
Project URLhttps://github.com/babelshift/SourceSchemaParser |
LicenseMIT |
Info4 total downloads |
0 downloads for version 2.0.3 |
Download (56.87 KB) |
Found on the current feed only |
Package history
Version | Size | Last updated | Downloads | Mirrored? | |||
---|---|---|---|---|---|---|---|
2.0.3 | 56.87 KB | Wed, 09 Aug 2017 00:46:14 GMT | 0 | ||||
2.0.3-ci-00076 | 56.9 KB | Wed, 09 Aug 2017 00:37:09 GMT | 0 | ||||
2.0.3-ci-00075 | 56.83 KB | Sat, 13 May 2017 02:18:06 GMT | 0 | ||||
2.0.2 | 56.8 KB | Sat, 13 May 2017 02:07:30 GMT | 0 | ||||
2.0.0-ci-00069 | 55.52 KB | Mon, 20 Feb 2017 15:33:21 GMT | 0 | ||||
2.0.0-ci-00068 | 55.53 KB | Mon, 06 Feb 2017 23:27:58 GMT | 2 | ||||
2.0.0-ci-00067 | 55.56 KB | Mon, 06 Feb 2017 23:19:11 GMT | 1 | ||||
2.0.0-ci-00066 | 55.17 KB | Mon, 06 Feb 2017 22:58:26 GMT | 1 |