diff --git a/scripts/publish-500px.sh b/scripts/publish-500px.sh index 649a999..952a9b4 100755 --- a/scripts/publish-500px.sh +++ b/scripts/publish-500px.sh @@ -12,7 +12,7 @@ SKIP_VALIDATION='--skipSchemaValidation' mcclient publish ${SKIP_VALIDATION} \ --jqFilter '._source | del(.aesthetics)' \ --prefix '500px' - --idFilter '.native_id' \ + --idFilter '.native_id | sub("500px[^_]*_(?\\d+)"; "\(.id)")' \ ${NAMESPACE} \ ${SCHEMA_HASH} \ $1 > /dev/null diff --git a/scripts/publish-dpla.sh b/scripts/publish-dpla.sh index 9953e08..4f7fc65 100755 --- a/scripts/publish-dpla.sh +++ b/scripts/publish-dpla.sh @@ -12,7 +12,7 @@ SKIP_VALIDATION='--skipSchemaValidation' mcclient publish ${SKIP_VALIDATION} \ --jqFilter '._source | del(.aesthetics)' \ - --idFilter '.native_id | sub("dpla_http://dp.la/api/items/(?.+)"; ".id")' \ + --idFilter '.native_id | sub("dpla_http://dp.la/api/items/(?.+)"; "\(.id)")' \ --prefix 'dpla' ${NAMESPACE} \ ${SCHEMA_HASH} \ diff --git a/scripts/publish-flickr-c10.sh b/scripts/publish-flickr-c10.sh index fffacf7..4518822 100755 --- a/scripts/publish-flickr-c10.sh +++ b/scripts/publish-flickr-c10.sh @@ -7,7 +7,7 @@ COMPOUND="--compound 10" mcclient publish ${COMPOUND} \ --skipSchemaValidation \ --jqFilter '._source | del(.aesthetics)' \ - --idFilter '.native_id' \ + --idFilter '.native_id | sub("flickr[^_]*_(?\\d+)"; "\(.id)")' \ --prefix 'flickr' ${NAMESPACE} \ ${SCHEMA_HASH} \ diff --git a/scripts/publish-flickr-c100.sh b/scripts/publish-flickr-c100.sh index 0f2683d..0d33c96 100755 --- a/scripts/publish-flickr-c100.sh +++ b/scripts/publish-flickr-c100.sh @@ -7,7 +7,7 @@ COMPOUND="--compound 100" mcclient publish ${COMPOUND} \ --skipSchemaValidation \ --jqFilter '._source | del(.aesthetics)' \ - --idFilter '.native_id' \ + --idFilter '.native_id | sub("flickr[^_]*_(?\\d+)"; "\(.id)")' \ --prefix 'flickr' ${NAMESPACE} \ ${SCHEMA_HASH} \ diff --git a/scripts/publish-flickr.sh b/scripts/publish-flickr.sh index c376eb3..3776901 100755 --- a/scripts/publish-flickr.sh +++ b/scripts/publish-flickr.sh @@ -12,7 +12,7 @@ SKIP_VALIDATION='--skipSchemaValidation' mcclient publish ${SKIP_VALIDATION} \ --jqFilter '._source | del(.aesthetics)' \ - --idFilter '.native_id' \ + --idFilter '.native_id | sub("flickr[^_]*_(?\\d+)"; "\(.id)")' \ --prefix 'flickr' ${NAMESPACE} \ ${SCHEMA_HASH} \ diff --git a/scripts/publish-pexels.sh b/scripts/publish-pexels.sh index c08cede..d673431 100755 --- a/scripts/publish-pexels.sh +++ b/scripts/publish-pexels.sh @@ -11,8 +11,8 @@ SKIP_VALIDATION='--skipSchemaValidation' mcclient publish ${SKIP_VALIDATION} \ --jqFilter '._source | del(.aesthetics)' \ - --idFilter '.native_id' \ - --prefix 'flickr' + --idFilter '.native_id | sub("flickr[^_]*_(?\\d+)"; "\(.id)")' \ + --prefix 'pexels' ${NAMESPACE} \ ${SCHEMA_HASH} \ $1 > /dev/null