Add dev scripts for ui/translation generation
This commit is contained in:
parent
142a0c365b
commit
23894c64f1
3 changed files with 20 additions and 3 deletions
8
scripts/py2ts.sh
Executable file
8
scripts/py2ts.sh
Executable file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
cwd="$(pwd)"
|
||||||
|
cd "$(dirname "$0")"/.. || exit
|
||||||
|
|
||||||
|
pylupdate5 -noobsolete $(find rare/ -iname "*.py") -ts rare/languages/placeholder.ts
|
||||||
|
|
||||||
|
cd "$cwd" || exit
|
8
scripts/pylint.sh
Executable file
8
scripts/pylint.sh
Executable file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
cwd="$(pwd)"
|
||||||
|
cd "$(dirname "$0")"/.. || exit
|
||||||
|
|
||||||
|
pylint -E rare --jobs=3 --disable=E0611,E1123,E1120 --ignore=ui,singleton.py --extension-pkg-whitelist=PyQt5
|
||||||
|
|
||||||
|
cd "$cwd" || exit
|
|
@ -1,6 +1,7 @@
|
||||||
#!/usr/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
pushd "$(dirname "$0")" || exit
|
cwd="$(pwd)"
|
||||||
|
cd "$(dirname "$0")"/.. || exit
|
||||||
|
|
||||||
changed="$(git diff --name-only HEAD | grep '\.ui')"
|
changed="$(git diff --name-only HEAD | grep '\.ui')"
|
||||||
|
|
||||||
|
@ -9,4 +10,4 @@ for ui in $changed; do
|
||||||
pyuic5 "${ui}" -x -o "${ui%.ui}.py"
|
pyuic5 "${ui}" -x -o "${ui%.ui}.py"
|
||||||
done
|
done
|
||||||
|
|
||||||
popd || exit
|
cd "$cwd" || exit
|
Loading…
Reference in a new issue