Revision 1451
Added by Aaron Marcuse-Kubitza almost 13 years ago
inputs/GBIF/src/GBIF.specimens.txt.header | ||
---|---|---|
1 |
0 1 Collector 3 LatestDateCollected InstitutionCD CollectionCD CatalogNO LastDateModified IdentifiedBy ScientificNameOriginal AuthorOfScientificName ScientificName GBIFFamilyOriginal Family GBIFGenusOriginal Genus Country Locality County StateProvince DecimalLatitude VerbatimLatitude DecimalLongitude VerbatimLongitude 25 MinimumElevationInMeter MaximumElevationInMeter SpecificEpithet InfraspecificEpithet |
inputs/GBIF/src/GBIF.0.header.specimens.txt | ||
---|---|---|
1 |
0 1 Collector 3 LatestDateCollected InstitutionCD CollectionCD CatalogNO LastDateModified IdentifiedBy ScientificNameOriginal AuthorOfScientificName ScientificName GBIFFamilyOriginal Family GBIFGenusOriginal Genus Country Locality County StateProvince DecimalLatitude VerbatimLatitude DecimalLongitude VerbatimLongitude 25 MinimumElevationInMeter MaximumElevationInMeter SpecificEpithet InfraspecificEpithet |
inputs/input.Makefile | ||
---|---|---|
135 | 135 |
inputFiles := $(wildcard $(exts:%=src/*.%)) |
136 | 136 |
|
137 | 137 |
+maps = $(filter maps/% $(mappings)/%,$(+_)) |
138 |
<in = $(firstword $(filter-out $(+maps),$(+_)) $(wildcard $(exts:%=src/*.$*.%))) |
|
139 |
inputs = $(strip $(wildcard $(<in).header) $(<in)) |
|
140 |
map = $(if $(inputs),$(bin)/with_cat $(inputs) -- ,$(if $(mapEnv),env $(mapEnv)\ |
|
141 |
,$(error No input file src/*.$*.{$(exts)})))$(root)/map $(+maps) |
|
138 |
<in = $(firstword $(filter-out $(+maps),$(+_))) |
|
139 |
srcs = $(sort $(wildcard $(exts:%=src/*.$*.%))) |
|
140 |
map = $(if $(<in),<$(<in),\ |
|
141 |
$(if $(srcs),$(bin)/with_cat_csv $(srcs) --,\ |
|
142 |
$(if $(mapEnv),env $(mapEnv),\ |
|
143 |
$(error No input file src/*.$*.{$(exts)}))))\ |
|
144 |
$(root)/map $(+maps) |
|
142 | 145 |
map2db = env out_database=vegbien $(map) |
143 | 146 |
|
144 | 147 |
##### Import to VegBIEN |
Also available in: Unified diff
input.Makefile: Mapping: Support multiple segments of a source table flat file. Use with_cat_csv if flat file segment(s) are available; otherwise use the input file in $+ or the input database, if any. Don't look for an explicit CSV header file because it can now be handled as the first segment if appropriately named.