{"id":32383714,"url":"https://github.com/jacadzaca/dbcpy","last_synced_at":"2025-10-25T01:59:57.800Z","repository":{"id":48970366,"uuid":"275097079","full_name":"jacadzaca/dbcpy","owner":"jacadzaca","description":"python3 library for reading/writing DBC files","archived":false,"fork":false,"pushed_at":"2024-08-18T21:21:01.000Z","size":54,"stargazers_count":4,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-25T01:02:02.426Z","etag":null,"topics":["dbc","trinitycore","world-of-warcraft"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/dbcpy/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jacadzaca.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}},"created_at":"2020-06-26T07:21:15.000Z","updated_at":"2025-07-08T21:31:52.000Z","dependencies_parsed_at":"2022-08-30T07:50:35.051Z","dependency_job_id":null,"html_url":"https://github.com/jacadzaca/dbcpy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jacadzaca/dbcpy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacadzaca%2Fdbcpy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacadzaca%2Fdbcpy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacadzaca%2Fdbcpy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacadzaca%2Fdbcpy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jacadzaca","download_url":"https://codeload.github.com/jacadzaca/dbcpy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacadzaca%2Fdbcpy/sbom","scorecard":{"id":500278,"data":{"date":"2025-08-11","repo":{"name":"github.com/jacadzaca/dbcpy","commit":"66f67c3a0b4e3274983befff2837bc98e22d51f4"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 1/29 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU Lesser General Public License v3.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T21:39:32.288Z","repository_id":48970366,"created_at":"2025-08-19T21:39:32.288Z","updated_at":"2025-08-19T21:39:32.288Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280893612,"owners_count":26409280,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-24T02:00:06.418Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["dbc","trinitycore","world-of-warcraft"],"created_at":"2025-10-25T01:59:56.335Z","updated_at":"2025-10-25T01:59:57.795Z","avatar_url":"https://github.com/jacadzaca.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## About\nThis repository contains code for a python3 library that is capable of editing various [DBC](https://wowdev.wiki/DBC) files.\nThe library was only tested with 3.3.5a DBCs and a [TrinityCore](https://www.trinitycore.org) server.\nIf this library dose not fit your use case, please consider using [pywowlib](https://github.com/wowdev/pywowlib/). Although\npywowlib's README states that reading/writing DBCs is not possible, [the features seem to be already implemented](https://github.com/wowdev/pywowlib/blob/master/wdbx/wdbc.py).\n\n## Instalation\n```bash\npip install dbcpy\n```\n\n## Records\ndbcpy dose NOT use [WoWDBDefs](https://github.com/wowdev/WoWDBDefs) to parse the DBCs.\nDBC representations must be added manually, for a list of supported DBCs see [records](https://github.com/jacadzaca/dbcpy/tree/master/dbcpy/records)\n\n##### Adding records\nAdding a record is easy. Just pick a copy-paste the definition from [here](https://wowdev.wiki/Category:DBC_WotLK)\ninto a python dictionary and define a new dataclass. See [this](https://github.com/jacadzaca/dbcpy/blob/master/dbcpy/records/item_record.py) for a\nreference implementation.\n\n## Examples\n##### Modifying an existing items' display_ids (will take ~1 second)\n\n```python\n#!/usr/bin/env python3\nfrom dbcpy.dbc_file import DBCFile\nfrom dbcpy.records.item_record import ItemRecord\n\ndef change_display_ids(item_record):\n    # entry: new_display_id\n    new_display_ids = {\n        1501: 37388,\n        15534: 27083,\n    }\n    try:\n        item_record.display_id = new_display_ids[item_record.entry]\n        return item_record\n    except KeyError:\n        return item_record\n\nif __name__ == '__main__':\n    with open('Item.dbc', 'r+b') as f:\n        dbc_file = DBCFile.from_file(f, ItemRecord)\n        some_item = dbc_file.records.find(873)\n        some_item.entry = 56807\n        some_item.display_id = 20300\n        with open('Item.dbc.new', 'w+b') as ff:\n            dbc_file.write_to_file(change_display_ids, ff)\n\n    with open('Item.dbc.new', 'r+b') as f:\n        dbc_file = DBCFile.from_file(f, ItemRecord)\n        print(dbc_file.records.find(1501).display_id)\n        print(dbc_file.records.find(15534).display_id)\n\n```\n\n##### Adding a Spell.dbc entry (will take \u003e1 second):\n\n```python\n#!/usr/bin/env python3\nfrom dbcpy.dbc_file import DBCFile\nfrom dbcpy.records.spell_record import SpellRecord\n\nif __name__ == '__main__':\n    with open('Spell.dbc', 'r+b') as f:\n        dbc_file = DBCFile.from_file(f, SpellRecord)\n        some_spell = dbc_file.records.find(116)\n        some_spell.name.en_us = 'New spell name'\n        some_spell.entry = 80865\n        dbc_file.records.append(some_spell)\n\n    with open('Spell.dbc', 'r+b') as f:\n        dbc_file = DBCFile.from_file(f, SpellRecord)\n        the_spell = dbc_file.records.find(80865)\n        print(the_spell.name.en_us)\n\n```\n\n##### Modyfing an existing spells' names (will take ~30 seconds)\n\n```python\n#!/usr/bin/env python3\nfrom dbcpy.dbc_file import DBCFile\nfrom dbcpy.records.spell_record import SpellRecord\n\ndef rename_spell(spell_record):\n    new_names = {\n        8716: 'i love',\n        37263: 'long',\n        37290: 'discussions',\n    }\n    try:\n        spell_record.name.en_us = new_names[spell_record.entry]\n        return spell_record\n    except KeyError:\n        return spell_record\n\nif __name__ == '__main__':\n    with open('Spell.dbc', 'r+b') as f:\n        dbc_file = DBCFile.from_file(f, SpellRecord)\n        with open('Spell.dbc.new', 'w+b') as ff:\n            dbc_file.write_to_file(rename_spell, ff)\n\n    with open('Spell.dbc.new', 'r+b') as f:\n        dbc_file = DBCFile.from_file(f, SpellRecord)\n        print(dbc_file.records.find(8716).name.en_us)\n        print(dbc_file.records.find(37263).name.en_us)\n        print(dbc_file.records.find(37290).name.en_us)\n\n```\n\n## Why dose modifying an existing record takes so long?\nWell, not always. In order to modify an existing record, we must rewrite the whole DBC file, because of the string block.\nThe SpellRecord is especially *large* and the [RecordReader.read_record](https://github.com/jacadzaca/dbcpy/blob/master/dbcpy/records/record_reader.py)\nmethod is not suited for reading *large* records like that. It handles smaller records (like ItemRecord) well enough (~1 second).\nThe simplest fix would be to implement a SpellRecord specific RecordReader.\n\n## How to contribute?\n1. Ensure that your commits have meaningful comments\n2. If your contribution is small (e.g it fixes a minor bug) increment revision (the last digit of version) in [setup.py](https://github.com/jacadzaca/dbcpy/blob/master/setup.py)\n3. Provide test-cases\n\n## Legal Note\nWorld of Warcraft is a registered trademark of Blizzard Entertainment and/or other respective owners.\nThis software is not created by Blizzard Entertainment or its affiliates, and is for purely educational and research purposes.\nThis software is not intended for the use and production of cheating (hacking) software or modifications that can disrupt World of Warcraft's gameplay.\nIt is your sole responsibility to follow copyright law, game's ToS and EULA.\nThe creators hold no responsibility for the consequences of use of this software.\n\nThe code is licensed under [LGPL 3.0](https://www.gnu.org/licenses/lgpl-3.0.txt).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacadzaca%2Fdbcpy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjacadzaca%2Fdbcpy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacadzaca%2Fdbcpy/lists"}