mirror of
https://github.com/yihong0618/bilingual_book_maker.git
synced 2025-06-05 19:15:34 +00:00
Fix library of crypto for current Windows (#159)
* Fix library of crypto for current Windows * Modify obok import statement Only import this module when necessary --------- Co-authored-by: Hsieh Chin Fan <pham@topo.tw>
This commit is contained in:
parent
5d2c89a841
commit
0a1991d8ad
@ -3,7 +3,6 @@ import json
|
||||
import os
|
||||
from os import environ as env
|
||||
|
||||
import book_maker.obok as obok
|
||||
from book_maker.loader import BOOK_LOADER_DICT
|
||||
from book_maker.translator import MODEL_DICT
|
||||
from book_maker.utils import LANGUAGES, TO_LANGUAGE_CODE
|
||||
@ -190,6 +189,8 @@ def main():
|
||||
OPENAI_API_KEY = ""
|
||||
|
||||
if options.book_from == "kobo":
|
||||
import book_maker.obok as obok
|
||||
|
||||
device_path = options.device_path
|
||||
if device_path is None:
|
||||
raise Exception(
|
||||
|
@ -1,6 +1,9 @@
|
||||
# The original code comes from:
|
||||
# https://github.com/apprenticeharper/DeDRM_tools
|
||||
|
||||
# Version 4.1.2 March 2023
|
||||
# Update library for crypto for current Windows
|
||||
|
||||
# Version 4.1.1 March 2023
|
||||
# Make obok.py works as file selector
|
||||
|
||||
@ -161,7 +164,7 @@
|
||||
"""Manage all Kobo books, either encrypted or DRM-free."""
|
||||
from __future__ import print_function
|
||||
|
||||
__version__ = "4.0.0"
|
||||
__version__ = "4.1.2"
|
||||
__about__ = "Obok v{0}\nCopyright © 2012-2020 Physisticated et al.".format(__version__)
|
||||
|
||||
import base64
|
||||
@ -211,7 +214,7 @@ def _load_crypto_libcrypto():
|
||||
from ctypes.util import find_library
|
||||
|
||||
if sys.platform.startswith("win"):
|
||||
libcrypto = find_library("libeay32")
|
||||
libcrypto = find_library("libcrypto")
|
||||
else:
|
||||
libcrypto = find_library("crypto")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user