update metadata & readme

- fix some typos
- format
This commit is contained in:
qwjyh 2024-03-18 08:58:33 +09:00
parent 1794b8b409
commit 0e6256b74f
3 changed files with 13 additions and 5 deletions

View file

@ -3,10 +3,12 @@ name = "xdbm"
version = "0.1.0" version = "0.1.0"
authors = ["qwjyh <urataw421@gmail.com>"] authors = ["qwjyh <urataw421@gmail.com>"]
edition = "2021" 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" homepage = "https://github.com/qwjyh/xdbm"
repository = "https://github.com/qwjyh/xdbm" repository = "https://github.com/qwjyh/xdbm"
license = "MIT OR Apache-1.0" 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 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View file

@ -1,6 +1,6 @@
# xdbm # xdbm
_Cross device backup manager_, _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 ## Usage
1. `xdbm init` to setup new device(i.e. PC). 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. 4. `xdbm backup done` to tell xdbm to write backup execution datetime.
5. `xdbm storage list` and `xdbm backup list` to see their status. 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 <SHELL>` to generate completion scripts for shells.
- Give `--help` to see helps on the commands.
## TODO: ## TODO:
- [x] split subcommands to functions - [x] split subcommands to functions
- [x] write test for init subcommand - [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] check that all parents exist
- [x] reorganize cmd option for storage - [x] reorganize cmd option for storage
- [x] use subcommand - [x] use subcommand
- [ ] backup subcommands - [x] backup subcommands
- [x] backup add - [x] backup add
- [x] test for backup add - [x] test for backup add
- [x] backup list - [x] backup list
- [x] status printing - [x] status printing
- [x] backup done - [x] backup done
- [ ] fancy display - [ ] fancy display
- [ ] json output
- [ ] no commit option - [ ] no commit option
<!-- vim: set sw=2 ts=2: --> <!-- vim: set sw=2 ts=2: -->

View file

@ -1,7 +1,7 @@
use std::{ use std::{
collections::HashMap, collections::HashMap,
io::{self, stdout, Write}, io::{self, stdout, Write},
path::{PathBuf, Path}, path::{Path, PathBuf},
}; };
use anyhow::{anyhow, Context, Ok, Result}; use anyhow::{anyhow, Context, Ok, Result};
@ -297,7 +297,7 @@ mod test {
storages.add(storage2)?; storages.add(storage2)?;
let cmd = BackupAddCommands::External { let cmd = BackupAddCommands::External {
name: "sampple_backup".to_string(), 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( let backup = new_backup(
"new backup".to_string(), "new backup".to_string(),