diff options
author | Alan Aversa <alan.aveNOrsaSP@AMcox.net (remove NO and SPAM)> | 2020-06-26 14:10:23 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2020-06-28 08:16:53 +0700 |
commit | e1097e3fadd39dd0326f917932c4a0b5d30d894b (patch) | |
tree | bee567674dfc1206012a7fdb512e0d8c03da1e47 | |
parent | 110dd65648828931fc7e0931463058a6d3febaae (diff) | |
download | slackbuilds-e1097e3fadd39dd0326f917932c4a0b5d30d894b.tar.gz |
python/google-images-download: Added (Py script for Google Images)
Signed-off-by: Dave Woodfall <dave@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r-- | python/google-images-download/README | 18 | ||||
-rw-r--r-- | python/google-images-download/google-images-download.SlackBuild | 88 | ||||
-rw-r--r-- | python/google-images-download/google-images-download.info | 10 | ||||
-rw-r--r-- | python/google-images-download/slack-desc | 19 |
4 files changed, 135 insertions, 0 deletions
diff --git a/python/google-images-download/README b/python/google-images-download/README new file mode 100644 index 0000000000..5c1af96538 --- /dev/null +++ b/python/google-images-download/README @@ -0,0 +1,18 @@ +Summary + +This is a command line python program to search keywords/key-phrases on +Google Images and optionally download images to your computer. You can +also invoke this script from another python file. + +This is a small and ready-to-run program. No dependencies are required +to be installed if you would only want to download up to 100 images per +keyword. If you would want more than 100 images per keyword, then you +would need to install Selenium library along with chromedriver. Detailed +instructions in the troubleshooting section. + +Compatibility + +This program is compatible with both the versions of python - 2.x and +3.x (recommended). It is a download-and-run program with no changes to +the file. You will just have to specify parameters through the command +line. diff --git a/python/google-images-download/google-images-download.SlackBuild b/python/google-images-download/google-images-download.SlackBuild new file mode 100644 index 0000000000..d17e37c353 --- /dev/null +++ b/python/google-images-download/google-images-download.SlackBuild @@ -0,0 +1,88 @@ +#!/bin/sh + +# Slackware build script for google-images-download + +# Copyright 2020 Alan Aversa +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PRGNAM=google-images-download +VERSION=${VERSION:-0d2bf8f} +FULLHASH=${FULLHASH:-0d2bf8f17b5a8806d90df7258e7a172aa0cb7963} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +unzip $CWD/$VERSION.zip +mv $PRGNAM-$FULLHASH $PRGNAM-$VERSION +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +if $(python3 -c 'import sys' 2>/dev/null); then + python3 setup.py install --root=$PKG +else + python setup.py install --root=$PKG +fi + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/python/google-images-download/google-images-download.info b/python/google-images-download/google-images-download.info new file mode 100644 index 0000000000..dd8eebd969 --- /dev/null +++ b/python/google-images-download/google-images-download.info @@ -0,0 +1,10 @@ +PRGNAM="google-images-download" +VERSION="0d2bf8f" +HOMEPAGE="https://github.com/hardikvasa/google-images-download" +DOWNLOAD="https://github.com/hardikvasa/google-images-download/archive/0d2bf8f.zip" +MD5SUM="10186d6fd8c75e552e53ed889eafb5d2" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Alan Aversa" +EMAIL="alan.aveNOrsaSP@AMcox.net (remove NO and SPAM)" diff --git a/python/google-images-download/slack-desc b/python/google-images-download/slack-desc new file mode 100644 index 0000000000..c900f5d136 --- /dev/null +++ b/python/google-images-download/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +google-images-download: google-images-download (Python script for Google Images downloading) +google-images-download: +google-images-download: This program lets you download tons of images from Google. +google-images-download: +google-images-download: Homepage: https://github.com/hardikvasa/google-images-download +google-images-download: +google-images-download: Documentation: https://google-images-download.readthedocs.io +google-images-download: +google-images-download: +google-images-download: +google-images-download: |