AlistGo / alist

🗂️A file list/WebDAV program that supports multiple storages, powered by Gin and Solidjs. / 一个支持多存储的文件列表/WebDAV程序,使用 Gin 和 Solidjs。
https://alist.nn.ci
GNU Affero General Public License v3.0
44.09k stars 5.72k forks source link

希望可以支持在线预览epub、mobi、azw3等格式书籍的功能 #2010

Closed HelloMusician closed 2 years ago

HelloMusician commented 2 years ago

Please make sure of the following things

Description of the feature / 需求描述

目前是txt和pdf格式的可以在线预览,有一些书籍格式不同的无法在线浏览,能否闲暇之余加上这一功能?

谢谢大佬,不强求。

Suggested solution / 实现思路

实在实现不了可以参考视频播放功能,在下方调用本地文档阅读器,例如开源阅读器Koodo Reader

另外还有一个文库项目作者也在想实现这一功能,可以作为参考 https://gitee.com/truthhun/DocHub

Additional context / 附件

No response

welcome[bot] commented 2 years ago

Thanks for opening your first issue here! Be sure to follow the issue template!

xhofe commented 2 years ago

真的不是所有文件都可以在网页上解析预览

调用本地文档阅读器你可以自己添加,refer to https://alist.nn.ci/config/preview.html#external-previews

github-actions[bot] commented 2 years ago

Hello @HelloMusician, this issue will not be worked on and will be closed. 你好 @HelloMusician,这不会被处理,将被关闭。

HelloMusician commented 2 years ago

好的,谢谢大佬

rocaltair commented 1 month ago

@HelloMusician 我现在用的这个: https://github.com/johnfactotum/foliate-js ,不需要额外改代码

把这个随便用个 nginx 或者 python -m SimpleHTTPServer 拉起来,然后改 Iframe 预览 里的链接就好了,这个支持 azw3, epub, mobi, pdf 各种格式,比现在的处理速度快很多,打开大几百MB 的也没问题。

比如我现在部署在路由器上:不用的时候不占cpu/mem资源

{
    "doc,docx,xls,xlsx,ppt,pptx": {
        "Microsoft":"https://view.officeapps.live.com/op/view.aspx?src=$e_url",
        "Google":"https://docs.google.com/gview?url=$e_url&embedded=true"
    },
    "pdf": {
        "reader.js": "http://192.168.1.1:8090/ebook-reader/reader.html?url=$e_url"
    },
    "azw3": {
        "reader.js": "http://192.168.1.1:8090/ebook-reader/reader.html?url=$e_url"
    },
    "epub": {
        "reader.js": "http://192.168.1.1:8090/ebook-reader/reader.html?url=$e_url"
    },
    "mobi": {
        "reader.js": "http://192.168.1.1:8090/ebook-reader/reader.html?url=$e_url"
    }
}