From 0776397028140e6441b22928cc5d7c5d73a54015 Mon Sep 17 00:00:00 2001 From: Marcello Stanisci Date: Mon, 25 Jul 2016 12:00:27 +0200 Subject: calling IMG parser for all articles --- examples/blog/articles/article_images.php | 50 +++++++++++++++++++++++++++---- examples/blog/web-common | 2 +- examples/shop/web-common | 2 +- 3 files changed, 47 insertions(+), 7 deletions(-) diff --git a/examples/blog/articles/article_images.php b/examples/blog/articles/article_images.php index 4fec29da..b9087e10 100644 --- a/examples/blog/articles/article_images.php +++ b/examples/blog/articles/article_images.php @@ -13,10 +13,6 @@ $xpath->registerNamespace('php', 'http://php.net/xpath'); $xpath->registerPhpFunctions('preg_match'); $elements = $xpath->query('//img[php:functionString("preg_match", "@^/essay/[^/]+/data/[^/]+@", @src) > 0]'); - /* - 1 open final JSON in "append mode" - 2 append current file's entries - */ $db_filename = "articles_images.json"; $json_str; if (file_exists($db_filename)) @@ -35,7 +31,51 @@ /* suppress warnings due to parsing HTML5 */ libxml_use_internal_errors(true); - /* main: manually call add_article() for each article */ add_article("scrap1_10.html"); add_article("scrap1_11.html"); + add_article("scrap1_12.html"); + add_article("scrap1_13.html"); + add_article("scrap1_14.html"); + add_article("scrap1_15.html"); + add_article("scrap1_16.html"); + add_article("scrap1_17.html"); + add_article("scrap1_18.html"); + add_article("scrap1_19.html"); + add_article("scrap1_1.html"); + add_article("scrap1_20.html"); + add_article("scrap1_21.html"); + add_article("scrap1_22.html"); + add_article("scrap1_23.html"); + add_article("scrap1_24.html"); + add_article("scrap1_25.html"); + add_article("scrap1_26.html"); + add_article("scrap1_27.html"); + add_article("scrap1_28.html"); + add_article("scrap1_29.html"); + add_article("scrap1_2.html"); + add_article("scrap1_30.html"); + add_article("scrap1_31.html"); + add_article("scrap1_32.html"); + add_article("scrap1_33.html"); + add_article("scrap1_34.html"); + add_article("scrap1_35.html"); + add_article("scrap1_36.html"); + add_article("scrap1_37.html"); + add_article("scrap1_38.html"); + add_article("scrap1_39.html"); + add_article("scrap1_3.html"); + add_article("scrap1_40.html"); + add_article("scrap1_41.html"); + add_article("scrap1_42.html"); + add_article("scrap1_43.html"); + add_article("scrap1_46.html"); + add_article("scrap1_47.html"); + add_article("scrap1_4.html"); + add_article("scrap1_5.html"); + add_article("scrap1_6.html"); + add_article("scrap1_7.html"); + add_article("scrap1_8.html"); + add_article("scrap1_9.html"); + add_article("scrap1_U.0.html"); + add_article("scrap1_U.1.html"); ?> diff --git a/examples/blog/web-common b/examples/blog/web-common index 026ef247..80f1e270 160000 --- a/examples/blog/web-common +++ b/examples/blog/web-common @@ -1 +1 @@ -Subproject commit 026ef2476676ef00b6c2a0cec135a8e64024ee5a +Subproject commit 80f1e2708dbe4b19349244b611a6167b4b7a98c9 diff --git a/examples/shop/web-common b/examples/shop/web-common index 026ef247..80f1e270 160000 --- a/examples/shop/web-common +++ b/examples/shop/web-common @@ -1 +1 @@ -Subproject commit 026ef2476676ef00b6c2a0cec135a8e64024ee5a +Subproject commit 80f1e2708dbe4b19349244b611a6167b4b7a98c9 -- cgit v1.2.3