Giter Site home page Giter Site logo

novel-rs / cli Goto Github PK

View Code? Open in Web Editor NEW
50.0 50.0 10.0 16.75 MB

A set of tools for downloading novels from the web, manipulating text, and generating EPUB

License: Apache License 2.0

JavaScript 0.15% Fluent 6.22% Rust 93.62%
ciweimao ciyuanji epub novel sfacg

cli's People

Contributors

alerque avatar alexiaveronica avatar dependabot[bot] avatar pre-commit-ci[bot] avatar terakomarigandesblood avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cli's Issues

登录问题

你好我有个问题,就是我之前在菠萝包下载书籍在程序中输入过账号和密码,但是之后我修改了密码,现在我下载书籍时输入账号后就会提示密码不匹配无法重新输入密码,请问如何清除掉之前的登录信息然后重新输入账号密码进行登录?谢谢

Request support txt format

Hi, first I want to thank you for new tool for downloading novels 😄

Your old tool till work great but ofcourse I would love to use your new tool too.

Hope you can support txt format like the old one.

使用问题

当我打开已经编译好的文件后程序就会闪退,是否是因为我没有安装其他库文件?

又是关于书架无法显示的事

在我输入novel-cli bookshelf -s sfacg后,程序先提示我登陆账号,我仅仅输入了账号后,程序就报错

报错内容如下
Error:
0: error decoding response body: missing field novelId at line 1 column 1484
1: missing field novelId at line 1 column 1484

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets

(账号是在旧版本登录并生成缓存的,不知道是不是这个问题)

EPUB style

当前使用pandoc生成的epub默认样式不够美观,目录结构也需要自定义调整

增加导出书评和吐槽的功能

如题,希望增加将书评、长评和章内吐槽导出的功能,可能以JSON格式导出比较合适。

另外还希望增加导出菠萝圈作者动态的功能。

It can`t get information from my favourites in ciweimao.

捕获 (with -v)
I tried to run "novel-cli.exe favorites -s ciweimao" to get information about my favorites (or bookshelf?) in ciweimao.
But it only interrupted by this error: "The novel does not exist".
I don`t know what it means. And I think the program has some bugs.
So how can I deal with it?

Weird 503 error when downloading a certain book from hbooker

When running:

novel-cli download -v -s ciweimao -f pandoc 100248572

The command exited with error:

Error: The HTTP request was unsuccessful, status code: `503 Service Unavailable`, message: `Image download failed`

I searched the source code, but couldn't find any string matching Image download failed...

On other books, the command works fine.

单元/集成测试

当前项目缺乏测试。注意一些子命令需要登录,并且多次执行。

Can't type password.

won't let me

It won't let me type anything into the password slot after typing my username, the picture above is what happens if I just press enter and the picture below is where it stops letting me type. Pls help.

password

[Bug]cannot get bookshelf from sfacg

似乎是小说类型不支持缺失导致的
Log:

PS C:\Users\lubor\Desktop\novel-cli> .\novel-cli.exe bookshelf -s sfacg
✔ 请输入用户名 · 139****9246
✔ 请输入密码 · ********
Error:
   0: error decoding response body: unknown variant `chatNovels`, expected one of `albums`, `comics`, `novels` at line 1 column 5115
   1: unknown variant `chatNovels`, expected one of `albums`, `comics`, `novels` at line 1 column 5115

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
PS C:\Users\lubor\Desktop\novel-cli> .\novel-cli.exe bookshelf -s sfacg
Error:
   0: error decoding response body: unknown variant `chatNovels`, expected one of `albums`, `comics`, `novels` at line 1 column 5115
   1: unknown variant `chatNovels`, expected one of `albums`, `comics`, `novels` at line 1 column 5115

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.

Novels that have been taken off the shelves cannot be downloaded

As per the question. If the novel is taken off the shelves, it will prompt "cannot be found". This issue should be related to the API used by the author. If it cannot be solved, I can provide a method, but I don't want many people to know. (Also, is the author Chinese? If so, we can communicate directly in Chinese.)

关于build构建生成的epub文件bug

image
image
image
第二步build之后生成的文件夹内,使用edge浏览器打开html文件,是正常的epub文件一样,但是用zip打包之后,epub阅读软件都不能正常打开。
image
image

Support for ciyuanji

Since some novels only available on ciyuanji app I hope in the future you can support ciyuanji

Or if you know there is anyway can download from ciyuanji can you tell me :D

There is a userscript can use to download but can only work on the web, the novels I'm following only appear on app T_T

Capturing sfacg Sign-in Bonus Network Packets

I'm trying to capture network requests for the sfacg sign-in bonus and keep hitting a snag: the app disconnects from the internet when I run packet capture tools on both Android and iOS( On Android, there’s an SSL certificate error when using packet capture tools. On the iPhone, capturing leads to a no network error.). Could you shed some light on how to capture these packets successfully?
If direct advice isn't possible, would you consider providing an API interface for the sign-in bonus feature?
image

Base64Error

[kinare@kinare Novel]$ ./novel-cli download -s sfacg -f pandoc 166787
Error: 
   0: Base64Error

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.

cargo test --test download version: 0.5.0
test.txt

environment:

OS: Arch Linux x86_64
Kernel: 6.4.7-arch1-2
Shell: bash 5.1.16

