Use this bash script and command to pull down all records from invenio and save them as discrete files within uniquely named directories
Create a file named invenio_recs.sh
with these contents:
#!/bin/bash
#create directory for records
If you have a directory path with many JSON files in it and you want them all on a single document for batch edits use JS
find . -name '*.json' -exec cat '{}' + | jq -s '.' > /Users/staff/Desktop/newjsonsinglefile.json
To reduce the process time for exceedingly large examples, you may be able to simply use
find . -name '*.json' -exec jq -s '{}' + > /Users/staff/Desktop/newjsonsinglefile.json
If you have a bunch of .jpg photos in a directory that were taken with a camera with coordinates associated, this workflow will allow you to recursively get the coordinates.
First, install exiftool
Then, from the directory where all of the .JPGs are
exiftool /Users/andrewbattista/desktop/*.JPG |grep 'File Name\|GPS Latitude\|GPS Longitude'
This shell script assumes that you have already installed GDAL and are converting between .KMZ files and Shapefiles with the names preserved. The specific ogr2ogr
commands can be changed as needed.
This also assumes many .KMZ files in a single directory. Kudos to Marii Nyrop.
Begin by creating a file named batch-separate-folders.sh
with the following and place it in your directory with the KMZs:
for KMZ in *.kmz; do
IDENTIFIER="$(basename ${KMZ} .kmz)"