automated terminal push
This commit is contained in:
14
DiskUtils.py
14
DiskUtils.py
@@ -68,24 +68,19 @@ def check_download_exists_matching_url_version_two(url):
|
||||
|
||||
print("month / ",month)
|
||||
|
||||
## this is a problem. it works but if there 2 channels.
|
||||
## redbull and redbull2 this is throw false positives. ugh
|
||||
|
||||
unicode_part = r"[\u3040-\u309F\u30A0-\u30FF_]*" # Matches any hiragana, katakana, and underscore
|
||||
|
||||
file_pattern = f"{unicode_part} \({channel_name}\) - game stats on Twitch in {month} {year} - SullyGnome.csv".lower()
|
||||
file_pattern = f"\(({username})\) - game stats on Twitch in {month} {year} - SullyGnome.csv".lower()
|
||||
|
||||
print("regex :",file_pattern)
|
||||
|
||||
for filename in os.listdir("/home/yankee/Downloads/"):
|
||||
for filename in os.listdir("/home/softwareshinobi/Downloads/"):
|
||||
|
||||
updated = filename.lower()
|
||||
|
||||
print("file in downloads / ",updated)
|
||||
print("found file (v2) / ",updated)
|
||||
|
||||
if fnmatch.fnmatch(updated, file_pattern):
|
||||
|
||||
print(f"Found matching file: {updated}")
|
||||
print(f"found match / {updated}")
|
||||
|
||||
return True
|
||||
|
||||
@@ -94,4 +89,3 @@ def check_download_exists_matching_url_version_two(url):
|
||||
print(f"No matching CSV file found for channel '{channel_name}' in year '{year}' and month '{month}'. (version t55555wo)")
|
||||
|
||||
return False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user