😄 你好~ 我是 yihong0618,生活工作在大连。 喜爱游戏,跑步,读书,编程和有趣的东西。 项目大多和这些相关。
你可以到我的网站来玩, 📫 如果你想聊聊,可以给我发邮件, 也可以来到我的 tg 频道
也欢迎赞助我杯可乐 Sponsor Me
Yesterday you said tomorrow.
记录下的跑步 13 年。
Make your epub books vertical or horizontal.
Home Page: https://epubhv.streamlit.app
License: MIT License
epubhv 专制主义**下的臣民心理.epub --convert s2t
usage: epubhv [-h] [--v] [--h] epub
在 macOS 14 中使用新增的「粤语注音」时,epubhv 会错误的在括号中进行两次注音(如图高亮部分所示),在全文注音中均出现了此现象。pip 版本为 23.3.1,Python 版本为 3.11。
所使用的 epub 和注音结果下附于 zip 中
Archive.zip
安装epubhv成功,运行却一直报错fugashi重装也没起作用,请指教。
[Documents]$ pip install epubhv
Defaulting to user installation because normal site-
packages is not writeable
Looking in indexes: https://pypi.tuna.tsinghua.edu.c
n/simple
Requirement already satisfied: epubhv in /var/mobile
/Containers/Data/Application/A3D6ABA5-6EFD-4792-9707
-EA0AE3678F47/Library/lib/python3.11/site-packages (
0.4.1)
Requirement already satisfied: beautifulsoup4==4.12.
2 in /var/mobile/Containers/Data/Application/A3D6ABA
5-6EFD-4792-9707-EA0AE3678F47/Library/lib/python3.11
/site-packages (from epubhv) (4.12.2)
Requirement already satisfied: cssutils==2.7.1 in /v
ar/mobile/Containers/Data/Application/A3D6ABA5-6EFD-
4792-9707-EA0AE3678F47/Library/lib/python3.11/site-p
ackages (from epubhv) (2.7.1)
Requirement already satisfied: lxml==4.9.3 in /priva
te/var/containers/Bundle/Application/C53C589E-EB81-4
638-9DF5-5656C96958CF/a-Shell-mini.app/Library/lib/p
ython3.11/site-packages (from epubhv) (4.9.3)
Requirement already satisfied: opencc-python-reimple
mented==0.1.7 in /var/mobile/Containers/Data/Applica
tion/A3D6ABA5-6EFD-4792-9707-EA0AE3678F47/Library/li
b/python3.11/site-packages (from epubhv) (0.1.7)
Requirement already satisfied: soupsieve==2.5 in /va
r/mobile/Containers/Data/Application/A3D6ABA5-6EFD-4
792-9707-EA0AE3678F47/Library/lib/python3.11/site-packages (from typed-argument-parser==1.8.1->e
pubhv) (0.15)
Requirement already satisfied: mypy-extensions>=0.3.0 in /var/mobile/Containers/Data/Application/A3D6ABA5-6EFD-4792-9707-EA0AE3678F47/Library/lib/python3.11/site-packages (from typing-inspect>=0.7.1->typed-argument-parser==1.8.1->epubhv) (1.0.0)
Requirement already satisfied: typing-extensions>=3.7.4 in /private/var/containers/Bundle/Application/C53C589E-EB81-4638-9DF5-5656C96958CF/a-Shell-mini.app/Library/lib/python3.11/site-packages (from typing-inspect>=0.7.1->typed-argument-parser==1.8.1->epubhv) (4.8.0)
[Documents]$ pip show epubhv
Name: epubhv
Version: 0.4.1
Summary: make your epub books vertical or horizontal.
Home-page:
Author:
Author-email: yihong0618 [email protected]
License: MIT
Location: /var/mobile/Containers/Data/Application/A3D6ABA5-6EFD-4792-9707-EA0AE3678F47/Library/lib/python3.11/site-packages
Requires: beautifulsoup4, cssutils, fugashi, jieba, lxml, opencc-python-reimplemented, pypinyin, soupsieve, typed-argument-parser, unidic_lite
Required-by:
[Documents]$ epubhv 浮木.epub --h --ruby
Traceback (most recent call last):
File "/var/mobile/Containers/Data/Application/A3D6ABA5-6EFD-4792-9707-EA0AE3678F47/Library/bin/epubhv", line 5, in
from epubhv.cli import main
File "/var/mobile/Containers/Data/Application/A3D6ABA5-6EFD-4792-9707-EA0AE3678F47/Library/lib/python3.11/site-packages/epubhv/cli.py", line 5, in
from epubhv.epubhv import EPUBHV, list_all_epub_in_dir
File "/var/mobile/Containers/Data/Application/A3D6ABA5-6EFD-4792-9707-EA0AE3678F47/Library/lib/python3.11/site-packages/epubhv/epubhv.py", line 20, in
from epubhv.yomituki import RubySoup, string_con
tainers
File "/var/mobile/Containers/Data/Application/A3D6
ABA5-6EFD-4792-9707-EA0AE3678F47/Library/lib/python3
.11/site-packages/epubhv/yomituki.py", line 14, in <
module>
from fugashi import Tagger
File "/var/mobile/Containers/Data/Application/A3D6
ABA5-6EFD-4792-9707-EA0AE3678F47/Library/lib/python3
.11/site-packages/fugashi/init.py", line 1, in <
module>
from .fugashi import *
ImportError: dlopen(/private/var/containers/Bundle/A
pplication/C53C589E-EB81-4638-9DF5-5656C96958CF/a-Sh
ell-mini.app/Frameworks/python3_ios-fugashi.fugashi.
framework/python3_ios-fugashi.fugashi, 0x0002): trie
d: '/private/var/containers/Bundle/Application/C53C5
89E-EB81-4638-9DF5-5656C96958CF/a-Shell-mini.app/Fra
meworks/python3_ios-fugashi.fugashi.framework/python
3_ios-fugashi.fugashi' (errno=2), '/private/preboot/
Cryptexes/OS/private/var/containers/Bundle/Applicati
on/C53C589E-EB81-4638-9DF5-5656C96958CF/a-Shell-mini
.app/Frameworks/python3_ios-fugashi.fugashi.framewor
k/python3_ios-fugashi.fugashi' (errno=2), '/private/
var/containers/Bundle/Application/C53C589E-EB81-4638
-9DF5-5656C96958CF/a-Shell-mini.app/Frameworks/pytho
n3_ios-fugashi.fugashi.framework/python3_ios-fugashi
.fugashi' (errno=2)
测试所有命令都提示*** is to_vertical
,pip install -U 更新后问题依旧。
另外文件会延迟一些输出,让人误以为失败了,也许有个进度预期?
测试文件:仓库里的 sanguo.epub
书名包含()
或[]
等字符时无法识,返回zsh: no matches found: a[spe].epub
更复杂的情况,返回zsh: unknown file attribute: ^#
比如:
epubhv 10堂极简概率课 (【美】佩尔西·戴康尼斯, 【美】布赖恩·斯科姆斯, 胡小锐) (Z-Library).epub
epubhv 你当像鸟飞往你的山 (塔拉·韦斯特弗(Tara Westover)) (Z-Library).epub
PS C:\Users\LuQQ\Downloads\Telegram Desktop> epubhv d.epub --h --convert t2s
d.epub is to_horizontal
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in run_code
File "C:\Python311\Scripts\epubhv.exe_main.py", line 7, in
File "C:\Python311\Lib\site-packages\epubhv\cli.py", line 85, in main
e.run(method)
File "C:\Python311\Lib\site-packages\epubhv\epubhv.py", line 288, in run
self.change_epub_to_horizontal()
File "C:\Python311\Lib\site-packages\epubhv\epubhv.py", line 205, in change_epub_to_horizontal
soup = load_opf_meta_data(self.opf_file)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\epubhv\epubhv.py", line 51, in load_opf_meta_data
content = f.read()
^^^^^^^^
UnicodeDecodeError: 'gbk' codec can't decode byte 0x89 in position 267: illegal multibyte sequence
Hi @yihong0618, thanks for building this great project! As I have touched more on it, I came up with some thoughts to share with you.
Currently, the project is relatively short - only several hundreds of code. However, there is still space of improvement, especially in further separate the methods into smaller ones or into their own modules. e.g.
utility:
and
pluggable functionality module:
and
User Interface:
It can be totally decoupled from utility
and pluggable functionality module:
,
e.g.
Let me how you think about it :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.