Skip to content

Instantly share code, notes, and snippets.

#####################################
# Reportnet: Data flows #
# http://cr.eionet.europa.eu/sparql #
#####################################
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX rod: <http://rod.eionet.europa.eu/schema.rdf#>
PREFIX obl: <http://rod.eionet.europa.eu/obligations/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
(: Suppose that validate-record is a function that checks a single record.
It receives the sequence of records to be validated and the position of the specific record to validate.
It returns a sequence.
If the recork is OK, then the returned sequence is empty.
If the recork is not OK, then the returned sequence contains a single element with the validation result.
Something like... :)
declare function validate-record($records as element()+, $position as xs:integer) as element()?
{ (: Whatever you need to do the check the record in that position.
Return an empty sequence if the record is ok.

Last updated: 2015-08-11

Searching for Files

Find images in a directory that don't have a DateTimeOriginal

exiftool -filename -filemodifydate -createdate -r -if '(not $datetimeoriginal) and $filetype eq "JPEG"' .

###Output photos that don't have datetimeoriginal to a CSV### Note this can take a long time if you have a lot of jpgs