Bukuserver settings/DB selection wrapper script #764
LeXofLeviafan
started this conversation in
Show and tell
Replies: 1 comment 11 replies
-
@jarun we can probably include this script in the repo… Though it'd likely need to be adjusted for cross-platform paths first (I've only tried using it on Linux so far). The "switching DBs" functionality is likely to become more relevant going forward, when/if I'll implement DB customization functionality (e.g. if/when we support custom record fields, it'd be more convenient to have a DB for games with Developer / Platforms fields and another DB for stuff like web-novels with reading progress like Chapter/Page Link, than to lump them all together in one DB). |
Beta Was this translation helpful? Give feedback.
11 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Recently I've put together a shell script to run bukuserver and switch between multiple databases (as I find it more convenient to have stuff partitioned… and also I'm not about to use my actual database for development 😅)
This script is especially convenient for development purposes, as in the development mode it allows to restart the script while retaining database choice.
Database switching happens on server restart, which can be triggered by stopping the server process manually (e.g. by pressing Ctrl+C), or by running the script with a
--stop
argument (which is useful when the main script instance is being run in daemon mode).Note that the UI dialogs are implemented by invoking Zenity; so if you want to try it out on Windows you'll need both Bash (which can be installed with Git) and Zenity in
PATH
.Environment variables (override defaults via CLI or by modifying the script):
DEVMODE
– non-empty value enables developer mode (rebuild on restart)BUKUSERVER
– path to executable, or directory to run from source (default is thebukuserver
executable fromPATH
)VENV
– path to venv (default is relative toBUKUSERVER
if in DEVMODE)BUKUSERVER_*
– Web-UI startup settings (see Bukuserver docs)The latter can be also set up in a config file (which can still be overridden via CLI), e.g.:
Screenshots
Shown in
DEVMODE
(developer mode) when restarting the serverShown on startup (unless no DB files were found):
Shown if no DB was selected (or none found):
Shown if new DB name is taken already:
Shown if DB name contains an invalid character (
/
):Beta Was this translation helpful? Give feedback.
All reactions