diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/README.md | 23 | ||||
-rw-r--r-- | scripts/Readme.txt | 25 | ||||
-rw-r--r-- | scripts/clonedigger.sh | 4 | ||||
-rw-r--r-- | scripts/code_analysis.sh | 25 |
4 files changed, 52 insertions, 25 deletions
diff --git a/scripts/README.md b/scripts/README.md new file mode 100644 index 000000000..6fd0b168c --- /dev/null +++ b/scripts/README.md @@ -0,0 +1,23 @@ +Script Support +-------------- + +pyLoad is able to start any kind of scripts at given events. +Simply put your script in a suitable folder and pyLoad will execute it at the given events and pass some arguments to them. + + +***Note:*** +**Every script starting with symbol `#` will be ignored!** (ex.: `#converter.sh`) + +***Note:*** +You have to restart pyload when you change script names or locations. + + +Below you see the list of arguments, which are passed to the scripts. + +### Argument list + + - `download_preparing`: **`pluginname` `url`** + - `download_finished`: **`pluginname` `url` `filename` `filelocation`** + - `package_finshed`: **`packagename` `packagelocation`** + - `before_reconnect`: **`oldip`** + - `after_reconnect`: **`newip`** diff --git a/scripts/Readme.txt b/scripts/Readme.txt deleted file mode 100644 index 1c326801d..000000000 --- a/scripts/Readme.txt +++ /dev/null @@ -1,25 +0,0 @@ - ############################# - ### pyLoad Script Support ### - ############################# - -pyLoad is able to start any kind of scripts at given events. -Simply put your script in a suitable folder and pyLoad will execute it at the given events and pass some arguments to them. - ---> Note: Scripts, which starts with # will be ignored! -For Example: #converter.sh will not be executed. - ---> Note: You have to restart pyload when you change script names or locations. - -Below you see the list of arguments, which are passed to the scripts. - -## Argument list ## - -download_preparing: pluginname url - -download_finished: pluginname url filename filelocation - -package_finshed: packagename packagelocation - -before_reconnect: oldip - -after_reconnect: newip
\ No newline at end of file diff --git a/scripts/clonedigger.sh b/scripts/clonedigger.sh new file mode 100644 index 000000000..87c3437cf --- /dev/null +++ b/scripts/clonedigger.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +PYLOAD="../module" # Check ~/pyload/module directory +clonedigger -o cpd.xml --cpd-output --fast --ignore-dir="lib" --ignore-dir="remote" $PYLOAD diff --git a/scripts/code_analysis.sh b/scripts/code_analysis.sh new file mode 100644 index 000000000..dce93d63d --- /dev/null +++ b/scripts/code_analysis.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +PYLOAD="../module" # Check ~/pyload/module directory + +echo "Running sloccount ..." +REPORT="sloccount.sc" +sloccount --duplicates --wide --details $PYLOAD > $REPORT && echo "Done. Report saved to $REPORT" + +echo "Running pep8 ..." +REPORT="pep8.txt" +pep8 $PYLOAD > $REPORT && echo "Done. Report saved to $REPORT" + +echo "Running pylint ..." +REPORT="pylint.txt" +pylint --reports=no $PYLOAD > $REPORT && echo "Done. Report saved to $REPORT" + +#echo "Running pyflakes ..." +#REPORT="pyflakes.txt" +#{ + # pyflakes to pylint syntak +# find $PYLOAD -type f -name "*.py" | egrep -v '^\./lib' | xargs pyflakes > pyflakes.log || : + # Filter warnings and strip ./ from path +# cat pyflakes.log | awk -F\: '{printf "%s:%s: [E]%s\n", $1, $2, $3}' | grep -i -E -v "'_'|pypath|webinterface|pyreq|addonmanager" > $REPORT +# sed -i 's/^.\///g' $REPORT +#} && echo "Done. Report saved to $REPORT" |