Backend for Somali speech corpus web app.
-
Open Database_SomPro.fmp12 in FileMaker Pro
-
Choose the Types table and click Show All
-
Choose File → Export records...
-
Choose Tab-separated file and save as Types.tab
-
Choose fields indicated by
db/model.sqlin the same order -
Do the same with the other tables (all of them?)
-
Remove/convert weird characters:
for file in ../*.tab; do tr "\r" "\n" < $file | tr -d "\0\013" > import/data/$(basename $file .tab).tsv; done -
Sensitive names in the data can be substituted with:
cat import/data/Tokens.tsv | sed s/NAME1/Mf/g | [...] > import/data/Tokens2.tsv # Check results... -
Review, commit and push the resulting tsv files
-
Run
import/import.sh
- Global FILE privilege is needed, which may be unsuitable for a server. Then do import locally and export/import database dump.
- Fix and commit any remaining inconsistencies in tsv data.
Create a config.ini file in this directory, containing at least the database host and password:
DB_HOST=<host>
DB_PASS=<password>
Serve the db/ directory on a host with PHP and MySQL support. Do not allow access to config.ini.
For development, you can use PHP's built-in web server:
php -S localhost:8030 -t db