Procházet zdrojové kódy

Corrida del archivo extract_files.js genera copias de archivos json en folder 'data'.

lyxaira.glass před 5 roky
rodič
revize
0d6dd4b6c5

+ 1
- 0
www/data/AROMATIZACIÓN.json
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 1
- 0
www/data/BAMBÚ.json
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 1
- 0
www/data/BARRO.json
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 1
- 0
www/data/CARETAS.json
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 1
- 0
www/data/CRISTAL.json
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 1
- 0
www/data/CUERO.json
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 1
- 0
www/data/DESECHOSMARINOS.json
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 1
- 0
www/data/DULCESTÍPICOS.json Zobrazit soubor

@@ -0,0 +1 @@
1
+[{"Nombre":"Daphne L. Labault Romero","Especificaciones":"Joyer\u00eda, Resina","Tel\u00e9fono 1":"(787) 671-3101","E-mail":"petalobydaphne@gmail.com","Municipio":"San Juan PR","id":0},{"Nombre":"El\u00ed J. David Cede\u00f1o","Especificaciones":"Cera, Figuras y simbolos indigenas, Im\u00e1genes Religiosas, S\u00edmbolos Patrios","Tel\u00e9fono 1":"(787) 795-2890","E-mail":"","Municipio":"Toa Baja PR","id":1},{"Nombre":"H\u00e9ctor L. Pe\u00f1a Gonz\u00e1lez","Especificaciones":"Cemento, S\u00edmbolos Patrios","Tel\u00e9fono 1":"","E-mail":"","Municipio":"","id":2},{"Nombre":"Nancy Laureano Figueroa","Especificaciones":"Cascarones  de frutas, Joyer\u00eda","Tel\u00e9fono 1":"(787) 451-9375","E-mail":"nancylaureano@yahoo.com","Municipio":"Bayam\u00f3n PR","id":3},{"Nombre":"Josefina Mart\u00ednez Campos","Especificaciones":"Cascarones de huevos, Figuras, S\u00edmbolos Patrios","Tel\u00e9fono 1":"(939) 216-3500","E-mail":"yamanay3@gmail.com","Municipio":"Arecibo PR","id":4},{"Nombre":"Lizzette M. Santiago Agosto","Especificaciones":"Velas","Tel\u00e9fono 1":"(787) 214-3393","E-mail":"lizziesan622@gmail.com","Municipio":"Yabucoa PR","id":5},{"Nombre":"Luis G. S\u00e1nchez Cruz","Especificaciones":"Pique","Tel\u00e9fono 1":"(787) 412-0205","E-mail":"","Municipio":"Gurabo PR","id":6},{"Nombre":"Mar\u00eda M. Rivera V\u00e1zquez","Especificaciones":"Cabello (Pelo), Figuras","Tel\u00e9fono 1":"(787) 672-9872","E-mail":"","Municipio":"Salinas PR","id":7},{"Nombre":"Ram\u00f3n Buchamp","Especificaciones":"Cemento","Tel\u00e9fono 1":"(787) 831-1434","E-mail":"","Municipio":"Mayag\u00fcez PR","id":8},{"Nombre":"Ram\u00f3n F. Lugo Silva","Especificaciones":"","Tel\u00e9fono 1":"(787) 368-0582","E-mail":"mochoreciklarte@gmail.com","Municipio":"Ponce PR","id":9},{"Nombre":"Silvia Solorzano Cede\u00f1o","Especificaciones":"Resina","Tel\u00e9fono 1":"(787) 636-0073","E-mail":"","Municipio":"","id":10}]

+ 1
- 0
www/data/FIBRAS.json
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 1
- 0
www/data/HIGÜERA.json
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 1
- 0
www/data/INSTRUMENTOSTÍPICOS.json
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 1
- 0
www/data/JUGUETESTRADICIONALES.json
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 1
- 0
www/data/LABORESENAGUJA.json
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 1
- 0
www/data/MADERA.json
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 1
- 0
www/data/METAL.json
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 1
- 0
www/data/PAPELCARTÓN.json
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 1
- 0
www/data/PIEDRAS.json Zobrazit soubor

