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
Contributor
No description provided.
MG-95 added 1 commit 2022-10-24 23:59:42 +02:00
MG-95 requested review from dkdent 2022-10-24 23:59:46 +02:00
MG-95 added 1 commit 2022-10-25 00:02:57 +02:00
dkdent approved these changes 2022-10-25 00:05:02 +02:00
@ -70,0 +78,4 @@
# we want the latest json file in given folder
filesList = [f for f in os.listdir(file_path) if os.path.isfile(os.path.join(file_path, f)) and f.endswith(".json")]
filesList.sort()
file_path = os.path.join(file_path, filesList[len(filesList) - 1])
Collaborator

filesList[-1] müsste reichen, um das letzte Element zu bekommen.

filesList[-1] müsste reichen, um das letzte Element zu bekommen.
Author
Contributor

Oh diese Syntax kenne ich gar nicht :)

Oh diese Syntax kenne ich gar nicht :)
MG-95 marked this conversation as resolved
MG-95 added 1 commit 2022-10-25 00:10:16 +02:00
MG-95 added 1 commit 2022-10-25 00:11:47 +02:00
MG-95 merged commit 1a0d3b3733 into master 2022-10-25 00:14:48 +02:00
MG-95 deleted branch automatically-get-latest-file 2022-10-25 00:14:49 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Netz39_Vorstand/stammdaten-formular#33
No description provided.