Giter Club home page Giter Club logo

Comments (9)

bgtsai avatar bgtsai commented on July 24, 2024

我的猜想是編輯安裝目錄下\opencc\dictionary\的文件
看起來像對照表,可以編輯試試?

可以參考
https://blog.darkthread.net/blog/opencc-conv-customization/

from epubconv_python.

ThanatosDi avatar ThanatosDi commented on July 24, 2024

這個部分的確可以自行在 opencc/dictionary 中修改
詳細要修改的檔案可以查看 opencc/config 中的設定檔
比如說使用 s2t 好了 就可以看到到底這個模式所使用的字典檔是那些,再去opencc/dictionary中修改,或者如 #8 (comment) 所說的用自訂字典的方式修改

"file": "STPhrases.txt"

"file": "STCharacters.txt"

但是比較需要注意的問題是 Python 版本的 OpenCC 有一個 BUG,就是當一個詞有兩種結果只會回傳第一個結果,作者頁面

如果需要非常準確的翻譯結果可以嘗試看看使用 v2.0.0 的繁化姬引擎翻譯看看,只不過因為是使用網路功能需要有網路的環境以及轉換的效率並沒有 OpenCC 來的快速

from epubconv_python.

mitis1233 avatar mitis1233 commented on July 24, 2024

ver.2.0.0無法使用,用calibre轉檔也一樣,這檔案在ver.1.0.5.2可以正常轉換。

log 記錄檔如下:
2019-07-27 20:49:25,353 EPUB INFO : * function: _read_config, * msg: read config
2019-07-27 20:49:25,353 EPUB INFO : * function: _read_config encoding, * msg: ASCII
2019-07-27 20:49:25,353 EPUB INFO : * function: _read_config, * msg: already read config
engine: zhconvert
converter: Traditional
format: Horizontal
2019-07-27 20:49:25,353 EPUB INFO : * function: convert, * msg: file path: D:\Program Files\EpubConv 2.0.0\冒险者入门篇[简].epub
2019-07-27 20:49:25,494 EPUB ERROR : * function: convert, * msg: File is not a epub file

from epubconv_python.

ThanatosDi avatar ThanatosDi commented on July 24, 2024

@mtis1233 我從這邊只能知道程式判斷檔案並非epub格式,epub格式為 application/epub+zip

from epubconv_python.

mitis1233 avatar mitis1233 commented on July 24, 2024

mimetype是application/epub+zip,檔案格式應該沒錯,我有寄檔案了,希望有幫助

from epubconv_python.

ThanatosDi avatar ThanatosDi commented on July 24, 2024

@mtis1233 恩...我這邊執行結果是正常的捏?

image

如果判斷還是非 epub 檔案
我預計會先釋出 2.0.1 讓程式可以輸出 debug log 這樣也比較好排除

from epubconv_python.

ThanatosDi avatar ThanatosDi commented on July 24, 2024

@mtis1233 我嘗試過很多方式還是無法還原你的問題 冏
一開始認為會不會是環境問題 我把 v2.0.1 版本的程式丟給朋友(完全無開發環境) 跟你提供的 epub 一樣可以轉換
接下來猜測作業系統? 防毒軟體? 或者有其他不明因素導致這個狀況發生
如同我回信的內容,照理說不管是怎樣的檔案規格應該都會有檔案格式,但是在debug內容中卻是回傳 None
又或者你執行方式是使用 cli 去呼叫轉換
那如果 epub 路徑中有空白比如說

python app2.py <file path>/example file.epub

在 cli 中會判斷成只執行

python app2.py <file path>/example

如果要完整寫上路徑建議是在檔案路徑前後還是用雙引號框起來

from epubconv_python.

mitis1233 avatar mitis1233 commented on July 24, 2024

我也找不到原因,win10內建防毒都關了也一樣,可能真的是作業系統bug吧 很久沒更新了。
目前是把self._check(epub_file_path)刪除就能正常運行
下圖:原檔案和刪除後
螢幕擷取畫面 (129)

from epubconv_python.

wym3253 avatar wym3253 commented on July 24, 2024

这个bug大概是calibre造成的,我之前安装calibre之后使用程序就会报错,卸载calibre无效,但是重装系统之后程序恢复正常。

from epubconv_python.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.