Skip to content

massivebird/arcstat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

arcstat

short for "archive stats"

My command line utility for analyzing video game archives!

🦀 written in Rust

What does arcstat do?

Arcstat provides a summary of each game system in your archive, which includes per system:

  • Number of games
  • Cumulative storage size

What is a valid video game archive?

A valid archive file system structure should follow these general rules:

  • Contains a config.yaml in the archive root (see: Customization)
  • Immediate root subdirectories represent individual game systems
  • Files in system directories represent individual games
    • These games can be either be files or directories

Here is an example of a valid archive structure:

/game/archive/root
├── ds
│   ├── game-1.nds
│   ├── game-2.nds
│   └── game-3.nds
├── wii
│   ├── game-1-dir
│   │   └── game-1-0.wbfs
│   └── game-2-dir
│       ├── game-2-0.wbfs
│       └── game-2-1.wbfs
└── config.yaml

Tip

While it is possible to place system directories multiple levels below the archive root (such as in root/systems/consoles/ps2), I do not recommend nesting system directories. This may generate undesirable results.

Building

To manually build the project, you must first install Rust.

Once you have Rust installed, run the following commands:

git clone https://github.com/massivebird/arcstat
cd arcstat
cargo run # runs unoptimized build

Adding arcstat to your PATH

If you want to add arcstat to your PATH, I recommend building it in release mode for better optimization.

cd arcstat
# build release mode
cargo build --release
# add arcstat to your PATH
ln -rs ./target/release/arcstat <dir-in-PATH>/arcstat
# run arcstat
arcstat

Usage

Basic arcstat syntax is simple! You can run it without any arguments:

arcstat

For information on all its optional arguments, run arcstat --help.

Locating your archive

To find your archive, arcstat defaults to reading the environment variable VG_ARCHIVE.

You can also provide this path from the command line:

arcstat --archive-path /path/to/archive

Customization

Arcstat looks for a config.yaml file in the root of your archive. This configuration file tells arcstat where and how to look for games!

For a quickstart on YAML syntax, click here.

Here is an example configuration:

# config.yaml
systems:
  ds: # system "label" — call it whatever you want!
    display_name: "DS"
    color: [135,215,255]
    path: "ds" # path relative to archive root
    games_are_directories: false # are games stored as directories?
  snes:
    display_name: "SNES"
    color: [95,0,255]
    path: "snes"
    games_are_directories: false
  wii:
    display_name: "WII"
    color: [0,215,255]
    path: "wbfs"
    games_are_directories: true

Other arcosystem projects

Arcstat belongs to a family of projects called the arcosystem!

Check out some other arcosystem projects:

About

Generate digital game archives statistics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages