diff --git a/attic/btpower.sh b/attic/btpower.sh deleted file mode 100644 index f8318dd..0000000 --- a/attic/btpower.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -DEVICES=$(upower -e) - -for device in $DEVICES; do - info=$(upower -i $device) - echo "$info" - model=$(echo "$info" | grep -oP 'model: \K\w+[a-zA-Z0-9 ]*$') - battery=$(echo "$info" | grep -oP 'percentage: [0-9 ]*%') - echo "$model: $battery" -done diff --git a/attic/checkupdates.sh b/attic/checkupdates.sh deleted file mode 100755 index 2a71c85..0000000 --- a/attic/checkupdates.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -#UPDATES=$(checkupdates | sed ':a;N;$!ba;s/\n/ /g') -CHECKUPDATES=$(checkupdates) -UPDATES=$(echo "${CHECKUPDATES}" | sed 's/->/-\>/g' | sed ':a;N;$!ba;s/\n/
/g') -NUM_UPDATES=$(echo "${CHECKUPDATES}" | wc -l) - -#echo "{\"text\": \"${NUM_UPDATES}\", \"tooltip\":\"$UPDATES\"}" -printf "{\"text\": \"%s\", \"tooltip\": \"%s\"}" $(checkupdates | wc -l) "$(checkupdates | tr '\n' '\r')" diff --git a/attic/convertAtlasXmlToJson.php b/attic/convertAtlasXmlToJson.php deleted file mode 100755 index c5fe305..0000000 --- a/attic/convertAtlasXmlToJson.php +++ /dev/null @@ -1,95 +0,0 @@ -#!/bin/php -meta->sprites} textures processed successfully with {$json->meta->app} version {$json->meta->version}"); - file_put_contents($new_filename, json_encode($json)); - logMsg("Saved to {$new_filename}"); - } else { - logMsg("No file exists named: {$filename}"); - die(); - } -} -else { - logMsg("No input file name provided"); - die(); -} -die(); - -function convertXMLToJSONHash($xml){ - $json = new stdClass(); - //build out the frames obj (contains all the images) - $json->frames = new stdClass(); - //build out the meta object (just info about this program) - $json->meta = writeJSONMeta(); - //loop through all subtextures - $i = 0; - foreach ($xml->SubTexture as $frame){ - //get the attributes for each XML node - $attrs = $frame->attributes(); - //make the right object, JSON arr would differ here - $json->frames->{$attrs["name"]} = new stdClass(); - //make the frame object - $frame_obj = new stdClass(); - $frame_obj->x = intval($attrs["x"]); - $frame_obj->y = intval($attrs["y"]); - $frame_obj->w = intval($attrs["width"]); - $frame_obj->h = intval($attrs["height"]); - //set the frame object - $json->frames->{$attrs["name"]}->frame = $frame_obj; - - //make the sprite source object - $sprite_obj = new stdClass(); - $sprite_obj->x = 0; - $sprite_obj->y = 0; - $sprite_obj->w = $frame_obj->w; - $sprite_obj->h = $frame_obj->h; - //set the sprite source object - $json->frames->{$attrs["name"]}->spriteSourceSize = $sprite_obj; - - //make the source size object - $source_obj = new stdClass(); - $source_obj->w = $frame_obj->w; - $source_obj->h = $frame_obj->h; - //set the sprite source object - $json->frames->{$attrs["name"]}->sourceSize = $source_obj; - - //add some more stuff that may or may not matter - $json->frames->{$attrs["name"]}->rotated = false; - $json->frames->{$attrs["name"]}->trimmed = false; - - //make the pivot object - $pivot_obj = new stdClass(); - $pivot_obj->x = 0.5; - $pivot_obj->y = 0.5; - $json->frames->{$attrs["name"]}->rotated = false; - $i++; - } - $json->meta->sprites = $i; - //get root attributes - $attrs = $xml->attributes(); - $json->meta->image = (string)$attrs["imagePath"]; - return $json; -} - -function writeJSONMeta(){ - global $VERSION; - $meta = new stdClass(); - $meta->app = "TextureAtlasConverter"; - $meta->version = $VERSION; - return $meta; -} - -function logMsg ($message){ - echo "{$message}\n"; -} -?> diff --git a/attic/dropboxGetPublicURL.sh b/attic/dropboxGetPublicURL.sh deleted file mode 100755 index a2e12b6..0000000 --- a/attic/dropboxGetPublicURL.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -s=`~/Scripts/dropbox.py puburl "$1"` - -zenity --info --text="$s" && echo "$s" | xclip -selection c diff --git a/attic/hubic.py b/attic/hubic.py deleted file mode 100755 index 08f93ad..0000000 --- a/attic/hubic.py +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/python -import os -import re -import lib.helpers as helpers -from subprocess import check_output - -hubic_available = helpers.is_exe('/usr/bin/hubic') - -if not hubic_available: - print('Not running') - os.exit(1) - -return_value = check_output(['hubic', 'status']) -m = re.search(r'State: (.*)', return_value.decode("utf-8")) -print(m.group(1)) - diff --git a/attic/keepass.sh b/attic/keepass.sh deleted file mode 100755 index 3e858f8..0000000 --- a/attic/keepass.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -# Store password like this: -# ´´secret-tool store --label='KeepassPassword' password keepass`` - -DATABASE=~/Nextcloud/Avaimet/Passwords.kdbx -PW=$(secret-tool lookup password keepass) -PASSWORDS=$(echo $PW | keepassxc-cli ls -R $DATABASE) - -for pass in $PASSWORDS; do - found=$(echo $pass | grep --ignore-case $1) - if [ -n "$found" ]; then - echo $PW | keepassxc-cli show -s -q $DATABASE $found & - fi -done diff --git a/attic/lastpass.sh b/attic/lastpass.sh deleted file mode 100755 index 46baa5e..0000000 --- a/attic/lastpass.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -# First check if lastpass is correctly initialized -if lpass ls 1>/dev/null 2>&1; then - # success - lpass ls | grep --ignore-case $1 | awk '{ if (match($0,/\[id: (.*)?\]/,m)) print m[1] }' | xargs lpass show - # --color=always --format="%ai %au %ap" # unable to use because lpass is buggy with the formatting -else - # failure - echo -n "Enter login name: " - read loginname - lpass login $loginname -fi - diff --git a/attic/md_create_eplist.py b/attic/md_create_eplist.py deleted file mode 100755 index 6450385..0000000 --- a/attic/md_create_eplist.py +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/python - -import sys -if __name__ == "__main__": - ret = '- [ ] ' + sys.argv[1] + "\n" - for ep in range(1, int(sys.argv[2])+1): - ret += " - [ ] Ep. "+str(ep)+"\n" - print(ret) diff --git a/attic/ranger.sh b/attic/ranger.sh deleted file mode 100755 index 8a4a5ff..0000000 --- a/attic/ranger.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -URI=$1 -REALPATH=$(echo "$URI" | sed 's/file\:\/\///g') -export TERMCMD=kitty -notify-send "Opening '$REALPATH'" -kitty -1 ranger '$REALPATH' diff --git a/attic/run-wine-prefix.sh b/attic/run-wine-prefix.sh deleted file mode 100755 index a3a9e2f..0000000 --- a/attic/run-wine-prefix.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -if [ $# -eq 0 ] -then - echo "No arguments supplied" - exit -1 -fi - -WINEDIR=$HOME/Pelit/Wine/$1/ - -export WINEDEBUG=-all -#export WINEARCH=win32 -export WINEPREFIX=$WINEDIR - -echo "Run in $WINEDIR" - -#if [ $# -eq 1 ] -#then -# wine $2 -#fi -shift 1; -exec $@ diff --git a/attic/search.sh b/attic/search.sh deleted file mode 100755 index 4f18f28..0000000 --- a/attic/search.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -if [ -z $1 ]; then echo "Search requires search string"; exit 1; fi - -grep -Irn "$1" . diff --git a/attic/sortPackagesBySize.sh b/maintenance/sortPackagesBySize.sh similarity index 100% rename from attic/sortPackagesBySize.sh rename to maintenance/sortPackagesBySize.sh