From 0e6256b74fc6cf80447f05acb0f68d9a31e004a6 Mon Sep 17 00:00:00 2001 From: qwjyh Date: Mon, 18 Mar 2024 08:58:33 +0900 Subject: [PATCH] update metadata & readme - fix some typos - format --- Cargo.toml | 4 +++- README.md | 10 ++++++++-- src/cmd_backup.rs | 4 ++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 98cbdb4..bee6887 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,10 +3,12 @@ name = "xdbm" version = "0.1.0" authors = ["qwjyh "] edition = "2021" -description = "Cross device backup manager, to manage backups on several storages mounted on multiple devices." +description = "Cross device backup manager, which manages backups on several storages mounted on multiple devices." +readme = "README.md" homepage = "https://github.com/qwjyh/xdbm" repository = "https://github.com/qwjyh/xdbm" license = "MIT OR Apache-1.0" +keywords = ["cli", "backup"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/README.md b/README.md index dc0ca53..15010ee 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # xdbm _Cross device backup manager_, -to manage backups on several storages mounted on multiple devices with a single repository. +which manages backups on several storages mounted on multiple devices with a single repository. ## Usage 1. `xdbm init` to setup new device(i.e. PC). @@ -9,6 +9,11 @@ to manage backups on several storages mounted on multiple devices with a single 4. `xdbm backup done` to tell xdbm to write backup execution datetime. 5. `xdbm storage list` and `xdbm backup list` to see their status. +### Hints +- `xdbm path` to see the path of repository. Use `git` to sync it among the devices. +- `xdbm completion ` to generate completion scripts for shells. +- Give `--help` to see helps on the commands. + ## TODO: - [x] split subcommands to functions - [x] write test for init subcommand @@ -27,13 +32,14 @@ to manage backups on several storages mounted on multiple devices with a single - [x] check that all parents exist - [x] reorganize cmd option for storage - [x] use subcommand -- [ ] backup subcommands +- [x] backup subcommands - [x] backup add - [x] test for backup add - [x] backup list - [x] status printing - [x] backup done - [ ] fancy display +- [ ] json output - [ ] no commit option diff --git a/src/cmd_backup.rs b/src/cmd_backup.rs index 020afd5..90c909f 100644 --- a/src/cmd_backup.rs +++ b/src/cmd_backup.rs @@ -1,7 +1,7 @@ use std::{ collections::HashMap, io::{self, stdout, Write}, - path::{PathBuf, Path}, + path::{Path, PathBuf}, }; use anyhow::{anyhow, Context, Ok, Result}; @@ -297,7 +297,7 @@ mod test { storages.add(storage2)?; let cmd = BackupAddCommands::External { name: "sampple_backup".to_string(), - note: "This is jus.to_string()t for test.".to_string(), + note: "This is just for test.".to_string(), }; let backup = new_backup( "new backup".to_string(),