Skip to content

Commit

Permalink
Test init (#96)
Browse files Browse the repository at this point in the history
* Test init

* Improve error message

* Update dependencies

* Clean up configure

* Add init args

* Fix test

* Update changelog

* Fix unused import

* Add documentation
  • Loading branch information
quambene authored Dec 21, 2024
1 parent dcda6be commit 6a359c9
Show file tree
Hide file tree
Showing 7 changed files with 109 additions and 97 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
- Fix `bogrep init` for empty folders
- Fix `--replace` for `bogrep fetch --urls <URLs>`
- Fix line breaks in text for paragraphs from HTML
- added
- Add `InitArgs` to `init()`

### v0.10.0

Expand Down
127 changes: 51 additions & 76 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub struct Args {
#[derive(Subcommand, Debug)]
pub enum Subcommands {
/// Initialize the source files to import the bookmarks.
Init,
Init(InitArgs),
/// Configure the settings.
Config(ConfigArgs),
/// Synchronize source and target bookmarks. Fetch and cache websites for
Expand All @@ -47,6 +47,14 @@ pub enum Subcommands {
Remove(RemoveArgs),
}

/// Describes the arguments for the `init` subcommand.
#[derive(ClapArgs, Debug)]
pub struct InitArgs {
/// Run command in dry mode.
#[arg(short = 'n', long = "dry-run")]
pub dry_run: bool,
}

/// Describes the arguments for the `config` subcommand.
#[derive(ClapArgs, Debug)]
pub struct ConfigArgs {
Expand Down
Loading

0 comments on commit 6a359c9

Please sign in to comment.