@@ -0,0 +1 @@
1
+[{"Nombre":"Andr\u00e9s Mel\u00e9ndez Cosme","Especificaciones":"Cuadros, Figuras, Placas, S\u00edmbolos","Tel\u00e9fono 1":"(787) 373-9225","E-mail":"talladepiedrasarte@gmail.com","Municipio":"Comer\u00edo PR","id":0},{"Nombre":"\u00c1ngel R. Medina Mart\u00ednez","Especificaciones":"Figuras y simbolos indigenas, Instrumentos de percusi\u00f3n, Maracas","Tel\u00e9fono 1":"(787) 635-6354","E-mail":"","Municipio":"Toa Alta PR","id":1},{"Nombre":"Carlos A. Ramos Camilo","Especificaciones":"","Tel\u00e9fono 1":"(787) 531-7358","E-mail":"","Municipio":"Trujillo Alto PR","id":2},{"Nombre":"Edgar Gand\u00eda Torres","Especificaciones":"Figuras y simbolos indigenas, S\u00edmbolos Patrios","Tel\u00e9fono 1":"(787) 315-0123","E-mail":"","Municipio":"San Juan PR","id":3},{"Nombre":"Eduardo G\u00f3mez","Especificaciones":"Dise\u00f1os, Figuras y simbolos indigenas, Quijotes, Reyes, S\u00edmbolos Patrios","Tel\u00e9fono 1":"","E-mail":"","Municipio":"Barranquitas PR","id":4},{"Nombre":"Evelyn M. Rivera Cancel","Especificaciones":"Figuras","Tel\u00e9fono 1":"(787) 884-4851","E-mail":"evelyn.rivera.cancel@gmail.com","Municipio":"Mayag\u00fcez PR","id":5},{"Nombre":"Hailie Rivera Ortiz","Especificaciones":"Figuras y simbolos indigenas, Muebles, S\u00edmbolos Patrios","Tel\u00e9fono 1":"","E-mail":"","Municipio":"Trujillo Alto PR","id":6},{"Nombre":"H\u00e9ctor de Le\u00f3n","Especificaciones":"Reyes, S\u00edmbolos Patrios","Tel\u00e9fono 1":"(787) 232-2314","E-mail":"eneidariosaponte@gmail.com","Municipio":"Florida PR","id":7},{"Nombre":"Jeannette Rosa Carrero","Especificaciones":"Figuras, Flores, Nacimientos, Reyes","Tel\u00e9fono 1":"(787) 299-7667","E-mail":"fifososa@gmail.com","Municipio":"Bayam\u00f3n PR","id":8},{"Nombre":"Jorge L. Col\u00f3n Reyes","Especificaciones":"Figuras y simbolos indigenas, Im\u00e1genes Religiosas, S\u00edmbolos Patrios","Tel\u00e9fono 1":"(787) 506-3388","E-mail":"","Municipio":"Barceloneta PR","id":9},{"Nombre":"Jos\u00e9 A. Rodr\u00edguez D\u00e1vila","Especificaciones":"Escultura, Figuras","Tel\u00e9fono 1":"(787) 502-7987","E-mail":"esculturasenpiedra@gmail.com","Municipio":"Salinas PR","id":10},{"Nombre":"Luoisa Torres Hern\u00e1ndez","Especificaciones":"","Tel\u00e9fono 1":"(787) 795-9147","E-mail":"","Municipio":"Toa Baja PR","id":11},{"Nombre":"Mar\u00eda S. del  Valle","Especificaciones":"","Tel\u00e9fono 1":"(787) 747-4229","E-mail":"","Municipio":"Caguas PR","id":12},{"Nombre":"Maritza de Jes\u00fas Vel\u00e1zquez","Especificaciones":"","Tel\u00e9fono 1":"(787) 815-1241","E-mail":"","Municipio":"","id":13},{"Nombre":"Teresa P\u00e9rez V\u00e1zquez","Especificaciones":"Cuadros, Figuras y simbolos indigenas, Im\u00e1genes Religiosas, Llaveros, Paisajes, Placas, S\u00edmbolos Patrios","Tel\u00e9fono 1":"(787) 951-0025","E-mail":"terearte518@gmail.com","Municipio":"Cabo Rojo PR","id":14},{"Nombre":"Marysel Cab\u00e1n Marrero","Especificaciones":"Cuadros","Tel\u00e9fono 1":"(787) 425-3938","E-mail":"marycm626@gmail.com","Municipio":"Cidra PR","id":15}]

+ 1
- 0
www/data/PORCELANICRÓN.json Zobrazit soubor

