Automatically get the latest json file if only given a folder as path #33

Merged
MG-95 merged 4 commits from automatically-get-latest-file into master 2022-10-25 00:14:48 +02:00
Showing only changes of commit a8f408941a - Show all commits

View file

@ -80,6 +80,10 @@ def main(*_args):
filesList.sort()
file_path = os.path.join(file_path, filesList[len(filesList) - 1])
else:
print("Please enter a valid json file or the directory containing the json file!")
sys.exit(0)
else:
file_path = pathlib.Path(pathlib.Path(__file__).absolute().parent, 'example.json')