cortex-command-community / Cortex-Command-Legacy-Mod-Converter

MIT License
4 stars 5 forks source link

Automatically GET the latest version of conversion_rules.json from this repo #10

Closed MyNameIsTrez closed 1 year ago

MyNameIsTrez commented 3 years ago

Is your feature request related to a problem? Please describe. In order to make sure the user has the latest version of conversion_rules.json it'd be ideal if the converter automatically checked if there's a newer version of the file on GitHub or CCCP's website.

Describe the solution you'd like Show a popup window saying that conversion_rules.json was updated. Ideally the popup would give the option to cancel the update when they've manually modified the file, along with showing a warning that updating will remove any local changes. It's probably a bit too difficult to tell the difference between an old file and a file that has been modified though, so it's for the best if the file always shows this warning for the time being.

To prevent the program from requesting a JSON file with ~1000 conversion rules every time it is loaded it'd be ideal if the version of the JSON file could be requested so it can be compared to the local version. The JSON file could get a Unix time name and then it may be possible to get the name of the file from the repository without downloading the whole JSON file, but it's probably the easiest to always have a "version.json" file that contains the Unix time it was created on. The reason that it'd be a JSON file instead of a text file is just for future-proofing. The version.json file can be automatically updated upon creation of the converter's exe and will then automatically be included in this GitHub repo so it can be GET requested easily.

MyNameIsTrez commented 1 year ago

Closing old issues.