예제 #1
0
파일: latex.py 프로젝트: BobPyron/calibre
 def finish(self):
     LaTeXBuilder.finish(self)
     self.info('Fixing Cyrillic characters...')
     tex = os.path.join(self.outdir, 'calibre.tex')
     with open(tex, 'r+b') as f:
         raw = f.read().replace(b'Михаил Горбачёв',
             br'{\fontencoding{T2A}\selectfont Михаил Горбачёв}')
         f.seek(0)
         f.write(raw)
예제 #2
0
파일: latex.py 프로젝트: AEliu/calibre
 def finish(self):
     LaTeXBuilder.finish(self)
     self.info('Fixing Cyrillic characters...')
     tex = os.path.join(self.outdir, 'calibre.tex')
     with open(tex, 'r+b') as f:
         raw = f.read()
         for x in (b'Михаил Горбачёв', b'Фёдор Миха́йлович Достоевский'):
             raw = raw.replace(x, br'{\fontencoding{T2A}\selectfont %s}' % (x.replace(b'а́', b'a')))
         f.seek(0)
         f.write(raw)
예제 #3
0
 def finish(self):
     LaTeXBuilder.finish(self)
     self.info('Fixing Cyrillic characters...')
     tex = os.path.join(self.outdir, 'calibre.tex')
     with open(tex, 'r+b') as f:
         raw = f.read().replace(
             b'Михаил Горбачёв',
             br'{\fontencoding{T2A}\selectfont Михаил Горбачёв}')
         f.seek(0)
         f.write(raw)
예제 #4
0
파일: latex.py 프로젝트: tokot/calibre
 def finish(self):
     LaTeXBuilder.finish(self)
     self.info('Fixing Cyrillic characters...')
     tex = os.path.join(self.outdir, 'calibre.tex')
     with open(tex, 'r+b') as f:
         raw = f.read()
         for x in (b'Михаил Горбачёв', b'Фёдор Миха́йлович Достоевский'):
             raw = raw.replace(x, br'{\fontencoding{T2A}\selectfont %s}' % (x.replace(b'а́', b'a')))
         f.seek(0)
         f.write(raw)
예제 #5
0
 def finish(self):
     if self._skip_finish:
         return None
     else:
         return LaTeXBuilder.finish(self)