southbridgeio / zabbix-review-export-import

Clone of zabbix-review-export with added import object(s) feature
https://gitlab.com/devopshq/zabbix-review-export
50 stars 30 forks source link

Feature Request: Allow export to XML/JSON and YAML at the same time #6

Open gjaekel opened 3 years ago

gjaekel commented 3 years ago

By using the option --save-yaml, the export may be converted to YAML as an alternative. Because I want to save both, XML (resp. JSON) and YAML, I request to add the possibility to write output to both formats with the same call. This will avoid to run the toll twice, which will save time and ensiore consistency between the both outputs.

I sugggest to add the option named --save-xml to enable XML output. To keep the current behavior, this should be true as default and set to false if --save-yaml is used alone.

evgkrsk commented 3 years ago

PRs are welcome.

gjaekel commented 3 years ago

I'm no code writing developer, but I'll try. The core point to output boot seems to be a easy one because the conversion to YAML is done by converting the txt variable in case. One have just to "double" the code and add a save-xml boolean.

The command parsing part is much more difficult to me because I don't know anything about the Python argument parsing facilities.