Commit 14d9b453 authored by Andrius Mickus's avatar Andrius Mickus

salary from to

parent b5042c33
...@@ -13,6 +13,8 @@ class JsonDataCollector ...@@ -13,6 +13,8 @@ class JsonDataCollector
'post_content' => 'aprasymas', 'post_content' => 'aprasymas',
'slug' => 'seo_url', 'slug' => 'seo_url',
'contact' => 'kontaktai', 'contact' => 'kontaktai',
'salary_from' => 'atlygis_nuo',
'salary_to' => 'atlygis_iki',
// 'email' => 'email', // 'email' => 'email',
// 'work_time' => 'darbo_laikas', // 'work_time' => 'darbo_laikas',
]; ];
...@@ -33,7 +35,7 @@ class JsonDataCollector ...@@ -33,7 +35,7 @@ class JsonDataCollector
'type' => [ 'type' => [
'slug' => 'type', 'slug' => 'type',
'name' => 'type' 'name' => 'type'
] ],
// 'tag' // 'tag'
// 'position', // 'position',
]; ];
...@@ -43,7 +45,8 @@ class JsonDataCollector ...@@ -43,7 +45,8 @@ class JsonDataCollector
'division' => [ 'division' => [
'title' => 'padalinys_name', 'title' => 'padalinys_name',
'slug' => 'padalinys' 'slug' => 'padalinys'
] ],
]; ];
// Language map // Language map
......
...@@ -51,6 +51,7 @@ function do_import() ...@@ -51,6 +51,7 @@ function do_import()
if ($env === 'dev') { if ($env === 'dev') {
// $inputFile = plugin_dir_path(__FILE__) . "source_data/wp_biuro.php.xml"; // $inputFile = plugin_dir_path(__FILE__) . "source_data/wp_biuro.php.xml";
$inputFile = "https://base.biuro.lt/_export/wp_biuro.php"; $inputFile = "https://base.biuro.lt/_export/wp_biuro.php";
$inputFile = "https://base.biuro.lt/_export/new_wp.php";
} elseif ($env === 'prod') { } elseif ($env === 'prod') {
$inputFile = "http://export.biuro.lt/wp_biuro.php"; $inputFile = "http://export.biuro.lt/wp_biuro.php";
} }
...@@ -75,6 +76,7 @@ function do_import() ...@@ -75,6 +76,7 @@ function do_import()
// JSON reader // JSON reader
$ads = (new JsonDataCollector($inputFile))->getData(); $ads = (new JsonDataCollector($inputFile))->getData();
// print_r($ads);
print_r("Found " . count($ads) . " ads from Biuro.<br>"); print_r("Found " . count($ads) . " ads from Biuro.<br>");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment