1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Added folder for dev scripts

This commit is contained in:
krateng 2021-12-26 22:50:07 +01:00
parent 9b23c3bd57
commit b704aa8092
4 changed files with 32 additions and 9 deletions

5
.gitignore vendored
View File

@ -6,13 +6,12 @@
/*-old
/*.yml
/pylintrc
.venv/*
# build
/dist
/build
# local actions
/scripts/*
/*.egg-info
# currently not using
/screenshot*.png

View File

@ -1,6 +0,0 @@
convert ../../maloja/web/static/png/favicon_large.png -resize 256 maloja-scrobbler/icon256.png
convert ../../maloja/web/static/png/favicon_large.png -resize 128 maloja-scrobbler/icon128.png
convert ../../maloja/web/static/png/favicon_large.png -resize 48 maloja-scrobbler/icon48.png
convert ../../maloja/web/static/png/favicon_large.png -background none -resize 280 -gravity center -extent 440x280 -background "#232327" -flatten tile.png
rm ./maloja-scrobbler.zip
zip ./maloja-scrobbler.zip maloja-scrobbler/* maloja-scrobbler/*/*

21
dev-scripts/packge.py Normal file
View File

@ -0,0 +1,21 @@
import toml
import os
with open("pyproject.toml") as filed:
data = toml.load(filed)
info = {
'name':data['project']['name'],
'license':"GPLv3",
'version':data['project']['version'],
'architecture':'all',
'description':'"' + data['project']['description'] + '"',
'url':'"' + data['project']['urls']['homepage'] + '"',
'maintainer':f"\"{data['project']['authors'][0]['name']} <{data['project']['authors'][0]['email']}>\"",
}
for target in ["apk","deb"]:
lcmd = f"fpm {' '.join(f'--{key} {info[key]}' for key in info)} -s python -t {target} . "
print(lcmd)
os.system(lcmd)

View File

@ -0,0 +1,9 @@
ICON_DIR=./maloja/web/static/png;
SCROBBLER_DIR=./auxiliary/chromium_scrobbler;
convert $ICON_DIR/favicon_large.png -resize 256 $SCROBBLER_DIR/maloja-scrobbler/icon256.png
convert $ICON_DIR/favicon_large.png -resize 128 $SCROBBLER_DIR/maloja-scrobbler/icon128.png
convert $ICON_DIR/favicon_large.png -resize 48 $SCROBBLER_DIR/maloja-scrobbler/icon48.png
convert $ICON_DIR/favicon_large.png -background none -resize 280 -gravity center -extent 440x280 -background "#232327" -flatten $SCROBBLER_DIR/tile.png
rm $SCROBBLER_DIR/maloja-scrobbler.zip
zip $SCROBBLER_DIR/maloja-scrobbler.zip $SCROBBLER_DIR/maloja-scrobbler/* $SCROBBLER_DIR/maloja-scrobbler/*/*