]> git.parisson.com Git - telemeta-data.git/commitdiff
add MNHN data prototype import + consolidate MUCEM import
authorolivier <olivier@3bf09e05-f825-4182-b9bc-eedd7160adf0>
Fri, 23 Jan 2009 18:11:11 +0000 (18:11 +0000)
committerolivier <olivier@3bf09e05-f825-4182-b9bc-eedd7160adf0>
Fri, 23 Jan 2009 18:11:11 +0000 (18:11 +0000)
git-svn-id: http://svn.parisson.org/svn/crem@57 3bf09e05-f825-4182-b9bc-eedd7160adf0

trunk/import/README
trunk/import/prototype/README.mnhn [new file with mode: 0644]
trunk/import/prototype/scripts/mnhn-import.sql [new file with mode: 0644]
trunk/import/prototype/scripts/mucem-import.sql
trunk/import/prototype/src/mnhn-2009-15-23/Item+CollGabon.csv [new file with mode: 0644]
trunk/import/prototype/src/mnhn-2009-15-23/Item+CollGabon.xls [new file with mode: 0644]

index 3d88096cea170761b9aeeb104eccb6e5dd6b9066..d76aa8217fcd9f9993f1d8732b39902402ef767d 100644 (file)
@@ -1,10 +1,10 @@
 
 ==========================================
-CREM/MUCEM data import instructions and programs
+CREM/MUCEM/MNHN data import instructions and programs
 ==========================================
 
 * ``prototype`` : this directory contains scripts to perform an experimental
-  import of the CREM/MUCEM database into Telemeta 0.3.x. It is only meant as a
+  import of the CREM/MUCEM/MNHN database into Telemeta 0.3.x. It is only meant as a
   proof of concept.
 * ``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
