Skip to content

Commit

Permalink
Update steam-screenshot-sort.py
Browse files Browse the repository at this point in the history
  • Loading branch information
marschel3000 authored Mar 24, 2017
1 parent 1b6091b commit c892e54
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions steam-screenshot-sort.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/usr/bin/env python3
#!/usr/bin/env python
import urllib2
import os
import json
import sys
import shutil
import re

def getSteamName(steamID):
def get_steam_name(steamID):
try:
steamID = int(steamID)
if steamID > 0 and steamID < 9223372036854775807:
Expand All @@ -24,7 +24,7 @@ def main():
for dir_name in os.listdir(root):
dir_path = os.path.join(root, dir_name)
sreens_path = os.path.join(dir_path, 'screenshots')
game_name = getSteamName(dir_name)
game_name = get_steam_name(dir_name)

if (game_name):
game_name = re.sub(ur'[^a-zA-Z0-9-_]', ' ', game_name).strip()
Expand All @@ -39,4 +39,4 @@ def main():
shutil.rmtree(dir_path, True)

if __name__ == '__main__':
main()
main()

0 comments on commit c892e54

Please sign in to comment.