3 releases
0.1.3 | Sep 26, 2024 |
---|---|
0.1.2 | Sep 24, 2024 |
0.1.1 | Sep 24, 2024 |
#161 in Text processing
93 downloads per month
29KB
219 lines
nvl-cli
nvl-cli
is mainly a program to store local copies of online webnovels.
Chapters of these novels are stored on disk for later perusing. The main use case for this is to be able to read them without an active and persistent Internet connection.
It supports multiple webnovel sources, such as RoyalRoad, FreeWebNovel and LibRead. Support for these backends is
provided by libwebnovel
.
It also has been built in the idea of not trusting the source: chapters may be revised (which is good!) or deleted outright (which is less good for the reader, better for the author), for instance in the case of a publishing deal.
There are already quite a few similar efforts made by people worldwide (including me! That's not my first attempt at solving the offline reading issue), but I have often been disappointed, whether due to a lack of documentation, difficulty in adapting the code, or missing features.
Installation
From releases
You can have a look at the release page and grab the corresponding binary for your platform.
With cargo
$ cargo install nvl-cli
<trucated_output>
$ nvl --help
A program to download webnovels
Usage: nvl <COMMAND>
Commands:
update Update all novels with their new chapters, downloading them as necessary
add Add a novel to be watched
list List all currently watched novels
delete Delete a novel from watch list
self-update Attempts to update itself if a new version is available
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
Usage
Add some novels to follow:
$ nvl add https://www.royalroad.com/fiction/21220/mother-of-learning
Then periodically call nvl update
(either by hand or a scheduled task by your OS):
$ nvl update
The chapter files are in your $XDG_DATA_DIR
, for instance $HOME/.local/share
on many linuxes.
EPUB generation is planned, as well as a simple way to read the chapters in your browser.
TODO
- implement CRUD for novel list:
- add novel
- delete novel
- list novels
- improve CLI interface, for instance with colors.
- download images for the chapters/novels. Most of these novels have at least a cover image.
- handle chapter collisions, where a chapter may be changed and/or deleted. Print a pretty diff & let the user decide whether to update those chapters.
- add ebook generation
- add the ability to open the system's web browser to read chapters:
- open a chapter from CLI
- open a webui with an iframe wrapping the chapter and buttons enabling chapter browsing
- provide self-update
- provide OS packages
I also have the kinda stupid dream of making a TUI with ratatui
to add, list, delete novels and
read chapters.
Dependencies
~25–40MB
~644K SLoC