From: olivier Date: Fri, 13 Jun 2008 15:30:49 +0000 (+0000) Subject: import: add raw_conversion README and 4D methods X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=87ec5852f1275ed5a9444e46c558573676ec52e3;p=telemeta-data.git import: add raw_conversion README and 4D methods git-svn-id: http://svn.parisson.org/svn/crem@28 3bf09e05-f825-4182-b9bc-eedd7160adf0 --- diff --git a/import/raw_conversion/README b/import/raw_conversion/README new file mode 100644 index 0000000..ddbf038 --- /dev/null +++ b/import/raw_conversion/README @@ -0,0 +1,34 @@ +========================================= +CREM database: 4D to MySQL raw conversion +========================================= + +Instructions and scripts to perform a full raw conversion of the CREM +database from 4D to MySQL. The result has the same structure as the +original 4D database, and, as such, can't be used directly in +Telemeta. + +Exporting the 4D database to text files +--------------------------------------- + +These instructions are for 4D 6.5.x on Windows. It should be possible to do this on +the Mac version too, with a few modifications. Warning: do this on a copy of the 4D +database, not on the production one. + +1. Export all tables (all fields, all records) to windows "Text" + files, **with column titles**, using the 4D export dialogs. The resulting + files must named as the table with .txt as extension (ex: ``Support.txt``) + +2. Create a new 4D method using the code provided in ``export_formations_4d.txt`` + and run it in order to export many-to-many instruments/performances relations + to ``C:\Formation.txt`` + + Side note: if you're using a demo version of 4D you can't create a new method. + Just replace an existing method in this case. + +3. Create a new 4D method using the code provided in + ``export_fonction_usage_4d.txt`` and run it in order to export many-to-many + keywords relations to ``C:\Fonction_Usage.txt`` + + + + diff --git a/import/raw_conversion/export_fonction_usage_4d.txt b/import/raw_conversion/export_fonction_usage_4d.txt new file mode 100644 index 0000000..de097e0 --- /dev/null +++ b/import/raw_conversion/export_fonction_usage_4d.txt @@ -0,0 +1,22 @@ + +$doc:=Creer document("c:\Fonction_Usage.txt";"TXT") +Si (ok=1) + $tab:=Caractere(9) + $fin:=Caractere(13) + TOUT SELECTIONNER([Phono]) + Boucle ($i;1;Enregistrements trouves([Phono])) + $cote:=[Phono]Cote_Phono + TOUS LES SOUS ENREGISTREMENTS([Phono]Fonction_Usage) + Boucle ($j;1;Sous enregistrements trouves([Phono]Fonction_Usage) + $texte:=$cote+$tab+[Phono]Fonction_Usage'Mot_Clef+$fin + ENVOYER PAQUET($doc;Mac vers Windows($texte)) + SOUS ENREGISTREMENT SUIVANT([Phono]Fonction_Usage) + Fin de boucle + LIBERER ENREGISTREMENT([Phono]) + ENREGISTREMENT SUIVANT([Phono]) + Fin de boucle + + FERMER DOCUMENT($doc) + +Fin de si + diff --git a/import/raw_conversion/export_formations_4d.txt b/import/raw_conversion/export_formations_4d.txt new file mode 100644 index 0000000..68f73cb --- /dev/null +++ b/import/raw_conversion/export_formations_4d.txt @@ -0,0 +1,22 @@ + +$doc:=Creer document("c:\Formation.txt";"TXT") +Si (ok=1) + $tab:=Caractere(9) + $fin:=Caractere(13) + TOUT SELECTIONNER([Phono]) + Boucle ($i;1;Enregistrements trouves([Phono])) + $cote:=[Phono]Cote_Phono + TOUS LES SOUS ENREGISTREMENTS([Phono]Formation) + Boucle ($j;1;Sous enregistrements trouves([Phono]Formation) + $texte:=$cote+$tab+[Phono]Formation'Instr_Scientif+$tab+[Phono]Formation'Instr_Vernacul+$tab+[Phono]Formation'Interpr?te+$tab+[Phono]Formation'Total_Instrum+$fin + ENVOYER PAQUET($doc;Mac vers Windows($texte)) + SOUS ENREGISTREMENT SUIVANT([Phono]Formation) + Fin de boucle + LIBERER ENREGISTREMENT([Phono]) + ENREGISTREMENT SUIVANT([Phono]) + Fin de boucle + + FERMER DOCUMENT($doc) + +Fin de si +