Created
December 7, 2021 05:55
-
-
Save petrohs/0cd75f5e861bb20cb2638269a5a83c59 to your computer and use it in GitHub Desktop.
wikiFotosCC¦ Descarga fotos de creativecommons y le da un efecto de foto polaroid
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ARCH="$1"; | |
TEXTO="[[${ARCH}]] petrohsW/wikiCommons CC by sa (20181117)" | |
URL_PAG="https://commons.wikimedia.org/wiki/File:${ARCH}" | |
wget ${URL_PAG} -o ${ARCH}.log -O ${ARCH}.html | |
URL_FOTO=$(grep 'div class="fullMedia"' ${ARCH}.html | sed -e "s'.*a href=\"''" -e "s/\" class=\"internal.*//") | |
wget ${URL_FOTO} -o ${ARCH}.2.log | |
convert -caption "${TEXTO}" ${ARCH} -bordercolor Lavender -border 5x5 -density 144 -gravity center -pointsize 8 -background black -polaroid +15 -resize 520 polaroid-${ARCH}.png | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment