Skip to main content

Python package for parsing Houkai Gakuen 2 items data

Project description

About

hg2-item-parser is a Python package for parsing Houkai Gakuen 2 items data.

Installation

From PyPi

pip install hg2-item-parser

Preparations

To use this package, you will need a folder containing all item data, which can be downloaded and extracted using another package hg2-data-extractor. It is recommended to use both packages in the same directory to avoid manually specifying folder paths, as they are designed to create and use directories with compatible names by default.

Commands Overview

The CLI offers several commands for processing data. Below is a quick summary:

Command Description
check Parses a single item by ID and prints to the console.
parse Parses a single item or a range of items by ID(s) and writes to a file.

Usage

The CLI is invoked through a main entry point (e.g., hg2-item-parser or python -m <module-name>). Below are detailed examples for each command.

1. Check item

Parses and displays details about a single in-game item by its ID.

hg2-item-parser check <item_id> --data-dir path/to/data/
Option Description Default Value
<item_id> The in-game ID of a single item to parse. None
--data-dir, -d Path to the directory where data files are located. extracted

2. Parse item(s)

Parses and writes a single item or a range of items by their in-game IDs to a file.

hg2-item-parser parse <item_id> --range from to
Option Description Default Value
<item_id> The in-game ID of a single item to parse. None
--range, -r Specify a range of item IDs to parse. Provide two integers: the start and end IDs (inclusive). None

Examples

1. Check item

Display item with ID=200:

hg2-item-parser check 200 --data-dir extracted

2. Parse a single item

Parse item with ID=200:

hg2-item-parser parse 200 --output items.txt --data-dir extracted

3. Parse a range of items

Parse items with IDs from 1 to 200:

hg2-item-parser parse --range 1 200 --output items.txt --data-dir extracted

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hg2_item_parser-0.7.1.tar.gz (14.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hg2_item_parser-0.7.1-py3-none-any.whl (15.0 MB view details)

Uploaded Python 3

File details

Details for the file hg2_item_parser-0.7.1.tar.gz.

File metadata

  • Download URL: hg2_item_parser-0.7.1.tar.gz
  • Upload date:
  • Size: 14.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.4.24

File hashes

Hashes for hg2_item_parser-0.7.1.tar.gz
Algorithm Hash digest
SHA256 534b4cb3d26e9308b1e350318996c426f3e15d6ee7fca60bb405d240e74c54f5
MD5 578f9a641b6b8bab6358ca2d91994b6f
BLAKE2b-256 da87d07904c1b7728b89afcd9f3b99571762cd812c9831e147727a439f7ae7c7

See more details on using hashes here.

File details

Details for the file hg2_item_parser-0.7.1-py3-none-any.whl.

File metadata

File hashes

Hashes for hg2_item_parser-0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 842a8df68c492607e65448ddb5789620eb814877c2b933bc27e2f9ee522125f2
MD5 85813936825bbac861e758ce90a8ab2e
BLAKE2b-256 3018418156daf1c8f252557bb61abde1cd247a2934804771b64bec6c6cc1f6c0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page