[PATCH 8/8] add script to print image information found in xml files
image widths shouldnot exceed 600px. if you consider to add an image to the git with width bigger than 600px, i recommend that you should think about either to add a thumbnail image manually or if you extend this script to filter all images to get only images with widths > 600px to convert them in the makefile and to pass the filenames to xsltproc via stringparam and parse the list there to prepare image src with the according thumbnailurl (in xsl/common.xsl line 56 atm). Signed-off-by: klObs <jw@klobs.de>
This commit is contained in:
parent
4ebdc5199d
commit
989c0edd3d
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/bash -e
|
||||||
|
|
||||||
|
for i in `ls ./content/news/*.xml`
|
||||||
|
do
|
||||||
|
xmllint --shell <<<'cat //image[not(starts-with(text(), "http"))]/text()' "$i" \
|
||||||
|
| sed '/^\/\? [>-]/d' \
|
||||||
|
| awk '{ print "./content/static/images/" $1 }' \
|
||||||
|
| xargs identify -quiet 2> /dev/null || true
|
||||||
|
done
|
||||||
|
|
Loading…
Reference in New Issue