diff options
author | Anthony Wang | 2022-01-22 22:36:43 -0600 |
---|---|---|
committer | Anthony Wang | 2022-01-22 22:36:43 -0600 |
commit | 53b7908df5fc664264a0265e76408cef91dc77aa (patch) | |
tree | 5e4b59c56d7a173fb14aa5cc533db91ad2e02663 | |
parent | 81c7f3961415dcf72fee9be0d462c60d8c840743 (diff) |
Add some fun emojis to mkbinder.py
-rwxr-xr-x | mkbinder.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/mkbinder.py b/mkbinder.py index ffd0440..c588fc1 100755 --- a/mkbinder.py +++ b/mkbinder.py @@ -17,7 +17,7 @@ args = parser.parse_args() for category in os.listdir('Links'): - print('Examining: ' + category) + print('🔍 Examining: ' + category) os.makedirs(category, exist_ok=True) section = '' @@ -29,8 +29,8 @@ for category in os.listdir('Links'): name = os.path.join(category, section + ' - ' + re.sub(r'(?u)[^-\w.]', '', link[5:]) + '.pdf') if not os.path.exists(name) or args.force: - print('Downloading: ' + link[:-1]) - print('Destination: ' + name) + print('📲 Downloading: ' + link[:-1]) + print('💾 Destination: ' + name) # Time to print! try: @@ -39,5 +39,7 @@ for category in os.listdir('Links'): else: pdf = weasyprint.HTML(link).write_pdf() open(name, 'wb').write(pdf) + except KeyboardInterrupt: + print('😭 Exiting') except: - print('Error when printing 😱') + print('😱 Error when printing') |