mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
e24d4cd7c0
commit
d2e8ec09fa
@ -237,15 +237,13 @@ class Container(object):
|
||||
|
||||
def compare_to(self, other):
|
||||
if set(self.name_path_map) != set(other.name_path_map):
|
||||
return ['Set of files is not the same']
|
||||
return 'Set of files is not the same'
|
||||
mismatches = []
|
||||
for name, path in self.name_path_map.iteritems():
|
||||
opath = other.name_path_map[name]
|
||||
with open(path, 'rb') as f1, open(opath, 'rb') as f2:
|
||||
if f1.read() != f2.read():
|
||||
mismatches.append('The file %s is not the same'%name)
|
||||
import subprocess
|
||||
subprocess.call(['kompare', path, opath])
|
||||
return '\n'.join(mismatches)
|
||||
|
||||
# EPUB {{{
|
||||
|
@ -71,4 +71,6 @@ def subset_all_fonts(container, font_stats, report):
|
||||
if remove_font_face_rules(container, sheet, remove):
|
||||
style.text = sheet.cssText
|
||||
container.dirty(name)
|
||||
report('Reduced total font size to %.1f%% of original'%(
|
||||
total_new/total_old*100))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user