diff --git a/README.md b/README.md index 71b78c4..7f04f0b 100644 --- a/README.md +++ b/README.md @@ -7,11 +7,19 @@ ![Linting status badge](https://github.com/Hochfrequenz/migmose/workflows/Linting/badge.svg) ![Black status badge](https://github.com/Hochfrequenz/migmose/workflows/Formatting/badge.svg) -MIG_mose generates machine-readable files from MIG documents. +MIG_mose generates machine-readable files from MIG documents ([edi-energy](https://www.edi-energy.de/index.php?id=38)). MIG_mose is the sister of [kohlrahbi](https://github.com/Hochfrequenz/kohlrahbi). +## Tech-Stack +- MIG_mose is a Python(3.11,3.12) project. +- .docx files a processed by the [python-docx](https://python-docx.readthedocs.io/en/latest/) library. +- EdiFact formats are used as in [maus.edifact](https://github.com/Hochfrequenz/mig_ahb_utility_stack/blob/main/src/maus/edifact.py). + +This is at the moment a MWE (Minimum Working Example) and will be extended in the future. +See below for an overview of its features. + ## Installation -MIGmose is a Python based tool. +MIG_mose is a Python based tool. Therefore you have to make sure, that Python is running on your machine. We recommend to use virtual environments to keep your system clean. @@ -36,6 +44,33 @@ Finally, install the package with ```bash pip install migmose ``` +## Features And How To Use Them + +At this point, MIG_mose works as a command-line interface tool (CLI). +There are several flags available to provide a user-friendly way to interact with MIG_mose. +Below the available options are listed: + +- **Input Directory (`-i`, `--input-dir`):** + - Description: This option allows the user to specify the path to the directory containing the .docx files for the MIGs (Message Implementation Guides). + - Example: `--input_dir /path/to/input_directory` + +- **Message Format (`-mf`, `--message-format`):** + - Description: This option defines the set of message formats to be parsed. Users can specify multiple message formats by providing multiple values. The formats are EdiFact formats (cf. [maus.edifact.EdifactFormat](https://github.com/Hochfrequenz/mig_ahb_utility_stack/blob/main/src/maus/edifact.py)). If no format is specified, all formats are parsed. + - Example: `--message_format "UTILMD" --message_format "ORDCHG"` + +- **Output Directory (`-o`, `--output-dir`):** + - Description: This option allows the user to specify the path to the directory which should contain the output files generated by the tool. If the directory does not exist, it will be created automatically. + - Example: `--output_dir /path/to/output_directory` +- **Output File Type (`-ft`, `--file-type`):** + - Description: Defines the output format. Choose between csv for flat Nachrichtenstruktur tables and nested_json for json files of the nested Nachrichtenstruktur tables. Default is csv. + - Example: `--file-type "csv" +### Usage Example + +To use the CLI logic provided by this tool, follow the command syntax below: + +```bash +migmose -i /path/to/input_directory -o /path/to/output_directory -mf "UTILMD" -mf "ORDCHG" -ft "csv" +``` ## Development