windows pathnames

This commit is contained in:
j 2016-01-31 22:58:53 +05:30
commit 5dead44107
5 changed files with 38 additions and 8 deletions

View file

@ -14,7 +14,7 @@ from PyPDF2 import PdfFileReader
import ox
import settings
from utils import get_language, to_isbn13, find_isbns
from utils import get_language, to_isbn13, find_isbns, get_short_path_name
import logging
logger = logging.getLogger(__name__)
@ -51,6 +51,8 @@ def ql_cover(pdf):
def page(pdf, page):
tmp = tempfile.mkdtemp()
if sys.platform == 'win32':
pdf = get_short_path_name(pdf)
cmd = [
'pdftocairo',
pdf,