{"id":19293645,"url":"https://github.com/mann-conomy/tf-parser","last_synced_at":"2026-03-02T14:32:30.489Z","repository":{"id":245724129,"uuid":"798720838","full_name":"Mann-Conomy/tf-parser","owner":"Mann-Conomy","description":"A Node.js parser for converting Team Fortress 2 game files to JSON objects.","archived":false,"fork":false,"pushed_at":"2025-05-29T14:37:38.000Z","size":136,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-08T19:12:34.750Z","etag":null,"topics":["file","json","localization","mann-conomy","nodejs","parser","tf2","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@mann-conomy/tf-parser","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mann-Conomy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-05-10T10:37:11.000Z","updated_at":"2025-05-29T14:36:37.000Z","dependencies_parsed_at":"2024-07-19T23:21:14.018Z","dependency_job_id":"a182e20f-f291-4180-a391-34fcb4a51612","html_url":"https://github.com/Mann-Conomy/tf-parser","commit_stats":null,"previous_names":["mann-conomy/tf-parser"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/Mann-Conomy/tf-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mann-Conomy%2Ftf-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mann-Conomy%2Ftf-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mann-Conomy%2Ftf-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mann-Conomy%2Ftf-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mann-Conomy","download_url":"https://codeload.github.com/Mann-Conomy/tf-parser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mann-Conomy%2Ftf-parser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30006317,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T14:08:50.421Z","status":"ssl_error","status_checked_at":"2026-03-02T14:08:50.037Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["file","json","localization","mann-conomy","nodejs","parser","tf2","typescript"],"created_at":"2024-11-09T22:35:36.105Z","updated_at":"2026-03-02T14:32:30.480Z","avatar_url":"https://github.com/Mann-Conomy.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tf-parser\n\nA Node.js parser for converting Team Fortress 2 game files to JSON objects.\n\n[![npm version](https://img.shields.io/npm/v/@mann-conomy/tf-parser?style=flat-square\u0026logo=npm)](https://npmjs.com/package/@mann-conomy/tf-parser)\n[![npm downloads](https://img.shields.io/npm/d18m/@mann-conomy/tf-parser?style=flat-square\u0026logo=npm)](https://npmjs.com/package/@mann-conomy/tf-parser)\n[![Node.js version](https://img.shields.io/node/v/@mann-conomy/tf-parser?style=flat-square\u0026logo=nodedotjs)](https://nodejs.org/en/about/releases/)\n[![GitHub actions](https://img.shields.io/github/actions/workflow/status/Mann-Conomy/tf-parser/test.yml?branch=main\u0026style=flat-square\u0026logo=github\u0026label=test)](https://github.com/Mann-Conomy/tf-parser/blob/main/.github/workflows/test.yml)\n[![GitHub license](https://img.shields.io/github/license/Mann-Conomy/tf-parser?style=flat-square\u0026logo=github)](https://github.com/Mann-Conomy/tf-parser/blob/main/LICENSE)\n\n## Installation\n\nUsing [npm](https://www.npmjs.com/package/@mann-conomy/tf-parser):\n\n```bash\n$ npm install @mann-conomy/tf-parser\n```\n\nUsing [yarn](https://yarnpkg.com/package/@mann-conomy/tf-parser):\n\n```bash\n$ yarn add @mann-conomy/tf-parser\n```\n\n## Testing\n\nUsing [npm](https://docs.npmjs.com/cli/v8/commands/npm-run-script):\n```bash\n$ npm test\n```\n\nUsing [yarn](https://classic.yarnpkg.com/lang/en/docs/cli/run/):\n```bash\n$ yarn test\n```\n\n## Examples\n\nParsing UTF-16 encoded localization files from the Team Fortress 2 game client into JSON objects.\n\n```js\nimport { readFile } from \"fs/promises\";\nimport { LocalizationParser } from \"@mann-conomy/tf-parser\";\n\n(async () =\u003e {\n    try {\n        // Read the contents of the tf_english.txt file\n        const file = await readFile(\"tf_english.txt\", { encoding: \"utf16le\" });\n\n        // Parse english language translations\n        const { lang } = LocalizationParser.parse(file);\n\n        console.log(lang.Language); // English\n        console.log(lang.Tokens.rarity4); // Unusual\n    } catch (error) {\n        console.error(\"Error parsing tf_english.txt\", error.message);\n    }\n})();\n```\n\nParsing the client schema from the Steam Web API.\n\n```js\nimport { SchemaParser } from \"@mann-conomy/tf-parser\";\n\n(async() =\u003e {\n    try {\n        // Fetch the client schema from the Steam Web API\n        const response = await fetch(\"https://media.steampowered.com/apps/440/scripts/items/items_game.bdc614ad776fb2d43c1f247fce870485d2299152.txt\");\n\n        // Resolve the response into a UTF-8 string\n        const items = await response.text();\n\n        // Parse the in-game items\n        const { items_game } = SchemaParser.parse(items);\n\n        console.log(items_game.rarities.unusual?.value); // 99\n        console.log(items_game.qualities.vintage?.value); // 3\n    } catch (error: unknown) {\n        if (error instanceof Error) {\n            console.error(\"Error parsing items_game.txt\", error.message);\n        }\n    }\n})();\n```\n\nSome more examples are available in the [examples](https://github.com/Mann-Conomy/tf-parser/tree/main/examples) and [test](https://github.com/Mann-Conomy/tf-parser/tree/main/test) directories.\n\n## Documentation\n\nSee the [Wiki pages](https://github.com/Mann-Conomy/tf-parser/wiki) for further documentation.\n\n## License\n\n[MIT](LICENSE)\n\nCopyright 2025, The Mann-Conomy Project\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmann-conomy%2Ftf-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmann-conomy%2Ftf-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmann-conomy%2Ftf-parser/lists"}