-
Notifications
You must be signed in to change notification settings - Fork 0
Home
kumy edited this page May 3, 2023
·
13 revisions
xquery doc('pending-geokrety.xml')/gkxml/errors
xquery count(doc('pending-geokrety.xml')/gkxml/errors/geokret)
xquery doc('pending-geokrety.xml')/gkxml/geokrety
xquery count(doc('pending-geokrety.xml')/gkxml/geokrety/geokret)
xquery doc('geokrety.xml')//geokret[@missing=""]
xquery count(doc('geokrety.xml')//geokret[@missing=""])
xquery doc('geokrety.xml')//geokret[not(@ownername)]
xquery count(doc('geokrety.xml')//geokret[not(@ownername)])
xquery for $i in doc('pending-geokrety.xml')/gkxml/errors/geokret return (insert node $i as last into doc('pending-geokrety.xml')/gkxml/geokrety, delete node $i)
xquery let $db := doc('geokrety-details.xml')/gkxml/geokrety/geokret return for $a in doc('geokrety.xml')/gkxml/geokrety/geokret return replace value of node $a/@missing with $db[@id=$a/@id]/missing/string()
for i in $(seq 10000 -1 1); do curl https://api.geokrety.org/gk/$i/dirty ; echo; sleep 0.001; done
Note: Legacy command (kept here for reference)
This method doesn't work as the current xquery code will only update the missing, date, etc, but doesn't touch or compute the state, position logic. They come from export2.php
.
xquery for $i in doc('geokrety.xml')/gkxml/geokrety/geokret return insert node $i as last into doc('pending-geokrety.xml')/gkxml/geokrety
xquery delete node doc('pending-geokrety.xml')//geokret/@date