Skip to content

Commit

Permalink
Elaborate on usage in README
Browse files Browse the repository at this point in the history
  • Loading branch information
spotlightishere committed Aug 28, 2023
1 parent 32b6022 commit 32c813f
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 7 deletions.
32 changes: 30 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,35 @@
# silverutil
A utility to read (and, eventually, modify!) the contents of SilverDB files from iPods.
A utility to read and modify the contents of SilverDB files within iPod firmware. Tested on 5th, 6th, and 7th generation iPod nanos.

Tested on 5th, 6th, and 7th generation iPod nanos.
## Usage
For up-to-date information, run `silverutil -h`:
```
Usage: silverutil <COMMAND>
Commands:
extract Extracts sections within database into a YAML representation
info Displays information about contents present within sections
create Creates a database from a YAML representation
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
```

Each section is transformed to a separate YAML file. An example of a such a representation is as follows, from the section `StrT` (named `StrT.yaml`):
```yaml
magic: StrT
is_sequential: 1
resources:
- id: 1
contents: !String orientation.landscape
- id: 2
contents: !String orientation.alt
# [... continues ...]
```

The special file `metadata.yaml` is used to preserve the order of sections.

## Format
Within the external `rsrc` ("iPod Resources") filesystem, UI translations and date/time locale can be found in `SilverDB.xx_XX.LE.bin`), along with bitmap images in `SilverImagesDB.LE.bin`.
Expand Down
7 changes: 2 additions & 5 deletions src/cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ mod marshal;
#[command(author, version, about, long_about = None)]
struct Cli {
#[command(subcommand)]
command: Option<Subcommands>,
command: Subcommands,
}

#[derive(Subcommand)]
Expand All @@ -35,10 +35,7 @@ enum Subcommands {

fn main() {
let cli = Cli::parse();
// We should not have optional subcommands.
let subcommand = cli.command.unwrap();

match subcommand {
match cli.command {
Subcommands::Extract {
database_path,
output_dir,
Expand Down

0 comments on commit 32c813f

Please sign in to comment.