@@ -0,0 +1 @@
1
+[{"Nombre":"Ada L. Robles Rivera","T\u00e9cnica":"Fabricantes, Manual","Especificaciones":"Figuras, Mu\u00f1ecas de Trapo","Tel\u00e9fono 1":"(787) 854-7446","E-mail":"","Municipio":"Manat\u00ed PR","id":0},{"Nombre":"Betzaida Ramos Rosado","T\u00e9cnica":"Esculpir","Especificaciones":"Figuras","Tel\u00e9fono 1":"(787) 202-5760","E-mail":"tallernuestropueblo@hotmail.com","Municipio":"San Sebast\u00edan PR","id":1},{"Nombre":"Carmen A. Rivera Acevedo","T\u00e9cnica":"","Especificaciones":"","Tel\u00e9fono 1":"","E-mail":"","Municipio":"","id":2},{"Nombre":"Carmen E. Resto Col\u00f3n","T\u00e9cnica":"Esculpir","Especificaciones":"Figuras","Tel\u00e9fono 1":"","E-mail":"","Municipio":"","id":3},{"Nombre":"Carmen M. L\u00f3pez Cruz","T\u00e9cnica":"Manual","Especificaciones":"Figuras","Tel\u00e9fono 1":"(787) 439-4927","E-mail":"","Municipio":"Salinas PR","id":4},{"Nombre":"Casilda Negr\u00f3n Tejera","T\u00e9cnica":"Esculpir","Especificaciones":"Figuras","Tel\u00e9fono 1":"","E-mail":"","Municipio":"","id":5},{"Nombre":"Edna S. Malabet R\u00edos","T\u00e9cnica":"Dise\u00f1ar, Ensamblar, Manual","Especificaciones":"Joyer\u00eda","Tel\u00e9fono 1":"(787) 593-6932","E-mail":"sally227@gmail.com","Municipio":"Carolina PR","id":6},{"Nombre":"Elsa D. Berr\u00edos Padilla","T\u00e9cnica":"Al horno, Manual","Especificaciones":"Figuras, Im\u00e1genes Religiosas, Paisajes, Quijotes","Tel\u00e9fono 1":"(787) 857-9328","E-mail":"","Municipio":"Barranquitas PR","id":7},{"Nombre":"Evelyn R. Cintr\u00f3n V\u00e9lez","T\u00e9cnica":"Dise\u00f1ar, Ensamblar, Manual","Especificaciones":"Alambre, Joyer\u00eda","Tel\u00e9fono 1":"(787) 439-1547","E-mail":"","Municipio":"Guayanilla PR","id":8},{"Nombre":"Jonathan U. Ortiz Aponte","T\u00e9cnica":"Manual, Pintura","Especificaciones":"Aves","Tel\u00e9fono 1":"(787) 529-6202","E-mail":"","Municipio":"Carolina PR","id":9},{"Nombre":"Luisa Y. Candelaria Estrella","T\u00e9cnica":"","Especificaciones":"","Tel\u00e9fono 1":"(787) 399-9001","E-mail":"iliremaria17@gmail.com","Municipio":"Carolina PR","id":10},{"Nombre":"Magdalena Gonz\u00e1lez Avil\u00e9s","T\u00e9cnica":"","Especificaciones":"","Tel\u00e9fono 1":"(787) 231-6597","E-mail":"mgonzalezavilesriv@hotmail.com","Municipio":"Aguadilla PR","id":11},{"Nombre":"Norma Agr\u00f3n Santiago","T\u00e9cnica":"","Especificaciones":"","Tel\u00e9fono 1":"(787) 877-6081","E-mail":"normasclay@yahoo.com","Municipio":"Moca PR","id":12},{"Nombre":"Virgen M. Rodr\u00edguez Rivera","T\u00e9cnica":"","Especificaciones":"","Tel\u00e9fono 1":"(939) 717-1028","E-mail":"","Municipio":"Yauco PR","id":13},{"Nombre":"Wilfredo Cab\u00e1n Vega","T\u00e9cnica":"","Especificaciones":"","Tel\u00e9fono 1":"(787) 818-8662","E-mail":"laartesana01@yahoo.com","Municipio":"Moca PR","id":14},{"Nombre":"Zorimar D. Rivera Nieves","T\u00e9cnica":"","Especificaciones":"","Tel\u00e9fono 1":"(787) 404-0543","E-mail":"zorimardenisse@gmail.com","Municipio":"San Juan PR","id":15},{"Nombre":"Rafael Cruz Collazo","T\u00e9cnica":"Dise\u00f1ar","Especificaciones":"Joyer\u00eda","Tel\u00e9fono 1":"(787) 315-3491","E-mail":"artesaniasguasabara3618@gmail.com","Municipio":"Utuado PR","id":16},{"Nombre":"Lydia Santiago Toledo","T\u00e9cnica":"Esculpir","Especificaciones":"Figuras","Tel\u00e9fono 1":"(787) 599-7653","E-mail":"lydia655@gmail.com","Municipio":"Lares PR","id":17},{"Nombre":"Ciryanis V\u00e1zquez Lezcano","T\u00e9cnica":"Dise\u00f1ar","Especificaciones":"Joyer\u00eda","Tel\u00e9fono 1":"(787) 452-4778","E-mail":"ciry.vazquez@gmail.com","Municipio":"Arecibo PR","id":18}]

