mirror of
https://gh.wpcy.net/https://github.com/bohdanbobrowski/blog2epub.git
synced 2026-04-25 17:48:27 +08:00
143 lines
4.6 KiB
Markdown
Executable file
143 lines
4.6 KiB
Markdown
Executable file
<p align="center">
|
|
<img src="./assets/blog2epub_256px.png" width="256" height="256" />
|
|
</p>
|
|
|
|
# blog2epub
|
|
|
|
[](https://github.com/bohdanbobrowski/blog2epub/graphs/commit-activity) [](https://lbesson.mit-license.org/)   
|
|
|
|
Convert blog to epub using command line or GUI.
|
|
|
|
### Supported blogs:
|
|
- *.blogspot.com
|
|
- *.wordpress.com and some blogs based on WordPress
|
|
|
|
### Main features
|
|
|
|
- command line (CLI) and graphic user interface (GUI)
|
|
- script downloads all text contents of selected blog to epub file,
|
|
- if it's possible, it includes post comments,
|
|
- images are downsized (to maximum 800/600px) and converted to grayscale,
|
|
- one post = one epub chapter,
|
|
- chapters are sorted by date ascending,
|
|
- cover is generated automatically from downloaded images.
|
|
|
|
### Example covers
|
|
|
|
<table style="width:100%;text-align:center;"><tr><td>
|
|
<img src="assets/v1.3.0/knippsen.blogspot.com_2023.04.01-2024.05.20.epub.jpg" width="400" style="margin:0 10px 10px 0" />
|
|
</td><td>
|
|
<img src="assets/v1.3.0/rocket-garage.blogspot.com_2024.01.21-2024.06.16.epub.jpg" width="400" style="margin:0 10px 10px 0" />
|
|
</td></tr><tr><td>
|
|
<img src="assets/v1.3.0/starybezpiek.blogspot.com_2014.11.04-2015.12.15.epub.jpg" width="400" style="margin:0 10px 10px 0" />
|
|
</td><td>
|
|
<img src="assets/v1.3.0/velosov.blogspot.com_2013.02.02-2013.03.10.epub.jpg" width="400" style="margin:0 10px 10px 0;" />
|
|
</td></tr></table>
|
|
|
|
## Installation
|
|
|
|
Checkout for latest available [builds](https://github.com/bohdanbobrowski/blog2epub/releases).
|
|
|
|
### Running from sources
|
|
|
|
git clone git@github.com:bohdanbobrowski/blog2epub.git
|
|
cd blog2epub
|
|
poetry install
|
|
poetry run blog2epubgui
|
|
|
|
### Building own executable
|
|
|
|
#### Windows
|
|
|
|
poetry run build_gui_windows
|
|
|
|
#### macOS
|
|
|
|
poetry run build_gui_macos
|
|
|
|
And then to create dmg image with app:
|
|
|
|
./make_macos_dmg.sh
|
|
|
|
#### Android
|
|
|
|
Before you start, you'll need to install buildozer following this [installation documentation](https://buildozer.readthedocs.io/en/latest/installation.html).
|
|
|
|
poetry shell
|
|
buildozer -v android
|
|
|
|
## Screenshots of GUI
|
|
|
|
### Android (Google Pixel 6a)
|
|
|
|
<p align="center">
|
|
<img src="assets/v1.4.0/blog2pub_android_pixel6a_screenshot1.png" width="200px" />
|
|
<img src="assets/v1.4.0/blog2pub_android_pixel6a_screenshot2.png" width="200px" />
|
|
<img src="assets/v1.4.0/blog2pub_android_pixel6a_screenshot3.png" width="200px" />
|
|
<img src="assets/v1.4.0/blog2pub_android_pixel6a_screenshot4.png" width="200px" />
|
|
</p>
|
|
|
|
### Windows (11)
|
|
|
|
<p align="center">
|
|
<img src="assets/v1.4.0/blog2epub_win11_screenshot.png" width="600px" />
|
|
</p>
|
|
|
|
### Linux (Manjaro Gnome)
|
|
|
|
<p align="center">
|
|
<img src="assets/v1.3.0/blog2epub_linux_screenshot.png" width="600px" />
|
|
</p>
|
|
|
|
### macOS (Sonoma 14.4.1)
|
|
|
|
<p align="center">
|
|
<img src="assets/v1.3.0/blog2epub_macos_screenshot.png" width="600px" />
|
|
</p>
|
|
|
|
## CLI
|
|
|
|
poetry run blog2epub [blog url] <parameters>
|
|
|
|
### Parameters
|
|
|
|
-l/--limit=[x] - limit epub file to x posts
|
|
-s/--skip=[x] - skip x latest posts
|
|
-q/--images-quality=[0-100] - included images quality (default is 40)
|
|
-n/--no-images - don't include images
|
|
|
|
## Examples
|
|
|
|
poetry run blog2epub starybezpiek.blogspot.com
|
|
poetry run blog2epub velosov.blogspot.com -l=10
|
|
poetry run blog2epub poznanskiehistorie.blogspot.com -q=100
|
|
poetry run blog2epub classicameras.blogspot.com --limit=10 --no-images
|
|
|
|
## Running tests
|
|
|
|
pytest ./tests
|
|
pytest --cov=blog2epub ./tests
|
|
pytest --cov=blog2epub --cov-report=html ./tests
|
|
|
|
|
|
## Current version
|
|
|
|
### [v1.4.0](https://github.com/bohdanbobrowski/blog2epub/releases/tag/v1.4.0)
|
|
- [X] custom destination folder
|
|
- [X] UI improvements (better scaling, more rely on KivyMD default features)
|
|
- [X] mypy and ruff pipeline job (via github Actions)
|
|
- [X] Android build
|
|
- [X] begin unit testing
|
|
- [X] crawlers refactor - some part is done
|
|
|
|
[» Complete Change Log here «](https://github.com/bohdanbobrowski/blog2epub/blob/master/CHANGELOG.md)
|
|
|
|
## Project backlog
|
|
|
|
And finally, a list known bugs and future plans for some new functions and enhancements: [BACKLOG.md](https://github.com/bohdanbobrowski/blog2epub/blob/master/BACKLOG.md)
|
|
|
|
|
|
## Project road map:
|
|
|
|
- 1.0 - somewhat working
|
|
- 2.0 - fully working project, 90% unit tested and available builds for Android/Windows/Linux/MacOS
|