All Projects → andygrunwald → vdf

andygrunwald / vdf

Licence: MIT license
A Lexer and Parser for Valves Data Format (known as vdf) written in Go

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to vdf

vdf
📜 Package for working with Valve's text and binary KeyValue format
Stars: ✭ 146 (+386.67%)
Mutual labels:  steam, valve, vdf
Vac Bypass
Valve Anti-Cheat bypass written in C.
Stars: ✭ 241 (+703.33%)
Mutual labels:  steam, counter-strike, valve
Steamworks
Exposing SteamWorks functions to SourcePawn.
Stars: ✭ 70 (+133.33%)
Mutual labels:  steam, counter-strike, valve
valve-matchmaking-ip-ranges
Lists of locations & IP addresses of Valve servers
Stars: ✭ 69 (+130%)
Mutual labels:  steam, counter-strike, valve
Steamtracking
🕵 Tracking things, so you don't have to
Stars: ✭ 542 (+1706.67%)
Mutual labels:  steam, valve
Archisteamfarm
C# application with primary purpose of idling Steam cards from multiple accounts simultaneously.
Stars: ✭ 7,219 (+23963.33%)
Mutual labels:  steam, valve
Depressurizer
A Steam library categorizing tool.
Stars: ✭ 1,008 (+3260%)
Mutual labels:  steam, valve
Steamid.php
🆔 PHP library to work with SteamIDs
Stars: ✭ 83 (+176.67%)
Mutual labels:  steam, valve
Steam
☁️ Python package for interacting with Steam
Stars: ✭ 489 (+1530%)
Mutual labels:  steam, valve
Steamcmd Autoupdate Any Gameserver
Windows SteamCMD to autoupdate and install any game server steam cmd settings configurable lots of useful features. This batch script will keep your game servers automaticly updated updating intervals announce the server is shutting down for updates etc all configurable.
Stars: ✭ 77 (+156.67%)
Mutual labels:  steam, valve
Vac Bypass Loader
Loader for VAC Bypass written in C.
Stars: ✭ 204 (+580%)
Mutual labels:  steam, valve
Valveresourceformat
🔬 Valve's Source 2 resource file format parser and decompiler
Stars: ✭ 638 (+2026.67%)
Mutual labels:  steam, valve
Uwphook
🔗 Add your Windows Store or UWP games to Steam
Stars: ✭ 566 (+1786.67%)
Mutual labels:  steam, valve
Vac Hooks
Hook WinAPI functions used by Valve Anti-Cheat. Log calls and intercept arguments & return values. DLL written in C.
Stars: ✭ 103 (+243.33%)
Mutual labels:  steam, valve
Node Globaloffensive
A Node.js module to connect to and interact with the CS:GO game coordinator. Mostly used to get item data.
Stars: ✭ 96 (+220%)
Mutual labels:  steam, counter-strike
Dota2
🐸 Python package for interacting with Dota 2 Game Coordinator
Stars: ✭ 129 (+330%)
Mutual labels:  steam, valve
Vpk
📦 Open, Search, Extract and Create VPKs in python
Stars: ✭ 79 (+163.33%)
Mutual labels:  steam, valve
Csgowinbig
Open-source Counter-Strike: Global Offensive jackpot betting website.
Stars: ✭ 149 (+396.67%)
Mutual labels:  steam, counter-strike
HammerPatch
Modification of Source Valve Hammer Editor to fix some issues. Fixes brush vertex precision loss.
Stars: ✭ 49 (+63.33%)
Mutual labels:  steam, valve
Node Csgo
A node-steam plugin for Counter-Strike: Global Offensive.
Stars: ✭ 367 (+1123.33%)
Mutual labels:  steam, counter-strike

vdf: A Lexer and Parser for Valves Data Format (known as vdf)

GoDoc Go Report Card

A Lexer and Parser for Valves Data Format (known as vdf) written in Go.

Table of Contents

Installation

It is go gettable

$ go get github.com/andygrunwald/vdf

Usage

Given a file named gamestate_integration_consolesample.cfg with content:

"Console Sample v.1"
{
	"uri" 		"http://127.0.0.1:3000"
	"timeout" 	"5.0"
	"buffer"  	"0.1"
	"throttle" 	"0.5"
	"heartbeat"	"60.0"
	[...]
}

Can be parsed with this Go code:

package main

import (
	"fmt"
	"os"

	"github.com/andygrunwald/vdf"
)

func main() {
	f, err := os.Open("gamestate_integration_consolesample.cfg")
	if err != nil {
		panic(err)
	}

	p := vdf.NewParser(f)
	m, err := p.Parse()
	if err != nil {
		panic(err)
	}

	fmt.Println(m)
}

And it will output:

map[
	Console Sample v.1:map[
		uri:http://127.0.0.1:3000
		timeout:5.0
		buffer:0.1
		throttle:0.5
		heartbeat:60.0
		[...]
	]
]

API-Documentation

The official Go package documentation can be found at https://pkg.go.dev/github.com/andygrunwald/vdf.

Development

Unit testing

To run the local unit tests, execute

$ make test

To run the local unit tests and view the unit test code coverage in your local web browser, execute

$ make test-coverage-html

Fuzzing tests

This library implements Go fuzzing. The generated fuzzing corpus is stored in andygrunwald/vdf-fuzzing-corpus, to avoid blowing up the size of this repository.

To run fuzzing locally, execute

$ make init-fuzzing   # Clone the corpus into testdata/fuzz
$ make clean-fuzzing  # Clean the local fuzzing cache
$ make test-fuzzing   # Execute the fuzzing

Press

VDF parser in other languages

Inspiration

The code is inspired by @benbjohnson's article Handwritten Parsers & Lexers in Go and his example sql-parser. Thank you Ben!

License

This project is released under the terms of the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].