A utility to pass arguments to vkBasalt
Project description
vkbasalt-cli
vkbasalt-cli (filename vkbasalt
) is a CLI utility and library in conjunction with vkBasalt. This makes generating configuration files or running vkBasalt with games easier. This is mainly convenient in environments where integrating vkBasalt is wishful, for example a GUI application. Integrating vkbasalt-cli allows a front-end to easily generate and use specific configurations on the fly, without asking the user to manually write a configuration file.
Installation
First, clone the directory, and then enter it:
git clone https://gitlab.com/TheEvilSkeleton/vkbasalt-cli
cd vkbasalt-cli
Flatpak
The recommended method is to install using flatpak-builder
:
flatpak-builder --user --install --install-deps-from=flathub --default-branch=main --force-clean build-dir io.gitlab.theevilskeleton.vkbasalt.yaml
You can run with:
flatpak run io.gitlab.theevilskeleton.vkbasalt
Python
The second method is to install via the python
command:
python setup.py install # --user for user install
Using vkbasalt-cli as a library
Import parse
and ParseConfig
methods from the vkbasalt.lib
module:
from vkbasalt.lib import parse, ParseConfig
For examples of using vkbasalt-cli as a library, see:
Using within Flatpak
If your application is available as a Flatpak and you would like to add the library in the manifest, then add this snippet depending on the file type:
YAML:
- name: vkbasalt-cli
buildsystem: simple
build-commands:
- python3 setup.py install --prefix=/app --root=/
sources:
- type: git
url: https://gitlab.com/TheEvilSkeleton/vkbasalt-cli.git
tag: TAG_NUMBER
commit: COMMIT_HASH
JSON:
{
"name": "vkbasalt-cli",
"buildsystem": "simple",
"build-commands": [
"python3 setup.py install --prefix=/app --root=/"
],
"sources": [
{
"type": "git",
"url": "https://gitlab.com/TheEvilSkeleton/vkbasalt-cli.git",
"tag": "TAG_NUMBER",
"commit": "COMMIT_HASH"
}
]
}
List of options
optional arguments:
-h, --help show this help message and exit
-e {cas,dls,fxaa,smaa,lut} [{cas,dls,fxaa,smaa,lut} ...], --effects {cas,dls,fxaa,smaa,lut} [{cas,dls,fxaa,smaa,lut} ...]
effects in a separated list of effect to use
-o OUTPUT, --output OUTPUT
output file
-d, --default use default configuration
--toggle-key TOGGLE_KEY
toggle key (default: Home)
--disable-on-launch disable on launch
--cas-sharpness CAS_SHARPNESS
adjust CAS sharpness
--dls-sharpness DLS_SHARPNESS
adjust DLS sharpness
--dls-denoise DLS_DENOISE
adjust DLS denoise
--fxaa-subpixel-quality FXAA_SUBPIXEL_QUALITY
adjust FXAA subpixel quality
--fxaa-quality-edge-threshold FXAA_QUALITY_EDGE_THRESHOLD
adjust FXAA quality edge threshold
--fxaa-quality-edge-threshold-min FXAA_QUALITY_EDGE_THRESHOLD_MIN
adjust FXAA quality edge threshold minimum
--smaa-edge-detection {luma,color}
adjust SMAA edge detection (default: luma)
--smaa-threshold SMAA_THRESHOLD
adjust SMAA threshold
--smaa-max-search-steps SMAA_MAX_SEARCH_STEPS
adjust SMAA max search steps
--smaa-max-search-steps-diagonal SMAA_MAX_SEARCH_STEPS_DIAGONAL
adjust SMAA max search steps diagonal
--smaa-corner-rounding SMAA_CORNER_ROUNDING
adjust SMAA corner rounding
--lut-file-path LUT_FILE_PATH
specify LUT file path
--exec EXEC execute command
Examples
Apply CAS and FXAA filters; output to the current directory:
vkbasalt --effects cas fxaa --output .
Apply CAS and FXAA filters; set CAS sharpness to 0.35
; output to the current directory:
vkbasalt --effects cas fxaa --cas-sharpness 0.35 --output .
Apply DLS and FXAA filters; set DLS sharpness to 1
; output to ~/.config/vkBasalt
:
vkbasalt --effects dls fxaa --dls-sharpness 1 --output ~/.config/vkBasalt
Apply SMAA, DLS and CAS filters; set CAS sharpness to 1
, DLS sharpness to 0.5
and DLS denoise to 0.75
:
vkbasalt --effects smaa dls cas --cas-sharpness 1 --dls-sharpness 0.5 --dls-denoise 0.75
Apply CAS, FXAA, DLS and SMAA filters; disable vkBasalt on launch; set CAS sharpness to 1
, DLS sharpness to 1
, DLS denoise to 1
, FXAA subpixel quality to 1
, FXAA edge quality threshold to 1
, FXAA edge minimum quality threshold to 0.1
, SMAA edge detection to color
, SMAA threshold to 0.5
, SMAA max search steps to 1
, SMAA corner rounding to 1
, SMAA max steps diagonal to 1
; execute MY_GAME
:
vkbasalt --effects cas fxaa dls smaa \
--disable-on-launch \
--cas-sharpness 1 \
--dls-sharpness 1 \
--dls-denoise 1 \
--fxaa-subpixel-quality 1 \
--fxaa-quality-edge-threshold 1 \
--fxaa-quality-edge-threshold-min 0.1 \
--smaa-edge-detection color \
--smaa-threshold 0.5 \
--smaa-max-search-steps 1 \
--smaa-corner-rounding 1 \
--smaa-max-search-steps-diagonal 1 \
--exec "MY_GAME"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file vkbasalt-cli-3.1.1.post2.tar.gz
.
File metadata
- Download URL: vkbasalt-cli-3.1.1.post2.tar.gz
- Upload date:
- Size: 22.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00914db4b4d2631fcef1b2a7fb74f1894d5ca62875f6e975caacbb6fa7641bad |
|
MD5 | 239b64373e563f7c340d00a10580f024 |
|
BLAKE2b-256 | 363101120bd0eff81887587aa09970e4b8560d0560431385b6d988c2710d8d6b |
File details
Details for the file vkbasalt_cli-3.1.1.post2-py3-none-any.whl
.
File metadata
- Download URL: vkbasalt_cli-3.1.1.post2-py3-none-any.whl
- Upload date:
- Size: 22.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e6db4a366a26cb449ef54ba39c4d448d1141f4d5227799fb0adf6e2900f398a |
|
MD5 | d8911f99722b0c9660336873a6192d72 |
|
BLAKE2b-256 | 98a3fa72d390dc18dd92430cdf31c1adff9cc99a3d1cd3545d72e904b19ba4e9 |