Skip to content

Commit

Permalink
feat: 过滤对部分格式的计分
Browse files Browse the repository at this point in the history
  • Loading branch information
MistEO authored Feb 9, 2024
1 parent 19663e2 commit 58dbdf6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/rank.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@

score_list = []

filter_ext = [".md", ".txt", ".png", ".jpg", ".gif", ".bmp"]
for player in Path('.').glob('*'):
if player.is_file():
continue
if player.stem.startswith('.'):
continue

result = best_file_score([x for x in player.glob('**/*') if x.is_file()])
result = best_file_score([x for x in player.glob('**/*') if x.is_file() and not x.suffix in filter_ext])
if result:
path, score = result
score_list.append((player.stem, path, score))
Expand Down

0 comments on commit 58dbdf6

Please sign in to comment.