From 153cc41e021b950913412a098bf9f27510e88351 Mon Sep 17 00:00:00 2001 From: "whitesource-bolt-for-github[bot]" Date: Thu, 6 Dec 2018 20:25:02 +0000 Subject: [PATCH 01/10] Initial WhiteSource configuration file --- .whitesource | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .whitesource diff --git a/.whitesource b/.whitesource new file mode 100644 index 0000000..5ef5902 --- /dev/null +++ b/.whitesource @@ -0,0 +1,8 @@ +########################################################## +#### WhiteSource "Bolt for Github" configuration file #### +########################################################## + +# Configuration # +#---------------# +ws.repo.scan=true +vulnerable.check.run.conclusion.level=success \ No newline at end of file From f1ce8b6894b16262ecc286316f6421c490394761 Mon Sep 17 00:00:00 2001 From: makotosan Date: Sun, 31 Mar 2019 01:56:27 +0100 Subject: [PATCH 02/10] some minor changes --- wpfind | 66 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/wpfind b/wpfind index a37ac08..ad9113c 100755 --- a/wpfind +++ b/wpfind @@ -7,7 +7,7 @@ #------------------------------------------------------------------------------ # app version number -version="0.1.3" +version="0.1.3.1" # logfile logfile="wpfind.log" touch $logfile @@ -56,7 +56,7 @@ function logo() { printf " ╚══╝╚══╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═══╝╚═════╝ \n"; printf "$BOLDVERT"; printf "\n" - printf "Find wallpapers recursively in a dir and sub-directories...\n" + printf "Find wallpapers recursively in a dir and sub-directories...\n" printf "\n" printf "$NORMAL" printf "Version : $version\n" @@ -78,7 +78,7 @@ function usage() { printf " -o (default: wpfiles inside the current directory)\n" printf " -w (default: 1920px)\n" printf " -v : verbose mode\n" - printf " -h : show help & informations\n" + printf " -h : show help & informations\n" } #------------------------------------------------------------------------------ @@ -129,24 +129,24 @@ function wpFind () { # browse recursively files and dir for pic in $1/*; do # if directory - if [ -d "$pic" ]; then + if [ -d "$pic" ]; then # and if not outputDir if [ "$pic" != "$outputDirToCheck" ]; then # browse sub-dir - wpFind "$pic" + wpFind "$pic" fi # if file - elif [ -f "$pic" ]; then + elif [ -f "$pic" ]; then # if file type is a picture if [[ $(file --mime-type -b "$pic") == image/*g ]]; then - pic_w_size=$(identify -format %w $pic) - pic_h_size=$(identify -format %h $pic) + pic_w_size=$(identify -format %w $pic) + pic_h_size=$(identify -format %h $pic) # if picture width > height - if [ "$pic_w_size" -gt "$pic_h_size" ]; then + if [ "$pic_w_size" -gt "$pic_h_size" ]; then # if picture width <= minimum width - if [ "$pic_w_size" -gt "$(($minw-1))" ]; then + if [ "$pic_w_size" -gt "$(($minw-1))" ]; then # if copy mode - if [ "$pic2move" = "no" ]; then + if [ "$pic2move" = "no" ]; then # if verbose mode if [ "$verbosemode" = "yes" ]; then printf "cp $iMode $pic $outputDir\n" @@ -155,7 +155,7 @@ function wpFind () { date2log=$($date +'%Y-%m-%d %H:%M:%S') printf "$date2log - cp $iMode $pic $outputDir\n" >> $logfile # if move mode - elif [ "$pic2move" = "yes" ]; then + elif [ "$pic2move" = "yes" ]; then # if verbose mode if [ "$verbosemode" = "yes" ]; then printf "mv $iMode $pic $outputDir\n" @@ -163,13 +163,13 @@ function wpFind () { mv $iMode $pic $outputDir date2log=$($date +'%Y-%m-%d %H:%M:%S') printf "$date2log - mv $iMode $pic $outputDir\n" >> $logfile - fi - picmoved=$(($picmoved+1)) - fi - fi - fi - fi - done + fi + picmoved=$(($picmoved+1)) + fi + fi + fi + fi + done } #------------------------------------------------------------------------------ @@ -177,9 +177,9 @@ function wpFind () { #------------------------------------------------------------------------------ function main() { beginProcess=$($date +'%s') - printf "$NORMAL""Analyzing...(this may take a (very)(long) while)\n""$NORMAL" + printf "$NORMAL""Analyzing...(this may take a (very)(long) while)\n""$NORMAL" - # check if detox is installed + # check if dependencies are installed depInstalled # create the outputDir if doesn't exist @@ -205,7 +205,7 @@ function main() { isValidDirectory $inputDir "i" # some var init - picmoved=0 + picmoved=0 minw=$(($minw-1)) # begin the process @@ -213,18 +213,18 @@ function main() { # display final status if [ "$pic2move" = "yes" ]; then - printf "$NORMAL""Pictures moved : ""$BOLDVERT""$picmoved\n""$NORMAL" + printf "$NORMAL""Pictures moved : ""$BOLDVERT""$picmoved\n""$NORMAL" elif [ "$pic2move" = "no" ]; then printf "$NORMAL""Pictures copied : ""$BOLDVERT""$picmoved\n""$NORMAL" fi # display additional informations with the status if [ "$verbosemode" = "yes" ]; then printf "$NORMAL""Minimal width : $(($minw+1))\n""$NORMAL" - printf "$NORMAL""Logfile : wpfind.log\n""$NORMAL" + printf "$NORMAL""Logfile : wpfind.log\n""$NORMAL" printf "$NORMAL""Analyzed dir : $inputDir\n""$NORMAL" - printf "$NORMAL""Wallpapers dir : $outputDir\n""$NORMAL" + printf "$NORMAL""Wallpapers dir : $outputDir\n""$NORMAL" fi - printf "\n" >> $logfile + printf "\n" >> $logfile # display the time elapsed for the complete process endProcess=$($date +'%s') @@ -237,11 +237,11 @@ function main() { [[ $# -lt 1 ]] && logo && usage && exit while getopts ":c,m,h,v,s,i:,o:,w:" option; do - case "$option" in - c) + case "$option" in + c) pic2move=no ;; - m) + m) pic2move=yes ;; o) @@ -253,7 +253,7 @@ while getopts ":c,m,h,v,s,i:,o:,w:" option; do w) minw=$OPTARG ;; - h) + h) logo usage exit 0 @@ -261,7 +261,7 @@ while getopts ":c,m,h,v,s,i:,o:,w:" option; do s) iMode="-i" ;; - v) + v) verbosemode=yes ;; :) @@ -269,12 +269,12 @@ while getopts ":c,m,h,v,s,i:,o:,w:" option; do usage exit 1 ;; - \?) + \?) printf "$BOLDROUGE""Error""$NORMAL"" : $OPTARG : invalid option\n\n" usage exit 1 ;; - esac + esac done # if no mode choosed but other options set From 07a7680df872f488ba1aeacf161801d386507a6a Mon Sep 17 00:00:00 2001 From: makotosan Date: Sun, 31 May 2020 16:13:48 +0200 Subject: [PATCH 03/10] whitespace bug fixed --- wpfind | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wpfind b/wpfind index ad9113c..46bdae9 100755 --- a/wpfind +++ b/wpfind @@ -7,7 +7,7 @@ #------------------------------------------------------------------------------ # app version number -version="0.1.3.1" +version="0.1.3.2" # logfile logfile="wpfind.log" touch $logfile @@ -151,7 +151,7 @@ function wpFind () { if [ "$verbosemode" = "yes" ]; then printf "cp $iMode $pic $outputDir\n" fi - cp $iMode $pic $outputDir + cp $iMode "$pic" "$outputDir" date2log=$($date +'%Y-%m-%d %H:%M:%S') printf "$date2log - cp $iMode $pic $outputDir\n" >> $logfile # if move mode @@ -160,7 +160,7 @@ function wpFind () { if [ "$verbosemode" = "yes" ]; then printf "mv $iMode $pic $outputDir\n" fi - mv $iMode $pic $outputDir + mv $iMode "$pic" "$outputDir" date2log=$($date +'%Y-%m-%d %H:%M:%S') printf "$date2log - mv $iMode $pic $outputDir\n" >> $logfile fi From e68fef7879987815fa70eb6662574fa133817100 Mon Sep 17 00:00:00 2001 From: makotosan Date: Sun, 31 May 2020 16:18:23 +0200 Subject: [PATCH 04/10] upd for Ubuntu 20.04, Linux Mint 20, Arch Linux --- README.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 82b3b76..92f9bee 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,21 @@ sudo apt-get update sudo apt-get install wpfind ``` +For Ubuntu 20.04, Linux Mint 20.x, and other derivatives + +``` +curl -L https://packagecloud.io/makoto/stable/gpgkey | sudo apt-key add - +echo "deb https://packagecloud.io/makoto/stable/ubuntu/ focal main" | sudo tee /etc/apt/sources.list.d/makoto.list +sudo apt-get update +sudo apt-get install wpfind +``` + +For Arch Linux and other derivatives + +``` +trizen -S wpfind +``` + Usage options ------------- @@ -47,7 +62,7 @@ Usage options Find wallpapers recursively in a dir and sub-directories... -Version : 0.1.2 +Version : 0.1.3 Author : Francois B (Makoto) Licence : GPLv3 From 80150201fe3e922daf47710d3215f7a8fff551e2 Mon Sep 17 00:00:00 2001 From: "Francois B. (Makoto)" Date: Tue, 22 Dec 2020 15:53:41 +0100 Subject: [PATCH 05/10] Ubuntu 16.04/Mint 18.x removed --- .gitignore | 0 .whitesource | 0 LICENSE | 0 README.md | 9 --------- pics/logo.png | Bin 5 files changed, 9 deletions(-) mode change 100644 => 100755 .gitignore mode change 100644 => 100755 .whitesource mode change 100644 => 100755 LICENSE mode change 100644 => 100755 README.md mode change 100644 => 100755 pics/logo.png diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/.whitesource b/.whitesource old mode 100644 new mode 100755 diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 index 92f9bee..a7e268f --- a/README.md +++ b/README.md @@ -16,15 +16,6 @@ Requirements Installation ------------ -For Ubuntu 16.04, Linux Mint 18.x, and other derivatives - -``` -curl -L https://packagecloud.io/makoto/stable/gpgkey | sudo apt-key add - -echo "deb https://packagecloud.io/makoto/stable/ubuntu/ xenial main" | sudo tee /etc/apt/sources.list.d/makoto.list -sudo apt-get update -sudo apt-get install wpfind -``` - For Ubuntu 18.04, Linux Mint 19.x, and other derivatives ``` diff --git a/pics/logo.png b/pics/logo.png old mode 100644 new mode 100755 From 458345c79c443cd506053ba7b90c7d17959897d5 Mon Sep 17 00:00:00 2001 From: "Francois B. (Makoto)" Date: Tue, 29 Oct 2024 02:24:48 +0100 Subject: [PATCH 06/10] -whitesource --- .whitesource | 8 -------- 1 file changed, 8 deletions(-) delete mode 100755 .whitesource diff --git a/.whitesource b/.whitesource deleted file mode 100755 index 5ef5902..0000000 --- a/.whitesource +++ /dev/null @@ -1,8 +0,0 @@ -########################################################## -#### WhiteSource "Bolt for Github" configuration file #### -########################################################## - -# Configuration # -#---------------# -ws.repo.scan=true -vulnerable.check.run.conclusion.level=success \ No newline at end of file From 5be6d0ec88449d2bba67eb7551c7aedff91b4d3c Mon Sep 17 00:00:00 2001 From: "Francois B. (Makoto)" Date: Tue, 29 Oct 2024 02:31:07 +0100 Subject: [PATCH 07/10] small upd --- README.md | 49 +++++++++++++++++++++---------------------------- 1 file changed, 21 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index a7e268f..18f3e7f 100755 --- a/README.md +++ b/README.md @@ -1,24 +1,21 @@ -![wpfind](pics/logo.png) +# WPFind -WPFind -====== +![wpfind](pics/logo.png) The purpose of this script is to find wallpapers among pictures files in directory and sub-directories and move/copy them to a separate directory. It can be useful when you are trying to clean your mess on your computer ;-) -Requirements ------------- +## Requirements -* Ubuntu, Linux Mint (should work on other Ubuntu derivatives) -* detox -* imagemagick +- Ubuntu, Linux Mint (should work on other Ubuntu derivatives) +- detox +- imagemagick -Installation ------------- +## Installation For Ubuntu 18.04, Linux Mint 19.x, and other derivatives -``` +```shell curl -L https://packagecloud.io/makoto/stable/gpgkey | sudo apt-key add - echo "deb https://packagecloud.io/makoto/stable/ubuntu/ bionic main" | sudo tee /etc/apt/sources.list.d/makoto.list sudo apt-get update @@ -27,21 +24,20 @@ sudo apt-get install wpfind For Ubuntu 20.04, Linux Mint 20.x, and other derivatives -``` +```shell curl -L https://packagecloud.io/makoto/stable/gpgkey | sudo apt-key add - echo "deb https://packagecloud.io/makoto/stable/ubuntu/ focal main" | sudo tee /etc/apt/sources.list.d/makoto.list sudo apt-get update sudo apt-get install wpfind ``` -For Arch Linux and other derivatives +For Arch Linux and derivatives -``` +```shell trizen -S wpfind ``` -Usage options -------------- +## Usage options ``` ██╗ ██╗██████╗ ███████╗██╗███╗ ██╗██████╗ @@ -68,36 +64,33 @@ Usage : wpfind [options] -h : show help & informations ``` -Usage examples --------------- +## Usage examples Copy wallpapers in the current directory and sub-directories with minimum width of 1920px to wpfiles -``` +```shell wpfind -c ``` Move wallpapers in the current directory and sub-directories with minimum width of 1920px to wpfiles -``` +```shell wpfind -m ``` Move wallpapers in the /home/user/MyPics directory and sub-directories with minimum width of 2560px to /home/user/MyWP directory -``` +```shell wpfind -m -w 2560 -i /home/user/MyPics -o /home/user/MyWP ``` -Credits -------- +## Credits This script has been written by Francois B. (Makotosan/Shakasan) -* Email : francois@makotonoblog.be -* Website : https://makotonoblog.be/wpfind/ +- Email : francois@exoseed.be +- Website : https://makotonoblog.be/wpfind/ -Licence -------- +## Licence -The script is licensed under the terms of the GPLv3 \ No newline at end of file +The script is licensed under the terms of the GPLv3 From ad32f12055ba01e712f12ac538c26be810888e3a Mon Sep 17 00:00:00 2001 From: "Francois B. (Makoto)" Date: Tue, 29 Oct 2024 02:32:31 +0100 Subject: [PATCH 08/10] small upd --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 18f3e7f..357a233 100755 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ It can be useful when you are trying to clean your mess on your computer ;-) ## Requirements -- Ubuntu, Linux Mint (should work on other Ubuntu derivatives) +- Ubuntu, Linux Mint (should work on Ubuntu derivatives), Arch Linux (should work on Ubuntu derivatives) - detox - imagemagick From 246f25600eb00976fea5c8895de85cebbcf4eb72 Mon Sep 17 00:00:00 2001 From: "Francois B. (Makoto)" Date: Tue, 29 Oct 2024 02:33:23 +0100 Subject: [PATCH 09/10] upd with yay --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 357a233..cbbe64e 100755 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ sudo apt-get install wpfind For Arch Linux and derivatives ```shell -trizen -S wpfind +yay -S wpfind ``` ## Usage options From 0fb7c7fde8ca34b6cfd12e54c5d256912f90c1a6 Mon Sep 17 00:00:00 2001 From: "Francois B. (Makoto)" Date: Mon, 4 Nov 2024 23:34:16 +0100 Subject: [PATCH 10/10] minor change in doc --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cbbe64e..bc74cef 100755 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ It can be useful when you are trying to clean your mess on your computer ;-) ## Requirements -- Ubuntu, Linux Mint (should work on Ubuntu derivatives), Arch Linux (should work on Ubuntu derivatives) +- Ubuntu, Linux Mint (should work on Ubuntu derivatives), Arch Linux (should work on Ubuntu derivatives) and probably any Linux distro - detox - imagemagick