Skip to content

Commit

Permalink
doc: adapt README to crates.io
Browse files Browse the repository at this point in the history
At this moment bmap-rs and bmap-parser share the same README. This is
problematic because in crates.io once published bmap-parser contains
references to bmap-rs while if should be independent from it.

Fix the original README file.
Add a new README file for bmap-parser.

Signed-off-by: Rafael Garcia Ruiz <[email protected]>
  • Loading branch information
Razaloc committed Dec 19, 2022
1 parent fd8700e commit 102b612
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 4 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,25 @@ The bmap-rs project aims to implement tools related to bmap. The project is writ
rust. The inspiration for it is an existing project that is written in python called
[bmap-tools](https://salsa.debian.org/debian/bmap-tools).

Right now the implemented function is copying system images files using bmap, which is
safer and faster than regular cp ro dd. That can be used to flash images into block
Right now, the implemented function is copying system images files using bmap, which is
safer and faster than regular cp or dd. That can be used to flash images into block
devices.

## Installation
```
cargo install bmap-rs
```

## Usage
bmap-rs supports 1 subcommand:
- "copy" - copy a file to another file using a bmap file.
```bash
bmap-rs copy <SOURCE_PATH> <TARGET_PATH>
bmap-rs copy <SOURCE_PATH>/<SOURCE_URL> <TARGET_PATH>
```

The bmap file is automatically searched in the source directory. The recommendation is
to name it as the source but with bmap extension.
If the file is remote, the bmap is also searched remotely.

## License
bmap-rs is licensed under dual Apache-2.0 and MIT licenses.
2 changes: 1 addition & 1 deletion bmap-parser/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2018"
license = "MIT AND Apache-2.0"
description = "bmap-parser is a library for Rust that allows you to copy files or flash block devices safely"
repository = "https://github.com/collabora/bmap-rs"
readme = "../README.md"
readme = "README.md"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
18 changes: 18 additions & 0 deletions bmap-parser/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# bmap-parser

The bmap-parser crate aims to implement tools related to bmap. The inspiration for it
is an existing project that is written in python called [bmap-tools](https://salsa.debian.org/debian/bmap-tools).

Right now, the implemented function is copying system images files using bmap, which is
safer and faster than regular cp or dd. That can be used to flash images into block
devices.

## Usage
```
use bmap-parser::*;
```
There is a `copy` function that uses bmap file as reference, and a `copy_async` for the
process to work in an asynchronous context.

## License
bmap-rs is licensed under dual Apache-2.0 and MIT licenses.

0 comments on commit 102b612

Please sign in to comment.