Skip to content
master
Switch branches/tags

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 

Pet Database Converter

PHP tools to convert rAthena pet_db.txt to JSON (.yml), YAML (.yml), or MySQL (.sql).

Converting

Convert to YAML

For converting to YAML is requried Symfony/YAML, this file is not using YAML of PHP's extension. So as long as have composer installed and PHP 7.1.3+, you only need to run composer intall in this project's root directory.

Defaults

Available Arguments

  • `-i="filename" : Full path and filename of pet_db.txt as input file
  • `-o="filename" : Full path and filename for output file

Usage

php petdb2yml.php
php petdb2yml.php -i="C:/MyDocument/rAthena/db/re/pet_db.txt" -o="pet_db.yml"

Convert to JSON

The created file will be set as JSON but with .yml as file extension. YAML parser is able to read JSON, and by using .yml we don't need to change the file name in source

Defaults

Available Arguments

  • `-i="filename" : Full path and filename of pet_db.txt as input file
  • `-o="filename" : Full path and filename for output file

Usage

php petdb2json.php
php petdb2json.php -i="C:/MyDocument/rAthena/db/re/pet_db.txt" -o="pet_db.yml"

Convert to MySQL

Defaults

Available Arguments

  • `-i="filename" : Full path and filename of pet_db.txt as input file
  • `-o="filename" : Full path and filename for output file
  • `-o="table_name" : Table name for pet database in rAthena main database

Usage

php petdb2sql.php
php petdb2sql.php -i="C:/MyDocument/rAthena/db/re/pet_db.txt" -o="pet_db.sql" -t="pet_db"