roms

package
v0.0.22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanShortcuts

func CleanShortcuts(parsed []*ROM) (int, error)

Clean shortcuts for not found ROMs

func Process

func Process(options *Options) error

Parse and process ROMs for given platforms

func ProcessROMs

func ProcessROMs(parsed []*ROM, options *Options) (int, error)

Process ROMs to scrape data and add to shortcuts list

Types

type Emulator added in v0.0.19

type Emulator struct {
	Name          string `json:"name"`
	Program       string `json:"program"`
	Extensions    string `json:"extensions"`
	LaunchOptions string `json:"launchOptions"`
}

Emulator struct

type Options

type Options struct {
	Platforms   []string `json:"platforms"`
	Preferences []string `json:"preferences"`
	Rebuild     bool     `json:"rebuild"`
}

Options struct

func ToOptions

func ToOptions(platforms []string, preferences []string, rebuild bool) *Options

Transform values into valid options

type Platform

type Platform struct {
	Name      string      `json:"name"`
	Console   string      `json:"console"`
	Folder    string      `json:"folder"`
	Emulators []*Emulator `json:"emulators"`
}

Platform struct

func GetPlatforms

func GetPlatforms(options *Options) []*Platform

Retrieve system platform specs. This list is almost a copy of EmulationStation DE systems

type ROM

type ROM struct {
	Path          string `json:"path"`
	RelativePath  string `json:"relativePath"`
	Directory     string `json:"directory"`
	File          string `json:"file"`
	Extension     string `json:"extension"`
	Name          string `json:"name"`
	Platform      string `json:"platform"`
	Console       string `json:"console"`
	Emulator      string `json:"emulator"`
	Program       string `json:"program"`
	LaunchOptions string `json:"launchOptions"`
}

ROM struct

func FilterROMs

func FilterROMs(roms []*ROM, options *Options) []*ROM

Filter ROMs that match given requirements and return the list to process

func ParseROMs

func ParseROMs(options *Options) ([]*ROM, error)

Find ROMs in folder and return the list of detected games

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL