A PyQt5 application for converting Chinese novel txt files into Kindle mobi files.
Project description
Create a simple PyQt5 application for converting Chinese txt files into mobi files. It wraps txt2mobi3. Since it supports Chinese only, the documentation and the code comments are written in Chinese.
1. 安装和运行
1.1. 从PyPI安装和运行:
$ pip install txt2mobi3_app
$ txt2mobi3_app
1.2. 从安装包:
Linux
下面以Ubuntu 16.04LTS为例:
$ sudo dpkg -i target/txt2mobi3_app.deb
MacOS
将txt2mobi3_app.dmg移动到Application中。
Windows
点击运行txt2mobi3_appSetup.exe。
2. 产生安装包
这里我们使用fbs来产生Linux、MacOS和Windows上的安装包。
2.1. Linux
下面以Ubuntu 16.04LTS为例:
$ sudo apt install ruby ruby-dev rubygems build-essential
$ sudo gem install --no-ri --no-rdoc fpm
产生安装包
$ python -m fbs installer
生成的安装包txt2mobi3_app.deb会在target目录中。
如果想产生一个可以单独运行的可执行文件,那么就运行下面这个fbs命令。
$ python -m fbs freeze
生成的可执行文件位于target/txt2mobi3_app目录中。将target/txt2mobi3_app目录复制到别的机器上后就可运行其中的可执行文件。
2.2. MacOS
以macOS Sierra 10.12.6为例:
先产生一个可以单独执行的可执行文件。
$ python -m fbs freeze
手动将默认封面图片和KindleGen程序等资源复制到包含有可执行文件的子目录txt2mobi3下。
$ cp -a src/main/resources/base/txt2mobi3/resources target/txt2mobi3_app/txt2mobi3/
$ cp -a src/main/resources/mac/txt2mobi3/resources/kindlegen/ target/txt2mobi3_app/txt2mobi3/resources/
因为fbs的一个可能bug(具体参见https://github.com/mherrmann/fbs/issues/39),所以这里我们不得不需要手动复制这些文件。
产生安装包。
$ python -m fbs installer
2.3. Windows
如果是Windows 10,你可能需要安装Windows 10 SDK。
安装NSIS并将其安装目录添加到PATH环境变量中。
产生安装包
$ python -m fbs installer
生成的安装包txt2mobi3_appSetup.exe.ext会在target目录中。
如果想产生一个可以单独运行的可执行文件,那么就运行下面这个fbs命令。
$ python -m fbs freeze
3. README.rst
README.rst is generated from README.md via pandoc.
$ pandoc --from=markdown --to=rst --output=README.rst README.md
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file txt2mobi3_app-0.2.0.tar.gz
.
File metadata
- Download URL: txt2mobi3_app-0.2.0.tar.gz
- Upload date:
- Size: 23.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.5.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f764de802805a05ff78ed928e996d7cd47345535c295d8baa92e58fc30186109 |
|
MD5 | 373e7e64f512a80002bf772da318e57d |
|
BLAKE2b-256 | 2a1709a70dee79a415807da40143fde479d6fa61254a5848c9920d340f0930fb |
File details
Details for the file txt2mobi3_app-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: txt2mobi3_app-0.2.0-py3-none-any.whl
- Upload date:
- Size: 23.9 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.5.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a0dab5adddbcbd836fd452e2b6d6afbceca4be7a34ae3867baafd628c416927 |
|
MD5 | a7d8b8b474604de69def4534674cd5ec |
|
BLAKE2b-256 | 837b431fe1501b38d35c6f150dfff32a81be9b0ac3ab0fab9af4301aabc784f1 |