OSM QA tools:

* fixed parsing of number of inhabitants with html entities
* fixed wikipedia name of Grabow
This commit is contained in:
lars 2009-08-18 09:30:58 +00:00
parent 9269781f4e
commit ead2c41bb3

View file

@ -36,6 +36,7 @@ Dmitz D%C3%B6mitz
Friedland Friedland_(Mecklenburg)
FrstenbergHavel F%C3%BCrstenberg/Havel
Goldberg Goldberg_(Mecklenburg)
Grabow Grabow_(Elde)
Malchow Malchow_(Mecklenburg)
OstseebadRerik Rerik
RbelMritz R%C3%B6bel
@ -56,11 +57,12 @@ get_place_data() {
get_place_size() {
# call "zcat -f" to uncompress a page if necessary
# ignore stuff like " " (space) within the number
wget --quiet --output-document - "$WIKIPEDIA_URL/$1" \
| zcat -f \
| grep -A 1 "^<td>Einwohner:</td>$" \
| tail -1 | cut -d ">" -f 2 | cut -d "<" -f 1 \
| sed s/[^0-9]//g
| sed -r 's/&#[0-9]{3};//g' | sed s/[^0-9]//g
}