Skip to content

Instantly share code, notes, and snippets.

@mtholder
Created March 4, 2025 18:40
Show Gist options
  • Save mtholder/37d063b6bbc31c9ddf70bcdc15b46be2 to your computer and use it in GitHub Desktop.
Save mtholder/37d063b6bbc31c9ddf70bcdc15b46be2 to your computer and use it in GitHub Desktop.
create several OTT DWCa dumps - see comments
#!/bin/bash
#
# Master script using MTH's hard-coded paths used to create darwin core
# archives
# Requires do-dwca-export.sh available from https://gist.github.com/mtholder/f733a75fe1616af1841ded62aadb4f04
# See also https://github.com/SpeciesFileGroup/2025_workshop_on_taxon_names
set -x
od=ott3.7.2-dwca
inp="/home/mholder/ot2023/ott/ott3.7.2"
if ! test -f ott3.7.2-dwca.sql.sqlite ; then
bash do-dwca-export.sh "${od}" "${inp}" || exit
fi
if ! test -d ott3.7.2metazoa ; then
otc-taxonomy-parser -x 691846 --write-taxonomy ott3.7.2metazoa "${inp}" || exit
bash do-dwca-export.sh "ott3.7.2metazoa-dwca" "ott3.7.2metazoa" || exit
fi
if ! test -d ott3.7.2chordata ; then
otc-taxonomy-parser -x 125642 --write-taxonomy ott3.7.2chordata "ott3.7.2metazoa" || exit
bash do-dwca-export.sh "ott3.7.2chordata-dwca" "ott3.7.2chordata" || exit
fi
if ! test -d ott3.7.2aves ; then
otc-taxonomy-parser -x 81461 --write-taxonomy ott3.7.2aves "ott3.7.2chordata" || exit
bash do-dwca-export.sh "ott3.7.2aves-dwca" "ott3.7.2aves" || exit
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment