Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EPUB and Mobi format support #22

Closed
2 tasks done
LancerComet opened this issue Apr 16, 2023 · 2 comments
Closed
2 tasks done

EPUB and Mobi format support #22

LancerComet opened this issue Apr 16, 2023 · 2 comments
Assignees
Labels
feature New feature is needed

Comments

@LancerComet
Copy link
Member

LancerComet commented Apr 16, 2023

  • epub: Supported since 0.8.0.
  • mobi: Supported since 0.9.0.

For more information please read: https://github.com/RuliaReader/Rulia/wiki/EPUB-and-Mobi-support

@LancerComet LancerComet added the feature New feature is needed label Apr 16, 2023
@LancerComet LancerComet self-assigned this Apr 16, 2023
@LancerComet
Copy link
Member Author

It is difficult to support mobi file for current code structure. A rich content reader component is needed.

@LancerComet LancerComet added the delay Oh no. label May 21, 2023
@LancerComet
Copy link
Member Author

LancerComet commented Aug 2, 2023

Both EPub and Mobi are HTML-based content formats, which can be tricky to render in Rulia, as Rulia is primarily designed as a manga reader that operates on bitmap images. There are two options:

  • Render each page in WebView and then extract the bitmap. The advantage of this option is that it can accurately preserve the original content. However, the drawback is that this process could be quite slow.
  • Parse the HTML content of each page, locate image files, then render them as a .NET bitmaps. The advantage of this way is the loading speed, as it would be significantly faster compared to the first option. The drawback is that it could potentially disrupt the content format.

About EPub

EN

There could be some issues with epub because epub is a zip file with a bunch of web pages, which means epub is not only designed for manga & comics but also for multimedia. So images could be displayed incorrectly, or even not displayed if it is not manga-content-based.

CHS

Epub 本质是一个包含很多网页的 zip 文件,因为内容存放在网页中,所以 epub 可以展示电子书、图片和富文本,因此不仅可以用来存储漫画,还可以存储小说和富文本等内容。您可能会发现您打开的 epub 文件不能正确展示,这是因为如果目标文件不是纯粹的漫画 epub 文件,可能会无法提取到正确的图片。

CHT

Epub 本質上是一個包含許多網頁的 zip 檔案,由於內容儲存在網頁中,所以 epub 可以展示電子書、圖片和富文本,因此不僅可以用來儲存漫畫,還可以儲存小說和富文本等內容。您可能會發現您開啟的 epub 檔案無法正確顯示,這是因為如果目標檔案不是純粹的漫畫 epub 檔案,可能會無法提取到正確的圖片。

JPN

Epub は、多くのウェブページを含む zip ファイルの本質です。内容がウェブページに保存されているため、Epub は電子書籍、画像、リッチテキストを表示することができます。そのため、漫画だけでなく、小説やリッチテキストなどのコンテンツも保存できます。Epub ファイルを開いたときに正しく表示されない場合がありますが、それは対象ファイルが純粹な漫画の Epub ファイルでない場合、正しい画像を抽出できない可能性があるためです。

About mobi

EN

I've noticed issues with certain mobi files. During decoding, checks for data correctness are essential. If incorrect data blocks are found, in theory they should be deprecated. However, doing so results in incomplete mobi content. While preserving the bad data might yield a complete output, I consider this practice to be inappropriate.

For the time being, I've chosen to retain all the "incorrect data blocks", and during validation, everything appears to function correctly. However, please note that at this stage, you should be cautious when using mobi files.

CHS

我发现一些 mobi 文件有问题。在 mobi 解码阶段,需要检查 mobi 的数据是否正确,如果发现了错误的数据,理论上,对应的数据段需要整段丢弃,但是我发现这么做会使得这些 mobi 文件的结果不完整。如果保留错误数据,则结果是正确的,但原则上讲这么做不合理。

目前我选择保留错误的数据,因为看起来这样做并不影响 mobi 文件的正常读取,不过还望您周知,mobi 文件依然可能出现一些问题。

CHT

我發現有些 mobi 檔案存在問題。在解碼 mobi 的階段,需要檢查其數據是否正確。若發現有錯誤的數據,理論上這部分數據應該被整段丟棄,但這樣做會導致該 mobi 檔案內容不完整。若保留這些錯誤數據,結果看起來是正確的,但從原則上講,這麼做是不合理的。

目前我選擇保留這些錯誤的數據,因為看起來不影響 mobi 檔案的正常讀取。但還是希望您知悉,閱讀 mobi 檔案時仍可能出現一些問題。

JPN

私はいくつかの mobi ファイルに問題があることに気付きました。mobi のデコード段階で、データが正しいかどうかを確認する必要があります。誤ったデータが見つかった場合、理論的にはそのデータセグメントを完全に破棄する必要があります。しかし、そのようにすると、mobi ファイルの内容が不完全になることがわかりました。誤ったデータを保持した場合、結果は正しそうですが、原則としてそのようにするのは不適切です。

現時点で、私は誤ったデータを保持する選択をしています。それは mobi ファイルの正常な読み取りに影響しないように見えるからです。しかし、mobi ファイルを読む際にまだいくつかの問題が発生する可能性があることをご理解ください。

@LancerComet LancerComet changed the title Mobi format support EPUB and Mobi format support Aug 2, 2023
@LancerComet LancerComet pinned this issue Aug 8, 2023
@LancerComet LancerComet removed the delay Oh no. label Aug 11, 2023
@LancerComet LancerComet unpinned this issue Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature is needed
Projects
None yet
Development

No branches or pull requests

1 participant