File: README.md

package info (click to toggle)
vkbasalt-cli 3.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 180 kB
  • sloc: python: 273; xml: 33; makefile: 2
file content (149 lines) | stat: -rw-r--r-- 5,602 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# 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:
```bash
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:

```py
from vkbasalt.lib import parse, ParseConfig
```

For examples of using vkbasalt-cli as a library, see:
- [vkbasalt/cli.py](vkbasalt/cli.py)
- [Bottles](https://github.com/bottlesdevs/Bottles/blob/main/bottles/frontend/windows/vkbasalt.py)


### 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:
```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:
```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
```bash
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:
```bash
vkbasalt --effects cas fxaa --output .
```
Apply CAS and FXAA filters; set CAS sharpness to `0.35`; output to the current directory:
```bash
vkbasalt --effects cas fxaa --cas-sharpness 0.35 --output .
```
Apply DLS and FXAA filters; set DLS sharpness to `1`; output to `~/.config/vkBasalt`:
```bash
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`:
```bash
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`:
```bash
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"
```

[vkBasalt]: https://github.com/DadSchoorse/vkBasalt