-
Notifications
You must be signed in to change notification settings - Fork 2
/
__main__.py
36 lines (29 loc) · 842 Bytes
/
__main__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import platform
import colorama
from convert import convert, creatdir
# ativando o colorama, ferramenta que
# facilita a coloração do terminal
colorama.init(autoreset=True)
if "windows" in platform.system().lower():
c = 'cls'
else:
c = 'clear'
# os.system(c)
diretorio = './arquivosConvertidos'
def banner():
print(f"""{colorama.Fore.CYAN}
\t\t--------------------------------
\t\t| CONVERSOR HTML TO PDF v1.1 |
\t\t--------------------------------
""")
if __name__ == '__main__':
try:
creatdir(diretorio)
banner()
site = str(input('DIGITE A URL DO SITE:\n> '))
nome = str(input('DIGITE O NOME COM QUE QUER GUARDAR O PDF:\n> '))
convert(site, nome, diretorio)
except Exception as erro:
pass
finally:
print(f'\n{colorama.Fore.YELLOW}By: SÍLVIO SILVA')