IW4MAdminDBParser/README.md

49 lines
2.0 KiB
Markdown
Raw Normal View History

2024-03-02 21:24:13 -05:00
# IW4MAdmin Database Parser
2023-05-14 01:23:33 -04:00
2024-03-02 21:24:13 -05:00
#### A Python3 script designed to export your IW4MAdmin database, parsing it into an easily accessible format. While the native `IW4MAdmin\Database\Database.db` is already accessible, navigating its complex relationships, keys, and constraints can be frustrating. This tool simplifies and streamlines the data, offering a more user-friendly view.
2023-05-14 01:23:33 -04:00
2024-03-03 05:24:56 -05:00
## Arguments
2024-03-03 05:30:26 -05:00
```
usage: parse_db.py [-h] [-s {ASC,DESC}] [-p PATH] [-o OUTPUT] [-t] [-c]
2024-03-03 05:24:56 -05:00
optional arguments:
-h, --help show this help message and exit
-s {ASC,DESC}, --sort {ASC,DESC}
Sort order for the query results (ASC or DESC).
-p PATH, --path PATH Path to the IW4MAdmin database file.
-o OUTPUT, --output OUTPUT
Output directory for the parsed database file.
-t, --time Time the script's execution.
2024-03-03 05:30:26 -05:00
-c, --config Use default config.json for configuration.
```
2023-05-20 23:44:50 -04:00
## Instructions
2024-03-03 05:30:26 -05:00
2024-03-02 21:24:13 -05:00
1. Copy the database to a folder and make sure it's named 'Database.db'
2. Copy the script `parse_db.py` into the location of your database's copy
3. Run the script
2023-05-20 23:44:50 -04:00
2024-03-02 21:24:13 -05:00
* This will generate a new database named `Database_parsed.db` with all of the essential information.
2023-05-20 23:44:50 -04:00
2024-03-02 21:24:13 -05:00
## Building
2023-05-20 23:44:50 -04:00
2024-03-02 21:24:13 -05:00
1. Ensure Python3 is installed on your system and added to PATH
2024-03-03 05:24:56 -05:00
2. Run `build.py`
## Examples
- Parse and save the IW4MAdmin Database in its native directory.
- `python parse_db.py -p "IW4MAdmin\Database\Database.db" -o "IW4MAdmin\Database"`
- Parse the database on the desktop, output to documents, use a config file, time the operation, and sort entries in descending order.
- `python parse_db.py -c -t -p "C:\Users\User\Desktop\Database.db" -o "C:\Users\User\Documents" -s DESC`
- Use config file and output to a specific folder.
- `python parse_db.py -p "Database.db" -o "FilteredOutput" -s DESC -c`
- Parse the database with timing
- `python parse_db.py -t -p "Database.db" -o "TimedOutput"`
- Extract using the config file for the newest/oldest database entries
- `python parse_db.py -c -p "Database.db" -o "SelectiveOutput" -s DESC -t`