-
Notifications
You must be signed in to change notification settings - Fork 16
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
关于5.1以后版本修改的一些发现及问题 #6
Comments
甚至在我注释和删除 对应的4行 后所编译的pyc也有着大量的不同 |
calibre在载入二进制文件时是通过marshal.loads()去加载的 |
我现在有点想就是给官方分支提 issue+pr 好好描述一下unicode的需求…然后让作者去Merge |
似乎有文章说作者认为用户不应该去操作文件系统 所以不考虑这个功能 |
看来要先用旧版顶下了,因为会用其他软件进行阅读批注的原因对中文名需求还是比较大的 |
能否把python-lib.bypy.frozen 解包后,混入修改的pyc重新打包 python-lib.bypy.frozen |
[Brute force Calibre Chinese Catalog](https://hsuan9522.medium.com/%E6%9A%B4%E5%8A%9B%E7%A0%B4%E8%A7%A3-calibre-%E4%B8% AD%E6%96%87%E7%9B%AE%E9%8C%84-2b124f92f54) |
https://github.com/kurikomoe/calibre-utf8-path 把相应的修改方法打包了一下。同时编译了一个 Linux 的版本 |
https://github.com/kurikomoe/calibre-utf8-path Packaged the corresponding modification method. Also compiled a version for Linux |
感谢您的修改,现在保存为中文目录,方便多了,简直造福人类!就是有个小问题:在calibre主目录,点击阅读图书的时候,epub等格式的图书没法直接点开,需要打开所在目录,然后点击该文件才能阅读, 稍微有点不方便!不知道是否有解决办法? |
Thank you for your modification, now it is saved as a Chinese catalog, which is much more convenient and benefits mankind! There is just a small problem: when you click to read a book in the caliber main directory, you cannot directly click to open a book in epub format. You need to open the directory where it is located, and then click on the file to read it, which is a bit inconvenient! Not sure if there is a solution? |
实际上是 dev 模式下,viewer 的源代码需要被 jit 编译后使用,Linux 上能直接编译后启动,Windows 可能缺乏 python 环境导致编译失败。 测试:https://github.com/kurikomoe/calibre-utf8-path/releases/tag/v6.10.2 另外建议其他和我的 patch 相关的 issue 提在 https://github.com/kurikomoe/calibre-utf8-path 里,不要污染本 issue。 |
In fact, in dev mode, the source code of the viewer needs to be compiled by jit to be used. On Linux, it can be compiled directly and then started. Windows may lack a python environment and cause the compilation to fail. Tested: https://github.com/kurikomoe/calibre-utf8-path/releases/tag/v6.10.2 |
非常感谢,已经可以打开了(虽然慢了一点),不过比不能打开强太多了,再次感谢!! |
Thank you very much, it can be opened already (although it is a bit slow), but it is much better than not being able to open it, thanks again! ! |
开个坑,这个问题可解,但是依赖软件逆向分析工具(可能有取巧绕过的方法 [可能]需要解决的问题:
问题: target = target.replace(
'author = ascii_filename(author)[:l]',
'author = re.sub(r"[\\/\\\\\\:\\*\\?\\"\\<\\>\\|]", "_", author.strip())[:l]'
)
啊我知道了,是替换掉 Windows 不能用作路径的字符 |
Open a hole, this problem can be solved, but rely on software reverse analysis tools (there may be tricky ways to bypass [Possible] Issues that need to be addressed:
|
The new version of the Patch scheme: |
在阅读了https://github.com/kovidgoyal/calibre 中的几个关键提交
和 https://github.com/kovidgoyal/bypy中的
后 在 bypy/freeze/init.py中发现了关键函数
它看起来是抛弃了旧版本将pyc压缩成压缩包的方法 而是直接将pyc文件已二进制依次存入 \bin\python-lib.bypy.frozen 中
在我以16进制打开该文件后 也找到了 对应的方法名
但现在的问题是 我不知道如何寻找并修改frozen文件以取消核心函数(通过python3.9编译的原代码和修改后的代码均和存档存在细微差异 以至于我很难寻找到二进制文件准确修改位置(或许是python版本的问题
想问问作者有什么办法来解决
The text was updated successfully, but these errors were encountered: