npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

csgo-items-parser

v0.0.6

Published

Extract Items/Skins/... from raw VDF data files

Downloads

15

Readme

Node-CSGO-Parser

Build Status Code Climate Test Coverage Issue Count npm

Extract Items/Skins/... from raw VDF data files


TODOs

  • [ ] Refactoring... This file will be too long
  • [ ] Generalization isDatasInitialized
  • [ ] Better handle of Little Endian for vdf / Hack dependency
  • [ ] Datamining File for more informations
  • [ ] DEBUG - Better Handle of Knifes and Rarities (My god, need so much hack ><. Volvo... that's not really clean ^^')
  • [ ] To ES6
  • [ ] Optimize Performances
  • [ ] defindex to int ?

Installation

npm install node-csgo-parser --save

Usage

var parser = require('./csgo-data-parser'),

var schemaFilePath = './test/test-data/schema.txt', 
	langFilePath = './test/test-data/csgo_english.txt',
	itemsFilePath = './test/test-data/items_game.txt',
	outLogFilePath = './out/logs/parser.log';

var csgoDataParser = new parser(schemaFilePath, langFilePath, itemsFilePath, 'debug', outLogFilePath);

Must pass schema file (like schema.txt), language file (like csgo_english.txt) and item file (like item_data.txt) at VDF format

  • Schema file can be find in Steam API
  • Language file can be find in game data files (steam-data/csgo/resource/csgo_language.txt)
  • Items File can be find both in game data files () and in Steam API (Note : You need do get the items_game_url information)

Example

A sample script is at example.js.

API Documentation

new CSGODataParser(schemaFilePath, langFilePath, itemsFilePath, logLevel, logFilePath)

| Param | Type | Description | | --- | --- | --- | | schemaFilePath | String | Path to schema file. | | langFilePath | String | Path to csgo_lang file. | | itemsFilePath | String | Path to items_game file. | | logLevel | String | Winston Log Level, if > info no timing data for generations. | | logFilePath | String | Choosen file path to write logs. |

csgoDataParser.getLogger() ⇒ winston.Logger

Return the parser's logger.

Kind: instance method of CSGODataParser
Returns: winston.Logger - Winston based Parser's Logger. Access: public

csgoDataParser.isDatasInitialized() ⇒ boolean

Check if datas files are OK.

Kind: instance method of CSGODataParser
Returns: boolean - True if datas initialized, false otherwise
Access: public

csgoDataParser.isLangInitialized() ⇒ boolean

Check if lang file is OK.

Kind: instance method of CSGODataParser
Returns: boolean - True if initialized, false otherwise
Access: public

csgoDataParser.getLangValue(keyLang) ⇒ String

Get the lang value from valve key i18n values.

Kind: instance method of CSGODataParser
Returns: String - traduction if langfile initialized and key is present, key otherwise
Access: public

| Param | Type | Description | | --- | --- | --- | | keyLang | String | valve key i18n values (like #PaintKit_aa_fade_Tag) |

csgoDataParser.getWeapons() ⇒ Array.<Weapon>

Generate bases Weapons data from schema's data.

Kind: instance method of CSGODataParser
Returns: Array.<Weapon> - List of Objects. One object represent one Weapon.
Access: public

csgoDataParser.getCollections() ⇒ Array.<Collection>

Generate collection's data from itemsgame's data.

Kind: instance method of CSGODataParser
Returns: Array.<Collection> - List of Collections. One object represent one Collection.
Access: public

csgoDataParser.getExteriors() ⇒ Array.<String>

Generate exteriors.

Kind: instance method of CSGODataParser
Returns: Array.<String> - One string represent one exterior type - I18N Name
Access: public

csgoDataParser.getCases() ⇒ Array.<Prefab>

Generate Weapon/Stickers skin Case list.

Kind: instance method of CSGODataParser
Returns: Array.<Prefab> - List of Object. One object represent one case
Access: public

csgoDataParser.getCaseKeys() ⇒ Array.<Prefab>

Generate Weapon/Stickers skin Case keys list.

Kind: instance method of CSGODataParser
Returns: Array.<Prefab> - List of Object. One object represent one case key
Access: public

csgoDataParser.getStickers() ⇒ Array.<Sticker>

Generate Stickers list. Note : Some unknown stickers are present in the item_game file so they have a rarity set to "default" (id 2 to 12)

Kind: instance method of CSGODataParser
Returns: Array.<Sticker> - List of Sticker. One object represent one sticker
Access: public

csgoDataParser.getMusicKits() ⇒ Array.<MusicKit>

Generate MusicKits list.

Kind: instance method of CSGODataParser
Returns: Array.<MusicKit> - List of MusicKit. One object represent one music kit
Access: public

csgoDataParser.getRaritiesIndex() ⇒ Array.<Rarity>

Generate Rarities index.

Kind: instance method of CSGODataParser
Returns: Array.<Rarity> - List of Rarity objects. One object represent one rarity.
Access: public