mirror of
https://github.com/akuker/RASCSI.git
synced 2024-06-09 11:29:31 +00:00
4252d46844
* Add capabilities to RaCtlCmds.get_device_types() to return the image file support boolean, and list of supported block sizes. * Inquire rascsi backend about the min block size rather than hard coding values in the web UI. * Add class methods for getting lists of certain device types. * Use the new class methods to get lists of device types in the web ui. * Make use of the new class methods in the oled script. * Remove now unused constants, and simplify logic in common_settings * Improve device name mapping to extend the existing dictionary rather than creating a new data structure. * Use jinja2 sort filters instead of sorting in python code. Removing redundant variables. * Introduce the get_device_name() utility method which returns the translated name for a device acronym. Use the new method to display device name when attaching devices. * Fix typo * Rename Support Device to Periperal Device. General tweaks to UI strings. * Tweak UI string. * Fix error.
18 lines
526 B
Python
18 lines
526 B
Python
"""
|
|
Module for general settings used in the rascsi module
|
|
"""
|
|
|
|
from os import getcwd
|
|
|
|
# There may be a more elegant way to get the HOME dir of the user that installed RaSCSI
|
|
HOME_DIR = "/".join(getcwd().split("/")[0:3])
|
|
CFG_DIR = f"{HOME_DIR}/.config/rascsi"
|
|
CONFIG_FILE_SUFFIX = "json"
|
|
|
|
# File ending used for drive properties files
|
|
PROPERTIES_SUFFIX = "properties"
|
|
|
|
# The RESERVATIONS list is used to keep track of the reserved ID memos.
|
|
# Initialize with a list of 8 empty strings.
|
|
RESERVATIONS = ["" for x in range(0, 8)]
|