diff --git a/trunk/import/prototype/README.mnhn b/trunk/import/prototype/README.mnhn
new file mode 100644 (file)
index 0000000..e12a3e9
--- /dev/null
@@ -0,0 +1,35 @@
+==================================================
+MUCEM data and how to import it into Telemeta 0.3.x
+==================================================
+
+Warning: the following instructions allow you to import the MUCEM's data
+into telemeta. However, it is currently a rather data destructive process,
+only meant for demonstration and testing purpose. Do not use this in a
+production environment.
+
+1.  Install Telemeta upon MySQL. Initialize the database using Telemeta's
+    Django models. Ensure that everything is running fine before going any 
+    further.
+
+2.  Copy the csv data into /tmp/mucem_import.csv
+
+    Example::
+
+    $ cp src/mucem-2009-15-01/ItemCollMucem15-01.csv /tmp/mucem_import.csv
+
+3.  Use the SQL import script to insert the data into your MySQL database.
+
+    Example::
+
+    $ mysql your_telemeta_database < scripts/mucem-import.sql
+
+4.  Copy the WAV test file of your choice, into <MEDIA_ROOT>/items/test.wav
+    This single file is associated with all media items, for testing purpose.
+
+That should be it. If you want to run Telemeta against SQLite instead of 
+MySQL, first follow the above instructions to import the data into MySQL.
+Then convert your data from MySQL to SQLite, this is a common task, google 
+about it.
+
+
+
diff --git a/trunk/import/prototype/scripts/mnhn-import.sql b/trunk/import/prototype/scripts/mnhn-import.sql
new file mode 100644 (file)
index 0000000..170804a
--- /dev/null
@@ -0,0 +1,42 @@
+
+SET NAMES 'utf8';
+
+CREATE TEMPORARY TABLE mnhn_import (
+    f1 VARCHAR (255) NOT NULL, f2 VARCHAR (255) NOT NULL, f3 VARCHAR (255) NOT NULL,
+    f4 VARCHAR (255) NOT NULL, f5 VARCHAR (255) NOT NULL, f6 VARCHAR (255) NOT NULL,
+    f7 VARCHAR (255) NOT NULL, f8 VARCHAR (255) NOT NULL, f9 VARCHAR (255) NOT NULL,
+    f10 VARCHAR (255) NOT NULL, f11 VARCHAR (255) NOT NULL, f12 VARCHAR (255) NOT NULL,
+    f13 VARCHAR (255) NOT NULL, f14 VARCHAR (255) NOT NULL, f15 VARCHAR (255) NOT NULL,
+    f16 VARCHAR (255) NOT NULL, f17 VARCHAR (255) NOT NULL, f18 VARCHAR (255) NOT NULL,
+    f19 VARCHAR (255) NOT NULL, f20 VARCHAR (255) NOT NULL, f21 VARCHAR (255) NOT NULL,
+    f22 VARCHAR (255) NOT NULL, f23 VARCHAR (255) NOT NULL, f24 VARCHAR (255) NOT NULL,
+    f25 VARCHAR (255) NOT NULL, f26 VARCHAR (255) NOT NULL, f27 VARCHAR (255) NOT NULL,
+    f28 VARCHAR (255) NOT NULL, f29 VARCHAR (255) NOT NULL, f30 VARCHAR (255) NOT NULL,
+    f31 VARCHAR (255) NOT NULL, f32 VARCHAR (255) NOT NULL, f33 VARCHAR (255) NOT NULL,
+    f34 VARCHAR (255) NOT NULL, f35 VARCHAR (255) NOT NULL, f36 VARCHAR (255) NOT NULL,
+    f37 VARCHAR (255) NOT NULL, f38 VARCHAR (255) NOT NULL, f39 VARCHAR (255) NOT NULL,
+    f40 VARCHAR (255) NOT NULL, f41 VARCHAR (255) NOT NULL, f42 VARCHAR (255) NOT NULL,
+    f43 VARCHAR (255) NOT NULL, f44 VARCHAR (255) NOT NULL, f45 VARCHAR (255) NOT NULL,
+    f46 VARCHAR (255) NOT NULL, f47 VARCHAR (255) NOT NULL
+);
+
+LOAD DATA INFILE '/tmp/mnhn_import.csv' INTO TABLE mnhn_import 
+  CHARACTER SET 'utf8' FIELDS TERMINATED BY ',' ENCLOSED BY '"' ESCAPED BY '"';
+
+DELETE FROM telemeta_item;
+INSERT INTO telemeta_item 
+SELECT f1, f2, f3, f4, f5, f6, f7, f8, CONCAT_WS(' - ', f46, f9), f10, 
+  f11, f12, f13, f14, f16, f17, f18, f19, f20, f22, f23, f24, f25, f26, f27, 
+  f28, f29, f30, "", f31, 'items/test.wav' FROM mnhn_import;
+UPDATE telemeta_item SET continent = UPPER(continent);  
+
+DELETE FROM telemeta_collection;
+INSERT INTO telemeta_collection (physical_format, id, title, physical_items_num, 
+  creator, booklet_writer)
+SELECT f2, f3, f11, COUNT(*), f25, f47 FROM mnhn_import GROUP BY f3;  
+  
+DELETE FROM telemeta_physicalformat;
+INSERT INTO telemeta_physicalformat (value)
+    SELECT DISTINCT physical_format FROM telemeta_collection
+    WHERE physical_format <> '' AND physical_format IS NOT NULL;
+
index f8b11baf0ff930608b5c3f0b3a6f09347e273062..e72fc59fe1fb76c805b7c6b3f061ab450b937009 100644 (file)
@@ -34,7 +34,7 @@ UPDATE telemeta_item SET continent = UPPER(continent);
 DELETE FROM telemeta_collection;
 INSERT INTO telemeta_collection (physical_format, id, title, physical_items_num, 
   creator, booklet_writer)
-SELECT f2, f3, f11, "1", f25, f47 FROM mucem_import;  
+SELECT f2, f3, f11, COUNT(*), f25, f47 FROM mucem_import GROUP BY f3;  
   
 DELETE FROM telemeta_physicalformat;
 INSERT INTO telemeta_physicalformat (value)
