Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit 35bed88

Browse files
committed
Merge branch 'master' of github.com:AKSW/transform-bvl-pages-to-csv-file
Conflicts: enrich-table-csv.php geo-info.sqlite3 le-online-extracted-places.csv
2 parents 06cad92 + e40e4b6 commit 35bed88

File tree

3 files changed

+31
-28
lines changed

3 files changed

+31
-28
lines changed

enrich-table-csv.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
$key = 0;
3535
$curl = new Curl\Curl();
3636

37-
if (false === file_exists('table.csv')) {
38-
throw new Exception('File table.csv not found. Aborting ...');
37+
if (false === file_exists(__DIR__ . '/table.csv')) {
38+
throw new Exception('File ' . __DIR__ . '/table.csv not found. Aborting ...');
3939
return;
4040
}
4141

@@ -190,16 +190,17 @@
190190
$i = 0;
191191

192192
echo PHP_EOL;
193-
echo '###############' . PHP_EOL;
194-
echo 'Fehlerprotokoll' . PHP_EOL;
195-
echo '###############';
193+
echo '#########' . PHP_EOL;
194+
echo 'Protokoll' . PHP_EOL;
195+
echo '#########';
196196
echo PHP_EOL;
197197

198198
foreach ($extractedData as $key => $extractedEntry) {
199199
foreach ($mdbDatabaseCSVExport as $key => $originalEntry) {
200200
if (!isset($originalEntry[5]) || !isset($originalEntry[7])) {
201-
echo PHP_EOL . 'Title information missing...';
202201
var_dump($originalEntry);
202+
echo PHP_EOL . 'Data seems corrupt, essential fields are unset. Aborting ...';
203+
return;
203204
}
204205

205206
$street = preg_replace('/(\(.*?\))/si', '', $originalEntry[7]);
@@ -338,6 +339,8 @@
338339

339340
$finalData[] = $extractedEntry;
340341

342+
echo PHP_EOL . $extractedEntry['Titel'] . ' finished' . PHP_EOL;
343+
341344
break;
342345
}
343346
}

geo-info.sqlite3

1 KB
Binary file not shown.

0 commit comments

Comments
 (0)