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.2.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.2-py3-none-any.whl (15.0 MB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for hg2_item_parser-0.7.2.tar.gz
Algorithm Hash digest
SHA256 0debafddae8cec8a46d090c885e7bb7c9e9de7e8d1a0bb7f91528327bb40b54b
MD5 2d8789c25d89a29a6843ad2af111ec30
BLAKE2b-256 699e884cd1cd1c076d9c45f4cbeb7a15f6608904e97b51606ae4447dc201e7d1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for hg2_item_parser-0.7.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c1c15113a0416bd0644d4738c89cc101bb35de904a93b7ac8a40da8d1cfa7624
MD5 9e659d4a6064866bb978ebb9b5cbd00d
BLAKE2b-256 6423efbe9e3c59894fb1016b52689e3fdd1d9597d62d6fc15e10c53470e388a1

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