mirror of
https://github.com/factbook/factbook.json.git
synced 2026-06-28 19:39:38 +02:00
Minor edits
This commit is contained in:
parent
ae90bf82ad
commit
3bd9fcfbca
1 changed files with 26 additions and 0 deletions
26
import.sh
Executable file
26
import.sh
Executable file
|
|
@ -0,0 +1,26 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
function import_region {
|
||||||
|
for file in `pwd`/$1/*.json
|
||||||
|
do
|
||||||
|
echo " importing >${file}"
|
||||||
|
mongoimport --db world --collection factbook --file ${file}
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
import_region africa
|
||||||
|
import_region antarctica
|
||||||
|
import_region australia-oceania
|
||||||
|
import_region central-america-n-caribbean
|
||||||
|
import_region central-asia
|
||||||
|
import_region east-n-southeast-asia
|
||||||
|
import_region europe
|
||||||
|
import_region middle-east
|
||||||
|
import_region north-america
|
||||||
|
import_region oceans
|
||||||
|
import_region south-america
|
||||||
|
import_region south-asia
|
||||||
|
import_region world
|
||||||
|
|
||||||
|
echo "Finished"
|
||||||
Loading…
Add table
Add a link
Reference in a new issue