Synthetic xml_data generator for 112 Department
To start generator you need python3.12
https://www.python.org/downloads/
- Clone project(git clone git@github.com:Danchicic/xml_generator.git)
- Go to directory and create venv (in directory in terminal: python -m venv venv)
- Activate venv(windows terminal: venv\Scripts\activate)
- Install requirements (pip install -r requirements.txt)
- Clone project(git clone git@github.com:Danchicic/xml_generator.git)
- Go to directory and create venv (in directory: python3.12 -m venv venv)
- Activate venv(bash: source venv/bin/activate)
- Install requirements (pip install -r requirements.txt)
❗️wsdl file must has name : wsdl_4_3.wsdl❗️
- Set global vars (guide for win: https://ab57.ru/cmdlist/set.html) like in the .env.example file
Launch main.py
in terminal with activated venv: python main.py
- Fill global environment variables
- [OPTIONAL] Choose type of sender in constants/sender.py(base=by_delay, delay=3)
- [OPTIONAL] Choose prefixes for files in constants/sender.py
- In terminal run command: python main.py --send
You can change base values in constants directory in the root of project
- generator - constants for generator, change it for locally start
- sender - constants for sender module, change it, if you want to send files
- union_constants - constants for all project(Date can be changed here), this file contains urls for google sheets
If constant has work_type postfix, you can change work_type_constant with one of: normal/poisson/uniform
You can take constants from google sheet
for this you need to change TAKE_CONSTANTS_FROM_FILE flag in generator to True
You can add env variables to program
SERVER_ADDRESS
SERVER_PASSWORD
SERVER_LOGIN
will be used if flag --send
You can launch the program with start values:
- --files-count - files count to generate
- --xmls - xml per file
- --date - zero date for files in format <YYYY-MM-DD_HH-MM-SS>
- --send - work type for script if true files will be sent to address in global vars