Skip to content

Commit

Permalink
Release 0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
antangelo committed Apr 22, 2023
1 parent 8ed40be commit 20237f3
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ members = [

[workspace.package]
license = "MIT"
version = "0.2.0"
version = "0.4.0"
edition = "2021"
repository = "https://github.com/antangelo/xdvdfs"
homepage = "https://github.com/antangelo/xdvdfs"
Expand Down
31 changes: 30 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,43 @@ Commands:
ls List files in an image
tree List all files in an image, recursively
md5 Show MD5 checksums for files in an image
unpack Unpack an entire image to a directory
info Print information about image metadata
unpack Unpack an entire image to a directory
pack Pack an image from a given directory
help Print this message or the help of the given subcommand(s)
```

Running a subcommand with the `-h` flag will show help information for that specific subcommand.

#### Packing an Image

To pack an image from a directory, run:

```sh
$ xdvdfs pack <directory> [optional output path]
```

This will create an iso that matches 1-to-1 with the input directory.

#### Unpacking

To unpack an image, run:

```sh
$ xdvdfs unpack <path to image> [optional output path]
```

#### Other Utilities

`xdvdfs-cli` supports additional utility tools for use with images.

| Command | Action |
| - | - |
| `xdvsfs ls <path to image> [path within image]` | Lists files within the specified directory, defaulting to root |
| `xdvdfs tree <path to image>` | Prints a listing of every file within the image |
| `xdvdfs md5 <path to image> [optional path to file within image]` | Prints md5 sums for specified files, or every file, within the image |
| `xdvdfs info <path to image> [path within image]` | Prints metadata info for the specified directory entry, or root volume |

## xdvdfs-core

`xdvdfs-core` is a library for working with XDVDFS metadata.
Expand Down
2 changes: 1 addition & 1 deletion xdvdfs-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ homepage.workspace = true
exclude = ["**/*.iso", "**/*.xiso"]

[dependencies]
xdvdfs = { path = "../xdvdfs-core", version = "0.2.0" }
xdvdfs = { path = "../xdvdfs-core", version = "0.4.0" }
clap = { version = "4.2.1", features = ["derive"] }
md-5 = { version = "0.10.5", default-features = false }

Expand Down
31 changes: 30 additions & 1 deletion xdvdfs-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,39 @@ Commands:
ls List files in an image
tree List all files in an image, recursively
md5 Show MD5 checksums for files in an image
unpack Unpack an entire image to a directory
info Print information about image metadata
unpack Unpack an entire image to a directory
pack Pack an image from a given directory
help Print this message or the help of the given subcommand(s)
```

Running a subcommand with the `-h` flag will show help information for that specific subcommand.

#### Packing an Image

To pack an image from a directory, run:

```sh
$ xdvdfs pack <directory> [optional output path]
```

This will create an iso that matches 1-to-1 with the input directory.

#### Unpacking

To unpack an image, run:

```sh
$ xdvdfs unpack <path to image> [optional output path]
```

#### Other Utilities

`xdvdfs-cli` supports additional utility tools for use with images.

| Command | Action |
| - | - |
| `xdvsfs ls <path to image> [path within image]` | Lists files within the specified directory, defaulting to root |
| `xdvdfs tree <path to image>` | Prints a listing of every file within the image |
| `xdvdfs md5 <path to image> [optional path to file within image]` | Prints md5 sums for specified files, or every file, within the image |
| `xdvdfs info <path to image> [path within image]` | Prints metadata info for the specified directory entry, or root volume |
4 changes: 2 additions & 2 deletions xdvdfs-core/src/write/img.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ pub fn create_xdvdfs_image<H: BlockDeviceWrite<E>, E>(
as usize;
let padding_len = 2048 - file_len % 2048;
if padding_len < 2048 {
let padding = vec![0; padding_len];
let padding = vec![0x00; padding_len];
BlockDeviceWrite::write(
image,
entry.sector * layout::SECTOR_SIZE + file_len,
Expand All @@ -150,7 +150,7 @@ pub fn create_xdvdfs_image<H: BlockDeviceWrite<E>, E>(
let len = BlockDeviceWrite::len(image)? as usize;
if len % (32 * 2048) > 0 {
let padding = (32 * 2048) - len % (32 * 2048);
let padding = vec![0xff; padding];
let padding = vec![0x00; padding];
BlockDeviceWrite::write(image, len, &padding)?;
}

Expand Down

0 comments on commit 20237f3

Please sign in to comment.