mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1089 (py3 fixes for bibtex file writer)
This commit is contained in:
parent
a3a00c56fd
commit
8eb679af27
@ -13,7 +13,6 @@ from calibre import strftime
|
||||
from calibre.customize import CatalogPlugin
|
||||
from calibre.library.catalogs import FIELDS, TEMPLATE_ALLOWED_FIELDS
|
||||
from calibre.customize.conversion import DummyReporter
|
||||
from calibre.constants import preferred_encoding
|
||||
from calibre.ebooks.metadata import format_isbn
|
||||
from polyglot.builtins import filter, string_or_bytes, unicode_type
|
||||
|
||||
@ -113,7 +112,6 @@ class BIBTEX(CatalogPlugin):
|
||||
from calibre.utils.html2text import html2text
|
||||
from calibre.utils.bibtex import BibTeX
|
||||
from calibre.library.save_to_disk import preprocess_template
|
||||
from calibre.utils.date import now as nowf
|
||||
from calibre.utils.logging import default_log as log
|
||||
from calibre.utils.filenames import ascii_text
|
||||
|
||||
@ -397,7 +395,7 @@ class BIBTEX(CatalogPlugin):
|
||||
|
||||
outfile.write('%%%Calibre catalog\n%%%{0} entries in catalog\n\n'.format(nb_entries))
|
||||
outfile.write('@preamble{"This catalog of %d entries was generated by calibre on %s"}\n\n'
|
||||
% (nb_entries, nowf().strftime("%A, %d. %B %Y %H:%M").decode(preferred_encoding)))
|
||||
% (nb_entries, strftime("%A, %d. %B %Y %H:%M")))
|
||||
|
||||
for entry in data:
|
||||
outfile.write(create_bibtex_entry(entry, fields, bib_entry, template_citation,
|
||||
|
Loading…
x
Reference in New Issue
Block a user