diff --git a/trunk/import/prototype/src/mnhn-2009-15-23/Item+CollGabon.csv b/trunk/import/prototype/src/mnhn-2009-15-23/Item+CollGabon.csv
new file mode 100644 (file)
index 0000000..2bfd25d
--- /dev/null
@@ -0,0 +1,17 @@
+,"CD audio","MNHN_E_2004_001",1,"MNHN_E_2004_001_01",03:20:00 AM,2003.07,"Gabon","Haut-Ogooué","Bateke (Atege)","MPA BATEKE","Olobo","Musiques Bateke",,"Voix chantée homme",,,,"agriculture","Chant interpréé lors du défrichement d'un champ","""Musiques Bateke, Mpa Atege, Gabon"". Sepia",,,,"Le Bomin, Sylvie",,2003,,,,"Afrique",,"Mission sur le terrain",,"Bande magnétique","Stéréo",,,,,"19,5 cm/s",,,"Théodore Ossele","MNHN","Odjouma","Simonnot"
+,"CD audio","MNHN_E_2004_001",2,"MNHN_E_2004_001_02",01:14:00 AM,2003.07,"Gabon","Haut-Ogooué","Bateke (Atege)","MPA BATEKE","Ndombi 1","Musiques Bateke",,"Voix chantée homme, femme",,,,"agriculture","Dans les plantations","""Musiques Bateke, Mpa Atege, Gabon"". Sepia",,,,"Le Bomin, Sylvie",,2003,,,,"Afrique",,"Mission sur le terrain",,"Bande magnétique","Stéréo",,,,,"19,5 cm/s",,,"Chlotilde Michemi et Théodore Ossele","MNHN","Odjouma","Simonnot"
+,"CD audio","MNHN_E_2004_001",3,"MNHN_E_2004_001_03",03:57:00 AM,2004.04,"Gabon","Haut-Ogooué","Bateke (Atege)","MPA BATEKE","Onkila 1","Musiques Bateke",,"Voix chantée homme et pluriarc (ngwomi)",,,,"Rituel","Ce chant du culte Onkila est une complainte adressée par une mère de jumeaux à sa propre mère.","""Musiques Bateke, Mpa Atege, Gabon"". Sepia","Le ngwomi est l'instrument emblématique des Otege. ",,,"Le Bomin, Sylvie",,2004,,,,"Afrique",,"Mission sur le terrain",,"Bande magnétique","Stéréo",,,,,"19,5 cm/s",,,"Paul Lakungu","MNHN","Odjouma","Simonnot"
+,"CD audio","MNHN_E_2004_001",4,"MNHN_E_2004_001_04",03:44:00 AM,2004.04,"Gabon","Haut-Ogooué","Bateke (Atege)","MPA BATEKE","Onkila 2","Musiques Bateke",,"Voix chantée homme et pluriarc (ngwomi)",,,,"Rituel","Ce chant évoque différenfs cas de naissances extraordinnaires.","""Musiques Bateke, Mpa Atege, Gabon"". Sepia","Le ngwomi est l'instrument emblématique des Otege. ",,,"Le Bomin, Sylvie",,2004,,,,"Afrique",,"Mission sur le terrain",,"Bande magnétique","Stéréo",,,,,"19,5 cm/s",,,"Paul Lakungu","MNHN","Odjouma","Simonnot"
+,"CD audio","MNHN_E_2004_001",5,"MNHN_E_2004_001_05",12:56:00 AM,2003.11,"Gabon","Haut-Ogooué","Bateke (Atege)","MPA BATEKE","Ndombi 2","Musiques Bateke",,"Voix chantée soliste femme et chœur mixte",,,,"divertissement","Ce chant évoque une forme de mariage coutumier ""obali"", où la fille non encore née est déjà promise à un homme âgé qui devra l'élever dès sa naissance.","""Musiques Bateke, Mpa Atege, Gabon"". Sepia",,,,"Le Bomin, Sylvie",,2003,,,,"Afrique",,"Mission sur le terrain",,"Bande magnétique","Stéréo",,,,,"19,5 cm/s",,,"Chlotilde Michemi","MNHN","Odjouma","Simonnot"
+,,"MNHN_E_2004_001",6,"MNHN_E_2004_001_06",02:30:00 AM,2003,"Gabon","Haut-Ogooué","Bateke (Atege)","MPA BATEKE","Ndombi 3","Musiques Bateke",,"Voix chantée femme et 2 tambours kakani et kadziri",,,,,,"""Musiques Bateke, Mpa Atege, Gabon"". Sepia",,,,"Le Bomin, Sylvie",,2003,,,,"Afrique",,"Mission sur le terrain",,"Bande magnétique","Stéréo",,,,,"19,5 cm/s",,,,"MNHN",,"Simonnot"
+,"CD audio","MNHN_E_2004_001",7,"MNHN_E_2004_001_07",06:12:00 AM,2003.07,"Gabon","Haut-Ogooué","Bateke (Atege)","MPA BATEKE","Mbali","Musiques Bateke",,"Voix chantée homme",,,,"divertissement","exposé des techniques vocales","""Musiques Bateke, Mpa Atege, Gabon"". Sepia",,,,"Le Bomin, Sylvie",,2003,,,,"Afrique",,"Mission sur le terrain",,"Bande magnétique","Stéréo",,,,,"19,5 cm/s",,,"Théodore Ossele","MNHN","Odjouma","Simonnot"
+,"CD audio","MNHN_E_2004_001",8,"MNHN_E_2004_001_08",01:14:00 AM,2003.12,"Gabon","Haut-Ogooué","Bateke (Atege)","MPA BATEKE","Ngwata ","Musiques Bateke",,"Chant soliste et polyphonique enfants",,,,"divertissement","Chant issu du répertoire ngwata","""Musiques Bateke, Mpa Atege, Gabon"". Sepia",,,,"Le Bomin, Sylvie",,2003,,,,"Afrique",,"Mission sur le terrain",,"Bande magnétique","Stéréo",,,,,"19,5 cm/s",,,"Estelle Nalebara","MNHN","Odjouma","Simonnot"
+,"CD audio","MNHN_E_2004_001",9,"MNHN_E_2004_001_09",03:36:00 AM,2003.08,"Gabon","Haut-Ogooué","Bateke (Atege)","MPA BATEKE","Otchendze","Musiques Bateke",,"Voix chantée homme et harpe cythare (otchendze)",,,,"divertissement",,"""Musiques Bateke, Mpa Atege, Gabon"". Sepia",,,,"Le Bomin, Sylvie",,2003,,,,"Afrique",,"Mission sur le terrain",,"Bande magnétique","Stéréo",,,,,"19,5 cm/s",,,"Jean-Jacques Sami","MNHN","Odjouma","Simonnot"
+,"CD audio","MNHN_E_2004_001",10,"MNHN_E_2004_001_10",02:31:00 AM,2003.11,"Gabon","Haut-Ogooué","Bateke (Atege)","MPA BATEKE","Lankwa","Musiques Bateke",,"Arc musical",,,,"divertissement",,"""Musiques Bateke, Mpa Atege, Gabon"". Sepia",,,,"Le Bomin, Sylvie",,2004,,,,"Afrique",,"Mission sur le terrain",,"Bande magnétique","Stéréo",,,,,"19,5 cm/s",,,"Marcel Gafouta","MNHN","Ekala","Simonnot"
+,"Bande magnétique","MNHN_E_2004_001",11,"MNHN_E_2004_001_11",07:43:00 AM,1965.07,"Gabon","Haut-Ogooué","Bateke (Atege)","MPA BATEKE","Ebanighi 1 ","Musiques Bateke",,"Voix chantée homme",,,,,,"""Musiques Bateke, Mpa Atege, Gabon"". Sepia",,,,"Pierre Sallée",,1965,,,,"Afrique",,"Mission sur le terrain",,"Bande magnétique","Stéréo",,,,,"19,5 cm/s",,,,"MNHN/MH","Lekoni","Simonnot"
+,"Bande magnétique","MNHN_E_2004_001",12,"MNHN_E_2004_001_12",08:58:00 AM,1946.08,"Congo","Haut-Ogooué","Bateke (Atege)","MPA BATEKE","Ebanighi 2","Musiques Bateke",,,,,,"Danse",,"""Musiques Bateke, Mpa Atege, Gabon"". Sepia",,,,"Gilbert Rouget et André Didier",,1946,,,,"Afrique",,"Mission sur le terrain",,"Disque Pyral","Mono",,,,,"78T",,,,"MNHN/CNRS","Oka","Simonnot"
+,"Bande magnétique","MNHN_E_2004_001",13,"MNHN_E_2004_001_13",05:05:00 AM,1965.07,"Gabon","Haut-Ogooué","Bateke (Atege)","MPA BATEKE","Onkila 3 ","Musiques Bateke",,"Voix chantée homme",,,,"Culte de Onkila",,"""Musiques Bateke, Mpa Atege, Gabon"". Sepia",,,,"Pierre Sallée",,1965,,,,"Afrique",,"Mission sur le terrain",,"Bande magnétique","Stéréo",,,,,"19,5 cm/s",,,,"MNHN","Lekoni","Simonnot"
+,"Bande magnétique","MNHN_E_2004_001",14,"MNHN_E_2004_001_14",01:43:00 AM,1965.07,"Gabon","Haut-Ogooué","Bateke (Atege)","MPA BATEKE","Kansanzi ","Musiques Bateke",,"Sanza (kasanzi)",,,,,,"""Musiques Bateke, Mpa Atege, Gabon"". Sepia",,,,"Pierre Sallée",,1965,,,,"Afrique",,"Mission sur le terrain",,"Bande magnétique","Stéréo",,,,,"19,5 cm/s",,,,"MNHN","Tsoulo","Simonnot"
+,"Bande magnétique","MNHN_E_2004_001",15,"MNHN_E_2004_001_15",03:54:00 AM,1946.08,"Gabon","Haut-Ogooué","Bateke (Atege)","MPA BATEKE","Olamagha 1","Musiques Bateke",,"Voix chantée homme",,,,"Danse",,"""Musiques Bateke, Mpa Atege, Gabon"". Sepia",,,,"Gilbert Rouget et André Didier",,1946,,,,"Afrique",,"Mission sur le terrain",,"Disque Pyral","Mono",,,,,"78T",,"District d'Ewo",,"MNHN","Oka","Simonnot"
+,"Bande magnétique","MNHN_E_2004_001",16,"MNHN_E_2004_001_16",02:07:00 AM,1965.07,"Gabon","Haut-Ogooué","Bateke (Atege)","MPA BATEKE","Olamagha 2 ","Musiques Bateke",,"Voix chantée homme, chœur homme, chœur femme",,,,"Danse",,"""Musiques Bateke, Mpa Atege, Gabon"". Sepia",,,,"Pierre Sallée",,1965,,,,"Afrique",,"Mission sur le terrain",,"Bande magnétique","Stéréo",,,,,"19,5 cm/s",,,,"MNHN","Saye","Simonnot"
+,"CD audio","MNHN_E_2004_001",17,"MNHN_E_2004_001_17",02:39:00 AM,2004.04,"Gabon","Haut-Ogooué","Bateke (Atege)","MPA BATEKE","Onkila 4 ","Musiques Bateke",,"Voix chantée homme et pluriarc",,,,"Culte de Onkila",,"""Musiques Bateke, Mpa Atege, Gabon"". Sepia",,,,"Le Bomin, Sylvie",,2004,,,,"Afrique",,"Mission sur le terrain",,"Bande magnétique","Stéréo",,,,,"19,5 cm/s",,,"Paul Lakungu","MNHN","Odjouma","Simonnot"
diff --git a/trunk/import/prototype/src/mnhn-2009-15-23/Item+CollGabon.xls b/trunk/import/prototype/src/mnhn-2009-15-23/Item+CollGabon.xls
new file mode 100644 (file)
index 0000000..28543d8
Binary files /dev/null and b/trunk/import/prototype/src/mnhn-2009-15-23/Item+CollGabon.xls differ