Tool does not support http images.

When running this command:

novel-cli download -s sfacg -f pandoc 44433

The download was interrupted by this error:

🚚 开始下载小说:这不是我想要的约会
⠄ [00:00:01] [#######################################################################################################################>-------------------------------------]     162/212     07 或守线 3rd day(中)                    (0.3s)
 WARN novel_api::sfacg: Image insertion format is incorrect: [img=700,393]http://rs.sfacg.com/web/novel/images/UploadPic/2016/08/7755920e-f422-4fd7-98cf-e12562ff9f06.jpg[/img], in function `novel_api::sfacg::SfacgClient::parser_image_url`, at `~/.cargo/registry/src/github.com-1ecc6299db9ec823/novel-api-0.2.0/src/sfacg/mod.rs:723:23`
 WARN novel_cli::cmd::download: There are chapters that cannot be downloaded

Relevant function:

713 impl SfacgClient {
714     fn parser_image_url(line: &str) -> Result<Url, Error> {
715         let begin = line.find("https");
716         let end = line.find("[/img]");
717
718         let begin = begin
719             .ok_or(Error::NovelApi(format!(
720                 "Image insertion format is incorrect: {}",
721                 line
722             )))
723             .location(here!())?;
724         let end = end
725             .ok_or(Error::NovelApi(format!(
726                 "Image insertion format is incorrect: {}",
727                 line
728             )))
729             .location(here!())?;
730
731         let url = line
732             .chars()
733             .skip(begin)
734             .take(end - begin)
735             .collect::<String>()
736             .trim()
737             .to_string();
738
739         Ok(Url::parse(&url).location(here!())?)
740     }
741 }

Can't compile with pandoc on windows?

When I execute the following command on Windows:

novel-cli download -s ciweimao 100334561
novel-cli -v build 赛马娘,开始摆烂.md

The program failed with the message:

⁨> ⁩ 开始构建 ⁨pandoc⁩ 格式输出
pandoc: images.webp: openBinaryFile: does not exist (No such file or directory)
�[32m INFO�[0m �[2mnovel_cli::cmd::build�[0m�[2m:�[0m Time spent on `pandoc build`: 4289ms
⁨> ⁩ 小说构建完成
�[32m INFO�[0m �[2mnovel_cli�[0m�[2m:�[0m Current physical memory usage: 13.6 MB

(The command claimed that it succeeded, but no ePUB file is produced)

To better illustrate the point, the command

pandoc 赛马娘,开始摆烂.md -o 赛马娘,开始摆烂.epub

failed with

pandoc.exe: images.webp: openBinaryFile: does not exist (No such file or directory)

and no ePUB file is produced.

However, after I changed all occurrences of \ to / in 赛马娘,开始摆烂.md, the command worked. Possibly because pandoc unstood backslash \ incorrectly? If this is the case, perhaps the download command should be changed?

登陆时崩溃

[kinare@kinare Novel]$ novel-cli download --source sfacg --format mdbook [novel_id]
Username: [user_name]
thread 'main' panicked at 'Cannot start a runtime from within a runtime. This happens because a function (like `block_on`) attempted to block the current thread while the thread is being used to drive asynchronous tasks.', /home/kinare/.cargo/registry/src/github.com-1ecc6299db9ec823/zbus-3.12.0/src/utils.rs:47:14
已放弃 (核心已转储)

没有在其它用户环境测试
版本信息:

[kinare@kinare Novel]$ novel-cli --version
novel-cli 0.2.1
Executable path: /home/kinare/.cargo/bin/novel-cli
Config directory: /home/kinare/.config/some-source
Data directory: /home/kinare/.local/share/some-source

Problem building crate on sqlx dependency

I've been trying to setup proper Arch Linux packaging for this and am having trouble building it in a clean chroot. I get stuck on this error:

<truncated>
   Compiling opencc-rs v0.3.0
   Compiling sea-schema v0.11.0
   Compiling trust-dns-resolver v0.22.0
   Compiling hyper v0.14.26
   Compiling sqlx v0.6.3
error: /build/novel-cli/src/cli-0.3.1/target/release/deps/libsqlx_macros-a6d2a8db0bd21b7c.so: undefined symbol: sqlite3_unlock_notify
  --> /build/.cargo/registry/src/github.com-1ecc6299db9ec823/sqlx-0.6.3/src/lib.rs:77:9
   |
77 | pub use sqlx_macros::test;
   |         ^^^^^^^^^^^

error: could not compile `sqlx` due to previous error
warning: build failed, waiting for other jobs to finish...

This is with Rust 1.69.0, and the chroot I'm working in has clang and cmake available in addition to the stuff in Arch's base-devel group that covers a lot of generic build tooling. As far as I can tell from both this project and sqlx this should be sufficient. I've messed around with feature flags, using or not using --frozen, having sqlite available in the chroot, and more. So far I can't figure out what is causing this. Any ideas?

部分小说epub生成失败

平台windows-x64
在把cover.webp移动至主文件夹并改名images.webp后可以使用novel-cli build生成小说(如:女儿心-sfacg-id:247674)
但部分小说无法生成(如血姬与骑士-sfacg-id:155640)
屏幕截图 2023-04-28 093335

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.