1
0
Fork 0
mirror of synced 2024-09-29 08:51:43 +13:00

Merge pull request #121 from loathingKernel/main

Add dev scripts for ui/translation generation
This commit is contained in:
Dummerle 2021-10-24 19:03:51 +02:00 committed by GitHub
commit 2b7a12db0d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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