From c1bac5cd3ccf13dc79005749c1a60e0d7da50ecb Mon Sep 17 00:00:00 2001 From: nowrep Date: Fri, 6 Dec 2013 22:33:29 +0100 Subject: [PATCH] [Scripts] Added new generate-qmake-plugins-translations script Also removed old unused scripts --- .../generate-qmake-plugins-translations.sh | 19 ++++++++++++++ scripts/ppastats.py | 26 ------------------- scripts/pythonLineCounter.py | 22 ---------------- scripts/show_lines.sh | 3 --- 4 files changed, 19 insertions(+), 51 deletions(-) create mode 100755 scripts/generate-qmake-plugins-translations.sh delete mode 100644 scripts/ppastats.py delete mode 100644 scripts/pythonLineCounter.py delete mode 100755 scripts/show_lines.sh diff --git a/scripts/generate-qmake-plugins-translations.sh b/scripts/generate-qmake-plugins-translations.sh new file mode 100755 index 000000000..b83de2fa8 --- /dev/null +++ b/scripts/generate-qmake-plugins-translations.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# +# Generates list of all plugins translations for qmake .pro + +PLUGINS=`ls -d ../src/plugins/*/translations` + +for dir in $PLUGINS +do + echo -e "$dir\n" + echo "TRANSLATIONS += \\" + + for translation in $dir/*.ts + do + [[ "$translation" == *empty.ts ]] && continue + echo " `echo $translation | awk 'BEGIN{FS="/"}{printf "%s/%s",$5,$6}'` \\" + done + + echo -e "\n\n" +done diff --git a/scripts/ppastats.py b/scripts/ppastats.py deleted file mode 100644 index cab74d500..000000000 --- a/scripts/ppastats.py +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/python -#usage python ppastats.py PPATEAM (ex: webupd8team) PPA (ex: gthumb) DIST (Ubuntu version eg maverick) ARCH (ubuntu arch eg i386 or amd64) - -#example - highest downloaded file: python ppastats.py webupd8team y-ppa-manager maverick amd64 | tr '\t' ',' | cut -d ',' -f3 | sort -gr - -import sys -from launchpadlib.launchpad import Launchpad - -PPAOWNER = sys.argv[1] -PPA = sys.argv[2] -desired_dist_and_arch = 'https://api.launchpad.net/devel/ubuntu/' + sys.argv[3] + '/' + sys.argv[4] - - - -cachedir = "~/.launchpadlib/cache/" -lp_ = Launchpad.login_anonymously('ppastats', 'edge', cachedir, version='devel') -owner = lp_.people[PPAOWNER] -archive = owner.getPPAByName(name=PPA) - -for individualarchive in archive.getPublishedBinaries(status='Published',distro_arch_series=desired_dist_and_arch): - - x = individualarchive.getDownloadCount() - if x > 0: - print individualarchive.binary_package_name + "\t" + individualarchive.binary_package_version + "\t" + str(individualarchive.getDownloadCount()) - elif x < 1: - print '0' diff --git a/scripts/pythonLineCounter.py b/scripts/pythonLineCounter.py deleted file mode 100644 index 5c50bde2f..000000000 --- a/scripts/pythonLineCounter.py +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/python -import commands, re - -cpp=commands.getoutput("find . -name '*.cpp' | xargs wc -l |grep celkem") -headers=commands.getoutput("find . -name '*.h' | xargs wc -l |grep celkem") -html=commands.getoutput("find . -name '*.html' | xargs wc -l |grep celkem") - -intcpp=int(re.findall(r"\d+",cpp)[0]) -intheaders=int(re.findall(r"\d+",headers)[0]) -inthtml=int(re.findall(r"\d+",html)[0]) - -print "##########################" -print "## QupZilla ##" -print "##########################" -print "\n" -print "Lines in Headers (.h files): "+str(intheaders) -print "Lines in Sources (.cpp files): "+str(intcpp) -print "Lines in Pages (.html files): "+str(inthtml) -print "----------------------------------------" -print "\n" -print "::: "+str(intheaders + intcpp + inthtml)+" LINES IN SUMMARY :::" -print "\n" diff --git a/scripts/show_lines.sh b/scripts/show_lines.sh deleted file mode 100755 index e84da47b8..000000000 --- a/scripts/show_lines.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -cd ../src/ && python ../scripts/pythonLineCounter.py -exit 0