mirror of
https://github.com/gryf/ebook-converter.git
synced 2026-04-25 16:01:29 +02:00
Removed Windows bits.
This commit is contained in:
@@ -44,7 +44,7 @@ class KPFExtract(FileTypePlugin):
|
||||
'KPF files. Note this will not contain any edits made in '
|
||||
'the Kindle Create program itself.')
|
||||
file_types = {'kpf'}
|
||||
supported_platforms = ['windows', 'osx', 'linux']
|
||||
supported_platforms = ['osx', 'linux']
|
||||
on_import = True
|
||||
|
||||
def run(self, archive):
|
||||
@@ -67,7 +67,7 @@ class ArchiveExtract(FileTypePlugin):
|
||||
'RAR). Also try to autodetect if they are actually CBZ/CBR '
|
||||
'files.')
|
||||
file_types = {'zip', 'rar'}
|
||||
supported_platforms = ['windows', 'osx', 'linux']
|
||||
supported_platforms = ['osx', 'linux']
|
||||
on_import = True
|
||||
|
||||
def run(self, archive):
|
||||
|
||||
@@ -5,7 +5,6 @@ import os, subprocess, shutil, re
|
||||
from functools import partial
|
||||
|
||||
from ebook_converter import prints
|
||||
from ebook_converter.constants_old import iswindows
|
||||
from ebook_converter.ptempfile import TemporaryDirectory
|
||||
from ebook_converter.ebooks.metadata import (
|
||||
MetaInformation, string_to_authors, check_isbn, check_doi)
|
||||
@@ -18,7 +17,7 @@ __copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
def get_tools():
|
||||
from ebook_converter.ebooks.pdf.pdftohtml import PDFTOHTML
|
||||
base = os.path.dirname(PDFTOHTML)
|
||||
suffix = '.exe' if iswindows else ''
|
||||
suffix = ''
|
||||
pdfinfo = os.path.join(base, 'pdfinfo') + suffix
|
||||
pdftoppm = os.path.join(base, 'pdftoppm') + suffix
|
||||
return pdfinfo, pdftoppm
|
||||
@@ -87,9 +86,6 @@ def page_images(pdfpath, outputdir='.', first=1, last=1, image_format='jpeg', pr
|
||||
pdftoppm = get_tools()[1]
|
||||
outputdir = os.path.abspath(outputdir)
|
||||
args = {}
|
||||
if iswindows:
|
||||
import win32process as w
|
||||
args['creationflags'] = w.HIGH_PRIORITY_CLASS | w.CREATE_NO_WINDOW
|
||||
try:
|
||||
subprocess.check_call([
|
||||
pdftoppm, '-cropbox', '-' + image_format, '-f', str(first),
|
||||
|
||||
Reference in New Issue
Block a user