Enhance import functionality
Staartvin opened this issue ยท 1 comments
The import method should be able to do the following separately:
- Import time from a separate folder 'import' from different files. Be able to import a file by name.
- Import time to your local database
- Import time to the global database
- Import time only to your global database
- Add warning when no imported files could be found.
New arguments that have been added:
- --db: Update the global database with imported values
- --db-only: Update only the global database with imported values (so local database is not updated)
- --overwrite-all: Overwrite both the local and global database with imported values
- --overwrite-db: Overwrite only the global database with imported values (but not the local database)
- --overwrite-flatfile: Overwrite only the local database with imported values (but not the global database).
Add an option to the general config "serverName:" where people can define a server name. This could be used to save the flatfile named [serverName]-autorank.sql or something. Then you can put flatfiles in a folder called "import".
You can use the command "/ar import" and then autorank will import all flatfiles in which are currently in the "import" folder.
Then there are 5 parameters for the "import" command:
--db will add the time which is being imported to the current flatfile but also to the database.
--db-only will only import the time and add it to the database
--overwrite will overwrite all data in the flatfile and database
--overwrite-flatfile will overwrite all data in the flatfile
--overwrite-db will overwrite all data in the database
It would be awesome if the parameters could be used together, so then --database --overwrite-flatfile will import the data and overwrite the flatfile, but will "add" the value's to the database and not overwrite the current value's in the database.