Skip to content

massivebird/arcsearch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

arcsearch

short for "archive search"

My command line querying utility for video game archives!

🦀 written in Rust

What does arcsearch do?

Arcsearch allows you to query your game collection with ease! Some features include:

  • Regular expression support
  • Displays game titles without their codes such as (USA, Europe), [!], and (Disk 2)
  • Displays game systems with distinct, customizable names

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 files can either be normal 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.wbfs
│   └── game-2-dir
│       └── game-2.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/arcsearch
cd arcsearch
cargo run # runs unoptimized build

Adding arcsearch to your PATH

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

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

Usage

Basic arcsearch syntax is as follows:

arcsearch <query>

For more information, run arcsearch --help.

Locating your archive

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

You can also provide this path from the command line:

arcsearch --archive-path /path/to/archive "some query"

Customization

Arcsearch looks for a config.yaml file in the root of your archive. This configuration file tells arcsearch 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

Arcsearch belongs to a family of projects called the arcosystem!

Check out some other arcosystem projects: