Structure
Menus is RetroNAS are driven from a JSON config stored in config/retronas.json
, it is intended to back both a Text User Interface (TUI) and Web User Interface (WUI). This document is intended to outline the implementation.
This is evolving so check back regularly if something isn't working as expected.
Menus are where feasible autogenerated based on input from the JSON, top level menus always are expected to have the menu
type
Retronas is written in BASH, it is a compilation of scripts combined with other tools (See Installers) that achieves the desired result.
RetroNAS installers are stored in Ansible playbooks as a series of Tasks, there has been some interest in migrating these to roles, while promising we are not there yet.
An installer runs ansible-playbook
which will configure the system and install various jinja
templates on the filesystem (where applicable) with the appropriate permissions to run actions and/or services.
We install and configure a number of 3rd party tools in RetroNAS, see Installers, sometimes issues will need to be upstreamed to the appropriate project.
a dict object, basic menu structure is
"menu-name":
{
"title": "",
"description": "",
"id":"",
"prompt": "",
"type": "menu",
"items": []
}
Term | Description |
---|---|
menu-name | an unique name for the menu, it can be used with type dialog to load the menu data |
title | Menu title, it is a H2 in the WUI and resides at the top of TUI dialog |
description | Freeform text to display at the top of a dialog before the menu elements, newlines represented by |
|
id | item id, used as an element id in the WUI, may be used for dialog type in TUI in the future |
prompt | (WUI only) a generic term to use to display on button elements |
type | See Types |
items | a list of dicts for each menu item and its function |
{
"index":"",
"title": "",
"description": "",
"id":"",
"prompt": "",
"type": "",
"group":"",
"command": ""
},
Term | Description |
---|---|
index | TUI only, the numeric index for the TUI element e.g. 06
|
title | Item title displays before the dash character in the TUI, also used in WUI |
description | Freeform text to display at the top of a dialog before the menu elements, newlines represented by |
|
id | item id, used as an element id in the WUI, may be used for dialog type in TUI in the future |
prompt | (WUI only) overwrride the global button element text for this item |
type | See Types |
group | Used to group similar commands together, WUI only, not yet implemented |
command | the execution params for the item, dependant on type, colon seperated, dependant on runner support |
This are pre-pended automatically based on type
Term | Description |
---|---|
d- | Dialog prefix, a standard menu |
s- | Script prefix |
m- | Modal prefix |
i- | input dialog |
f- | form dialog |
y- | yes/no dialog |
More types are probably required but this is what we have at the moment
Type | Description |
---|---|
menu | Menu navigation and top level menus have this type |
dialog | Loads another menu by passing command to menu.sh based on type
|
modal | A dialog that is service specifc and launch from another, in the WUI shows as modal |
script | A script type, that executes script_runner.sh based on input type executing |
install | This is an installer type that executes ansible_runner.sh
|
script-static | A script of type static exists in scripts/static and execute with elevated privs |
input:[type] | This is a WIP, expected to be used for form generation |
dialog_yn | A Yes/No dialog |
dialog_input | A dialog with an input field, used input.sh
|
service_status | Query a systemd service |
form | form based dialog (theoretical) |
The TUI Is driven from functions in common.sh
and a standard menu file based on type of dialog requested for menus this menu.sh
The TUI leverages the program jq
to query the JSON data to generate the menus
A generic placehoder menu that will take a menu object name as an arguement, read the data from JSON and display the content as selectable dialog
Written as a javascript driven cockpit plugin and managed in a seperate repo, it will be documented there but will confirm to the JSON layout detailed in this document
Getting started:
Contributing
- Bugs
- Structure
- Testing RetroNAS
- Ideas potential future state stuff
Multi-system protocols:
- ADTPro Apple // era
- EtherDFS MS-DOS/FreeDOS
- ethflop MS-DOS/FreeDOS L2 floppy emulator
- FTP
- HTTP
- Kermit
- NFS
- Netatalk AppleTalk/AFP
- Samba SMB/CIFS
- TNFS Atari 8-bit and ZX Spectrum
- Telnet
- ZeroConf, Bonjour, Avahi
- pyGopherd a HTTP alternative
- zterm Serial Comms Zmodem Transfer
Specific system configurations:
- Supported Clients
- 3DS QR codes Nintendo 3DS and 2DS
- Batocera
- EmuELEC and derivatives
- RecalBox
- EmuDeck
- Analogue Pocket (OpenFPGA)
- FSP Nintendo GameCube
- Fenrir-ODE Webserver Sega Saturn
- MiSTer FPGA
- NABU Internet Adapter
- Netlink Sega Saturn Netlink online play
- OpenPS2Loader PlayStation 2
- XBox360
- dreampi dreampi project for Dreamcast (and others) online
- hb-store-cdn PlayStation 4 Homebrew Store CDN
- ps3netsrv PlayStation 3
- linux-dexdrive Dump/Write PS1 memory card images
- sidecart Atari ST Sidecart
Services:
- WaybackProxy Web Proxy through the Wayback Machine
- WebOne Web Proxy
- macproxy Web Proxy
- wrp Web Proxy
- Cockpit Web management
- Syncthing file synchronization
- ROM import Smokemonsters SMDB
- TCPser software Hayes Modem
- BitTorrent
- aria2 lightweight download utility.
- megatools mega.nz suite
- XLink Kai multi-platform
Tools:
- gogrepo Sync your GOG installers
- SabreTools DAT management tool
- mc Midnight Commander (Norton clone)
- ytree filemanger XTree clone
- far2l far2l filemanager
- Gadgets Linux gadgets (OTG) mode
- affstools
- amitools
Physical Media:
- DiscImageCreator dump redump.org compatible images
- Redumper advance disc dumper
On-Device Management:
- cue2pops BIN/CUE to VCD conversion
- extract-xiso Manage XISOs
- hdl-dump PS2 HDD device management
- nbd-client Network Block Device
- pfsshell PFS shell / PFS fuse
- ucon64 A multi-purpose copier device tool
- xboxmanager An experimental XBOX Manager
- pi1541 setup a pi1541 compatible device
Advanced storage options:
- BtrFS RAID, Snapshots, Compression, Deduplication
- FAT Advanced guide to using FAT loopback mounts for EtherDFS
- TBA
- SMR Shingled Magnetic Recording hard drives (TBA)
- NTFS Advanced guide for NTFS formatted disks
- SMB Loopback Mounting an existing SMB NAS
- NFS Loopback Mounting an existing NFS NAS
- MDRAID (TBA)
- LVM (TBA)
- iSCSI Configuring iSCSI
Other: