1
0
Fork 0
mirror of synced 2024-06-24 17:20:23 +12:00

Add dev scripts for ui/translation generation

This commit is contained in:
Stelios Tsampas 2021-10-24 19:07:51 +03:00
parent 142a0c365b
commit 23894c64f1
No known key found for this signature in database
GPG key ID: 2FAEBF7B5BE5FD7C
3 changed files with 20 additions and 3 deletions

8
scripts/py2ts.sh Executable file
View 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
View 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

View file

@ -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')"
@ -9,4 +10,4 @@ for ui in $changed; do
pyuic5 "${ui}" -x -o "${ui%.ui}.py"
done
popd || exit
cd "$cwd" || exit