Last active
February 16, 2026 20:53
-
-
Save bergpb/fb15fbebf41190d2298339d484e589a0 to your computer and use it in GitHub Desktop.
Revisions
-
bergpb revised this gist
May 24, 2018 . 1 changed file with 1 addition and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,8 +7,6 @@ #install package os.system('sudo apt install calibre -y && sudo apt update') #remove espacos e insere _ for file in files: os.rename(os.path.join(path, file), os.path.join(path, file.replace(' ', '_'))) @@ -17,7 +15,7 @@ if file.endswith('.pdf'): f = file.split('.') f = f[0] os.system('ebook-convert {} {}.epub'.format(file, f)) sleep(10) print ('Finalizado.....') -
bergpb created this gist
May 24, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ import os from time import sleep path = os.getcwd() files = os.listdir(path) #install package os.system('sudo apt install calibre -y && sudo apt update') print (file) #remove espacos e insere _ for file in files: os.rename(os.path.join(path, file), os.path.join(path, file.replace(' ', '_'))) for file in files: if file.endswith('.pdf'): f = file.split('.') f = f[0] os.system('ebook-convert {} {}.epub'.format(file, filename)) sleep(10) print ('Finalizado.....')