-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cc96617
commit 2c84080
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#! /usr/bin/env python3 | ||
|
||
import json | ||
import sys | ||
import re | ||
|
||
|
||
def main(): | ||
name_list: list[tuple[int, str]] = [] | ||
data: dict[str, str] = json.load(sys.stdin) | ||
|
||
for _k, name in data.items(): | ||
m = re.search(r'\[(\d+)\]\.7z$', name) | ||
if not m: | ||
continue | ||
eid = int(m.group(1)) | ||
name_list.append((eid, name)) | ||
|
||
name_list.sort(reverse=True) | ||
|
||
for eid, name in name_list: | ||
print(name) | ||
|
||
return 0 | ||
|
||
|
||
if __name__ == "__main__": | ||
sys.exit(main()) |