+ 1
- 0
www/data/SEMILLAS.json
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 1
- 0
www/data/TABACOS.json Zobrazit soubor

@@ -0,0 +1 @@
1
+[{"Nombre":"\u00c1ngel Otero Cotto","Especificaciones":"Cigarros, Mascadura","Tel\u00e9fono 1":"(939) 350-4999","E-mail":"papiroscigars@gmail.com","Municipio":"Cidra PR","id":0},{"Nombre":"\u00c1ngel Otero Vicente","Especificaciones":"Cigarros, Mascadura","Tel\u00e9fono 1":"(787) 595-1431","E-mail":"papiroscigars@gmail.com","Municipio":"Cidra PR","id":1},{"Nombre":"Angelo Vel\u00e1zquez Santiago","Especificaciones":"Cigarros","Tel\u00e9fono 1":"(787) 396-0941","E-mail":"velazquezcigars@hotmail.com","Municipio":"Aguas Buenas PR","id":2},{"Nombre":"Carlos M. Del Valle Mel\u00e9ndez","Especificaciones":"Cigarros","Tel\u00e9fono 1":"(787) 380-9122","E-mail":"cdelvalle1229@yahoo.com","Municipio":"Gu\u00e1nica PR","id":3},{"Nombre":"Jos\u00e9 A. V\u00e9lez Burgos","Especificaciones":"Cigarros, Muebles, Restaurador","Tel\u00e9fono 1":"(787) 648-2858","E-mail":"velez.jose751@gmail.com","Municipio":"Yauco PR","id":4},{"Nombre":"Patricio A. Pe\u00f1a","Especificaciones":"","Tel\u00e9fono 1":"(787) 785-8619","E-mail":"","Municipio":"Bayam\u00f3n PR","id":5}]

+ 1
- 0
www/data/TEXTILES.json
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 76
- 0
www/data/driveToJson.php Zobrazit soubor

@@ -0,0 +1,76 @@
1
+<?php
2
+header('Content-type: application/json');
3
+ 
4
+
5
+ 
6
+// Function to convert CSV into associative array
7
+function csvToArray($file, $delimiter) { 
8
+  if (($handle = fopen($file, 'r')) !== FALSE) { 
9
+    $i = 0; 
10
+    while (($lineArray = fgetcsv($handle, 4000, $delimiter, '"')) !== FALSE) { 
11
+      for ($j = 0; $j < count($lineArray); $j++) { 
12
+        $arr[$i][$j] = $lineArray[$j]; 
13
+      } 
14
+      $i++; 
15
+    } 
16
+    fclose($handle); 
17
+  } 
18
+  return $arr; 
19
+} 
20
+ 
21
+function formatArray ($feed) {
22
+
23
+  $keys = array();
24
+  $newArray = array();
25
+  $data = csvToArray($feed, ',');
26
+ 
27
+  $count = count($data) - 1;
28
+ 
29
+  $labels = array_shift($data);  
30
+ 
31
+  foreach ($labels as $label) {
32
+    $keys[] = $label;
33
+  }
34
+ 
35
+  $keys[] = 'id';
36
+ 
37
+  for ($i = 0; $i < $count; $i++) {
38
+    $data[$i][] = $i;
39
+  }
40
+ 
41
+  for ($j = 0; $j < $count; $j++) {
42
+    $d = array_combine($keys, $data[$j]);
43
+    $newArray[$j] = $d;
44
+  }
45
+
46
+  return $newArray;
47
+
48
+}
49
+ 
50
+$feed = 'https://docs.google.com/spreadsheets/d/e/2PACX-1vQUspPunAmkZrtfhMgMvGYGTK_4ONsCnSoe6OcTFc-4ILRHTatdPIwgRx1eRM1qFTkYFMrvcx8OI4cv/pub?output=csv';
51
+
52
+$data = formatArray($feed);
53
+
54
+$info = json_encode($data);
55
+
56
+$infoAsJson = json_decode($info);
57
+
58
+
59
+
60
+$handle = fopen("renglones.json", 'w');
61
+fwrite($handle, $info);
62
+
63
+
64
+
65
+for ($i = 0; $i < count($infoAsJson); $i++) {
66
+  $renglon = formatArray($infoAsJson[$i]->Link);
67
+  $renglonInfo = json_encode($renglon);
68
+  $renglonAsJson = json_decode($renglonInfo);
69
+  
70
+  $my_file = $infoAsJson[$i]->Renglones . ".json";
71
+  $handle = fopen($my_file, 'w') or die ('Cannot open file');
72
+  fwrite($handle, $renglonInfo);
73
+
74
+}
75
+
76
+?>

+ 1
- 0
www/data/renglones.json
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor