fixed get_citation.sh
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# testing getting images dynamically
|
# testing getting images dynamically
|
||||||
first_call=$(lynx -dump -listonly "https://commons.wikimedia.org/w/index.php?search=${1//_/+}&title=Special:MediaSearch&go=Go&type=image")
|
first_call=$(lynx -nonumbers -dump -listonly "https://commons.wikimedia.org/w/index.php?search=${1//_/+}&title=Special:MediaSearch&go=Go&type=image" | sed '11q;d')
|
||||||
set -x
|
|
||||||
lynx -dump -nonumbers "$(lynx -dump \
|
lynx -dump -nonumbers "$(lynx -dump $first_call \
|
||||||
"$(echo "$first_call" \
|
| awk '/CiteThisPage/ {print $2}')" \
|
||||||
| sed '11q;d' \
|
| grep -A10 'Chicago style' \
|
||||||
| awk '{print $2}' )" \
|
| grep -A10 -e '^$' \
|
||||||
| awk -F'. ' '/Cite/ {print $3}' \
|
| grep -B10 'CBE' \
|
||||||
| xargs echo -n)" 2>&1 | grep -A10 'Chicago style' | grep -A10 -e '^$' | grep -B10 'CBE' | grep -B10 -e '^$'
|
| grep -B10 -e '^$'
|
||||||
|
|||||||
Reference in New Issue
Block a user