![]() |
#1 |
Member
![]() Posts: 18
Karma: 10
Join Date: Oct 2020
Device: kindle
|
calibre-utf8-path
https://github.com/snomiao/calibre-utf8-path
backend.py filenames.py Code:
def replace_invalid_filename_char(filename, replaced_char=''): '''Replace the invalid characaters in the filename with specified characater. The default replaced characater is '_'. e.g. C/C++ -> C_C++ ''' valid_filename = filename invalid_characaters = '\/:*?"<>|' for c in invalid_characaters: valid_filename = valid_filename.replace('【', '[') valid_filename = valid_filename.replace('】', ']') valid_filename = valid_filename.replace(c, replaced_char) return valid_filename Code:
def delete_originals(self): import win32file for path in self.handle_map: #win32file.DeleteFileW(path) os.remove(path) self.close_handles() |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
PRS-350 About the epub custom font path And how to know the path? | 52manhua | Sony Reader Dev Corner | 6 | 12-20-2013 01:28 AM |
Default Path Calibre | Themus | Calibre | 2 | 08-12-2010 10:44 PM |
utf8 problem in the path adding books | thcuvelier | Calibre | 1 | 02-01-2010 10:51 AM |
Calibre doesn't display UTF8 characters | jerrry94087 | Calibre | 1 | 01-02-2010 07:46 AM |
Calibre in Windows path | banjomike | Calibre | 13 | 09-04-2009 12:58 PM |