Skip to content
README.md 1.17 KiB
Newer Older
Studer Brendan's avatar
Studer Brendan committed
# EOLJsonParser
this project is meant to be a tool for the End Of Life unity project. It uses a JSON file to create Naninovel scripts.

## Input
A json file containing scenarios generated by the [EndOfLife-StoryBuilder](https://labinfo.ing.he-arc.ch/gitlab/ticd/17ticd05/endoflife-storybuilder) C# project.

## Output
A folder tree containing Naninovel scripts

Studer Brendan's avatar
Studer Brendan committed
# Requirements
Studer Brendan's avatar
Studer Brendan committed
- Install Python 0.10.8
Studer Brendan's avatar
Studer Brendan committed
    - No tested for other versions.
Studer Brendan's avatar
Studer Brendan committed

# Installation
Create an environment
```bash
python -m venv venv
```

Enter the environment
```bash
venv/Scripts/activate
```
install packages
Enter the environment
```bash
pip install -r requirements.txt
```
Create your own .env file based on the existing .env.example file
Studer Brendan's avatar
Studer Brendan committed

# Run
run the following command
Studer Brendan's avatar
Studer Brendan committed
```bash
Studer Brendan's avatar
Studer Brendan committed
python eol_json_parser.py
Studer Brendan's avatar
Studer Brendan committed
```
Studer Brendan's avatar
Studer Brendan committed

It's possible to add arguments
- -i or --ifile" to specified the input json file
- -o or --ofile to specify the name of the output folder
Studer Brendan's avatar
Studer Brendan committed
- -t or --tree to only print the tree of scenarios
Studer Brendan's avatar
Studer Brendan committed
- -s or --scores to compute the min and max scores for all scenes. The variables are written in the `variables.txt` file.
Studer Brendan's avatar
Studer Brendan committed

If input file and/or output folder are not specified, the cript will take them from you .env file