Commit graph

29 commits

Author SHA1 Message Date
Kenneth Gitere
d4a23088a9 test: add cli tests 2021-08-24 07:20:23 +03:00
Kenneth Gitere
9c2232e37f fix: add validation when passing inline-images flag 2021-07-27 18:38:01 +03:00
Kenneth Gitere
eac28da798 fix: add validation when passing --inline-toc
feat: add coloring when displaying CLI errors
2021-07-24 12:36:33 +03:00
Kenneth Gitere
2f4da824ba feat: add HTML exports with inlining of images
fix: typo fix
refactor: refactor `add_stylesheets` function
2021-07-24 12:08:18 +03:00
Kenneth Gitere
d1d1a0f3f4 feat: add no-css and no-header-css flags for #19
refactor: change to yaml configuration for the CLI

refactor: change all flags to kebab case
2021-07-22 08:50:08 +03:00
Kenneth Gitere
92c97ca2cf fix: add .epub extension as fallback
chore: update dependencies and update README
chore: bump version
2021-06-24 08:26:40 +03:00
Kenneth Gitere
754365a42a feat: add inline-toc flag 2021-06-17 17:32:53 +03:00
Kenneth Gitere
282d229754 fix: fix ordering issue with merged articles
This commit adds the itertools crate which is used to dedup the Vec
when downloading urls

fix: fix error message
feat: change the serif and mono fonts declarations
2021-06-11 14:21:41 +03:00
Kenneth Gitere
d50bbdfb58 fix: minor fixes
- restore default debug level when logging to file
- return early from generating epubs if there are no articles
- fix serialization bug in creating attributes
2021-06-09 07:26:52 +03:00
Kenneth Gitere
5fbfb9c806 refactor: move download function to http module
feat:  add rendering of table for partial downloads
feat:  add help message for enabling --log-to-file
chore: format flags to kebab-case and shorten --output-directory flag
2021-06-08 07:58:52 +03:00
Mikhail Gorbachev
aa9258e122 Fix from PR#15
- refactor comments
- move `cli::Error` to `errors::ErrorCli`
- removed mixing of order of input urls
- move pure functionality if `init_logger` to clear function
2021-06-06 13:25:28 +03:00
Mikhail Gorbachev
13ad14e73d Add output_dir to cli argument
- Add `output_dir` to cli argument
    - This argument allows you to save output files in a special folder, not just current dir
- Refactor 'cli.rs'
    - Add `Builder` for `AppConfig`
    - Add `Error` instead separated panics
- Upgrade dependencies
2021-06-01 18:18:14 +03:00
Kenneth Gitere
4fd71311a1 Fix bug when validating the download file name in merged mode 2021-04-30 07:47:25 +03:00
Kenneth Gitere
cae9227ab0 Update documentation 2021-04-30 06:55:02 +03:00
Kenneth Gitere
c00582ac29 Fix verbosity levels ordering 2021-04-30 06:42:08 +03:00
Kenneth Gitere
ae52cc4e13 Add features for logging and cli
- display of partial downloads in the summary
- custom file name that is displayed after the summary ensuring it is visible
- log-to-file flag which specifies that logs will be sent to the default directory
- verbose flag (v) used to configure the log levels
- disabling the progress bars when logging to the terminal is active
2021-04-29 20:02:08 +03:00
Kenneth Gitere
088699b2c3 Add debug flag 2021-04-24 15:50:43 +03:00
Kenneth Gitere
217cd3e442 Minor refactor
Change cli to grab version from the Cargo manifest
Rename fetch_url to fetch_html
2021-04-17 12:37:53 +03:00
Kenneth Gitere
165b2187be Bump version 2021-02-24 13:03:52 +03:00
Kenneth Gitere
912bc9d915 Add flag for configuring maximum concurrent requests
Change printing macro for error messages to go out to stderr
2021-02-21 13:11:26 +03:00
Kenneth Gitere
b0c4c47413 Add support for merging articles into a single epub
This is still experimental as it lacks validation of the target file name
2021-02-11 13:51:21 +03:00
Kenneth Gitere
003953332f Refactor downloading of HTML pages
This change allows for parallel downloads of HTML pages upto a maximum
number of concurrent HTTP requests which is more efficient than
before where all HTTP requests are likely to begin at the same time.
2021-02-06 17:06:03 +03:00
Kenneth Gitere
b402472ba6 Add http and epub modules 2021-02-06 12:59:03 +03:00
Kenneth Gitere
3d56023592 Add -f flag for adding links from a file instead of needing to use cat 2021-02-01 11:31:24 +03:00
Kenneth Gitere
b98c0a69a6 Bump version 2021-01-24 17:54:33 +03:00
Kenneth Gitere
8407c613df Bug fixes
- Prevent downloading images with base64 strings as the source
- Add escaping of quotation characters in the serializer
- Disable redirects when downloading images which fails on multiple sites
- Remove invalid characters for making the epub export file name
- Fix version number in release
2020-12-24 14:03:36 +03:00
Kenneth Gitere
37cb4e1fd2 Change from structopt to clap
This allows printing the help message if no args are passed
2020-11-24 09:58:50 +03:00
Kenneth Gitere
1b4c4ee658 Change CLI option to allow for multiple arguments
Add basic looping in async runtime
2020-10-22 15:22:56 +03:00
Kenneth Gitere
9f56c58dd9 Add simple CLI wrapper 2020-05-16 10:09:44 +03:00