From 08ee5eaf39a9b2a4be614a8276c9d43854695a76 Mon Sep 17 00:00:00 2001 From: mmk2410 Date: Tue, 16 Feb 2016 17:21:41 +0100 Subject: [PATCH 01/32] Update script fix --- update-scripts/1-2-1_1-3-0.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update-scripts/1-2-1_1-3-0.sh b/update-scripts/1-2-1_1-3-0.sh index 8dacf41..0f9cd5d 100755 --- a/update-scripts/1-2-1_1-3-0.sh +++ b/update-scripts/1-2-1_1-3-0.sh @@ -9,7 +9,7 @@ conf="./config.php" echo "Downloading version $version from GitHub..." mkdir $new cd $new || exit -wget -c https://github.com/mmk2410/Rangitaki/archive/"$version".zip +wget -c https://github.com/mmk2410/Rangitaki/archive/v"$version".zip echo "Extracting" unzip v"$version".zip From 75b705ee2c8da1793ddc47d7f3eb5a72cd3ec8fe Mon Sep 17 00:00:00 2001 From: mmk2410 Date: Fri, 11 Mar 2016 18:54:58 +0100 Subject: [PATCH 02/32] Code Improvements --- rcc/edit/index.php | 202 +++++++++++------ rcc/feed/index.php | 7 +- rcc/index.php | 467 ++++++++++++++++++++++++---------------- rcc/media/index.php | 152 ++++++++----- rcc/newpost/index.php | 139 +++++++----- rcc/res/atom.js | 3 - rcc/res/delete.js | 40 +++- rcc/res/delete_post.php | 58 +++-- rcc/res/edit.js | 33 ++- rcc/res/get_posts.php | 61 ++++-- rcc/res/rcc.css | 53 +++-- rcc/res/rcc.js | 22 +- rcc/res/save.php | 62 ++++-- rcc/uploaded/index.php | 155 ++++++++----- 14 files changed, 933 insertions(+), 521 deletions(-) diff --git a/rcc/edit/index.php b/rcc/edit/index.php index 7875fe5..40b9dec 100644 --- a/rcc/edit/index.php +++ b/rcc/edit/index.php @@ -1,112 +1,172 @@ + * @license MIT License + * @link https://mmk2410.org/rangitaki + * + * Edit page of RCC (Rangitaki Control Center) + * + * The MIT License + * + * Copyright 2015 mmk2410. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ date_default_timezone_set('UTC'); ?> - + + Rangitaki Control Center - + + + + + + + + + + + - -
- + +
+ +
+
Edit Post
-

Title:

+ +

Title: +

+

-

Date:

+

Date: +

+

-

Author:

+

Author: +

+ +

-

Tags:

" - class="itextfield" name="tags" - id="tags"/>

+

Tags: +

+ " name="tags" id="tags"/> +

Text:

+

SAVE CHANGES +
+ +
+
Back
+

Go back to the RCC home. All changes will be lost.

+ BACK +
- + + +
+
Access denied
+

- The access to this area is not granted. Make sure you're logged in. + The access to this area is not granted. Make sure you're logged + in.

+ BACK +
- -
- - - - + + + +
+ + + + + diff --git a/rcc/feed/index.php b/rcc/feed/index.php index 9a35aa2..6c69105 100644 --- a/rcc/feed/index.php +++ b/rcc/feed/index.php @@ -3,11 +3,13 @@ * PHP Version 7 * * @category Atom_Feed - * @package Rbe + * @package Rcc * @author Marcel Kapfer (mmk2410) * @license MIT License * @link https://github.com/mmk2410/rangitaki * + * Feed Generator + * * The MIT License * * Copyright 2015 mmk2410. @@ -88,11 +90,14 @@ if ($_SESSION['login']) { $feed = $writer->execute(); $file = fopen($feed_path, "w"); + if (fwrite($file, $feed) === false) { echo "-1"; exit; } + fclose($file); + echo "0"; } ?> diff --git a/rcc/index.php b/rcc/index.php index 9657df7..2114789 100644 --- a/rcc/index.php +++ b/rcc/index.php @@ -1,207 +1,298 @@ + + * @license MIT License + * @link https://mmk2410.org/rangitaki + * + * Main page of RCC (Rangitaki Control Center) + * + * The MIT License + * + * Copyright 2015 mmk2410. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +?> + - Rangitaki Control Center - + + + + + + + + + + - -
+ + + +
+ + + +
+
Log In
+
+

Password: +

+ +

+ + +
+
+ -
-
Log In
-
-

Password:

- -
-
- -
-
Post Upload
-
- - - -
-
- -
-
-
-
New Post
-
-

Blog:

- - -

Title:

- -

Date:

- -

Author:

- -

Tags:

- -

Text:

- -

- -
-
-
-
Edit post
-

- First select the blog of the post you wan't to edit. -

- -

- -

- GET POSTS -
-
-
Delete Post
-

- First select the subblog of the post you want to delete. -

- -

- -

- GET POSTS -
-
-
Media Upload
-
- - -
-
- -
-
-
-
Atom Feed Generator
-

- -

- GENERATE -
- -
-
Wrong Password
-

- Please go back and try again. -

- GO BACK -
- + + +
+
Post Upload
+
+ + + + + +

+ + +
+
+ + +
+
New Post
+
+

Blog:

+ + +

Title: +

+ +

+ +

Date: +

+ +

+ +

Author: +

+ +

+ +

Tags: +

+ +

+ +

Text:

+ +

+ +
+
+ + +
+
Edit post
+

+ First select the blog of the post you wan't to edit. +

+ +

+ +

+ GET POSTS +
+ + +
+
Delete Post
+

+ First select the subblog of the post you want to delete. +

+ +

+ +

+ GET POSTS +
+ + +
+
Media Upload
+
+ + +

+ +
+
+ + +
+
Atom Feed Generator
+

+ +

+ GENERATE +
+ + + + +
+
Wrong Password
+

+ Please go back and try again. +

+ GO BACK +
+ + + +
Rangitaki Control Center

- The Rangitaki Control Center is disabled. You can enable it in - your config file. But please read first the documentation. + The Rangitaki Control Center is disabled. You can enable + it in your config file. But please read first the + documentation.

- -
-
Back
-

- Go back to your blog. -

- GO BACK -
-
- - - - - + + + +
+
Back
+

Go back to your blog.

+ GO BACK +
+
+ + + + + diff --git a/rcc/media/index.php b/rcc/media/index.php index 1e66ea8..db16346 100644 --- a/rcc/media/index.php +++ b/rcc/media/index.php @@ -1,60 +1,100 @@ + + * @license MIT License + * @link https://mmk2410.org/rangitaki + * + * Media page of RCC (Rangitaki Control Center) + * + * The MIT License + * + * Copyright 2015 mmk2410. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +?> + - - - - Rangitaki Control Center - - - - - -
-
-
File Upload
- You have to choose a file!

"; - } else { - $uploaddir = "../../media/"; - $uploadfile = $uploaddir . basename($_FILES['userfile']['name']); + + - if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) { - echo "

The post was successfully uploaded and is now published.

"; - } else { - echo "

During the uploading process an error occured!
Error Code:" . ($_FILES['userfile']['error'] . "

"); - } - } - ?>GO BACK -
-
- + Rangitaki Control Center + + + + + + + + + + + + + + +
+ +
+
File Upload
+ +You have to choose a file!

"; + } else { + $uploaddir = "../../media/"; + $uploadfile = $uploaddir . basename($_FILES['userfile']['name']); + + if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) { + echo + "

+ The post was successfully uploaded and is now published. +

"; + } else { + echo + "

During the uploading process an error occured!
+ Error Code:" + . ($_FILES['userfile']['error'] . "

"); + } + } +?> + + GO BACK + + + +
+
+ diff --git a/rcc/newpost/index.php b/rcc/newpost/index.php index 3d45780..526d3a8 100644 --- a/rcc/newpost/index.php +++ b/rcc/newpost/index.php @@ -1,54 +1,82 @@ + * @license MIT License + * @link https://mmk2410.org/rangitaki + * + * Newpost page of RCC (Rangitaki Control Center) + * + * The MIT License + * + * Copyright 2015 mmk2410. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ date_default_timezone_set('UTC'); ?> + - + Rangitaki Control Center - + + + + + + + + + + - -
-
-
New Post
- + Rangitaki Control Center +
+ +
+
+
New Post
+ +GO BACK -
-
+ $filename = date("Y-m-d-H-i-s") . ".md"; + $handle = fopen("../../articles/$blog/$filename", "c"); + fwrite($handle, $md); + if (fclose($handle)) { + echo "Post successfully published."; + } else { + echo "Some error happend, while publishing."; + } + ?> + + GO BACK + + + + + diff --git a/rcc/res/atom.js b/rcc/res/atom.js index b5873c2..91fdc8f 100644 --- a/rcc/res/atom.js +++ b/rcc/res/atom.js @@ -1,13 +1,10 @@ /** - * Created by mmk2410 on 2016-02-16. - * * JavaScript for the ajax request to generate a atom feed * * Copyright (c) 2016 by mmk2410 * License: MIT License */ - function main() { // listener and function for calling the ajax request to create the // requested atom feed diff --git a/rcc/res/delete.js b/rcc/res/delete.js index a48d5c3..725df6c 100644 --- a/rcc/res/delete.js +++ b/rcc/res/delete.js @@ -1,30 +1,45 @@ /** - * Created by mmk2410 on 12/6/15. + * JavaScript for the ajax request to delete blog post * - * JavaScript for the functionality to delete blogs + * Copyright (c) 2016 by mmk2410 + * License: MIT License */ function main() { // listener and function for recieving the posts of the selected blogs $("#delete_get_posts").click(function () { + var selectedBlog = $("#delete_selected_blog").val(); + $.get("res/get_posts.php", { blog: selectedBlog }, function (data) { + $("#delete_select_post").remove(); $("#delete_select_post_info").remove(); $("#delete_post_button").remove(); $("#delete_get_posts").after("

"); - $("#delete_get_posts").after("

Now select the post you want to delete. " + - "Remember that once a post is deleted it can't be restored.

"); - $("#delete_select_post").append(""); + $("#delete_get_posts").after( + "

" + + "Now select the post you want to delete. " + + "Remember that once a post is deleted it can't be restored.

" + ); + $("#delete_select_post").append( + "" + ); + $.each($.parseJSON(data), function (index, value) { var post = value.substring(0, value.length - 3); - $("#delete_selected_post").append(""); + $("#delete_selected_post").append( + "" + ); }); - $("#delete_select_post").after("DELETE POST") + + $("#delete_select_post").after( + "DELETE POST" + ); }); }); @@ -37,10 +52,12 @@ function deletePostButton() { var selectedBlog = $("#delete_selected_blog").val(); var selectedPost = $("#delete_selected_post").val(); + $.get("res/delete_post.php", { blog: selectedBlog, post: selectedPost }, function (data) { + $("#delete_select_post").remove(); $("#delete_select_post_info").remove(); $("#delete_post_button").remove(); @@ -51,7 +68,10 @@ function deletePostButton() { } else if (data == "941") { alert("ERROR 941: No blog as get argument given"); } else if (data == "961") { - alert("ERROR 961: Error while deleting the file. Check if the web server has the permission to do so."); + alert( + "ERROR 961: Error while deleting the file. Check if the" + + "web server has the permission to do so." + ); } else if (data == "0") { alert("Post successfully deleted."); } @@ -59,4 +79,4 @@ function deletePostButton() { } -$(document).ready(main()); \ No newline at end of file +$(document).ready(main()); diff --git a/rcc/res/delete_post.php b/rcc/res/delete_post.php index 77b46ee..ac5450b 100644 --- a/rcc/res/delete_post.php +++ b/rcc/res/delete_post.php @@ -2,8 +2,35 @@ /** * PHP Version 7 * - * User: mmk2410 - * Date: 12/6/15 + * @category Blogging + * @package Rcc + * @author Marcel Kapfer (mmk2410) + * @license MIT License + * @link https://mmk2410.org/rangitaki + * + * delete post script + * + * The MIT License + * + * Copyright 2015 mmk2410. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. * * Error Codes: * 901 No post given as get argument @@ -11,17 +38,24 @@ * 941 No blog given as get argument * 961 Error while deleting the post */ + $post = $_GET["post"]; $blog = $_GET["blog"]; -if (!isset($post)) { - echo "901"; -} else if (!isset($blog)) { - echo "941"; -} else if (!file_exists("./../../articles/$blog/$post.md")) { - echo "921"; -} else { - if (unlink("./../../articles/$blog/$post.md")) { - echo "0"; + +session_start(); +if ($_SESSION['login']) { + if (!isset($post)) { + echo "901"; + } else if (!isset($blog)) { + echo "941"; + } else if (!file_exists("./../../articles/$blog/$post.md")) { + echo "921"; + } else { + if (unlink("./../../articles/$blog/$post.md")) { + echo "0"; + } + echo "961"; } - echo "961"; } + +?> diff --git a/rcc/res/edit.js b/rcc/res/edit.js index 6f101bd..3ff4973 100644 --- a/rcc/res/edit.js +++ b/rcc/res/edit.js @@ -1,41 +1,54 @@ /** - * Created by mmk2410 on 12/6/15. + * JavaScript for the ajax request to edit a article * - * JavaScript for the functionality to delete blogs + * Copyright (c) 2016 by mmk2410 + * License: MIT License */ function main() { // listener and function for recieving the posts of the selected blogs $("#edit_get_posts").click(function () { + var selectedBlog = $("#edit_selected_blog").val(); $.get("res/get_posts.php", { blog: selectedBlog }, function (data) { + $("#edit_select_post").remove(); $("#edit_select_post_info").remove(); $("#edit_post_button").remove(); $("#edit_get_posts").after("

"); - $("#edit_get_posts").after("

Now select the post you want to edit.

"); - $("#edit_select_post").append(""); + $("#edit_get_posts").after( + "

" + + "Now select the post you want to edit.

" + ); + $("#edit_select_post").append( + "" + ); $.each($.parseJSON(data), function (index, value) { var post = value.substring(0, value.length - 3); - $("#edit_selected_post").append(""); + $("#edit_selected_post").append( + "" + ); }); - $("#edit_select_post").after("EDIT POST") + $("#edit_select_post").after( + "EDIT POST" + ); }); }); $("#save_changes").click(function () { + var postTitle = $("#title").val(); var postDate = $("#date").val(); var postAuthor = $("#author").val(); var postTags = $("#tags").val(); var postText = $("#text").val(); - var file = "../../articles/" + getVariables['blog'] + "/" + getVariables['post'] + ".md"; - console.log(file); + var file = "../../articles/" + getVariables.blog + + "/" + getVariables.post + ".md"; $.post("../res/save.php", { title: postTitle, @@ -69,4 +82,4 @@ function editPostButton() { } -$(document).ready(main()); \ No newline at end of file +$(document).ready(main()); diff --git a/rcc/res/get_posts.php b/rcc/res/get_posts.php index 313d3db..fb3a2c0 100644 --- a/rcc/res/get_posts.php +++ b/rcc/res/get_posts.php @@ -2,26 +2,57 @@ /** * PHP Version 7 * - * User: mmk2410 - * Date: 12/6/15 + * @category Blogging + * @package Rcc + * @author Marcel Kapfer (mmk2410) + * @license MIT License + * @link https://mmk2410.org/rangitaki + * + * get post script + * + * The MIT License + * + * Copyright 2015 mmk2410. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. * * Error Codes: * 901 No blog given as get argument * 921 No blog with the given name available */ -$blog = $_GET["blog"]; -if (!isset($blog)) { - echo "901"; -} else if (!file_exists("./../../blogs/$blog.md")) { - echo "921"; -} else { - $posts = array(); - $i = 0; - foreach (scandir("./../../articles/$blog/") as $article) { - if (substr($article, -3) == ".md") { - $posts[$i] = $article; - $i++; + +session_start(); +if ($_SESSION['login']) { + $blog = $_GET["blog"]; + if (!isset($blog)) { + echo "901"; + } else if (!file_exists("./../../blogs/$blog.md")) { + echo "921"; + } else { + $posts = array(); + $i = 0; + foreach (scandir("./../../articles/$blog/") as $article) { + if (substr($article, -3) == ".md") { + $posts[$i] = $article; + $i++; + } } + print json_encode($posts); } - print json_encode($posts); } diff --git a/rcc/res/rcc.css b/rcc/res/rcc.css index d86933b..b3a6f2f 100644 --- a/rcc/res/rcc.css +++ b/rcc/res/rcc.css @@ -1,30 +1,29 @@ /* -The MIT License - -Copyright 2015 mmk2410. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ -/* - Created on : Jun 14, 2015, 6:13:38 PM - Author : mmk2410 -*/ + * RCC cascade style sheet + * + * Copyright (C) 2015-2016 Marcel Kapfer (mmk2410) + * MIT License + * + * The MIT License + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ /* BODY */ @@ -273,4 +272,4 @@ form{ #back-card { display: none; } -} \ No newline at end of file +} diff --git a/rcc/res/rcc.js b/rcc/res/rcc.js index 6539a71..f95995b 100644 --- a/rcc/res/rcc.js +++ b/rcc/res/rcc.js @@ -1,20 +1,32 @@ +/** + * JavaScript for RCC + * + * Copyright (c) 2016 by mmk2410 + * License: MIT License + */ + window.onload = function () { var t = document.getElementsByTagName('textarea')[0]; - var offset = !window.opera ? (t.offsetHeight - t.clientHeight) : (t.offsetHeight + parseInt(window.getComputedStyle(t, null).getPropertyValue('border-top-width'))); + var offset = !window.opera ? (t.offsetHeight - t.clientHeight) : ( + t.offsetHeight + parseInt( + window.getComputedStyle(t, null).getPropertyValue('border-top-width') + ) + ); /** - * The following three code clocks are for proper resizing of the input textarea + * The following three code clocks are for proper resizing of the input + * textarea */ var resize = function (t) { t.style.height = 'auto'; t.style.height = (t.scrollHeight + offset ) + 'px'; - } + }; t.addEventListener && t.addEventListener('input', function (event) { resize(t); }); - t['attachEvent'] && t.attachEvent('onkeyup', function () { + t.attachEvent && t.attachEvent('onkeyup', function () { resize(t); }); -} \ No newline at end of file +}; diff --git a/rcc/res/save.php b/rcc/res/save.php index bd96296..88abcf7 100644 --- a/rcc/res/save.php +++ b/rcc/res/save.php @@ -1,11 +1,46 @@ + * @license MIT License + * @link https://mmk2410.org/rangitaki + * + * + * The MIT License + * + * Copyright 2015 mmk2410. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +session_start(); +if ($_SESSION['login']) { + $title = $_POST["title"]; + $date = $_POST["date"]; + $author = $_POST["author"]; + $tags = $_POST["tags"]; + $text = $_POST["text"]; + $filename = $_POST["file"]; + $md = << + * @license MIT License + * @link https://mmk2410.org/rangitaki + * + * Main page of RCC (Rangitaki Control Center) + * + * The MIT License + * + * Copyright 2015 mmk2410. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +?> + - - - - Rangitaki Control Center - - - - - -
-
-
File Upload
- You have to choose a file!

"; - } else { - $blog = filter_input(INPUT_POST, "blog"); - $uploaddir = "../..//articles/$blog/"; - $uploadfile = $uploaddir . basename($_FILES['userfile']['name']); + + - if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) { - echo "

The post was successfully uploaded and is now published.

"; - } else { - echo "

During the uploading process an error occured!
Error Code:" . ($_FILES['userfile']['error'] . "

"); - } - } - ?>GO BACK -
-
- + Rangitaki Control Center + + + + + + + + + + + + + + + + +
+
+
File Upload
+ +You have to choose a file!

"; + } else { + $blog = filter_input(INPUT_POST, "blog"); + $uploaddir = "../..//articles/$blog/"; + $uploadfile = $uploaddir . basename($_FILES['userfile']['name']); + + if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) { + echo + "

The post was successfully uploaded and is now + published.

"; + } else { + echo + "

During the uploading process an error occured!
+ Error Code:" + . ($_FILES['userfile']['error'] . "

"); + } + } +?> + + GO BACK + + + +
+
+ From 681f4c3c836fdd5e8f7f03eb49e78c48844759f7 Mon Sep 17 00:00:00 2001 From: mmk2410 Date: Fri, 11 Mar 2016 18:58:26 +0100 Subject: [PATCH 03/32] Fix; Problem inserting password after instering wrong password --- rcc/index.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/rcc/index.php b/rcc/index.php index 2114789..df64979 100644 --- a/rcc/index.php +++ b/rcc/index.php @@ -258,9 +258,16 @@ if ($rcc == "yes") {
Wrong Password

- Please go back and try again. + The entered password was wrong, please try again.

- GO BACK +
+

Password: +

+ +

+ + +
Date: Sat, 12 Mar 2016 10:28:46 +0100 Subject: [PATCH 04/32] Fix: Feeds didn't show article content --- .gitignore | 1 + rcc/feed/index.php | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 87a12bb..d874e51 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ nbproject/ .idea/ completer.hist +feed/ diff --git a/rcc/feed/index.php b/rcc/feed/index.php index 6c69105..f98b79b 100644 --- a/rcc/feed/index.php +++ b/rcc/feed/index.php @@ -51,7 +51,7 @@ if ($_SESSION['login']) { $writer->title = $blogtitle; $writer->site_url = $blogurl; - $writer->feed_url = $blogurl . "/feed/feed.atom"; + $writer->feed_url = $blogurl . "/feed/" . $_GET['blog'] . ".atom"; $writer->author = array( 'name' => $blogauthor, 'url' => $blogurl, @@ -67,6 +67,10 @@ if ($_SESSION['login']) { if ($amount == 10) { break; } else { + $file = ArticleGenerator::getText($art_dir, $article); + $text = Parsedown::instance() + ->setBreaksEnabled(true)// with linebreaks + ->text($file); $writer->items[] = array( 'title' => ArticleGenerator::getTitle($art_dir, $article), 'updated' => strtotime( @@ -75,11 +79,9 @@ if ($_SESSION['login']) { 'url' => $blogurl . "./?article=" . substr($article, 0, strlen($article) - 3), 'summary'=> ArticleGenerator::getSummary( - $art_dir, $articles + $art_dir, $article ), - 'content' => "

" . ArticleGenerator::getText( - $art_dir, $articles - ) . "

" + 'content' => $text ); $amount += 1; } From 6d1928da7051f8458cb84b792f2d7f468639b497 Mon Sep 17 00:00:00 2001 From: "Marcel Kapfer (mmk2410)" Date: Sun, 17 Apr 2016 17:00:18 +0200 Subject: [PATCH 05/32] YAML Config Implement and post api --- .gitignore | 1 + composer.json | 6 +- composer.lock | 285 ++++++++++++++++++++++++++++++++++- config.yaml | 3 + rcc/api/post/index.php | 139 +++++++++++++++++ res/php/ArticleGenerator.php | 42 ++++++ res/php/Config.php | 57 +++++++ 7 files changed, 529 insertions(+), 4 deletions(-) create mode 100644 config.yaml create mode 100644 rcc/api/post/index.php create mode 100644 res/php/Config.php diff --git a/.gitignore b/.gitignore index d874e51..188684f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ nbproject/ .idea/ completer.hist feed/ +vendor/ diff --git a/composer.json b/composer.json index 32d27af..c265a1e 100644 --- a/composer.json +++ b/composer.json @@ -4,12 +4,14 @@ "type": "project", "require": { "erusev/parsedown": "^1.6", - "fguillot/picofeed": "^0.1.18" + "fguillot/picofeed": "^0.1.18", + "slim/slim": "^3.0", + "symfony/yaml": "^3.0" }, "license": "MIT License", "authors": [ { - "name": "mmk2410", + "name": "Marcel Kapfer (mmk2410)", "email": "marcelmichaelkapfer@yahoo.co.nz" } ], diff --git a/composer.lock b/composer.lock index 9f712e5..c096997 100644 --- a/composer.lock +++ b/composer.lock @@ -4,9 +4,36 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "4f3494edee00a6dd92be308e4f860622", - "content-hash": "d93c93221ea797a445a0313f18feccda", + "hash": "9dd7a02ced81071c430f6ac395855013", + "content-hash": "805975f3cf5b0b95d0be593e4599d471", "packages": [ + { + "name": "container-interop/container-interop", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/container-interop/container-interop.git", + "reference": "fc08354828f8fd3245f77a66b9e23a6bca48297e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/container-interop/container-interop/zipball/fc08354828f8fd3245f77a66b9e23a6bca48297e", + "reference": "fc08354828f8fd3245f77a66b9e23a6bca48297e", + "shasum": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Interop\\Container\\": "src/Interop/Container/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Promoting the interoperability of container objects (DIC, SL, etc.)", + "time": "2014-12-30 15:22:37" + }, { "name": "erusev/parsedown", "version": "1.6.0", @@ -94,6 +121,260 @@ "homepage": "https://github.com/fguillot/picoFeed", "time": "2016-02-09 02:49:54" }, + { + "name": "nikic/fast-route", + "version": "v0.6.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/FastRoute.git", + "reference": "31fa86924556b80735f98b294a7ffdfb26789f22" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/FastRoute/zipball/31fa86924556b80735f98b294a7ffdfb26789f22", + "reference": "31fa86924556b80735f98b294a7ffdfb26789f22", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "FastRoute\\": "src/" + }, + "files": [ + "src/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov", + "email": "nikic@php.net" + } + ], + "description": "Fast request router for PHP", + "keywords": [ + "router", + "routing" + ], + "time": "2015-06-18 19:15:47" + }, + { + "name": "pimple/pimple", + "version": "v3.0.2", + "source": { + "type": "git", + "url": "https://github.com/silexphp/Pimple.git", + "reference": "a30f7d6e57565a2e1a316e1baf2a483f788b258a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/silexphp/Pimple/zipball/a30f7d6e57565a2e1a316e1baf2a483f788b258a", + "reference": "a30f7d6e57565a2e1a316e1baf2a483f788b258a", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Pimple": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Pimple, a simple Dependency Injection Container", + "homepage": "http://pimple.sensiolabs.org", + "keywords": [ + "container", + "dependency injection" + ], + "time": "2015-09-11 15:10:35" + }, + { + "name": "psr/http-message", + "version": "1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", + "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "time": "2015-05-04 20:22:00" + }, + { + "name": "slim/slim", + "version": "3.3.0", + "source": { + "type": "git", + "url": "https://github.com/slimphp/Slim.git", + "reference": "939f2e85d57508de9cff241d10091cd972f221c3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/slimphp/Slim/zipball/939f2e85d57508de9cff241d10091cd972f221c3", + "reference": "939f2e85d57508de9cff241d10091cd972f221c3", + "shasum": "" + }, + "require": { + "container-interop/container-interop": "^1.1", + "nikic/fast-route": "^0.6", + "php": ">=5.5.0", + "pimple/pimple": "^3.0", + "psr/http-message": "^1.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0", + "squizlabs/php_codesniffer": "^2.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Slim\\": "Slim" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Rob Allen", + "email": "rob@akrabat.com", + "homepage": "http://akrabat.com" + }, + { + "name": "Josh Lockhart", + "email": "hello@joshlockhart.com", + "homepage": "https://joshlockhart.com" + }, + { + "name": "Gabriel Manricks", + "email": "gmanricks@me.com", + "homepage": "http://gabrielmanricks.com" + }, + { + "name": "Andrew Smith", + "email": "a.smith@silentworks.co.uk", + "homepage": "http://silentworks.co.uk" + } + ], + "description": "Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs", + "homepage": "http://slimframework.com", + "keywords": [ + "api", + "framework", + "micro", + "router" + ], + "time": "2016-03-10 21:37:40" + }, + { + "name": "symfony/yaml", + "version": "v3.0.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "0047c8366744a16de7516622c5b7355336afae96" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/0047c8366744a16de7516622c5b7355336afae96", + "reference": "0047c8366744a16de7516622c5b7355336afae96", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Yaml Component", + "homepage": "https://symfony.com", + "time": "2016-03-04 07:55:57" + }, { "name": "zendframework/zendxml", "version": "1.0.2", diff --git a/config.yaml b/config.yaml new file mode 100644 index 0000000..947e5b8 --- /dev/null +++ b/config.yaml @@ -0,0 +1,3 @@ +rcc: # settings concerning the rangitaki control center + rcc: on # enable rangitaki control center (enable: 'on') + api: on # enable rangitaki api (enable: 'on') diff --git a/rcc/api/post/index.php b/rcc/api/post/index.php new file mode 100644 index 0000000..2cae3e6 --- /dev/null +++ b/rcc/api/post/index.php @@ -0,0 +1,139 @@ +getConfig(); + +if ($settings["rcc"]["api"] == "on" && $settings["rcc"]["rcc"] == "on") { + $app = new \Slim\App(); + + /** + * api for fetching a blog post + * + * @param string $_GET["blog"] name of the blog + * @param string $_GET["post"] filename of the blog post + * + * @return JSON json string containing the blog post + */ + $app->get('/', function (Request $request, Response $response) { + $blog = $_GET["blog"]; + $post = $_GET["post"]; + + if (!$blog || !$post) { + $data = array('code' => 400, 'status' => 'Bad Request', 'error' => 'Not enough arguments'); + $response = $response->withHeader('Content-type', 'application/json'); + $response = $response->withJson($data, 400); + return $response; + } + + $path = "../../../articles/" . $blog . "/"; + $data = + ArticleGenerator::getArray($path, $post); + + $response = $response->withHeader('Content-type', 'application/json'); + $response = $response->withJson($data, 201); + + return $response; + }); + + /** + * api for changing/creating a blog post + * + * @param string $_POST["data"] all data + */ + $app->post('/', function (Request $request, Response $response) { + $blog = $_POST["blog"]; + $post = $_POST["post"]; + $title = $_POST["title"]; + $author = $_POST["author"]; + $date = $_POST["date"]; + $tags = $_POST["tags"]; + $text = $_POST["text"]; + + if (!$blog || !$post || (!$title && !$text)) { + $data = array('code' => 400, 'status' => 'Bad Request', 'error' => 'Not enough arguments'); + $response = $response->withHeader('Content-type', 'application/json'); + $response = $response->withJson($data, 400); + return $response; + } + + $text = str_replace('\n', '
', $text); + + $md = << 201, 'status' => 'Post created successfully'); + $response = $response->withHeader('Content-type', 'application/json'); + $response = $response->withJson($data, 201); + } else { + $data = array('code' => 500, 'status' => 'Internal server error'); + $response = $response->withHeader('Content-type', 'application/json'); + $response = $response->withJson($data, 500); + } + + return $response; + }); + + /** + * api for deleting a blog post + * + * @param string $_GET["blog"] name of the blog + * @param string $_GET["post"] filename of the blog post + * + * @return JSON json string containing the blog post + */ + $app->delete('/', function (Request $request, Response $response) { + $blog = $_GET["blog"]; + $post = $_GET["post"]; + + if (!$blog || !$post) { + $data = array('code' => 400, 'status' => 'Bad Request', 'error' => 'Not enough arguments'); + $response = $response->withHeader('Content-type', 'application/json'); + $response = $response->withJson($data, 400); + return $response; + } + + $path = "../../../articles/$blog/$post"; + + if (!file_exists($path)) { + $data = array('code' => 400, 'status' => 'Bad Request', 'error' => 'No such file'); + $response = $response->withHeader('Content-type', 'application/json'); + $response = $response->withJson($data, 400); + return $response; + } + + if (!unlink($path)) { + $data = array('code' => 500, 'status' => 'Bad Request', 'error' => 'Internal server error'); + $response = $response->withHeader('Content-type', 'application/json'); + $response = $response->withJson($data, 500); + return $response; + } + + $data = array('code' => 201, 'status' => 'File successfully deleted'); + $response = $response->withHeader('Content-type', 'application/json'); + $response = $response->withJson($data, 201); + + return $response; + }); + + $app->run(); +} diff --git a/res/php/ArticleGenerator.php b/res/php/ArticleGenerator.php index 86f4fa5..f259c9d 100644 --- a/res/php/ArticleGenerator.php +++ b/res/php/ArticleGenerator.php @@ -265,4 +265,46 @@ class ArticleGenerator return $article; } + /** + * A function to get a array of the article + * + * @param $directory The directory where the article is stored + * @param $articlefile The name of the article file + * @return string + */ + public function getArray($directory, $articlefile) + { + $article = file_get_contents($directory . $articlefile); + + if (substr($article, 0, 6) == "%TITLE") { // get and remove the title + $title = substr($article, 8, strpos($article, "\n") - 8); + $article = substr($article, strpos($article, "\n") + 1); + } + + if (substr($article, 0, 5) == "%DATE") { // get and remove the title + $date = substr($article, 7, strpos($article, "\n") - 7); + $article = substr($article, strpos($article, "\n") + 1); + } + + if (substr($article, 0, 7) == "%AUTHOR") { // get and remove the title + $author = substr($article, 9, strpos($article, "\n") - 9); + $article = substr($article, strpos($article, "\n") + 1); + } + + if (substr($article, 0, 5) == "%TAGS") { // get and remove the tags + $tags = substr($article, 7, strpos($article, "\n") - 7); // get the tags + $tags = explode(", ", $tags); // split them into an array + $article = substr($article, strpos($article, "\n") + 1); + } + + $data = array( + "title" => $title, + "date" => $date, + "author" => $author, + "tags" => $tags, + "text" => $article + ); + + return $data; + } } diff --git a/res/php/Config.php b/res/php/Config.php new file mode 100644 index 0000000..32dfda7 --- /dev/null +++ b/res/php/Config.php @@ -0,0 +1,57 @@ + + * @license MIT License + * @link http://marcel-kapfer.de/rangitaki + */ +namespace mmk2410\rbe\config; + +/** + * PHP Version 7 + * + * Configuration parser for yaml configuration files + * + * @category Configuration + * @package Rbe + * @author Marcel Kapfer (mmk2410) + * @license MIT License + * @link http://marcel-kapfer.de/rangitaki + */ +class Config +{ + + /** + * Path to yaml file + * @var string + */ + private $file; + + /** + * Constructor for the Config class + * + * @param $config path to the yaml file + * @param $composer path to the composer autoload + */ + public function __construct($config, $composer) + { + $this->file = $config; + require $composer; + } + + /** + * Return yaml config as PHP array + * + * @return config array + */ + public function getConfig() + { + $yaml = new \Symfony\Component\Yaml\Parser(); + return $yaml->parse(file_get_contents($this->file)); + } +} From cb491341dfc93e03be76429aa802718fcfd2b0df Mon Sep 17 00:00:00 2001 From: "Marcel Kapfer (mmk2410)" Date: Mon, 18 Apr 2016 09:53:47 +0200 Subject: [PATCH 06/32] Better code with isset() --- rcc/api/list/index.php | 56 +++++ rcc/api/post/index.php | 6 +- vendor/composer/ClassLoader.php | 8 +- vendor/composer/LICENSE | 2 +- vendor/composer/autoload_namespaces.php | 1 + vendor/composer/autoload_psr4.php | 5 + vendor/composer/autoload_real.php | 13 +- vendor/composer/installed.json | 293 ++++++++++++++++++++++++ 8 files changed, 374 insertions(+), 10 deletions(-) create mode 100644 rcc/api/list/index.php diff --git a/rcc/api/list/index.php b/rcc/api/list/index.php new file mode 100644 index 0000000..8ba39ff --- /dev/null +++ b/rcc/api/list/index.php @@ -0,0 +1,56 @@ +getConfig(); + +if ($settings["rcc"]["api"] == "on" && $settings["rcc"]["rcc"] == "on") { + $app = new \Slim\App(); + + /** + * api for fetching a blog post + * + * @param string $_GET["blog"] optional name of the blog + * + * @return JSON json string containing the blogs / blog posts + */ + $app->get('/', function (Request $request, Response $response) { + $blog = $_GET["blog"]; + + + if (!isset($blog)) { + $files = scandir('../../../blogs/', SCANDIR_SORT_DESCENDING); + + unset($files[sizeof($files) - 1]); + unset($files[sizeof($files) - 1]); + + $response = $response->withHeader('Content-type', 'application/json'); + $response = $response->withJson($files, 201); + return $response; + } + + $path = "../../../articles/" . $blog . "/"; + + $files = scandir($path, SCANDIR_SORT_DESCENDING); + + unset($files[sizeof($files) - 1]); + unset($files[sizeof($files) - 1]); + + $response = $response->withHeader('Content-type', 'application/json'); + $response = $response->withJson($files, 201); + + return $response; + }); + + $app->run(); +} diff --git a/rcc/api/post/index.php b/rcc/api/post/index.php index 2cae3e6..9c4c67b 100644 --- a/rcc/api/post/index.php +++ b/rcc/api/post/index.php @@ -30,7 +30,7 @@ if ($settings["rcc"]["api"] == "on" && $settings["rcc"]["rcc"] == "on") { $blog = $_GET["blog"]; $post = $_GET["post"]; - if (!$blog || !$post) { + if (!isset($blog) || !isset($post)) { $data = array('code' => 400, 'status' => 'Bad Request', 'error' => 'Not enough arguments'); $response = $response->withHeader('Content-type', 'application/json'); $response = $response->withJson($data, 400); @@ -61,7 +61,7 @@ if ($settings["rcc"]["api"] == "on" && $settings["rcc"]["rcc"] == "on") { $tags = $_POST["tags"]; $text = $_POST["text"]; - if (!$blog || !$post || (!$title && !$text)) { + if (!isset($blog) || !isset($post) || (!isset($title) && !isset($text))) { $data = array('code' => 400, 'status' => 'Bad Request', 'error' => 'Not enough arguments'); $response = $response->withHeader('Content-type', 'application/json'); $response = $response->withJson($data, 400); @@ -105,7 +105,7 @@ EOD; $blog = $_GET["blog"]; $post = $_GET["post"]; - if (!$blog || !$post) { + if (!isset($blog) || !isset($post)) { $data = array('code' => 400, 'status' => 'Bad Request', 'error' => 'Not enough arguments'); $response = $response->withHeader('Content-type', 'application/json'); $response = $response->withJson($data, 400); diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php index 5e1469e..ff6ecfb 100644 --- a/vendor/composer/ClassLoader.php +++ b/vendor/composer/ClassLoader.php @@ -13,9 +13,7 @@ namespace Composer\Autoload; /** - * ClassLoader implements a PSR-0 class loader - * - * See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md + * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. * * $loader = new \Composer\Autoload\ClassLoader(); * @@ -39,6 +37,8 @@ namespace Composer\Autoload; * * @author Fabien Potencier * @author Jordi Boggiano + * @see http://www.php-fig.org/psr/psr-0/ + * @see http://www.php-fig.org/psr/psr-4/ */ class ClassLoader { @@ -147,7 +147,7 @@ class ClassLoader * appending or prepending to the ones previously set for this namespace. * * @param string $prefix The prefix/namespace, with trailing '\\' - * @param array|string $paths The PSR-0 base directories + * @param array|string $paths The PSR-4 base directories * @param bool $prepend Whether to prepend the directories * * @throws \InvalidArgumentException diff --git a/vendor/composer/LICENSE b/vendor/composer/LICENSE index c8d57af..1a28124 100644 --- a/vendor/composer/LICENSE +++ b/vendor/composer/LICENSE @@ -1,5 +1,5 @@ -Copyright (c) 2015 Nils Adermann, Jordi Boggiano +Copyright (c) 2016 Nils Adermann, Jordi Boggiano Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php index 39bbda1..0bcdd11 100644 --- a/vendor/composer/autoload_namespaces.php +++ b/vendor/composer/autoload_namespaces.php @@ -7,6 +7,7 @@ $baseDir = dirname($vendorDir); return array( 'ZendXml\\' => array($vendorDir . '/zendframework/zendxml/library'), + 'Pimple' => array($vendorDir . '/pimple/pimple/src'), 'PicoFeed' => array($vendorDir . '/fguillot/picofeed/lib'), 'Parsedown' => array($vendorDir . '/erusev/parsedown'), ); diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index b265c64..cc46458 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -6,4 +6,9 @@ $vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( + 'Symfony\\Component\\Yaml\\' => array($vendorDir . '/symfony/yaml'), + 'Slim\\' => array($vendorDir . '/slim/slim/Slim'), + 'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src'), + 'Interop\\Container\\' => array($vendorDir . '/container-interop/container-interop/src/Interop/Container'), + 'FastRoute\\' => array($vendorDir . '/nikic/fast-route/src'), ); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index c07d3ff..3967c5a 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -40,11 +40,20 @@ class ComposerAutoloaderInite149f47a700f596a9845d47c917afeaf $loader->register(true); + $includeFiles = require __DIR__ . '/autoload_files.php'; + foreach ($includeFiles as $fileIdentifier => $file) { + composerRequiree149f47a700f596a9845d47c917afeaf($fileIdentifier, $file); + } + return $loader; } } -function composerRequiree149f47a700f596a9845d47c917afeaf($file) +function composerRequiree149f47a700f596a9845d47c917afeaf($fileIdentifier, $file) { - require $file; + if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { + require $file; + + $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; + } } diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 4e9985b..4999b25 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -136,5 +136,298 @@ ], "description": "Modern library to handle RSS/Atom feeds", "homepage": "https://github.com/fguillot/picoFeed" + }, + { + "name": "container-interop/container-interop", + "version": "1.1.0", + "version_normalized": "1.1.0.0", + "source": { + "type": "git", + "url": "https://github.com/container-interop/container-interop.git", + "reference": "fc08354828f8fd3245f77a66b9e23a6bca48297e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/container-interop/container-interop/zipball/fc08354828f8fd3245f77a66b9e23a6bca48297e", + "reference": "fc08354828f8fd3245f77a66b9e23a6bca48297e", + "shasum": "" + }, + "time": "2014-12-30 15:22:37", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Interop\\Container\\": "src/Interop/Container/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Promoting the interoperability of container objects (DIC, SL, etc.)" + }, + { + "name": "nikic/fast-route", + "version": "v0.6.0", + "version_normalized": "0.6.0.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/FastRoute.git", + "reference": "31fa86924556b80735f98b294a7ffdfb26789f22" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/FastRoute/zipball/31fa86924556b80735f98b294a7ffdfb26789f22", + "reference": "31fa86924556b80735f98b294a7ffdfb26789f22", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "time": "2015-06-18 19:15:47", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "FastRoute\\": "src/" + }, + "files": [ + "src/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov", + "email": "nikic@php.net" + } + ], + "description": "Fast request router for PHP", + "keywords": [ + "router", + "routing" + ] + }, + { + "name": "psr/http-message", + "version": "1.0", + "version_normalized": "1.0.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", + "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "time": "2015-05-04 20:22:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ] + }, + { + "name": "pimple/pimple", + "version": "v3.0.2", + "version_normalized": "3.0.2.0", + "source": { + "type": "git", + "url": "https://github.com/silexphp/Pimple.git", + "reference": "a30f7d6e57565a2e1a316e1baf2a483f788b258a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/silexphp/Pimple/zipball/a30f7d6e57565a2e1a316e1baf2a483f788b258a", + "reference": "a30f7d6e57565a2e1a316e1baf2a483f788b258a", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "time": "2015-09-11 15:10:35", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-0": { + "Pimple": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Pimple, a simple Dependency Injection Container", + "homepage": "http://pimple.sensiolabs.org", + "keywords": [ + "container", + "dependency injection" + ] + }, + { + "name": "slim/slim", + "version": "3.3.0", + "version_normalized": "3.3.0.0", + "source": { + "type": "git", + "url": "https://github.com/slimphp/Slim.git", + "reference": "939f2e85d57508de9cff241d10091cd972f221c3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/slimphp/Slim/zipball/939f2e85d57508de9cff241d10091cd972f221c3", + "reference": "939f2e85d57508de9cff241d10091cd972f221c3", + "shasum": "" + }, + "require": { + "container-interop/container-interop": "^1.1", + "nikic/fast-route": "^0.6", + "php": ">=5.5.0", + "pimple/pimple": "^3.0", + "psr/http-message": "^1.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0", + "squizlabs/php_codesniffer": "^2.5" + }, + "time": "2016-03-10 21:37:40", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Slim\\": "Slim" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Rob Allen", + "email": "rob@akrabat.com", + "homepage": "http://akrabat.com" + }, + { + "name": "Josh Lockhart", + "email": "hello@joshlockhart.com", + "homepage": "https://joshlockhart.com" + }, + { + "name": "Gabriel Manricks", + "email": "gmanricks@me.com", + "homepage": "http://gabrielmanricks.com" + }, + { + "name": "Andrew Smith", + "email": "a.smith@silentworks.co.uk", + "homepage": "http://silentworks.co.uk" + } + ], + "description": "Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs", + "homepage": "http://slimframework.com", + "keywords": [ + "api", + "framework", + "micro", + "router" + ] + }, + { + "name": "symfony/yaml", + "version": "v3.0.4", + "version_normalized": "3.0.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "0047c8366744a16de7516622c5b7355336afae96" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/0047c8366744a16de7516622c5b7355336afae96", + "reference": "0047c8366744a16de7516622c5b7355336afae96", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "time": "2016-03-04 07:55:57", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Yaml Component", + "homepage": "https://symfony.com" } ] From 9947a5f033e1c41ef2af6bc78c7d47f3337343a8 Mon Sep 17 00:00:00 2001 From: "Marcel Kapfer (mmk2410)" Date: Mon, 18 Apr 2016 09:56:52 +0200 Subject: [PATCH 07/32] Cleanup --- vendor/autoload.php | 7 - vendor/bin/picofeed | 1 - vendor/composer/ClassLoader.php | 413 ----- vendor/composer/LICENSE | 21 - vendor/composer/autoload_classmap.php | 9 - vendor/composer/autoload_namespaces.php | 13 - vendor/composer/autoload_psr4.php | 14 - vendor/composer/autoload_real.php | 59 - vendor/composer/installed.json | 433 ----- vendor/erusev/parsedown/.travis.yml | 16 - vendor/erusev/parsedown/LICENSE.txt | 20 - vendor/erusev/parsedown/Parsedown.php | 1528 ----------------- vendor/erusev/parsedown/README.md | 57 - vendor/erusev/parsedown/composer.json | 18 - vendor/erusev/parsedown/phpunit.xml.dist | 8 - .../erusev/parsedown/test/CommonMarkTest.php | 74 - .../erusev/parsedown/test/ParsedownTest.php | 159 -- .../erusev/parsedown/test/TestParsedown.php | 5 - vendor/erusev/parsedown/test/bootstrap.php | 3 - .../parsedown/test/data/aesthetic_table.html | 18 - .../parsedown/test/data/aesthetic_table.md | 4 - .../parsedown/test/data/aligned_table.html | 21 - .../parsedown/test/data/aligned_table.md | 4 - .../parsedown/test/data/atx_heading.html | 9 - .../erusev/parsedown/test/data/atx_heading.md | 17 - .../parsedown/test/data/automatic_link.html | 1 - .../parsedown/test/data/automatic_link.md | 1 - .../parsedown/test/data/block-level_html.html | 12 - .../parsedown/test/data/block-level_html.md | 16 - .../parsedown/test/data/code_block.html | 8 - .../erusev/parsedown/test/data/code_block.md | 10 - .../erusev/parsedown/test/data/code_span.html | 6 - .../erusev/parsedown/test/data/code_span.md | 11 - .../test/data/compound_blockquote.html | 9 - .../test/data/compound_blockquote.md | 10 - .../test/data/compound_emphasis.html | 2 - .../parsedown/test/data/compound_emphasis.md | 4 - .../parsedown/test/data/compound_list.html | 12 - .../parsedown/test/data/compound_list.md | 7 - .../test/data/deeply_nested_list.html | 12 - .../parsedown/test/data/deeply_nested_list.md | 6 - .../erusev/parsedown/test/data/em_strong.html | 8 - .../erusev/parsedown/test/data/em_strong.md | 15 - vendor/erusev/parsedown/test/data/email.html | 1 - vendor/erusev/parsedown/test/data/email.md | 1 - .../erusev/parsedown/test/data/emphasis.html | 8 - vendor/erusev/parsedown/test/data/emphasis.md | 13 - .../erusev/parsedown/test/data/escaping.html | 6 - vendor/erusev/parsedown/test/data/escaping.md | 11 - .../test/data/fenced_code_block.html | 6 - .../parsedown/test/data/fenced_code_block.md | 14 - .../parsedown/test/data/horizontal_rule.html | 5 - .../parsedown/test/data/horizontal_rule.md | 9 - .../parsedown/test/data/html_comment.html | 5 - .../parsedown/test/data/html_comment.md | 8 - .../parsedown/test/data/html_entity.html | 1 - .../erusev/parsedown/test/data/html_entity.md | 1 - .../parsedown/test/data/image_reference.html | 2 - .../parsedown/test/data/image_reference.md | 5 - .../parsedown/test/data/image_title.html | 2 - .../erusev/parsedown/test/data/image_title.md | 3 - .../test/data/implicit_reference.html | 4 - .../parsedown/test/data/implicit_reference.md | 13 - .../parsedown/test/data/inline_link.html | 6 - .../erusev/parsedown/test/data/inline_link.md | 11 - .../test/data/inline_link_title.html | 6 - .../parsedown/test/data/inline_link_title.md | 11 - .../parsedown/test/data/inline_title.html | 1 - .../parsedown/test/data/inline_title.md | 1 - .../parsedown/test/data/lazy_blockquote.html | 6 - .../parsedown/test/data/lazy_blockquote.md | 5 - .../erusev/parsedown/test/data/lazy_list.html | 4 - .../erusev/parsedown/test/data/lazy_list.md | 2 - .../parsedown/test/data/line_break.html | 2 - .../erusev/parsedown/test/data/line_break.md | 2 - .../test/data/multiline_list_paragraph.html | 7 - .../test/data/multiline_list_paragraph.md | 4 - .../test/data/nested_block-level_html.html | 10 - .../test/data/nested_block-level_html.md | 11 - .../parsedown/test/data/ordered_list.html | 13 - .../parsedown/test/data/ordered_list.md | 11 - .../parsedown/test/data/paragraph_list.html | 12 - .../parsedown/test/data/paragraph_list.md | 9 - .../parsedown/test/data/reference_title.html | 2 - .../parsedown/test/data/reference_title.md | 6 - .../test/data/self-closing_html.html | 12 - .../parsedown/test/data/self-closing_html.md | 12 - .../test/data/separated_nested_list.html | 9 - .../test/data/separated_nested_list.md | 4 - .../parsedown/test/data/setext_header.html | 5 - .../parsedown/test/data/setext_header.md | 12 - .../test/data/simple_blockquote.html | 11 - .../parsedown/test/data/simple_blockquote.md | 7 - .../parsedown/test/data/simple_table.html | 37 - .../parsedown/test/data/simple_table.md | 11 - .../parsedown/test/data/span-level_html.html | 5 - .../parsedown/test/data/span-level_html.md | 8 - .../test/data/sparse_dense_list.html | 7 - .../parsedown/test/data/sparse_dense_list.md | 4 - .../parsedown/test/data/sparse_html.html | 8 - .../erusev/parsedown/test/data/sparse_html.md | 8 - .../parsedown/test/data/sparse_list.html | 15 - .../erusev/parsedown/test/data/sparse_list.md | 9 - .../test/data/special_characters.html | 6 - .../parsedown/test/data/special_characters.md | 13 - .../parsedown/test/data/strikethrough.html | 3 - .../parsedown/test/data/strikethrough.md | 5 - .../erusev/parsedown/test/data/strong_em.html | 6 - .../erusev/parsedown/test/data/strong_em.md | 11 - .../test/data/tab-indented_code_block.html | 6 - .../test/data/tab-indented_code_block.md | 6 - .../test/data/table_inline_markdown.html | 22 - .../test/data/table_inline_markdown.md | 5 - .../parsedown/test/data/text_reference.html | 8 - .../parsedown/test/data/text_reference.md | 21 - .../parsedown/test/data/unordered_list.html | 10 - .../parsedown/test/data/unordered_list.md | 8 - .../parsedown/test/data/untidy_table.html | 18 - .../parsedown/test/data/untidy_table.md | 4 - .../parsedown/test/data/url_autolinking.html | 3 - .../parsedown/test/data/url_autolinking.md | 5 - .../parsedown/test/data/whitespace.html | 1 - .../erusev/parsedown/test/data/whitespace.md | 5 - vendor/fguillot/picofeed/LICENSE | 21 - .../picofeed/lib/PicoFeed/Client/Client.php | 668 ------- .../lib/PicoFeed/Client/ClientException.php | 14 - .../picofeed/lib/PicoFeed/Client/Curl.php | 384 ----- .../lib/PicoFeed/Client/HttpHeaders.php | 79 - .../Client/InvalidCertificateException.php | 12 - .../PicoFeed/Client/InvalidUrlException.php | 12 - .../PicoFeed/Client/MaxRedirectException.php | 12 - .../lib/PicoFeed/Client/MaxSizeException.php | 12 - .../picofeed/lib/PicoFeed/Client/Stream.php | 201 --- .../lib/PicoFeed/Client/TimeoutException.php | 12 - .../picofeed/lib/PicoFeed/Client/Url.php | 290 ---- .../picofeed/lib/PicoFeed/Config/Config.php | 96 -- .../lib/PicoFeed/Encoding/Encoding.php | 33 - .../lib/PicoFeed/Filter/Attribute.php | 699 -------- .../picofeed/lib/PicoFeed/Filter/Filter.php | 155 -- .../picofeed/lib/PicoFeed/Filter/Html.php | 243 --- .../picofeed/lib/PicoFeed/Filter/Tag.php | 227 --- .../picofeed/lib/PicoFeed/Logging/Logger.php | 114 -- .../picofeed/lib/PicoFeed/Parser/Atom.php | 366 ---- .../lib/PicoFeed/Parser/DateParser.php | 113 -- .../picofeed/lib/PicoFeed/Parser/Feed.php | 194 --- .../picofeed/lib/PicoFeed/Parser/Item.php | 230 --- .../PicoFeed/Parser/MalformedXmlException.php | 12 - .../picofeed/lib/PicoFeed/Parser/Parser.php | 576 ------- .../lib/PicoFeed/Parser/ParserException.php | 14 - .../picofeed/lib/PicoFeed/Parser/Rss10.php | 270 --- .../picofeed/lib/PicoFeed/Parser/Rss20.php | 291 ---- .../picofeed/lib/PicoFeed/Parser/Rss91.php | 12 - .../picofeed/lib/PicoFeed/Parser/Rss92.php | 12 - .../PicoFeed/Parser/XmlEntityException.php | 12 - .../lib/PicoFeed/Parser/XmlParser.php | 229 --- .../lib/PicoFeed/PicoFeedException.php | 14 - .../picofeed/lib/PicoFeed/Reader/Favicon.php | 207 --- .../picofeed/lib/PicoFeed/Reader/Reader.php | 209 --- .../lib/PicoFeed/Reader/ReaderException.php | 14 - .../Reader/SubscriptionNotFoundException.php | 12 - .../Reader/UnsupportedFeedFormatException.php | 12 - .../lib/PicoFeed/Rules/.blog.lemonde.fr.php | 14 - .../lib/PicoFeed/Rules/.blogs.nytimes.com.php | 15 - .../picofeed/lib/PicoFeed/Rules/.igen.fr.php | 13 - .../lib/PicoFeed/Rules/.nytimes.com.php | 11 - .../lib/PicoFeed/Rules/.phoronix.com.php | 12 - .../lib/PicoFeed/Rules/.slate.com.php | 20 - .../lib/PicoFeed/Rules/.theguardian.com.php | 14 - .../lib/PicoFeed/Rules/.wikipedia.org.php | 29 - .../lib/PicoFeed/Rules/.wired.com.php | 31 - .../picofeed/lib/PicoFeed/Rules/.wsj.com.php | 15 - .../picofeed/lib/PicoFeed/Rules/01net.com.php | 19 - .../lib/PicoFeed/Rules/abstrusegoose.com.php | 9 - .../lib/PicoFeed/Rules/alainonline.net.php | 15 - .../lib/PicoFeed/Rules/aljazeera.com.php | 22 - .../lib/PicoFeed/Rules/allafrica.com.php | 20 - .../PicoFeed/Rules/allgemeine-zeitung.de.php | 24 - .../PicoFeed/Rules/amazingsuperpowers.com.php | 9 - .../lib/PicoFeed/Rules/anythingcomic.com.php | 14 - .../picofeed/lib/PicoFeed/Rules/ap.org.php | 14 - .../lib/PicoFeed/Rules/areadvd.de.php | 11 - .../lib/PicoFeed/Rules/arstechnica.com.php | 23 - .../lib/PicoFeed/Rules/awkwardzombie.com.php | 11 - .../lib/PicoFeed/Rules/bangkokpost.com.php | 21 - .../picofeed/lib/PicoFeed/Rules/bgr.com.php | 16 - .../lib/PicoFeed/Rules/bigfootjustice.com.php | 9 - .../lib/PicoFeed/Rules/bizjournals.com.php | 13 - .../lib/PicoFeed/Rules/blog.fefe.de.php | 14 - .../lib/PicoFeed/Rules/blog.mapillary.com.php | 12 - .../PicoFeed/Rules/buenosairesherald.com.php | 18 - .../lib/PicoFeed/Rules/bunicomic.com.php | 14 - .../lib/PicoFeed/Rules/buttersafe.com.php | 14 - .../lib/PicoFeed/Rules/cad-comic.com.php | 13 - .../Rules/chaoslife.findchaos.com.php | 11 - .../lib/PicoFeed/Rules/cliquerefresh.com.php | 11 - .../picofeed/lib/PicoFeed/Rules/cnet.com.php | 38 - .../lib/PicoFeed/Rules/consomac.fr.php | 14 - .../lib/PicoFeed/Rules/cowbirdsinlove.com.php | 9 - .../lib/PicoFeed/Rules/csmonitor.com.php | 19 - .../lib/PicoFeed/Rules/dailyjs.com.php | 20 - .../lib/PicoFeed/Rules/dailyreporter.com.php | 16 - .../lib/PicoFeed/Rules/dailytech.com.php | 14 - .../lib/PicoFeed/Rules/degroupnews.com.php | 15 - .../lib/PicoFeed/Rules/derstandard.at.php | 15 - .../lib/PicoFeed/Rules/dilbert.com.php | 12 - .../PicoFeed/Rules/discovermagazine.com.php | 18 - .../lib/PicoFeed/Rules/distrowatch.com.php | 14 - .../lib/PicoFeed/Rules/dozodomo.com.php | 16 - .../PicoFeed/Rules/drawingboardcomic.com.php | 16 - .../lib/PicoFeed/Rules/endlessorigami.com.php | 9 - .../lib/PicoFeed/Rules/engadget.com.php | 11 - .../PicoFeed/Rules/escapistmagazine.com.php | 46 - .../lib/PicoFeed/Rules/espn.go.com.php | 12 - .../lib/PicoFeed/Rules/exocomics.com.php | 16 - .../lib/PicoFeed/Rules/explosm.net.php | 14 - .../Rules/extrafabulouscomics.com.php | 9 - .../lib/PicoFeed/Rules/fastcodesign.com.php | 14 - .../lib/PicoFeed/Rules/fastcoexist.com.php | 14 - .../lib/PicoFeed/Rules/fastcompany.com.php | 14 - .../lib/PicoFeed/Rules/ffworld.com.php | 14 - .../lib/PicoFeed/Rules/foreignpolicy.com.php | 22 - .../lib/PicoFeed/Rules/fossbytes.com.php | 19 - .../PicoFeed/Rules/fowllanguagecomics.com.php | 11 - .../picofeed/lib/PicoFeed/Rules/geek.com.php | 17 - .../PicoFeed/Rules/gerbilwithajetpack.com.php | 13 - .../lib/PicoFeed/Rules/giantitp.com.php | 13 - .../lib/PicoFeed/Rules/github.com.php | 15 - .../lib/PicoFeed/Rules/gocomics.com.php | 13 - .../picofeed/lib/PicoFeed/Rules/golem.de.php | 13 - .../lib/PicoFeed/Rules/greekculture.com.php | 12 - .../lib/PicoFeed/Rules/happletea.com.php | 19 - .../picofeed/lib/PicoFeed/Rules/heise.de.php | 13 - .../lib/PicoFeed/Rules/huffingtonpost.com.php | 14 - .../lib/PicoFeed/Rules/imogenquest.net.php | 9 - .../picofeed/lib/PicoFeed/Rules/ing.dk.php | 13 - .../lib/PicoFeed/Rules/invisiblebread.com.php | 9 - .../lib/PicoFeed/Rules/ir.amd.com.php | 11 - .../lib/PicoFeed/Rules/japantimes.co.jp.php | 22 - .../lib/PicoFeed/Rules/japantoday.com.php | 16 - .../lib/PicoFeed/Rules/journaldugeek.com.php | 12 - .../lib/PicoFeed/Rules/jsonline.com.php | 24 - .../picofeed/lib/PicoFeed/Rules/kanpai.fr.php | 14 - .../PicoFeed/Rules/karriere.jobfinder.dk.php | 13 - .../lib/PicoFeed/Rules/koreaherald.com.php | 12 - .../lib/PicoFeed/Rules/koreatimes.php | 16 - .../PicoFeed/Rules/lastplacecomics.com.php | 9 - .../lib/PicoFeed/Rules/lejapon.fr.php | 18 - .../lib/PicoFeed/Rules/lesjoiesducode.fr.php | 14 - .../picofeed/lib/PicoFeed/Rules/lfg.co.php | 13 - .../lib/PicoFeed/Rules/lifehacker.com.php | 19 - .../picofeed/lib/PicoFeed/Rules/linux.org.php | 15 - .../lib/PicoFeed/Rules/linuxinsider.com.php | 21 - .../picofeed/lib/PicoFeed/Rules/lists.php | 14 - .../lib/PicoFeed/Rules/loadingartist.com.php | 9 - .../lib/PicoFeed/Rules/loldwell.com.php | 11 - .../lib/PicoFeed/Rules/lukesurl.com.php | 16 - .../picofeed/lib/PicoFeed/Rules/macg.co.php | 14 - .../picofeed/lib/PicoFeed/Rules/marc.info.php | 14 - .../PicoFeed/Rules/marriedtothesea.com.php | 13 - .../lib/PicoFeed/Rules/marycagle.com.php | 14 - .../Rules/maximumble.thebookofbiff.com.php | 11 - .../lib/PicoFeed/Rules/medium.com.php | 14 - .../lib/PicoFeed/Rules/mercworks.net.php | 18 - .../lib/PicoFeed/Rules/metronieuws.nl.php | 11 - .../lib/PicoFeed/Rules/milwaukeenns.php | 15 - .../picofeed/lib/PicoFeed/Rules/mlb.com.php | 19 - .../Rules/mokepon.smackjeeves.com.php | 11 - .../PicoFeed/Rules/monwindowsphone.com.php | 14 - .../lib/PicoFeed/Rules/mrlovenstein.com.php | 10 - .../lib/PicoFeed/Rules/muckrock.com.php | 17 - .../PicoFeed/Rules/nationaljournal.com.php | 16 - .../lib/PicoFeed/Rules/nature.com.php | 13 - .../picofeed/lib/PicoFeed/Rules/nba.com.php | 16 - .../lib/PicoFeed/Rules/nedroid.com.php | 9 - .../lib/PicoFeed/Rules/networkworld.com.php | 21 - .../lib/PicoFeed/Rules/neustadt-ticker.de.php | 16 - .../PicoFeed/Rules/news.sciencemag.org.php | 18 - .../lib/PicoFeed/Rules/niceteethcomic.com.php | 11 - .../lib/PicoFeed/Rules/nichtlustig.de.php | 9 - .../picofeed/lib/PicoFeed/Rules/oglaf.com.php | 20 - .../picofeed/lib/PicoFeed/Rules/onhax.net.php | 16 - .../lib/PicoFeed/Rules/onmilwaukee.php | 24 - .../PicoFeed/Rules/openrightsgroup.org.php | 21 - .../lib/PicoFeed/Rules/opensource.com.php | 12 - .../lib/PicoFeed/Rules/optipess.com.php | 9 - .../lib/PicoFeed/Rules/osnews.com.php | 12 - .../lib/PicoFeed/Rules/pastebin.com.php | 14 - .../lib/PicoFeed/Rules/peebleslab.com.php | 10 - .../lib/PicoFeed/Rules/penny-arcade.com.php | 22 - .../lib/PicoFeed/Rules/pixelbeat.org.php | 13 - .../lib/PicoFeed/Rules/plus.google.com.php | 12 - .../lib/PicoFeed/Rules/popstrip.com.php | 9 - .../lib/PicoFeed/Rules/putaindecode.fr.php | 17 - .../lib/PicoFeed/Rules/recode.net.php | 21 - .../PicoFeed/Rules/retractionwatch.com.php | 18 - .../PicoFeed/Rules/rue89.nouvelobs.com.php | 14 - .../lib/PicoFeed/Rules/satwcomic.com.php | 14 - .../lib/PicoFeed/Rules/scrumalliance.org.php | 13 - .../lib/PicoFeed/Rules/securityfocus.com.php | 12 - .../PicoFeed/Rules/sentfromthemoon.com.php | 19 - .../lib/PicoFeed/Rules/sitepoint.com.php | 14 - .../lib/PicoFeed/Rules/slashdot.org.php | 12 - .../PicoFeed/Rules/smallhousebliss.com.php | 20 - .../lib/PicoFeed/Rules/smarthomewelt.de.php | 11 - .../PicoFeed/Rules/smashingmagazine.com.php | 11 - .../lib/PicoFeed/Rules/smbc-comics.com.php | 9 - .../lib/PicoFeed/Rules/soundandvision.com.php | 22 - .../lib/PicoFeed/Rules/spiegel.de.php | 12 - .../lib/PicoFeed/Rules/stereophile.com.php | 12 - .../lib/PicoFeed/Rules/stupidfox.net.php | 14 - .../lib/PicoFeed/Rules/subtraction.com.php | 16 - .../picofeed/lib/PicoFeed/Rules/sz.de.php | 11 - .../lib/PicoFeed/Rules/techcrunch.com.php | 16 - .../PicoFeed/Rules/the-ebook-reader.com.php | 12 - .../lib/PicoFeed/Rules/theatlantic.com.php | 23 - .../lib/PicoFeed/Rules/theawkwardyeti.com.php | 9 - .../lib/PicoFeed/Rules/thecodinglove.com.php | 11 - .../PicoFeed/Rules/thedoghousediaries.com.php | 19 - .../lib/PicoFeed/Rules/thegamercat.com.php | 11 - .../lib/PicoFeed/Rules/thehindu.com.php | 20 - .../lib/PicoFeed/Rules/thelocal.se.php | 21 - .../lib/PicoFeed/Rules/themerepublic.net.php | 11 - .../lib/PicoFeed/Rules/themoscowtimes.com.php | 19 - .../lib/PicoFeed/Rules/thenewslens.com.php | 28 - .../lib/PicoFeed/Rules/theodd1sout.com.php | 9 - .../lib/PicoFeed/Rules/theonion.com.php | 13 - .../lib/PicoFeed/Rules/thestandard.com.hk.php | 23 - .../lib/PicoFeed/Rules/threepanelsoul.com.php | 12 - .../Rules/timesofindia.indiatimes.com.php | 15 - .../lib/PicoFeed/Rules/travel-dealz.de.php | 16 - .../lib/PicoFeed/Rules/treehugger.com.php | 15 - .../lib/PicoFeed/Rules/treelobsters.com.php | 9 - .../lib/PicoFeed/Rules/twogag.com.php | 9 - .../PicoFeed/Rules/twokinds.keenspot.com.php | 11 - .../lib/PicoFeed/Rules/undeadly.org.php | 15 - .../picofeed/lib/PicoFeed/Rules/upi.com.php | 16 - .../lib/PicoFeed/Rules/version2.dk.php | 13 - .../lib/PicoFeed/Rules/vgcats.com.php | 16 - .../picofeed/lib/PicoFeed/Rules/vuxml.org.php | 18 - .../lib/PicoFeed/Rules/www.bbc.co.uk.php | 34 - .../lib/PicoFeed/Rules/www.bdgest.com.php | 16 - .../lib/PicoFeed/Rules/www.bgr.in.php | 24 - .../PicoFeed/Rules/www.businessweek.com.php | 16 - .../lib/PicoFeed/Rules/www.cnn.com.php | 25 - .../lib/PicoFeed/Rules/www.developpez.com.php | 22 - .../lib/PicoFeed/Rules/www.egscomics.com.php | 13 - .../Rules/www.fakingnews.firstpost.com.php | 18 - .../lib/PicoFeed/Rules/www.forbes.com.php | 21 - .../PicoFeed/Rules/www.franceculture.fr.php | 14 - .../Rules/www.futura-sciences.com.php | 20 - .../PicoFeed/Rules/www.geekculture.com.php | 13 - .../lib/PicoFeed/Rules/www.howtogeek.com.php | 15 - .../lib/PicoFeed/Rules/www.lepoint.fr.php | 19 - .../PicoFeed/Rules/www.lesnumeriques.com.php | 26 - .../lib/PicoFeed/Rules/www.mac4ever.com.php | 14 - .../lib/PicoFeed/Rules/www.makeuseof.com.php | 19 - .../lib/PicoFeed/Rules/www.npr.org.php | 21 - .../lib/PicoFeed/Rules/www.numerama.com.php | 16 - .../lib/PicoFeed/Rules/www.oneindia.com.php | 15 - .../lib/PicoFeed/Rules/www.pcinpact.com.php | 14 - .../Rules/www.pseudo-sciences.org.php | 17 - .../lib/PicoFeed/Rules/www.slate.fr.php | 20 - .../PicoFeed/Rules/www.universfreebox.com.php | 16 - .../lib/PicoFeed/Rules/www.zeit.de.php | 41 - .../picofeed/lib/PicoFeed/Rules/xkcd.com.php | 9 - .../picofeed/lib/PicoFeed/Rules/zdnet.com.php | 24 - .../lib/PicoFeed/Scraper/CandidateParser.php | 273 --- .../lib/PicoFeed/Scraper/ParserInterface.php | 13 - .../lib/PicoFeed/Scraper/RuleLoader.php | 122 -- .../lib/PicoFeed/Scraper/RuleParser.php | 83 - .../picofeed/lib/PicoFeed/Scraper/Scraper.php | 341 ---- .../lib/PicoFeed/Serialization/Export.php | 122 -- .../lib/PicoFeed/Serialization/Import.php | 162 -- .../lib/PicoFeed/Syndication/Atom.php | 215 --- .../lib/PicoFeed/Syndication/Rss20.php | 206 --- .../lib/PicoFeed/Syndication/Writer.php | 95 - vendor/fguillot/picofeed/picofeed | 125 -- vendor/zendframework/zendxml/.gitignore | 5 - vendor/zendframework/zendxml/.travis.yml | 43 - vendor/zendframework/zendxml/CHANGELOG.md | 24 - vendor/zendframework/zendxml/LICENSE.md | 12 - vendor/zendframework/zendxml/README.md | 50 - vendor/zendframework/zendxml/composer.json | 40 - .../ZendXml/Exception/ExceptionInterface.php | 14 - .../Exception/InvalidArgumentException.php | 17 - .../ZendXml/Exception/RuntimeException.php | 17 - .../zendxml/library/ZendXml/Security.php | 374 ---- .../zendframework/zendxml/tests/Bootstrap.php | 92 - .../tests/ZendXmlTest/MultibyteTest.php | 125 -- .../tests/ZendXmlTest/SecurityTest.php | 135 -- .../zendxml/tests/phpunit.xml.dist | 27 - 391 files changed, 15712 deletions(-) delete mode 100644 vendor/autoload.php delete mode 120000 vendor/bin/picofeed delete mode 100644 vendor/composer/ClassLoader.php delete mode 100644 vendor/composer/LICENSE delete mode 100644 vendor/composer/autoload_classmap.php delete mode 100644 vendor/composer/autoload_namespaces.php delete mode 100644 vendor/composer/autoload_psr4.php delete mode 100644 vendor/composer/autoload_real.php delete mode 100644 vendor/composer/installed.json delete mode 100644 vendor/erusev/parsedown/.travis.yml delete mode 100644 vendor/erusev/parsedown/LICENSE.txt delete mode 100755 vendor/erusev/parsedown/Parsedown.php delete mode 100644 vendor/erusev/parsedown/README.md delete mode 100644 vendor/erusev/parsedown/composer.json delete mode 100644 vendor/erusev/parsedown/phpunit.xml.dist delete mode 100644 vendor/erusev/parsedown/test/CommonMarkTest.php delete mode 100644 vendor/erusev/parsedown/test/ParsedownTest.php delete mode 100644 vendor/erusev/parsedown/test/TestParsedown.php delete mode 100644 vendor/erusev/parsedown/test/bootstrap.php delete mode 100644 vendor/erusev/parsedown/test/data/aesthetic_table.html delete mode 100644 vendor/erusev/parsedown/test/data/aesthetic_table.md delete mode 100644 vendor/erusev/parsedown/test/data/aligned_table.html delete mode 100644 vendor/erusev/parsedown/test/data/aligned_table.md delete mode 100644 vendor/erusev/parsedown/test/data/atx_heading.html delete mode 100644 vendor/erusev/parsedown/test/data/atx_heading.md delete mode 100644 vendor/erusev/parsedown/test/data/automatic_link.html delete mode 100644 vendor/erusev/parsedown/test/data/automatic_link.md delete mode 100644 vendor/erusev/parsedown/test/data/block-level_html.html delete mode 100644 vendor/erusev/parsedown/test/data/block-level_html.md delete mode 100644 vendor/erusev/parsedown/test/data/code_block.html delete mode 100644 vendor/erusev/parsedown/test/data/code_block.md delete mode 100644 vendor/erusev/parsedown/test/data/code_span.html delete mode 100644 vendor/erusev/parsedown/test/data/code_span.md delete mode 100644 vendor/erusev/parsedown/test/data/compound_blockquote.html delete mode 100644 vendor/erusev/parsedown/test/data/compound_blockquote.md delete mode 100644 vendor/erusev/parsedown/test/data/compound_emphasis.html delete mode 100644 vendor/erusev/parsedown/test/data/compound_emphasis.md delete mode 100644 vendor/erusev/parsedown/test/data/compound_list.html delete mode 100644 vendor/erusev/parsedown/test/data/compound_list.md delete mode 100644 vendor/erusev/parsedown/test/data/deeply_nested_list.html delete mode 100644 vendor/erusev/parsedown/test/data/deeply_nested_list.md delete mode 100644 vendor/erusev/parsedown/test/data/em_strong.html delete mode 100644 vendor/erusev/parsedown/test/data/em_strong.md delete mode 100644 vendor/erusev/parsedown/test/data/email.html delete mode 100644 vendor/erusev/parsedown/test/data/email.md delete mode 100644 vendor/erusev/parsedown/test/data/emphasis.html delete mode 100644 vendor/erusev/parsedown/test/data/emphasis.md delete mode 100644 vendor/erusev/parsedown/test/data/escaping.html delete mode 100644 vendor/erusev/parsedown/test/data/escaping.md delete mode 100644 vendor/erusev/parsedown/test/data/fenced_code_block.html delete mode 100644 vendor/erusev/parsedown/test/data/fenced_code_block.md delete mode 100644 vendor/erusev/parsedown/test/data/horizontal_rule.html delete mode 100644 vendor/erusev/parsedown/test/data/horizontal_rule.md delete mode 100644 vendor/erusev/parsedown/test/data/html_comment.html delete mode 100644 vendor/erusev/parsedown/test/data/html_comment.md delete mode 100644 vendor/erusev/parsedown/test/data/html_entity.html delete mode 100644 vendor/erusev/parsedown/test/data/html_entity.md delete mode 100644 vendor/erusev/parsedown/test/data/image_reference.html delete mode 100644 vendor/erusev/parsedown/test/data/image_reference.md delete mode 100644 vendor/erusev/parsedown/test/data/image_title.html delete mode 100644 vendor/erusev/parsedown/test/data/image_title.md delete mode 100644 vendor/erusev/parsedown/test/data/implicit_reference.html delete mode 100644 vendor/erusev/parsedown/test/data/implicit_reference.md delete mode 100644 vendor/erusev/parsedown/test/data/inline_link.html delete mode 100644 vendor/erusev/parsedown/test/data/inline_link.md delete mode 100644 vendor/erusev/parsedown/test/data/inline_link_title.html delete mode 100644 vendor/erusev/parsedown/test/data/inline_link_title.md delete mode 100644 vendor/erusev/parsedown/test/data/inline_title.html delete mode 100644 vendor/erusev/parsedown/test/data/inline_title.md delete mode 100644 vendor/erusev/parsedown/test/data/lazy_blockquote.html delete mode 100644 vendor/erusev/parsedown/test/data/lazy_blockquote.md delete mode 100644 vendor/erusev/parsedown/test/data/lazy_list.html delete mode 100644 vendor/erusev/parsedown/test/data/lazy_list.md delete mode 100644 vendor/erusev/parsedown/test/data/line_break.html delete mode 100644 vendor/erusev/parsedown/test/data/line_break.md delete mode 100644 vendor/erusev/parsedown/test/data/multiline_list_paragraph.html delete mode 100644 vendor/erusev/parsedown/test/data/multiline_list_paragraph.md delete mode 100644 vendor/erusev/parsedown/test/data/nested_block-level_html.html delete mode 100644 vendor/erusev/parsedown/test/data/nested_block-level_html.md delete mode 100644 vendor/erusev/parsedown/test/data/ordered_list.html delete mode 100644 vendor/erusev/parsedown/test/data/ordered_list.md delete mode 100644 vendor/erusev/parsedown/test/data/paragraph_list.html delete mode 100644 vendor/erusev/parsedown/test/data/paragraph_list.md delete mode 100644 vendor/erusev/parsedown/test/data/reference_title.html delete mode 100644 vendor/erusev/parsedown/test/data/reference_title.md delete mode 100644 vendor/erusev/parsedown/test/data/self-closing_html.html delete mode 100644 vendor/erusev/parsedown/test/data/self-closing_html.md delete mode 100644 vendor/erusev/parsedown/test/data/separated_nested_list.html delete mode 100644 vendor/erusev/parsedown/test/data/separated_nested_list.md delete mode 100644 vendor/erusev/parsedown/test/data/setext_header.html delete mode 100644 vendor/erusev/parsedown/test/data/setext_header.md delete mode 100644 vendor/erusev/parsedown/test/data/simple_blockquote.html delete mode 100644 vendor/erusev/parsedown/test/data/simple_blockquote.md delete mode 100644 vendor/erusev/parsedown/test/data/simple_table.html delete mode 100644 vendor/erusev/parsedown/test/data/simple_table.md delete mode 100644 vendor/erusev/parsedown/test/data/span-level_html.html delete mode 100644 vendor/erusev/parsedown/test/data/span-level_html.md delete mode 100644 vendor/erusev/parsedown/test/data/sparse_dense_list.html delete mode 100644 vendor/erusev/parsedown/test/data/sparse_dense_list.md delete mode 100644 vendor/erusev/parsedown/test/data/sparse_html.html delete mode 100644 vendor/erusev/parsedown/test/data/sparse_html.md delete mode 100644 vendor/erusev/parsedown/test/data/sparse_list.html delete mode 100644 vendor/erusev/parsedown/test/data/sparse_list.md delete mode 100644 vendor/erusev/parsedown/test/data/special_characters.html delete mode 100644 vendor/erusev/parsedown/test/data/special_characters.md delete mode 100644 vendor/erusev/parsedown/test/data/strikethrough.html delete mode 100644 vendor/erusev/parsedown/test/data/strikethrough.md delete mode 100644 vendor/erusev/parsedown/test/data/strong_em.html delete mode 100644 vendor/erusev/parsedown/test/data/strong_em.md delete mode 100644 vendor/erusev/parsedown/test/data/tab-indented_code_block.html delete mode 100644 vendor/erusev/parsedown/test/data/tab-indented_code_block.md delete mode 100644 vendor/erusev/parsedown/test/data/table_inline_markdown.html delete mode 100644 vendor/erusev/parsedown/test/data/table_inline_markdown.md delete mode 100644 vendor/erusev/parsedown/test/data/text_reference.html delete mode 100644 vendor/erusev/parsedown/test/data/text_reference.md delete mode 100644 vendor/erusev/parsedown/test/data/unordered_list.html delete mode 100644 vendor/erusev/parsedown/test/data/unordered_list.md delete mode 100644 vendor/erusev/parsedown/test/data/untidy_table.html delete mode 100644 vendor/erusev/parsedown/test/data/untidy_table.md delete mode 100644 vendor/erusev/parsedown/test/data/url_autolinking.html delete mode 100644 vendor/erusev/parsedown/test/data/url_autolinking.md delete mode 100644 vendor/erusev/parsedown/test/data/whitespace.html delete mode 100644 vendor/erusev/parsedown/test/data/whitespace.md delete mode 100644 vendor/fguillot/picofeed/LICENSE delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Client/Client.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Client/ClientException.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Client/Curl.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Client/HttpHeaders.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Client/InvalidCertificateException.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Client/InvalidUrlException.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Client/MaxRedirectException.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Client/MaxSizeException.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Client/Stream.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Client/TimeoutException.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Client/Url.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Config/Config.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Encoding/Encoding.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Filter/Attribute.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Filter/Filter.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Filter/Html.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Filter/Tag.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Logging/Logger.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Parser/Atom.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Parser/DateParser.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Parser/Feed.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Parser/Item.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Parser/MalformedXmlException.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Parser/Parser.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Parser/ParserException.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Parser/Rss10.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Parser/Rss20.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Parser/Rss91.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Parser/Rss92.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Parser/XmlEntityException.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Parser/XmlParser.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/PicoFeedException.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Reader/Favicon.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Reader/Reader.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Reader/ReaderException.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Reader/SubscriptionNotFoundException.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Reader/UnsupportedFeedFormatException.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/.blog.lemonde.fr.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/.blogs.nytimes.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/.igen.fr.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/.nytimes.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/.phoronix.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/.slate.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/.theguardian.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/.wikipedia.org.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/.wired.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/.wsj.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/01net.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/abstrusegoose.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/alainonline.net.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/aljazeera.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/allafrica.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/allgemeine-zeitung.de.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/amazingsuperpowers.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/anythingcomic.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/ap.org.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/areadvd.de.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/arstechnica.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/awkwardzombie.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/bangkokpost.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/bgr.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/bigfootjustice.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/bizjournals.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/blog.fefe.de.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/blog.mapillary.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/buenosairesherald.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/bunicomic.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/buttersafe.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/cad-comic.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/chaoslife.findchaos.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/cliquerefresh.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/cnet.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/consomac.fr.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/cowbirdsinlove.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/csmonitor.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/dailyjs.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/dailyreporter.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/dailytech.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/degroupnews.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/derstandard.at.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/dilbert.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/discovermagazine.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/distrowatch.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/dozodomo.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/drawingboardcomic.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/endlessorigami.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/engadget.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/escapistmagazine.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/espn.go.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/exocomics.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/explosm.net.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/extrafabulouscomics.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/fastcodesign.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/fastcoexist.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/fastcompany.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/ffworld.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/foreignpolicy.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/fossbytes.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/fowllanguagecomics.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/geek.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/gerbilwithajetpack.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/giantitp.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/github.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/gocomics.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/golem.de.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/greekculture.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/happletea.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/heise.de.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/huffingtonpost.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/imogenquest.net.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/ing.dk.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/invisiblebread.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/ir.amd.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/japantimes.co.jp.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/japantoday.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/journaldugeek.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/jsonline.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/kanpai.fr.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/karriere.jobfinder.dk.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/koreaherald.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/koreatimes.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/lastplacecomics.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/lejapon.fr.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/lesjoiesducode.fr.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/lfg.co.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/lifehacker.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/linux.org.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/linuxinsider.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/lists.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/loadingartist.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/loldwell.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/lukesurl.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/macg.co.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/marc.info.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/marriedtothesea.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/marycagle.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/maximumble.thebookofbiff.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/medium.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/mercworks.net.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/metronieuws.nl.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/milwaukeenns.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/mlb.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/mokepon.smackjeeves.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/monwindowsphone.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/mrlovenstein.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/muckrock.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/nationaljournal.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/nature.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/nba.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/nedroid.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/networkworld.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/neustadt-ticker.de.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/news.sciencemag.org.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/niceteethcomic.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/nichtlustig.de.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/oglaf.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/onhax.net.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/onmilwaukee.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/openrightsgroup.org.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/opensource.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/optipess.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/osnews.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/pastebin.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/peebleslab.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/penny-arcade.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/pixelbeat.org.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/plus.google.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/popstrip.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/putaindecode.fr.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/recode.net.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/retractionwatch.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/rue89.nouvelobs.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/satwcomic.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/scrumalliance.org.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/securityfocus.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/sentfromthemoon.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/sitepoint.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/slashdot.org.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/smallhousebliss.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/smarthomewelt.de.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/smashingmagazine.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/smbc-comics.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/soundandvision.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/spiegel.de.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/stereophile.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/stupidfox.net.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/subtraction.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/sz.de.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/techcrunch.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/the-ebook-reader.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/theatlantic.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/theawkwardyeti.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/thecodinglove.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/thedoghousediaries.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/thegamercat.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/thehindu.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/thelocal.se.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/themerepublic.net.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/themoscowtimes.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/thenewslens.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/theodd1sout.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/theonion.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/thestandard.com.hk.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/threepanelsoul.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/timesofindia.indiatimes.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/travel-dealz.de.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/treehugger.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/treelobsters.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/twogag.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/twokinds.keenspot.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/undeadly.org.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/upi.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/version2.dk.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/vgcats.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/vuxml.org.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.bbc.co.uk.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.bdgest.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.bgr.in.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.businessweek.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.cnn.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.developpez.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.egscomics.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.fakingnews.firstpost.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.forbes.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.franceculture.fr.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.futura-sciences.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.geekculture.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.howtogeek.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.lepoint.fr.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.lesnumeriques.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.mac4ever.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.makeuseof.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.npr.org.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.numerama.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.oneindia.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.pcinpact.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.pseudo-sciences.org.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.slate.fr.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.universfreebox.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.zeit.de.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/xkcd.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Rules/zdnet.com.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Scraper/CandidateParser.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Scraper/ParserInterface.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Scraper/RuleLoader.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Scraper/RuleParser.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Scraper/Scraper.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Serialization/Export.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Serialization/Import.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Syndication/Atom.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Syndication/Rss20.php delete mode 100644 vendor/fguillot/picofeed/lib/PicoFeed/Syndication/Writer.php delete mode 100755 vendor/fguillot/picofeed/picofeed delete mode 100644 vendor/zendframework/zendxml/.gitignore delete mode 100644 vendor/zendframework/zendxml/.travis.yml delete mode 100644 vendor/zendframework/zendxml/CHANGELOG.md delete mode 100644 vendor/zendframework/zendxml/LICENSE.md delete mode 100644 vendor/zendframework/zendxml/README.md delete mode 100644 vendor/zendframework/zendxml/composer.json delete mode 100644 vendor/zendframework/zendxml/library/ZendXml/Exception/ExceptionInterface.php delete mode 100644 vendor/zendframework/zendxml/library/ZendXml/Exception/InvalidArgumentException.php delete mode 100644 vendor/zendframework/zendxml/library/ZendXml/Exception/RuntimeException.php delete mode 100644 vendor/zendframework/zendxml/library/ZendXml/Security.php delete mode 100644 vendor/zendframework/zendxml/tests/Bootstrap.php delete mode 100644 vendor/zendframework/zendxml/tests/ZendXmlTest/MultibyteTest.php delete mode 100644 vendor/zendframework/zendxml/tests/ZendXmlTest/SecurityTest.php delete mode 100755 vendor/zendframework/zendxml/tests/phpunit.xml.dist diff --git a/vendor/autoload.php b/vendor/autoload.php deleted file mode 100644 index 07e7324..0000000 --- a/vendor/autoload.php +++ /dev/null @@ -1,7 +0,0 @@ - - * Jordi Boggiano - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Composer\Autoload; - -/** - * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. - * - * $loader = new \Composer\Autoload\ClassLoader(); - * - * // register classes with namespaces - * $loader->add('Symfony\Component', __DIR__.'/component'); - * $loader->add('Symfony', __DIR__.'/framework'); - * - * // activate the autoloader - * $loader->register(); - * - * // to enable searching the include path (eg. for PEAR packages) - * $loader->setUseIncludePath(true); - * - * In this example, if you try to use a class in the Symfony\Component - * namespace or one of its children (Symfony\Component\Console for instance), - * the autoloader will first look for the class under the component/ - * directory, and it will then fallback to the framework/ directory if not - * found before giving up. - * - * This class is loosely based on the Symfony UniversalClassLoader. - * - * @author Fabien Potencier - * @author Jordi Boggiano - * @see http://www.php-fig.org/psr/psr-0/ - * @see http://www.php-fig.org/psr/psr-4/ - */ -class ClassLoader -{ - // PSR-4 - private $prefixLengthsPsr4 = array(); - private $prefixDirsPsr4 = array(); - private $fallbackDirsPsr4 = array(); - - // PSR-0 - private $prefixesPsr0 = array(); - private $fallbackDirsPsr0 = array(); - - private $useIncludePath = false; - private $classMap = array(); - - private $classMapAuthoritative = false; - - public function getPrefixes() - { - if (!empty($this->prefixesPsr0)) { - return call_user_func_array('array_merge', $this->prefixesPsr0); - } - - return array(); - } - - public function getPrefixesPsr4() - { - return $this->prefixDirsPsr4; - } - - public function getFallbackDirs() - { - return $this->fallbackDirsPsr0; - } - - public function getFallbackDirsPsr4() - { - return $this->fallbackDirsPsr4; - } - - public function getClassMap() - { - return $this->classMap; - } - - /** - * @param array $classMap Class to filename map - */ - public function addClassMap(array $classMap) - { - if ($this->classMap) { - $this->classMap = array_merge($this->classMap, $classMap); - } else { - $this->classMap = $classMap; - } - } - - /** - * Registers a set of PSR-0 directories for a given prefix, either - * appending or prepending to the ones previously set for this prefix. - * - * @param string $prefix The prefix - * @param array|string $paths The PSR-0 root directories - * @param bool $prepend Whether to prepend the directories - */ - public function add($prefix, $paths, $prepend = false) - { - if (!$prefix) { - if ($prepend) { - $this->fallbackDirsPsr0 = array_merge( - (array) $paths, - $this->fallbackDirsPsr0 - ); - } else { - $this->fallbackDirsPsr0 = array_merge( - $this->fallbackDirsPsr0, - (array) $paths - ); - } - - return; - } - - $first = $prefix[0]; - if (!isset($this->prefixesPsr0[$first][$prefix])) { - $this->prefixesPsr0[$first][$prefix] = (array) $paths; - - return; - } - if ($prepend) { - $this->prefixesPsr0[$first][$prefix] = array_merge( - (array) $paths, - $this->prefixesPsr0[$first][$prefix] - ); - } else { - $this->prefixesPsr0[$first][$prefix] = array_merge( - $this->prefixesPsr0[$first][$prefix], - (array) $paths - ); - } - } - - /** - * Registers a set of PSR-4 directories for a given namespace, either - * appending or prepending to the ones previously set for this namespace. - * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param array|string $paths The PSR-4 base directories - * @param bool $prepend Whether to prepend the directories - * - * @throws \InvalidArgumentException - */ - public function addPsr4($prefix, $paths, $prepend = false) - { - if (!$prefix) { - // Register directories for the root namespace. - if ($prepend) { - $this->fallbackDirsPsr4 = array_merge( - (array) $paths, - $this->fallbackDirsPsr4 - ); - } else { - $this->fallbackDirsPsr4 = array_merge( - $this->fallbackDirsPsr4, - (array) $paths - ); - } - } elseif (!isset($this->prefixDirsPsr4[$prefix])) { - // Register directories for a new namespace. - $length = strlen($prefix); - if ('\\' !== $prefix[$length - 1]) { - throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); - } - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; - } elseif ($prepend) { - // Prepend directories for an already registered namespace. - $this->prefixDirsPsr4[$prefix] = array_merge( - (array) $paths, - $this->prefixDirsPsr4[$prefix] - ); - } else { - // Append directories for an already registered namespace. - $this->prefixDirsPsr4[$prefix] = array_merge( - $this->prefixDirsPsr4[$prefix], - (array) $paths - ); - } - } - - /** - * Registers a set of PSR-0 directories for a given prefix, - * replacing any others previously set for this prefix. - * - * @param string $prefix The prefix - * @param array|string $paths The PSR-0 base directories - */ - public function set($prefix, $paths) - { - if (!$prefix) { - $this->fallbackDirsPsr0 = (array) $paths; - } else { - $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; - } - } - - /** - * Registers a set of PSR-4 directories for a given namespace, - * replacing any others previously set for this namespace. - * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param array|string $paths The PSR-4 base directories - * - * @throws \InvalidArgumentException - */ - public function setPsr4($prefix, $paths) - { - if (!$prefix) { - $this->fallbackDirsPsr4 = (array) $paths; - } else { - $length = strlen($prefix); - if ('\\' !== $prefix[$length - 1]) { - throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); - } - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; - } - } - - /** - * Turns on searching the include path for class files. - * - * @param bool $useIncludePath - */ - public function setUseIncludePath($useIncludePath) - { - $this->useIncludePath = $useIncludePath; - } - - /** - * Can be used to check if the autoloader uses the include path to check - * for classes. - * - * @return bool - */ - public function getUseIncludePath() - { - return $this->useIncludePath; - } - - /** - * Turns off searching the prefix and fallback directories for classes - * that have not been registered with the class map. - * - * @param bool $classMapAuthoritative - */ - public function setClassMapAuthoritative($classMapAuthoritative) - { - $this->classMapAuthoritative = $classMapAuthoritative; - } - - /** - * Should class lookup fail if not found in the current class map? - * - * @return bool - */ - public function isClassMapAuthoritative() - { - return $this->classMapAuthoritative; - } - - /** - * Registers this instance as an autoloader. - * - * @param bool $prepend Whether to prepend the autoloader or not - */ - public function register($prepend = false) - { - spl_autoload_register(array($this, 'loadClass'), true, $prepend); - } - - /** - * Unregisters this instance as an autoloader. - */ - public function unregister() - { - spl_autoload_unregister(array($this, 'loadClass')); - } - - /** - * Loads the given class or interface. - * - * @param string $class The name of the class - * @return bool|null True if loaded, null otherwise - */ - public function loadClass($class) - { - if ($file = $this->findFile($class)) { - includeFile($file); - - return true; - } - } - - /** - * Finds the path to the file where the class is defined. - * - * @param string $class The name of the class - * - * @return string|false The path if found, false otherwise - */ - public function findFile($class) - { - // work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731 - if ('\\' == $class[0]) { - $class = substr($class, 1); - } - - // class map lookup - if (isset($this->classMap[$class])) { - return $this->classMap[$class]; - } - if ($this->classMapAuthoritative) { - return false; - } - - $file = $this->findFileWithExtension($class, '.php'); - - // Search for Hack files if we are running on HHVM - if ($file === null && defined('HHVM_VERSION')) { - $file = $this->findFileWithExtension($class, '.hh'); - } - - if ($file === null) { - // Remember that this class does not exist. - return $this->classMap[$class] = false; - } - - return $file; - } - - private function findFileWithExtension($class, $ext) - { - // PSR-4 lookup - $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; - - $first = $class[0]; - if (isset($this->prefixLengthsPsr4[$first])) { - foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) { - if (0 === strpos($class, $prefix)) { - foreach ($this->prefixDirsPsr4[$prefix] as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) { - return $file; - } - } - } - } - } - - // PSR-4 fallback dirs - foreach ($this->fallbackDirsPsr4 as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { - return $file; - } - } - - // PSR-0 lookup - if (false !== $pos = strrpos($class, '\\')) { - // namespaced class name - $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) - . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); - } else { - // PEAR-like class name - $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; - } - - if (isset($this->prefixesPsr0[$first])) { - foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { - if (0 === strpos($class, $prefix)) { - foreach ($dirs as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { - return $file; - } - } - } - } - } - - // PSR-0 fallback dirs - foreach ($this->fallbackDirsPsr0 as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { - return $file; - } - } - - // PSR-0 include paths. - if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { - return $file; - } - } -} - -/** - * Scope isolated include. - * - * Prevents access to $this/self from included files. - */ -function includeFile($file) -{ - include $file; -} diff --git a/vendor/composer/LICENSE b/vendor/composer/LICENSE deleted file mode 100644 index 1a28124..0000000 --- a/vendor/composer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - -Copyright (c) 2016 Nils Adermann, Jordi Boggiano - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php deleted file mode 100644 index 7a91153..0000000 --- a/vendor/composer/autoload_classmap.php +++ /dev/null @@ -1,9 +0,0 @@ - array($vendorDir . '/zendframework/zendxml/library'), - 'Pimple' => array($vendorDir . '/pimple/pimple/src'), - 'PicoFeed' => array($vendorDir . '/fguillot/picofeed/lib'), - 'Parsedown' => array($vendorDir . '/erusev/parsedown'), -); diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php deleted file mode 100644 index cc46458..0000000 --- a/vendor/composer/autoload_psr4.php +++ /dev/null @@ -1,14 +0,0 @@ - array($vendorDir . '/symfony/yaml'), - 'Slim\\' => array($vendorDir . '/slim/slim/Slim'), - 'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src'), - 'Interop\\Container\\' => array($vendorDir . '/container-interop/container-interop/src/Interop/Container'), - 'FastRoute\\' => array($vendorDir . '/nikic/fast-route/src'), -); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php deleted file mode 100644 index 3967c5a..0000000 --- a/vendor/composer/autoload_real.php +++ /dev/null @@ -1,59 +0,0 @@ - $path) { - $loader->set($namespace, $path); - } - - $map = require __DIR__ . '/autoload_psr4.php'; - foreach ($map as $namespace => $path) { - $loader->setPsr4($namespace, $path); - } - - $classMap = require __DIR__ . '/autoload_classmap.php'; - if ($classMap) { - $loader->addClassMap($classMap); - } - - $loader->register(true); - - $includeFiles = require __DIR__ . '/autoload_files.php'; - foreach ($includeFiles as $fileIdentifier => $file) { - composerRequiree149f47a700f596a9845d47c917afeaf($fileIdentifier, $file); - } - - return $loader; - } -} - -function composerRequiree149f47a700f596a9845d47c917afeaf($fileIdentifier, $file) -{ - if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { - require $file; - - $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; - } -} diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json deleted file mode 100644 index 4999b25..0000000 --- a/vendor/composer/installed.json +++ /dev/null @@ -1,433 +0,0 @@ -[ - { - "name": "erusev/parsedown", - "version": "1.6.0", - "version_normalized": "1.6.0.0", - "source": { - "type": "git", - "url": "https://github.com/erusev/parsedown.git", - "reference": "3ebbd730b5c2cf5ce78bc1bf64071407fc6674b7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/erusev/parsedown/zipball/3ebbd730b5c2cf5ce78bc1bf64071407fc6674b7", - "reference": "3ebbd730b5c2cf5ce78bc1bf64071407fc6674b7", - "shasum": "" - }, - "time": "2015-10-04 16:44:32", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-0": { - "Parsedown": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Emanuil Rusev", - "email": "hello@erusev.com", - "homepage": "http://erusev.com" - } - ], - "description": "Parser for Markdown.", - "homepage": "http://parsedown.org", - "keywords": [ - "markdown", - "parser" - ] - }, - { - "name": "zendframework/zendxml", - "version": "1.0.2", - "version_normalized": "1.0.2.0", - "source": { - "type": "git", - "url": "https://github.com/zendframework/ZendXml.git", - "reference": "7b64507bc35d841c9c5802d67f6f87ef8e1a58c9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/ZendXml/zipball/7b64507bc35d841c9c5802d67f6f87ef8e1a58c9", - "reference": "7b64507bc35d841c9c5802d67f6f87ef8e1a58c9", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^3.7 || ^4.0", - "squizlabs/php_codesniffer": "^1.5" - }, - "time": "2016-02-04 21:02:08", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "ZendXml\\": "library/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Utility library for XML usage, best practices, and security in PHP", - "homepage": "http://packages.zendframework.com/", - "keywords": [ - "security", - "xml", - "zf2" - ] - }, - { - "name": "fguillot/picofeed", - "version": "v0.1.18", - "version_normalized": "0.1.18.0", - "source": { - "type": "git", - "url": "https://github.com/fguillot/picoFeed.git", - "reference": "8f776343b0dada397c2a950a7c3f7be57442fa35" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/fguillot/picoFeed/zipball/8f776343b0dada397c2a950a7c3f7be57442fa35", - "reference": "8f776343b0dada397c2a950a7c3f7be57442fa35", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-iconv": "*", - "ext-libxml": "*", - "ext-simplexml": "*", - "ext-xml": "*", - "php": ">=5.3.0", - "zendframework/zendxml": "^1.0" - }, - "suggest": { - "ext-curl": "PicoFeed will use cURL if present" - }, - "time": "2016-02-09 02:49:54", - "bin": [ - "picofeed" - ], - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-0": { - "PicoFeed": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Frédéric Guillot" - } - ], - "description": "Modern library to handle RSS/Atom feeds", - "homepage": "https://github.com/fguillot/picoFeed" - }, - { - "name": "container-interop/container-interop", - "version": "1.1.0", - "version_normalized": "1.1.0.0", - "source": { - "type": "git", - "url": "https://github.com/container-interop/container-interop.git", - "reference": "fc08354828f8fd3245f77a66b9e23a6bca48297e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/container-interop/container-interop/zipball/fc08354828f8fd3245f77a66b9e23a6bca48297e", - "reference": "fc08354828f8fd3245f77a66b9e23a6bca48297e", - "shasum": "" - }, - "time": "2014-12-30 15:22:37", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Interop\\Container\\": "src/Interop/Container/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Promoting the interoperability of container objects (DIC, SL, etc.)" - }, - { - "name": "nikic/fast-route", - "version": "v0.6.0", - "version_normalized": "0.6.0.0", - "source": { - "type": "git", - "url": "https://github.com/nikic/FastRoute.git", - "reference": "31fa86924556b80735f98b294a7ffdfb26789f22" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/FastRoute/zipball/31fa86924556b80735f98b294a7ffdfb26789f22", - "reference": "31fa86924556b80735f98b294a7ffdfb26789f22", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "time": "2015-06-18 19:15:47", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "FastRoute\\": "src/" - }, - "files": [ - "src/functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov", - "email": "nikic@php.net" - } - ], - "description": "Fast request router for PHP", - "keywords": [ - "router", - "routing" - ] - }, - { - "name": "psr/http-message", - "version": "1.0", - "version_normalized": "1.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", - "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "time": "2015-05-04 20:22:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP messages", - "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" - ] - }, - { - "name": "pimple/pimple", - "version": "v3.0.2", - "version_normalized": "3.0.2.0", - "source": { - "type": "git", - "url": "https://github.com/silexphp/Pimple.git", - "reference": "a30f7d6e57565a2e1a316e1baf2a483f788b258a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/silexphp/Pimple/zipball/a30f7d6e57565a2e1a316e1baf2a483f788b258a", - "reference": "a30f7d6e57565a2e1a316e1baf2a483f788b258a", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "time": "2015-09-11 15:10:35", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "Pimple": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Pimple, a simple Dependency Injection Container", - "homepage": "http://pimple.sensiolabs.org", - "keywords": [ - "container", - "dependency injection" - ] - }, - { - "name": "slim/slim", - "version": "3.3.0", - "version_normalized": "3.3.0.0", - "source": { - "type": "git", - "url": "https://github.com/slimphp/Slim.git", - "reference": "939f2e85d57508de9cff241d10091cd972f221c3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/slimphp/Slim/zipball/939f2e85d57508de9cff241d10091cd972f221c3", - "reference": "939f2e85d57508de9cff241d10091cd972f221c3", - "shasum": "" - }, - "require": { - "container-interop/container-interop": "^1.1", - "nikic/fast-route": "^0.6", - "php": ">=5.5.0", - "pimple/pimple": "^3.0", - "psr/http-message": "^1.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.0", - "squizlabs/php_codesniffer": "^2.5" - }, - "time": "2016-03-10 21:37:40", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Slim\\": "Slim" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Rob Allen", - "email": "rob@akrabat.com", - "homepage": "http://akrabat.com" - }, - { - "name": "Josh Lockhart", - "email": "hello@joshlockhart.com", - "homepage": "https://joshlockhart.com" - }, - { - "name": "Gabriel Manricks", - "email": "gmanricks@me.com", - "homepage": "http://gabrielmanricks.com" - }, - { - "name": "Andrew Smith", - "email": "a.smith@silentworks.co.uk", - "homepage": "http://silentworks.co.uk" - } - ], - "description": "Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs", - "homepage": "http://slimframework.com", - "keywords": [ - "api", - "framework", - "micro", - "router" - ] - }, - { - "name": "symfony/yaml", - "version": "v3.0.4", - "version_normalized": "3.0.4.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "0047c8366744a16de7516622c5b7355336afae96" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/0047c8366744a16de7516622c5b7355336afae96", - "reference": "0047c8366744a16de7516622c5b7355336afae96", - "shasum": "" - }, - "require": { - "php": ">=5.5.9" - }, - "time": "2016-03-04 07:55:57", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Yaml Component", - "homepage": "https://symfony.com" - } -] diff --git a/vendor/erusev/parsedown/.travis.yml b/vendor/erusev/parsedown/.travis.yml deleted file mode 100644 index 5df49dc..0000000 --- a/vendor/erusev/parsedown/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -language: php - -php: - - 7.0 - - 5.6 - - 5.5 - - 5.4 - - 5.3 - - hhvm - - hhvm-nightly - -matrix: - fast_finish: true - allow_failures: - - php: 7.0 - - php: hhvm-nightly diff --git a/vendor/erusev/parsedown/LICENSE.txt b/vendor/erusev/parsedown/LICENSE.txt deleted file mode 100644 index baca86f..0000000 --- a/vendor/erusev/parsedown/LICENSE.txt +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 Emanuil Rusev, erusev.com - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/vendor/erusev/parsedown/Parsedown.php b/vendor/erusev/parsedown/Parsedown.php deleted file mode 100755 index c8c92a3..0000000 --- a/vendor/erusev/parsedown/Parsedown.php +++ /dev/null @@ -1,1528 +0,0 @@ -DefinitionData = array(); - - # standardize line breaks - $text = str_replace(array("\r\n", "\r"), "\n", $text); - - # remove surrounding line breaks - $text = trim($text, "\n"); - - # split text into lines - $lines = explode("\n", $text); - - # iterate through lines to identify blocks - $markup = $this->lines($lines); - - # trim line breaks - $markup = trim($markup, "\n"); - - return $markup; - } - - # - # Setters - # - - function setBreaksEnabled($breaksEnabled) - { - $this->breaksEnabled = $breaksEnabled; - - return $this; - } - - protected $breaksEnabled; - - function setMarkupEscaped($markupEscaped) - { - $this->markupEscaped = $markupEscaped; - - return $this; - } - - protected $markupEscaped; - - function setUrlsLinked($urlsLinked) - { - $this->urlsLinked = $urlsLinked; - - return $this; - } - - protected $urlsLinked = true; - - # - # Lines - # - - protected $BlockTypes = array( - '#' => array('Header'), - '*' => array('Rule', 'List'), - '+' => array('List'), - '-' => array('SetextHeader', 'Table', 'Rule', 'List'), - '0' => array('List'), - '1' => array('List'), - '2' => array('List'), - '3' => array('List'), - '4' => array('List'), - '5' => array('List'), - '6' => array('List'), - '7' => array('List'), - '8' => array('List'), - '9' => array('List'), - ':' => array('Table'), - '<' => array('Comment', 'Markup'), - '=' => array('SetextHeader'), - '>' => array('Quote'), - '[' => array('Reference'), - '_' => array('Rule'), - '`' => array('FencedCode'), - '|' => array('Table'), - '~' => array('FencedCode'), - ); - - # ~ - - protected $unmarkedBlockTypes = array( - 'Code', - ); - - # - # Blocks - # - - private function lines(array $lines) - { - $CurrentBlock = null; - - foreach ($lines as $line) - { - if (chop($line) === '') - { - if (isset($CurrentBlock)) - { - $CurrentBlock['interrupted'] = true; - } - - continue; - } - - if (strpos($line, "\t") !== false) - { - $parts = explode("\t", $line); - - $line = $parts[0]; - - unset($parts[0]); - - foreach ($parts as $part) - { - $shortage = 4 - mb_strlen($line, 'utf-8') % 4; - - $line .= str_repeat(' ', $shortage); - $line .= $part; - } - } - - $indent = 0; - - while (isset($line[$indent]) and $line[$indent] === ' ') - { - $indent ++; - } - - $text = $indent > 0 ? substr($line, $indent) : $line; - - # ~ - - $Line = array('body' => $line, 'indent' => $indent, 'text' => $text); - - # ~ - - if (isset($CurrentBlock['continuable'])) - { - $Block = $this->{'block'.$CurrentBlock['type'].'Continue'}($Line, $CurrentBlock); - - if (isset($Block)) - { - $CurrentBlock = $Block; - - continue; - } - else - { - if (method_exists($this, 'block'.$CurrentBlock['type'].'Complete')) - { - $CurrentBlock = $this->{'block'.$CurrentBlock['type'].'Complete'}($CurrentBlock); - } - } - } - - # ~ - - $marker = $text[0]; - - # ~ - - $blockTypes = $this->unmarkedBlockTypes; - - if (isset($this->BlockTypes[$marker])) - { - foreach ($this->BlockTypes[$marker] as $blockType) - { - $blockTypes []= $blockType; - } - } - - # - # ~ - - foreach ($blockTypes as $blockType) - { - $Block = $this->{'block'.$blockType}($Line, $CurrentBlock); - - if (isset($Block)) - { - $Block['type'] = $blockType; - - if ( ! isset($Block['identified'])) - { - $Blocks []= $CurrentBlock; - - $Block['identified'] = true; - } - - if (method_exists($this, 'block'.$blockType.'Continue')) - { - $Block['continuable'] = true; - } - - $CurrentBlock = $Block; - - continue 2; - } - } - - # ~ - - if (isset($CurrentBlock) and ! isset($CurrentBlock['type']) and ! isset($CurrentBlock['interrupted'])) - { - $CurrentBlock['element']['text'] .= "\n".$text; - } - else - { - $Blocks []= $CurrentBlock; - - $CurrentBlock = $this->paragraph($Line); - - $CurrentBlock['identified'] = true; - } - } - - # ~ - - if (isset($CurrentBlock['continuable']) and method_exists($this, 'block'.$CurrentBlock['type'].'Complete')) - { - $CurrentBlock = $this->{'block'.$CurrentBlock['type'].'Complete'}($CurrentBlock); - } - - # ~ - - $Blocks []= $CurrentBlock; - - unset($Blocks[0]); - - # ~ - - $markup = ''; - - foreach ($Blocks as $Block) - { - if (isset($Block['hidden'])) - { - continue; - } - - $markup .= "\n"; - $markup .= isset($Block['markup']) ? $Block['markup'] : $this->element($Block['element']); - } - - $markup .= "\n"; - - # ~ - - return $markup; - } - - # - # Code - - protected function blockCode($Line, $Block = null) - { - if (isset($Block) and ! isset($Block['type']) and ! isset($Block['interrupted'])) - { - return; - } - - if ($Line['indent'] >= 4) - { - $text = substr($Line['body'], 4); - - $Block = array( - 'element' => array( - 'name' => 'pre', - 'handler' => 'element', - 'text' => array( - 'name' => 'code', - 'text' => $text, - ), - ), - ); - - return $Block; - } - } - - protected function blockCodeContinue($Line, $Block) - { - if ($Line['indent'] >= 4) - { - if (isset($Block['interrupted'])) - { - $Block['element']['text']['text'] .= "\n"; - - unset($Block['interrupted']); - } - - $Block['element']['text']['text'] .= "\n"; - - $text = substr($Line['body'], 4); - - $Block['element']['text']['text'] .= $text; - - return $Block; - } - } - - protected function blockCodeComplete($Block) - { - $text = $Block['element']['text']['text']; - - $text = htmlspecialchars($text, ENT_NOQUOTES, 'UTF-8'); - - $Block['element']['text']['text'] = $text; - - return $Block; - } - - # - # Comment - - protected function blockComment($Line) - { - if ($this->markupEscaped) - { - return; - } - - if (isset($Line['text'][3]) and $Line['text'][3] === '-' and $Line['text'][2] === '-' and $Line['text'][1] === '!') - { - $Block = array( - 'markup' => $Line['body'], - ); - - if (preg_match('/-->$/', $Line['text'])) - { - $Block['closed'] = true; - } - - return $Block; - } - } - - protected function blockCommentContinue($Line, array $Block) - { - if (isset($Block['closed'])) - { - return; - } - - $Block['markup'] .= "\n" . $Line['body']; - - if (preg_match('/-->$/', $Line['text'])) - { - $Block['closed'] = true; - } - - return $Block; - } - - # - # Fenced Code - - protected function blockFencedCode($Line) - { - if (preg_match('/^['.$Line['text'][0].']{3,}[ ]*([\w-]+)?[ ]*$/', $Line['text'], $matches)) - { - $Element = array( - 'name' => 'code', - 'text' => '', - ); - - if (isset($matches[1])) - { - $class = 'language-'.$matches[1]; - - $Element['attributes'] = array( - 'class' => $class, - ); - } - - $Block = array( - 'char' => $Line['text'][0], - 'element' => array( - 'name' => 'pre', - 'handler' => 'element', - 'text' => $Element, - ), - ); - - return $Block; - } - } - - protected function blockFencedCodeContinue($Line, $Block) - { - if (isset($Block['complete'])) - { - return; - } - - if (isset($Block['interrupted'])) - { - $Block['element']['text']['text'] .= "\n"; - - unset($Block['interrupted']); - } - - if (preg_match('/^'.$Block['char'].'{3,}[ ]*$/', $Line['text'])) - { - $Block['element']['text']['text'] = substr($Block['element']['text']['text'], 1); - - $Block['complete'] = true; - - return $Block; - } - - $Block['element']['text']['text'] .= "\n".$Line['body'];; - - return $Block; - } - - protected function blockFencedCodeComplete($Block) - { - $text = $Block['element']['text']['text']; - - $text = htmlspecialchars($text, ENT_NOQUOTES, 'UTF-8'); - - $Block['element']['text']['text'] = $text; - - return $Block; - } - - # - # Header - - protected function blockHeader($Line) - { - if (isset($Line['text'][1])) - { - $level = 1; - - while (isset($Line['text'][$level]) and $Line['text'][$level] === '#') - { - $level ++; - } - - if ($level > 6) - { - return; - } - - $text = trim($Line['text'], '# '); - - $Block = array( - 'element' => array( - 'name' => 'h' . min(6, $level), - 'text' => $text, - 'handler' => 'line', - ), - ); - - return $Block; - } - } - - # - # List - - protected function blockList($Line) - { - list($name, $pattern) = $Line['text'][0] <= '-' ? array('ul', '[*+-]') : array('ol', '[0-9]+[.]'); - - if (preg_match('/^('.$pattern.'[ ]+)(.*)/', $Line['text'], $matches)) - { - $Block = array( - 'indent' => $Line['indent'], - 'pattern' => $pattern, - 'element' => array( - 'name' => $name, - 'handler' => 'elements', - ), - ); - - $Block['li'] = array( - 'name' => 'li', - 'handler' => 'li', - 'text' => array( - $matches[2], - ), - ); - - $Block['element']['text'] []= & $Block['li']; - - return $Block; - } - } - - protected function blockListContinue($Line, array $Block) - { - if ($Block['indent'] === $Line['indent'] and preg_match('/^'.$Block['pattern'].'(?:[ ]+(.*)|$)/', $Line['text'], $matches)) - { - if (isset($Block['interrupted'])) - { - $Block['li']['text'] []= ''; - - unset($Block['interrupted']); - } - - unset($Block['li']); - - $text = isset($matches[1]) ? $matches[1] : ''; - - $Block['li'] = array( - 'name' => 'li', - 'handler' => 'li', - 'text' => array( - $text, - ), - ); - - $Block['element']['text'] []= & $Block['li']; - - return $Block; - } - - if ($Line['text'][0] === '[' and $this->blockReference($Line)) - { - return $Block; - } - - if ( ! isset($Block['interrupted'])) - { - $text = preg_replace('/^[ ]{0,4}/', '', $Line['body']); - - $Block['li']['text'] []= $text; - - return $Block; - } - - if ($Line['indent'] > 0) - { - $Block['li']['text'] []= ''; - - $text = preg_replace('/^[ ]{0,4}/', '', $Line['body']); - - $Block['li']['text'] []= $text; - - unset($Block['interrupted']); - - return $Block; - } - } - - # - # Quote - - protected function blockQuote($Line) - { - if (preg_match('/^>[ ]?(.*)/', $Line['text'], $matches)) - { - $Block = array( - 'element' => array( - 'name' => 'blockquote', - 'handler' => 'lines', - 'text' => (array) $matches[1], - ), - ); - - return $Block; - } - } - - protected function blockQuoteContinue($Line, array $Block) - { - if ($Line['text'][0] === '>' and preg_match('/^>[ ]?(.*)/', $Line['text'], $matches)) - { - if (isset($Block['interrupted'])) - { - $Block['element']['text'] []= ''; - - unset($Block['interrupted']); - } - - $Block['element']['text'] []= $matches[1]; - - return $Block; - } - - if ( ! isset($Block['interrupted'])) - { - $Block['element']['text'] []= $Line['text']; - - return $Block; - } - } - - # - # Rule - - protected function blockRule($Line) - { - if (preg_match('/^(['.$Line['text'][0].'])([ ]*\1){2,}[ ]*$/', $Line['text'])) - { - $Block = array( - 'element' => array( - 'name' => 'hr' - ), - ); - - return $Block; - } - } - - # - # Setext - - protected function blockSetextHeader($Line, array $Block = null) - { - if ( ! isset($Block) or isset($Block['type']) or isset($Block['interrupted'])) - { - return; - } - - if (chop($Line['text'], $Line['text'][0]) === '') - { - $Block['element']['name'] = $Line['text'][0] === '=' ? 'h1' : 'h2'; - - return $Block; - } - } - - # - # Markup - - protected function blockMarkup($Line) - { - if ($this->markupEscaped) - { - return; - } - - if (preg_match('/^<(\w*)(?:[ ]*'.$this->regexHtmlAttribute.')*[ ]*(\/)?>/', $Line['text'], $matches)) - { - $element = strtolower($matches[1]); - - if (in_array($element, $this->textLevelElements)) - { - return; - } - - $Block = array( - 'name' => $matches[1], - 'depth' => 0, - 'markup' => $Line['text'], - ); - - $length = strlen($matches[0]); - - $remainder = substr($Line['text'], $length); - - if (trim($remainder) === '') - { - if (isset($matches[2]) or in_array($matches[1], $this->voidElements)) - { - $Block['closed'] = true; - - $Block['void'] = true; - } - } - else - { - if (isset($matches[2]) or in_array($matches[1], $this->voidElements)) - { - return; - } - - if (preg_match('/<\/'.$matches[1].'>[ ]*$/i', $remainder)) - { - $Block['closed'] = true; - } - } - - return $Block; - } - } - - protected function blockMarkupContinue($Line, array $Block) - { - if (isset($Block['closed'])) - { - return; - } - - if (preg_match('/^<'.$Block['name'].'(?:[ ]*'.$this->regexHtmlAttribute.')*[ ]*>/i', $Line['text'])) # open - { - $Block['depth'] ++; - } - - if (preg_match('/(.*?)<\/'.$Block['name'].'>[ ]*$/i', $Line['text'], $matches)) # close - { - if ($Block['depth'] > 0) - { - $Block['depth'] --; - } - else - { - $Block['closed'] = true; - } - } - - if (isset($Block['interrupted'])) - { - $Block['markup'] .= "\n"; - - unset($Block['interrupted']); - } - - $Block['markup'] .= "\n".$Line['body']; - - return $Block; - } - - # - # Reference - - protected function blockReference($Line) - { - if (preg_match('/^\[(.+?)\]:[ ]*?(?:[ ]+["\'(](.+)["\')])?[ ]*$/', $Line['text'], $matches)) - { - $id = strtolower($matches[1]); - - $Data = array( - 'url' => $matches[2], - 'title' => null, - ); - - if (isset($matches[3])) - { - $Data['title'] = $matches[3]; - } - - $this->DefinitionData['Reference'][$id] = $Data; - - $Block = array( - 'hidden' => true, - ); - - return $Block; - } - } - - # - # Table - - protected function blockTable($Line, array $Block = null) - { - if ( ! isset($Block) or isset($Block['type']) or isset($Block['interrupted'])) - { - return; - } - - if (strpos($Block['element']['text'], '|') !== false and chop($Line['text'], ' -:|') === '') - { - $alignments = array(); - - $divider = $Line['text']; - - $divider = trim($divider); - $divider = trim($divider, '|'); - - $dividerCells = explode('|', $divider); - - foreach ($dividerCells as $dividerCell) - { - $dividerCell = trim($dividerCell); - - if ($dividerCell === '') - { - continue; - } - - $alignment = null; - - if ($dividerCell[0] === ':') - { - $alignment = 'left'; - } - - if (substr($dividerCell, - 1) === ':') - { - $alignment = $alignment === 'left' ? 'center' : 'right'; - } - - $alignments []= $alignment; - } - - # ~ - - $HeaderElements = array(); - - $header = $Block['element']['text']; - - $header = trim($header); - $header = trim($header, '|'); - - $headerCells = explode('|', $header); - - foreach ($headerCells as $index => $headerCell) - { - $headerCell = trim($headerCell); - - $HeaderElement = array( - 'name' => 'th', - 'text' => $headerCell, - 'handler' => 'line', - ); - - if (isset($alignments[$index])) - { - $alignment = $alignments[$index]; - - $HeaderElement['attributes'] = array( - 'style' => 'text-align: '.$alignment.';', - ); - } - - $HeaderElements []= $HeaderElement; - } - - # ~ - - $Block = array( - 'alignments' => $alignments, - 'identified' => true, - 'element' => array( - 'name' => 'table', - 'handler' => 'elements', - ), - ); - - $Block['element']['text'] []= array( - 'name' => 'thead', - 'handler' => 'elements', - ); - - $Block['element']['text'] []= array( - 'name' => 'tbody', - 'handler' => 'elements', - 'text' => array(), - ); - - $Block['element']['text'][0]['text'] []= array( - 'name' => 'tr', - 'handler' => 'elements', - 'text' => $HeaderElements, - ); - - return $Block; - } - } - - protected function blockTableContinue($Line, array $Block) - { - if (isset($Block['interrupted'])) - { - return; - } - - if ($Line['text'][0] === '|' or strpos($Line['text'], '|')) - { - $Elements = array(); - - $row = $Line['text']; - - $row = trim($row); - $row = trim($row, '|'); - - preg_match_all('/(?:(\\\\[|])|[^|`]|`[^`]+`|`)+/', $row, $matches); - - foreach ($matches[0] as $index => $cell) - { - $cell = trim($cell); - - $Element = array( - 'name' => 'td', - 'handler' => 'line', - 'text' => $cell, - ); - - if (isset($Block['alignments'][$index])) - { - $Element['attributes'] = array( - 'style' => 'text-align: '.$Block['alignments'][$index].';', - ); - } - - $Elements []= $Element; - } - - $Element = array( - 'name' => 'tr', - 'handler' => 'elements', - 'text' => $Elements, - ); - - $Block['element']['text'][1]['text'] []= $Element; - - return $Block; - } - } - - # - # ~ - # - - protected function paragraph($Line) - { - $Block = array( - 'element' => array( - 'name' => 'p', - 'text' => $Line['text'], - 'handler' => 'line', - ), - ); - - return $Block; - } - - # - # Inline Elements - # - - protected $InlineTypes = array( - '"' => array('SpecialCharacter'), - '!' => array('Image'), - '&' => array('SpecialCharacter'), - '*' => array('Emphasis'), - ':' => array('Url'), - '<' => array('UrlTag', 'EmailTag', 'Markup', 'SpecialCharacter'), - '>' => array('SpecialCharacter'), - '[' => array('Link'), - '_' => array('Emphasis'), - '`' => array('Code'), - '~' => array('Strikethrough'), - '\\' => array('EscapeSequence'), - ); - - # ~ - - protected $inlineMarkerList = '!"*_&[:<>`~\\'; - - # - # ~ - # - - public function line($text) - { - $markup = ''; - - # $excerpt is based on the first occurrence of a marker - - while ($excerpt = strpbrk($text, $this->inlineMarkerList)) - { - $marker = $excerpt[0]; - - $markerPosition = strpos($text, $marker); - - $Excerpt = array('text' => $excerpt, 'context' => $text); - - foreach ($this->InlineTypes[$marker] as $inlineType) - { - $Inline = $this->{'inline'.$inlineType}($Excerpt); - - if ( ! isset($Inline)) - { - continue; - } - - # makes sure that the inline belongs to "our" marker - - if (isset($Inline['position']) and $Inline['position'] > $markerPosition) - { - continue; - } - - # sets a default inline position - - if ( ! isset($Inline['position'])) - { - $Inline['position'] = $markerPosition; - } - - # the text that comes before the inline - $unmarkedText = substr($text, 0, $Inline['position']); - - # compile the unmarked text - $markup .= $this->unmarkedText($unmarkedText); - - # compile the inline - $markup .= isset($Inline['markup']) ? $Inline['markup'] : $this->element($Inline['element']); - - # remove the examined text - $text = substr($text, $Inline['position'] + $Inline['extent']); - - continue 2; - } - - # the marker does not belong to an inline - - $unmarkedText = substr($text, 0, $markerPosition + 1); - - $markup .= $this->unmarkedText($unmarkedText); - - $text = substr($text, $markerPosition + 1); - } - - $markup .= $this->unmarkedText($text); - - return $markup; - } - - # - # ~ - # - - protected function inlineCode($Excerpt) - { - $marker = $Excerpt['text'][0]; - - if (preg_match('/^('.$marker.'+)[ ]*(.+?)[ ]*(? strlen($matches[0]), - 'element' => array( - 'name' => 'code', - 'text' => $text, - ), - ); - } - } - - protected function inlineEmailTag($Excerpt) - { - if (strpos($Excerpt['text'], '>') !== false and preg_match('/^<((mailto:)?\S+?@\S+?)>/i', $Excerpt['text'], $matches)) - { - $url = $matches[1]; - - if ( ! isset($matches[2])) - { - $url = 'mailto:' . $url; - } - - return array( - 'extent' => strlen($matches[0]), - 'element' => array( - 'name' => 'a', - 'text' => $matches[1], - 'attributes' => array( - 'href' => $url, - ), - ), - ); - } - } - - protected function inlineEmphasis($Excerpt) - { - if ( ! isset($Excerpt['text'][1])) - { - return; - } - - $marker = $Excerpt['text'][0]; - - if ($Excerpt['text'][1] === $marker and preg_match($this->StrongRegex[$marker], $Excerpt['text'], $matches)) - { - $emphasis = 'strong'; - } - elseif (preg_match($this->EmRegex[$marker], $Excerpt['text'], $matches)) - { - $emphasis = 'em'; - } - else - { - return; - } - - return array( - 'extent' => strlen($matches[0]), - 'element' => array( - 'name' => $emphasis, - 'handler' => 'line', - 'text' => $matches[1], - ), - ); - } - - protected function inlineEscapeSequence($Excerpt) - { - if (isset($Excerpt['text'][1]) and in_array($Excerpt['text'][1], $this->specialCharacters)) - { - return array( - 'markup' => $Excerpt['text'][1], - 'extent' => 2, - ); - } - } - - protected function inlineImage($Excerpt) - { - if ( ! isset($Excerpt['text'][1]) or $Excerpt['text'][1] !== '[') - { - return; - } - - $Excerpt['text']= substr($Excerpt['text'], 1); - - $Link = $this->inlineLink($Excerpt); - - if ($Link === null) - { - return; - } - - $Inline = array( - 'extent' => $Link['extent'] + 1, - 'element' => array( - 'name' => 'img', - 'attributes' => array( - 'src' => $Link['element']['attributes']['href'], - 'alt' => $Link['element']['text'], - ), - ), - ); - - $Inline['element']['attributes'] += $Link['element']['attributes']; - - unset($Inline['element']['attributes']['href']); - - return $Inline; - } - - protected function inlineLink($Excerpt) - { - $Element = array( - 'name' => 'a', - 'handler' => 'line', - 'text' => null, - 'attributes' => array( - 'href' => null, - 'title' => null, - ), - ); - - $extent = 0; - - $remainder = $Excerpt['text']; - - if (preg_match('/\[((?:[^][]|(?R))*)\]/', $remainder, $matches)) - { - $Element['text'] = $matches[1]; - - $extent += strlen($matches[0]); - - $remainder = substr($remainder, $extent); - } - else - { - return; - } - - if (preg_match('/^[(]((?:[^ ()]|[(][^ )]+[)])+)(?:[ ]+("[^"]*"|\'[^\']*\'))?[)]/', $remainder, $matches)) - { - $Element['attributes']['href'] = $matches[1]; - - if (isset($matches[2])) - { - $Element['attributes']['title'] = substr($matches[2], 1, - 1); - } - - $extent += strlen($matches[0]); - } - else - { - if (preg_match('/^\s*\[(.*?)\]/', $remainder, $matches)) - { - $definition = strlen($matches[1]) ? $matches[1] : $Element['text']; - $definition = strtolower($definition); - - $extent += strlen($matches[0]); - } - else - { - $definition = strtolower($Element['text']); - } - - if ( ! isset($this->DefinitionData['Reference'][$definition])) - { - return; - } - - $Definition = $this->DefinitionData['Reference'][$definition]; - - $Element['attributes']['href'] = $Definition['url']; - $Element['attributes']['title'] = $Definition['title']; - } - - $Element['attributes']['href'] = str_replace(array('&', '<'), array('&', '<'), $Element['attributes']['href']); - - return array( - 'extent' => $extent, - 'element' => $Element, - ); - } - - protected function inlineMarkup($Excerpt) - { - if ($this->markupEscaped or strpos($Excerpt['text'], '>') === false) - { - return; - } - - if ($Excerpt['text'][1] === '/' and preg_match('/^<\/\w*[ ]*>/s', $Excerpt['text'], $matches)) - { - return array( - 'markup' => $matches[0], - 'extent' => strlen($matches[0]), - ); - } - - if ($Excerpt['text'][1] === '!' and preg_match('/^/s', $Excerpt['text'], $matches)) - { - return array( - 'markup' => $matches[0], - 'extent' => strlen($matches[0]), - ); - } - - if ($Excerpt['text'][1] !== ' ' and preg_match('/^<\w*(?:[ ]*'.$this->regexHtmlAttribute.')*[ ]*\/?>/s', $Excerpt['text'], $matches)) - { - return array( - 'markup' => $matches[0], - 'extent' => strlen($matches[0]), - ); - } - } - - protected function inlineSpecialCharacter($Excerpt) - { - if ($Excerpt['text'][0] === '&' and ! preg_match('/^&#?\w+;/', $Excerpt['text'])) - { - return array( - 'markup' => '&', - 'extent' => 1, - ); - } - - $SpecialCharacter = array('>' => 'gt', '<' => 'lt', '"' => 'quot'); - - if (isset($SpecialCharacter[$Excerpt['text'][0]])) - { - return array( - 'markup' => '&'.$SpecialCharacter[$Excerpt['text'][0]].';', - 'extent' => 1, - ); - } - } - - protected function inlineStrikethrough($Excerpt) - { - if ( ! isset($Excerpt['text'][1])) - { - return; - } - - if ($Excerpt['text'][1] === '~' and preg_match('/^~~(?=\S)(.+?)(?<=\S)~~/', $Excerpt['text'], $matches)) - { - return array( - 'extent' => strlen($matches[0]), - 'element' => array( - 'name' => 'del', - 'text' => $matches[1], - 'handler' => 'line', - ), - ); - } - } - - protected function inlineUrl($Excerpt) - { - if ($this->urlsLinked !== true or ! isset($Excerpt['text'][2]) or $Excerpt['text'][2] !== '/') - { - return; - } - - if (preg_match('/\bhttps?:[\/]{2}[^\s<]+\b\/*/ui', $Excerpt['context'], $matches, PREG_OFFSET_CAPTURE)) - { - $Inline = array( - 'extent' => strlen($matches[0][0]), - 'position' => $matches[0][1], - 'element' => array( - 'name' => 'a', - 'text' => $matches[0][0], - 'attributes' => array( - 'href' => $matches[0][0], - ), - ), - ); - - return $Inline; - } - } - - protected function inlineUrlTag($Excerpt) - { - if (strpos($Excerpt['text'], '>') !== false and preg_match('/^<(\w+:\/{2}[^ >]+)>/i', $Excerpt['text'], $matches)) - { - $url = str_replace(array('&', '<'), array('&', '<'), $matches[1]); - - return array( - 'extent' => strlen($matches[0]), - 'element' => array( - 'name' => 'a', - 'text' => $url, - 'attributes' => array( - 'href' => $url, - ), - ), - ); - } - } - - # ~ - - protected function unmarkedText($text) - { - if ($this->breaksEnabled) - { - $text = preg_replace('/[ ]*\n/', "
\n", $text); - } - else - { - $text = preg_replace('/(?:[ ][ ]+|[ ]*\\\\)\n/', "
\n", $text); - $text = str_replace(" \n", "\n", $text); - } - - return $text; - } - - # - # Handlers - # - - protected function element(array $Element) - { - $markup = '<'.$Element['name']; - - if (isset($Element['attributes'])) - { - foreach ($Element['attributes'] as $name => $value) - { - if ($value === null) - { - continue; - } - - $markup .= ' '.$name.'="'.$value.'"'; - } - } - - if (isset($Element['text'])) - { - $markup .= '>'; - - if (isset($Element['handler'])) - { - $markup .= $this->{$Element['handler']}($Element['text']); - } - else - { - $markup .= $Element['text']; - } - - $markup .= ''; - } - else - { - $markup .= ' />'; - } - - return $markup; - } - - protected function elements(array $Elements) - { - $markup = ''; - - foreach ($Elements as $Element) - { - $markup .= "\n" . $this->element($Element); - } - - $markup .= "\n"; - - return $markup; - } - - # ~ - - protected function li($lines) - { - $markup = $this->lines($lines); - - $trimmedMarkup = trim($markup); - - if ( ! in_array('', $lines) and substr($trimmedMarkup, 0, 3) === '

') - { - $markup = $trimmedMarkup; - $markup = substr($markup, 3); - - $position = strpos($markup, "

"); - - $markup = substr_replace($markup, '', $position, 4); - } - - return $markup; - } - - # - # Deprecated Methods - # - - function parse($text) - { - $markup = $this->text($text); - - return $markup; - } - - # - # Static Methods - # - - static function instance($name = 'default') - { - if (isset(self::$instances[$name])) - { - return self::$instances[$name]; - } - - $instance = new static(); - - self::$instances[$name] = $instance; - - return $instance; - } - - private static $instances = array(); - - # - # Fields - # - - protected $DefinitionData; - - # - # Read-Only - - protected $specialCharacters = array( - '\\', '`', '*', '_', '{', '}', '[', ']', '(', ')', '>', '#', '+', '-', '.', '!', '|', - ); - - protected $StrongRegex = array( - '*' => '/^[*]{2}((?:\\\\\*|[^*]|[*][^*]*[*])+?)[*]{2}(?![*])/s', - '_' => '/^__((?:\\\\_|[^_]|_[^_]*_)+?)__(?!_)/us', - ); - - protected $EmRegex = array( - '*' => '/^[*]((?:\\\\\*|[^*]|[*][*][^*]+?[*][*])+?)[*](?![*])/s', - '_' => '/^_((?:\\\\_|[^_]|__[^_]*__)+?)_(?!_)\b/us', - ); - - protected $regexHtmlAttribute = '[a-zA-Z_:][\w:.-]*(?:\s*=\s*(?:[^"\'=<>`\s]+|"[^"]*"|\'[^\']*\'))?'; - - protected $voidElements = array( - 'area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'link', 'meta', 'param', 'source', - ); - - protected $textLevelElements = array( - 'a', 'br', 'bdo', 'abbr', 'blink', 'nextid', 'acronym', 'basefont', - 'b', 'em', 'big', 'cite', 'small', 'spacer', 'listing', - 'i', 'rp', 'del', 'code', 'strike', 'marquee', - 'q', 'rt', 'ins', 'font', 'strong', - 's', 'tt', 'sub', 'mark', - 'u', 'xm', 'sup', 'nobr', - 'var', 'ruby', - 'wbr', 'span', - 'time', - ); -} diff --git a/vendor/erusev/parsedown/README.md b/vendor/erusev/parsedown/README.md deleted file mode 100644 index 6f9f649..0000000 --- a/vendor/erusev/parsedown/README.md +++ /dev/null @@ -1,57 +0,0 @@ -## Parsedown - -[![Build Status](https://img.shields.io/travis/erusev/parsedown/master.svg?style=flat-square)](https://travis-ci.org/erusev/parsedown) - - -Better Markdown Parser in PHP - -[Demo](http://parsedown.org/demo) | -[Benchmarks](http://parsedown.org/speed) | -[Tests](http://parsedown.org/tests/) | -[Documentation](https://github.com/erusev/parsedown/wiki/) - -### Features - -* Super Fast -* [GitHub flavored](https://help.github.com/articles/github-flavored-markdown) -* Extensible -* Tested in 5.3 to 5.6 -* [Markdown Extra extension](https://github.com/erusev/parsedown-extra) - -### Installation - -Include `Parsedown.php` or install [the composer package](https://packagist.org/packages/erusev/parsedown). - -### Example - -``` php -$Parsedown = new Parsedown(); - -echo $Parsedown->text('Hello _Parsedown_!'); # prints:

Hello Parsedown!

-``` - -More examples in [the wiki](https://github.com/erusev/parsedown/wiki/) and in [this video tutorial](http://youtu.be/wYZBY8DEikI). - -### Questions - -**How does Parsedown work?** - -It tries to read Markdown like a human. First, it looks at the lines. It’s interested in how the lines start. This helps it recognise blocks. It knows, for example, that if a line start with a `-` then it perhaps belong to a list. Once it recognises the blocks, it continues to the content. As it reads, it watches out for special characters. This helps it recognise inline elements (or inlines). - -We call this approach "line based". We believe that Parsedown is the first Markdown parser to use it. Since the release of Parsedown, other developers have used the same approach to develop other Markdown parsers in PHP and in other languages. - -**Is it compliant with CommonMark?** - -It passes most of the CommonMark tests. Most of the tests that don't pass deal with cases that are quite uncommon. Still, as CommonMark matures, compliance should improve. - -**Who uses it?** - -[phpDocumentor](http://www.phpdoc.org/), [October CMS](http://octobercms.com/), [Bolt CMS](http://bolt.cm/), [Kirby CMS](http://getkirby.com/), [Grav CMS](http://getgrav.org/), [Statamic CMS](http://www.statamic.com/), [RaspberryPi.org](http://www.raspberrypi.org/) and [more](https://www.versioneye.com/php/erusev:parsedown/references). - -**How can I help?** - -Use it, star it, share it and if you feel generous, [donate](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=528P3NZQMP8N2). - ---- - -You might also like [Caret](http://caret.io) - our Markdown editor for the desktop. diff --git a/vendor/erusev/parsedown/composer.json b/vendor/erusev/parsedown/composer.json deleted file mode 100644 index 1439b82..0000000 --- a/vendor/erusev/parsedown/composer.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "erusev/parsedown", - "description": "Parser for Markdown.", - "keywords": ["markdown", "parser"], - "homepage": "http://parsedown.org", - "type": "library", - "license": "MIT", - "authors": [ - { - "name": "Emanuil Rusev", - "email": "hello@erusev.com", - "homepage": "http://erusev.com" - } - ], - "autoload": { - "psr-0": {"Parsedown": ""} - } -} \ No newline at end of file diff --git a/vendor/erusev/parsedown/phpunit.xml.dist b/vendor/erusev/parsedown/phpunit.xml.dist deleted file mode 100644 index b2d5e9d..0000000 --- a/vendor/erusev/parsedown/phpunit.xml.dist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - test/ParsedownTest.php - - - \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/CommonMarkTest.php b/vendor/erusev/parsedown/test/CommonMarkTest.php deleted file mode 100644 index 9b8d116..0000000 --- a/vendor/erusev/parsedown/test/CommonMarkTest.php +++ /dev/null @@ -1,74 +0,0 @@ -setUrlsLinked(false); - - $actualHtml = $Parsedown->text($markdown); - $actualHtml = $this->normalizeMarkup($actualHtml); - - $this->assertEquals($expectedHtml, $actualHtml); - } - - function data() - { - $spec = file_get_contents(self::SPEC_URL); - $spec = strstr($spec, '', true); - - $tests = array(); - $currentSection = ''; - - preg_replace_callback( - '/^\.\n([\s\S]*?)^\.\n([\s\S]*?)^\.$|^#{1,6} *(.*)$/m', - function($matches) use ( & $tests, & $currentSection, & $testCount) { - if (isset($matches[3]) and $matches[3]) { - $currentSection = $matches[3]; - } else { - $testCount++; - $markdown = $matches[1]; - $markdown = preg_replace('/→/', "\t", $markdown); - $expectedHtml = $matches[2]; - $expectedHtml = $this->normalizeMarkup($expectedHtml); - $tests []= array( - $currentSection, # section - $markdown, # markdown - $expectedHtml, # html - ); - } - }, - $spec - ); - - return $tests; - } - - private function normalizeMarkup($markup) - { - $markup = preg_replace("/\n+/", "\n", $markup); - $markup = preg_replace('/^\s+/m', '', $markup); - $markup = preg_replace('/^((?:<[\w]+>)+)\n/m', '$1', $markup); - $markup = preg_replace('/\n((?:<\/[\w]+>)+)$/m', '$1', $markup); - $markup = trim($markup); - - return $markup; - } -} diff --git a/vendor/erusev/parsedown/test/ParsedownTest.php b/vendor/erusev/parsedown/test/ParsedownTest.php deleted file mode 100644 index c922ab1..0000000 --- a/vendor/erusev/parsedown/test/ParsedownTest.php +++ /dev/null @@ -1,159 +0,0 @@ -dirs = $this->initDirs(); - $this->Parsedown = $this->initParsedown(); - - parent::__construct($name, $data, $dataName); - } - - private $dirs, $Parsedown; - - /** - * @return array - */ - protected function initDirs() - { - $dirs []= dirname(__FILE__).'/data/'; - - return $dirs; - } - - /** - * @return Parsedown - */ - protected function initParsedown() - { - $Parsedown = new Parsedown(); - - return $Parsedown; - } - - /** - * @dataProvider data - * @param $test - * @param $dir - */ - function test_($test, $dir) - { - $markdown = file_get_contents($dir . $test . '.md'); - - $expectedMarkup = file_get_contents($dir . $test . '.html'); - - $expectedMarkup = str_replace("\r\n", "\n", $expectedMarkup); - $expectedMarkup = str_replace("\r", "\n", $expectedMarkup); - - $actualMarkup = $this->Parsedown->text($markdown); - - $this->assertEquals($expectedMarkup, $actualMarkup); - } - - function data() - { - $data = array(); - - foreach ($this->dirs as $dir) - { - $Folder = new DirectoryIterator($dir); - - foreach ($Folder as $File) - { - /** @var $File DirectoryIterator */ - - if ( ! $File->isFile()) - { - continue; - } - - $filename = $File->getFilename(); - - $extension = pathinfo($filename, PATHINFO_EXTENSION); - - if ($extension !== 'md') - { - continue; - } - - $basename = $File->getBasename('.md'); - - if (file_exists($dir . $basename . '.html')) - { - $data []= array($basename, $dir); - } - } - } - - return $data; - } - - public function test_no_markup() - { - $markdownWithHtml = <<_content_ - -sparse: - -
-
-_content_ -
-
- -paragraph - - - -comment - - -MARKDOWN_WITH_MARKUP; - - $expectedHtml = <<<div>content</div>

-

sparse:

-

<div> -<div class="inner"> -content -</div> -</div>

-

paragraph

-

<style type="text/css"> -p { -color: red; -} -</style>

-

comment

-

<!-- html comment -->

-EXPECTED_HTML; - $parsedownWithNoMarkup = new Parsedown(); - $parsedownWithNoMarkup->setMarkupEscaped(true); - $this->assertEquals($expectedHtml, $parsedownWithNoMarkup->text($markdownWithHtml)); - } - - public function testLateStaticBinding() - { - include 'test/TestParsedown.php'; - - $parsedown = Parsedown::instance(); - $this->assertInstanceOf('Parsedown', $parsedown); - - // After instance is already called on Parsedown - // subsequent calls with the same arguments return the same instance - $sameParsedown = TestParsedown::instance(); - $this->assertInstanceOf('Parsedown', $sameParsedown); - $this->assertSame($parsedown, $sameParsedown); - - $testParsedown = TestParsedown::instance('test late static binding'); - $this->assertInstanceOf('TestParsedown', $testParsedown); - - $sameInstanceAgain = TestParsedown::instance('test late static binding'); - $this->assertSame($testParsedown, $sameInstanceAgain); - } -} diff --git a/vendor/erusev/parsedown/test/TestParsedown.php b/vendor/erusev/parsedown/test/TestParsedown.php deleted file mode 100644 index 7024dfb..0000000 --- a/vendor/erusev/parsedown/test/TestParsedown.php +++ /dev/null @@ -1,5 +0,0 @@ - - - -header 1 -header 2 - - - - -cell 1.1 -cell 1.2 - - -cell 2.1 -cell 2.2 - - - \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/aesthetic_table.md b/vendor/erusev/parsedown/test/data/aesthetic_table.md deleted file mode 100644 index 5245e6c..0000000 --- a/vendor/erusev/parsedown/test/data/aesthetic_table.md +++ /dev/null @@ -1,4 +0,0 @@ -| header 1 | header 2 | -| -------- | -------- | -| cell 1.1 | cell 1.2 | -| cell 2.1 | cell 2.2 | \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/aligned_table.html b/vendor/erusev/parsedown/test/data/aligned_table.html deleted file mode 100644 index c4acfcb..0000000 --- a/vendor/erusev/parsedown/test/data/aligned_table.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - -
header 1header 2header 2
cell 1.1cell 1.2cell 1.3
cell 2.1cell 2.2cell 2.3
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/aligned_table.md b/vendor/erusev/parsedown/test/data/aligned_table.md deleted file mode 100644 index 69a45f9..0000000 --- a/vendor/erusev/parsedown/test/data/aligned_table.md +++ /dev/null @@ -1,4 +0,0 @@ -| header 1 | header 2 | header 2 | -| :------- | :------: | -------: | -| cell 1.1 | cell 1.2 | cell 1.3 | -| cell 2.1 | cell 2.2 | cell 2.3 | \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/atx_heading.html b/vendor/erusev/parsedown/test/data/atx_heading.html deleted file mode 100644 index 751f873..0000000 --- a/vendor/erusev/parsedown/test/data/atx_heading.html +++ /dev/null @@ -1,9 +0,0 @@ -

h1

-

h2

-

h3

-

h4

-
h5
-
h6
-

####### not a heading

-

closed h1

-

#

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/atx_heading.md b/vendor/erusev/parsedown/test/data/atx_heading.md deleted file mode 100644 index ad97b44..0000000 --- a/vendor/erusev/parsedown/test/data/atx_heading.md +++ /dev/null @@ -1,17 +0,0 @@ -# h1 - -## h2 - -### h3 - -#### h4 - -##### h5 - -###### h6 - -####### not a heading - -# closed h1 # - -# \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/automatic_link.html b/vendor/erusev/parsedown/test/data/automatic_link.html deleted file mode 100644 index 50a94ba..0000000 --- a/vendor/erusev/parsedown/test/data/automatic_link.html +++ /dev/null @@ -1 +0,0 @@ -

http://example.com

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/automatic_link.md b/vendor/erusev/parsedown/test/data/automatic_link.md deleted file mode 100644 index 08d3bf4..0000000 --- a/vendor/erusev/parsedown/test/data/automatic_link.md +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/block-level_html.html b/vendor/erusev/parsedown/test/data/block-level_html.html deleted file mode 100644 index 6443a4a..0000000 --- a/vendor/erusev/parsedown/test/data/block-level_html.html +++ /dev/null @@ -1,12 +0,0 @@ -
_content_
-

paragraph

-
-
- _content_ -
-
- -
- home
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/block-level_html.md b/vendor/erusev/parsedown/test/data/block-level_html.md deleted file mode 100644 index 17cbc22..0000000 --- a/vendor/erusev/parsedown/test/data/block-level_html.md +++ /dev/null @@ -1,16 +0,0 @@ -
_content_
- -paragraph - -
-
- _content_ -
-
- - - -
- home
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/code_block.html b/vendor/erusev/parsedown/test/data/code_block.html deleted file mode 100644 index 889b02d..0000000 --- a/vendor/erusev/parsedown/test/data/code_block.html +++ /dev/null @@ -1,8 +0,0 @@ -
<?php
-
-$message = 'Hello World!';
-echo $message;
-
-
> not a quote
-- not a list item
-[not a reference]: http://foo.com
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/code_block.md b/vendor/erusev/parsedown/test/data/code_block.md deleted file mode 100644 index 2cfc953..0000000 --- a/vendor/erusev/parsedown/test/data/code_block.md +++ /dev/null @@ -1,10 +0,0 @@ - not a quote - - not a list item - [not a reference]: http://foo.com \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/code_span.html b/vendor/erusev/parsedown/test/data/code_span.html deleted file mode 100644 index 5c4c231..0000000 --- a/vendor/erusev/parsedown/test/data/code_span.html +++ /dev/null @@ -1,6 +0,0 @@ -

a code span

-

this is also a codespan trailing text

-

and look at this one!

-

single backtick in a code span: `

-

backtick-delimited string in a code span: `foo`

-

sth `` sth

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/code_span.md b/vendor/erusev/parsedown/test/data/code_span.md deleted file mode 100644 index c2f1a74..0000000 --- a/vendor/erusev/parsedown/test/data/code_span.md +++ /dev/null @@ -1,11 +0,0 @@ -a `code span` - -`this is also a codespan` trailing text - -`and look at this one!` - -single backtick in a code span: `` ` `` - -backtick-delimited string in a code span: `` `foo` `` - -`sth `` sth` \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/compound_blockquote.html b/vendor/erusev/parsedown/test/data/compound_blockquote.html deleted file mode 100644 index 37afb57..0000000 --- a/vendor/erusev/parsedown/test/data/compound_blockquote.html +++ /dev/null @@ -1,9 +0,0 @@ -
-

header

-

paragraph

-
    -
  • li
  • -
-
-

paragraph

-
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/compound_blockquote.md b/vendor/erusev/parsedown/test/data/compound_blockquote.md deleted file mode 100644 index 80c4aed..0000000 --- a/vendor/erusev/parsedown/test/data/compound_blockquote.md +++ /dev/null @@ -1,10 +0,0 @@ -> header -> ------ -> -> paragraph -> -> - li -> -> --- -> -> paragraph \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/compound_emphasis.html b/vendor/erusev/parsedown/test/data/compound_emphasis.html deleted file mode 100644 index 178dd54..0000000 --- a/vendor/erusev/parsedown/test/data/compound_emphasis.html +++ /dev/null @@ -1,2 +0,0 @@ -

code code

-

codecodecode

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/compound_emphasis.md b/vendor/erusev/parsedown/test/data/compound_emphasis.md deleted file mode 100644 index 6fe07f2..0000000 --- a/vendor/erusev/parsedown/test/data/compound_emphasis.md +++ /dev/null @@ -1,4 +0,0 @@ -_`code`_ __`code`__ - -*`code`**`code`**`code`* - diff --git a/vendor/erusev/parsedown/test/data/compound_list.html b/vendor/erusev/parsedown/test/data/compound_list.html deleted file mode 100644 index f5593c1..0000000 --- a/vendor/erusev/parsedown/test/data/compound_list.html +++ /dev/null @@ -1,12 +0,0 @@ -
    -
  • -

    paragraph

    -

    paragraph

    -
  • -
  • -

    paragraph

    -
    -

    quote

    -
    -
  • -
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/compound_list.md b/vendor/erusev/parsedown/test/data/compound_list.md deleted file mode 100644 index ed7f0c6..0000000 --- a/vendor/erusev/parsedown/test/data/compound_list.md +++ /dev/null @@ -1,7 +0,0 @@ -- paragraph - - paragraph - -- paragraph - - > quote \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/deeply_nested_list.html b/vendor/erusev/parsedown/test/data/deeply_nested_list.html deleted file mode 100644 index d2c7e5a..0000000 --- a/vendor/erusev/parsedown/test/data/deeply_nested_list.html +++ /dev/null @@ -1,12 +0,0 @@ -
    -
  • li -
      -
    • li -
        -
      • li
      • -
      • li
      • -
    • -
    • li
    • -
  • -
  • li
  • -
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/deeply_nested_list.md b/vendor/erusev/parsedown/test/data/deeply_nested_list.md deleted file mode 100644 index 76b7552..0000000 --- a/vendor/erusev/parsedown/test/data/deeply_nested_list.md +++ /dev/null @@ -1,6 +0,0 @@ -- li - - li - - li - - li - - li -- li \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/em_strong.html b/vendor/erusev/parsedown/test/data/em_strong.html deleted file mode 100644 index 323d60a..0000000 --- a/vendor/erusev/parsedown/test/data/em_strong.html +++ /dev/null @@ -1,8 +0,0 @@ -

em strong

-

em strong strong

-

strong em strong

-

strong em strong strong

-

em strong

-

em strong strong

-

strong em strong

-

strong em strong strong

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/em_strong.md b/vendor/erusev/parsedown/test/data/em_strong.md deleted file mode 100644 index 9abeb3f..0000000 --- a/vendor/erusev/parsedown/test/data/em_strong.md +++ /dev/null @@ -1,15 +0,0 @@ -___em strong___ - -___em strong_ strong__ - -__strong _em strong___ - -__strong _em strong_ strong__ - -***em strong*** - -***em strong* strong** - -**strong *em strong*** - -**strong *em strong* strong** \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/email.html b/vendor/erusev/parsedown/test/data/email.html deleted file mode 100644 index c40759c..0000000 --- a/vendor/erusev/parsedown/test/data/email.html +++ /dev/null @@ -1 +0,0 @@ -

my email is me@example.com

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/email.md b/vendor/erusev/parsedown/test/data/email.md deleted file mode 100644 index 26b7b6c..0000000 --- a/vendor/erusev/parsedown/test/data/email.md +++ /dev/null @@ -1 +0,0 @@ -my email is \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/emphasis.html b/vendor/erusev/parsedown/test/data/emphasis.html deleted file mode 100644 index 60ff4bd..0000000 --- a/vendor/erusev/parsedown/test/data/emphasis.html +++ /dev/null @@ -1,8 +0,0 @@ -

underscore, asterisk, one two, three four, a, b

-

strong and em and strong and em

-

line -line -line

-

this_is_not_an_emphasis

-

an empty emphasis __ ** is not an emphasis

-

*mixed *double and single asterisk** spans

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/emphasis.md b/vendor/erusev/parsedown/test/data/emphasis.md deleted file mode 100644 index 85b9d22..0000000 --- a/vendor/erusev/parsedown/test/data/emphasis.md +++ /dev/null @@ -1,13 +0,0 @@ -_underscore_, *asterisk*, _one two_, *three four*, _a_, *b* - -**strong** and *em* and **strong** and *em* - -_line -line -line_ - -this_is_not_an_emphasis - -an empty emphasis __ ** is not an emphasis - -*mixed **double and* single asterisk** spans \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/escaping.html b/vendor/erusev/parsedown/test/data/escaping.html deleted file mode 100644 index ab1c41f..0000000 --- a/vendor/erusev/parsedown/test/data/escaping.html +++ /dev/null @@ -1,6 +0,0 @@ -

escaped *emphasis*.

-

escaped \*emphasis\* in a code span

-
escaped \*emphasis\* in a code block
-

\ ` * _ { } [ ] ( ) > # + - . !

-

one_two one_two

-

one*two one*two

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/escaping.md b/vendor/erusev/parsedown/test/data/escaping.md deleted file mode 100644 index 9f174e9..0000000 --- a/vendor/erusev/parsedown/test/data/escaping.md +++ /dev/null @@ -1,11 +0,0 @@ -escaped \*emphasis\*. - -`escaped \*emphasis\* in a code span` - - escaped \*emphasis\* in a code block - -\\ \` \* \_ \{ \} \[ \] \( \) \> \# \+ \- \. \! - -_one\_two_ __one\_two__ - -*one\*two* **one\*two** \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/fenced_code_block.html b/vendor/erusev/parsedown/test/data/fenced_code_block.html deleted file mode 100644 index 8bdabba..0000000 --- a/vendor/erusev/parsedown/test/data/fenced_code_block.html +++ /dev/null @@ -1,6 +0,0 @@ -
<?php
-
-$message = 'fenced code block';
-echo $message;
-
tilde
-
echo 'language identifier';
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/fenced_code_block.md b/vendor/erusev/parsedown/test/data/fenced_code_block.md deleted file mode 100644 index cbed8eb..0000000 --- a/vendor/erusev/parsedown/test/data/fenced_code_block.md +++ /dev/null @@ -1,14 +0,0 @@ -``` - -
-
-
-
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/horizontal_rule.md b/vendor/erusev/parsedown/test/data/horizontal_rule.md deleted file mode 100644 index bf461a9..0000000 --- a/vendor/erusev/parsedown/test/data/horizontal_rule.md +++ /dev/null @@ -1,9 +0,0 @@ ---- - -- - - - - - - - - -*** - -___ \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/html_comment.html b/vendor/erusev/parsedown/test/data/html_comment.html deleted file mode 100644 index 566dc3a..0000000 --- a/vendor/erusev/parsedown/test/data/html_comment.html +++ /dev/null @@ -1,5 +0,0 @@ - -

paragraph

- -

paragraph

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/html_comment.md b/vendor/erusev/parsedown/test/data/html_comment.md deleted file mode 100644 index 6ddfdb4..0000000 --- a/vendor/erusev/parsedown/test/data/html_comment.md +++ /dev/null @@ -1,8 +0,0 @@ - - -paragraph - - - -paragraph \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/html_entity.html b/vendor/erusev/parsedown/test/data/html_entity.html deleted file mode 100644 index 4d23e3c..0000000 --- a/vendor/erusev/parsedown/test/data/html_entity.html +++ /dev/null @@ -1 +0,0 @@ -

& © {

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/html_entity.md b/vendor/erusev/parsedown/test/data/html_entity.md deleted file mode 100644 index ff545ea..0000000 --- a/vendor/erusev/parsedown/test/data/html_entity.md +++ /dev/null @@ -1 +0,0 @@ -& © { \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/image_reference.html b/vendor/erusev/parsedown/test/data/image_reference.html deleted file mode 100644 index 67fbd2c..0000000 --- a/vendor/erusev/parsedown/test/data/image_reference.html +++ /dev/null @@ -1,2 +0,0 @@ -

Markdown Logo

-

![missing reference]

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/image_reference.md b/vendor/erusev/parsedown/test/data/image_reference.md deleted file mode 100644 index 1e11d94..0000000 --- a/vendor/erusev/parsedown/test/data/image_reference.md +++ /dev/null @@ -1,5 +0,0 @@ -![Markdown Logo][image] - -[image]: /md.png - -![missing reference] \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/image_title.html b/vendor/erusev/parsedown/test/data/image_title.html deleted file mode 100644 index 957c950..0000000 --- a/vendor/erusev/parsedown/test/data/image_title.html +++ /dev/null @@ -1,2 +0,0 @@ -

alt

-

blank title

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/image_title.md b/vendor/erusev/parsedown/test/data/image_title.md deleted file mode 100644 index 7ce2849..0000000 --- a/vendor/erusev/parsedown/test/data/image_title.md +++ /dev/null @@ -1,3 +0,0 @@ -![alt](/md.png "title") - -![blank title](/md.png "") \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/implicit_reference.html b/vendor/erusev/parsedown/test/data/implicit_reference.html deleted file mode 100644 index 24b51c1..0000000 --- a/vendor/erusev/parsedown/test/data/implicit_reference.html +++ /dev/null @@ -1,4 +0,0 @@ -

an implicit reference link

-

an implicit reference link with an empty link definition

-

an implicit reference link followed by another

-

an explicit reference link with a title

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/implicit_reference.md b/vendor/erusev/parsedown/test/data/implicit_reference.md deleted file mode 100644 index f850df9..0000000 --- a/vendor/erusev/parsedown/test/data/implicit_reference.md +++ /dev/null @@ -1,13 +0,0 @@ -an [implicit] reference link - -[implicit]: http://example.com - -an [implicit][] reference link with an empty link definition - -an [implicit][] reference link followed by [another][] - -[another]: http://cnn.com - -an [explicit][example] reference link with a title - -[example]: http://example.com "Example" \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/inline_link.html b/vendor/erusev/parsedown/test/data/inline_link.html deleted file mode 100644 index 5ad564a..0000000 --- a/vendor/erusev/parsedown/test/data/inline_link.html +++ /dev/null @@ -1,6 +0,0 @@ -

link

-

link with parentheses in URL

-

(link) in parentheses

-

link

-

MD Logo

-

MD Logo and text

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/inline_link.md b/vendor/erusev/parsedown/test/data/inline_link.md deleted file mode 100644 index 6bac0b3..0000000 --- a/vendor/erusev/parsedown/test/data/inline_link.md +++ /dev/null @@ -1,11 +0,0 @@ -[link](http://example.com) - -[link](/url-(parentheses)) with parentheses in URL - -([link](/index.php)) in parentheses - -[`link`](http://example.com) - -[![MD Logo](http://parsedown.org/md.png)](http://example.com) - -[![MD Logo](http://parsedown.org/md.png) and text](http://example.com) \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/inline_link_title.html b/vendor/erusev/parsedown/test/data/inline_link_title.html deleted file mode 100644 index ecdfd03..0000000 --- a/vendor/erusev/parsedown/test/data/inline_link_title.html +++ /dev/null @@ -1,6 +0,0 @@ -

single quotes

-

double quotes

-

single quotes blank

-

double quotes blank

-

space

-

parentheses

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/inline_link_title.md b/vendor/erusev/parsedown/test/data/inline_link_title.md deleted file mode 100644 index 6e1c5af..0000000 --- a/vendor/erusev/parsedown/test/data/inline_link_title.md +++ /dev/null @@ -1,11 +0,0 @@ -[single quotes](http://example.com 'Title') - -[double quotes](http://example.com "Title") - -[single quotes blank](http://example.com '') - -[double quotes blank](http://example.com "") - -[space](http://example.com "2 Words") - -[parentheses](http://example.com/url-(parentheses) "Title") \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/inline_title.html b/vendor/erusev/parsedown/test/data/inline_title.html deleted file mode 100644 index bbab93b..0000000 --- a/vendor/erusev/parsedown/test/data/inline_title.html +++ /dev/null @@ -1 +0,0 @@ -

single quotes and double quotes

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/inline_title.md b/vendor/erusev/parsedown/test/data/inline_title.md deleted file mode 100644 index cb09344..0000000 --- a/vendor/erusev/parsedown/test/data/inline_title.md +++ /dev/null @@ -1 +0,0 @@ -[single quotes](http://example.com 'Example') and [double quotes](http://example.com "Example") \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/lazy_blockquote.html b/vendor/erusev/parsedown/test/data/lazy_blockquote.html deleted file mode 100644 index 0a2a2aa..0000000 --- a/vendor/erusev/parsedown/test/data/lazy_blockquote.html +++ /dev/null @@ -1,6 +0,0 @@ -
-

quote -the rest of it

-

another paragraph -the rest of it

-
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/lazy_blockquote.md b/vendor/erusev/parsedown/test/data/lazy_blockquote.md deleted file mode 100644 index 48f645f..0000000 --- a/vendor/erusev/parsedown/test/data/lazy_blockquote.md +++ /dev/null @@ -1,5 +0,0 @@ -> quote -the rest of it - -> another paragraph -the rest of it \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/lazy_list.html b/vendor/erusev/parsedown/test/data/lazy_list.html deleted file mode 100644 index 1a51992..0000000 --- a/vendor/erusev/parsedown/test/data/lazy_list.html +++ /dev/null @@ -1,4 +0,0 @@ -
    -
  • li -the rest of it
  • -
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/lazy_list.md b/vendor/erusev/parsedown/test/data/lazy_list.md deleted file mode 100644 index 62ad9d7..0000000 --- a/vendor/erusev/parsedown/test/data/lazy_list.md +++ /dev/null @@ -1,2 +0,0 @@ -- li -the rest of it \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/line_break.html b/vendor/erusev/parsedown/test/data/line_break.html deleted file mode 100644 index 5f37d85..0000000 --- a/vendor/erusev/parsedown/test/data/line_break.html +++ /dev/null @@ -1,2 +0,0 @@ -

line
-line

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/line_break.md b/vendor/erusev/parsedown/test/data/line_break.md deleted file mode 100644 index 04dff43..0000000 --- a/vendor/erusev/parsedown/test/data/line_break.md +++ /dev/null @@ -1,2 +0,0 @@ -line -line \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/multiline_list_paragraph.html b/vendor/erusev/parsedown/test/data/multiline_list_paragraph.html deleted file mode 100644 index 3247bd2..0000000 --- a/vendor/erusev/parsedown/test/data/multiline_list_paragraph.html +++ /dev/null @@ -1,7 +0,0 @@ -
    -
  • -

    li

    -

    line -line

    -
  • -
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/multiline_list_paragraph.md b/vendor/erusev/parsedown/test/data/multiline_list_paragraph.md deleted file mode 100644 index f5b4272..0000000 --- a/vendor/erusev/parsedown/test/data/multiline_list_paragraph.md +++ /dev/null @@ -1,4 +0,0 @@ -- li - - line - line \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/nested_block-level_html.html b/vendor/erusev/parsedown/test/data/nested_block-level_html.html deleted file mode 100644 index bfbef54..0000000 --- a/vendor/erusev/parsedown/test/data/nested_block-level_html.html +++ /dev/null @@ -1,10 +0,0 @@ -
-_parent_ -
-_child_ -
-
-_adopted child_
-
-
-

outside

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/nested_block-level_html.md b/vendor/erusev/parsedown/test/data/nested_block-level_html.md deleted file mode 100644 index 5e01e10..0000000 --- a/vendor/erusev/parsedown/test/data/nested_block-level_html.md +++ /dev/null @@ -1,11 +0,0 @@ -
-_parent_ -
-_child_ -
-
-_adopted child_
-
-
- -_outside_ \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/ordered_list.html b/vendor/erusev/parsedown/test/data/ordered_list.html deleted file mode 100644 index b6c5216..0000000 --- a/vendor/erusev/parsedown/test/data/ordered_list.html +++ /dev/null @@ -1,13 +0,0 @@ -
    -
  1. one
  2. -
  3. two
  4. -
-

repeating numbers:

-
    -
  1. one
  2. -
  3. two
  4. -
-

large numbers:

-
    -
  1. one
  2. -
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/ordered_list.md b/vendor/erusev/parsedown/test/data/ordered_list.md deleted file mode 100644 index b307032..0000000 --- a/vendor/erusev/parsedown/test/data/ordered_list.md +++ /dev/null @@ -1,11 +0,0 @@ -1. one -2. two - -repeating numbers: - -1. one -1. two - -large numbers: - -123. one \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/paragraph_list.html b/vendor/erusev/parsedown/test/data/paragraph_list.html deleted file mode 100644 index ced1c43..0000000 --- a/vendor/erusev/parsedown/test/data/paragraph_list.html +++ /dev/null @@ -1,12 +0,0 @@ -

paragraph

-
    -
  • li
  • -
  • li
  • -
-

paragraph

-
    -
  • -

    li

    -
  • -
  • li
  • -
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/paragraph_list.md b/vendor/erusev/parsedown/test/data/paragraph_list.md deleted file mode 100644 index b973908..0000000 --- a/vendor/erusev/parsedown/test/data/paragraph_list.md +++ /dev/null @@ -1,9 +0,0 @@ -paragraph -- li -- li - -paragraph - - * li - - * li \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/reference_title.html b/vendor/erusev/parsedown/test/data/reference_title.html deleted file mode 100644 index 8f2be94..0000000 --- a/vendor/erusev/parsedown/test/data/reference_title.html +++ /dev/null @@ -1,2 +0,0 @@ -

double quotes and single quotes and parentheses

-

[invalid title]: http://example.com example title

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/reference_title.md b/vendor/erusev/parsedown/test/data/reference_title.md deleted file mode 100644 index 43cb217..0000000 --- a/vendor/erusev/parsedown/test/data/reference_title.md +++ /dev/null @@ -1,6 +0,0 @@ -[double quotes] and [single quotes] and [parentheses] - -[double quotes]: http://example.com "example title" -[single quotes]: http://example.com 'example title' -[parentheses]: http://example.com (example title) -[invalid title]: http://example.com example title \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/self-closing_html.html b/vendor/erusev/parsedown/test/data/self-closing_html.html deleted file mode 100644 index 4d072b4..0000000 --- a/vendor/erusev/parsedown/test/data/self-closing_html.html +++ /dev/null @@ -1,12 +0,0 @@ -
-

paragraph

-
-

paragraph

-
-

paragraph

-
-

paragraph

-
-

paragraph

-
-

paragraph

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/self-closing_html.md b/vendor/erusev/parsedown/test/data/self-closing_html.md deleted file mode 100644 index acb2032..0000000 --- a/vendor/erusev/parsedown/test/data/self-closing_html.md +++ /dev/null @@ -1,12 +0,0 @@ -
-paragraph -
-paragraph -
-paragraph -
-paragraph -
-paragraph -
-paragraph \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/separated_nested_list.html b/vendor/erusev/parsedown/test/data/separated_nested_list.html deleted file mode 100644 index 80a5cae..0000000 --- a/vendor/erusev/parsedown/test/data/separated_nested_list.html +++ /dev/null @@ -1,9 +0,0 @@ -
    -
  • -

    li

    -
      -
    • li
    • -
    • li
    • -
    -
  • -
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/separated_nested_list.md b/vendor/erusev/parsedown/test/data/separated_nested_list.md deleted file mode 100644 index d7cd1af..0000000 --- a/vendor/erusev/parsedown/test/data/separated_nested_list.md +++ /dev/null @@ -1,4 +0,0 @@ -- li - - - li - - li \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/setext_header.html b/vendor/erusev/parsedown/test/data/setext_header.html deleted file mode 100644 index 60aac08..0000000 --- a/vendor/erusev/parsedown/test/data/setext_header.html +++ /dev/null @@ -1,5 +0,0 @@ -

h1

-

h2

-

single character

-

not a header

-
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/setext_header.md b/vendor/erusev/parsedown/test/data/setext_header.md deleted file mode 100644 index c43b52c..0000000 --- a/vendor/erusev/parsedown/test/data/setext_header.md +++ /dev/null @@ -1,12 +0,0 @@ -h1 -== - -h2 --- - -single character -- - -not a header - ------------- \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/simple_blockquote.html b/vendor/erusev/parsedown/test/data/simple_blockquote.html deleted file mode 100644 index 8225d57..0000000 --- a/vendor/erusev/parsedown/test/data/simple_blockquote.html +++ /dev/null @@ -1,11 +0,0 @@ -
-

quote

-
-

indented:

-
-

quote

-
-

no space after >:

-
-

quote

-
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/simple_blockquote.md b/vendor/erusev/parsedown/test/data/simple_blockquote.md deleted file mode 100644 index 22b6b11..0000000 --- a/vendor/erusev/parsedown/test/data/simple_blockquote.md +++ /dev/null @@ -1,7 +0,0 @@ -> quote - -indented: - > quote - -no space after `>`: ->quote \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/simple_table.html b/vendor/erusev/parsedown/test/data/simple_table.html deleted file mode 100644 index 237d7ef..0000000 --- a/vendor/erusev/parsedown/test/data/simple_table.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - -
header 1header 2
cell 1.1cell 1.2
cell 2.1cell 2.2
-
- - - - - - - - - - - - - - - - - -
header 1header 2
cell 1.1cell 1.2
cell 2.1cell 2.2
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/simple_table.md b/vendor/erusev/parsedown/test/data/simple_table.md deleted file mode 100644 index 466d140..0000000 --- a/vendor/erusev/parsedown/test/data/simple_table.md +++ /dev/null @@ -1,11 +0,0 @@ -header 1 | header 2 --------- | -------- -cell 1.1 | cell 1.2 -cell 2.1 | cell 2.2 - ---- - -header 1 | header 2 -:------- | -------- -cell 1.1 | cell 1.2 -cell 2.1 | cell 2.2 \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/span-level_html.html b/vendor/erusev/parsedown/test/data/span-level_html.html deleted file mode 100644 index f852a25..0000000 --- a/vendor/erusev/parsedown/test/data/span-level_html.html +++ /dev/null @@ -1,5 +0,0 @@ -

an important link

-

broken
-line

-

inline tag at the beginning

-

http://example.com

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/span-level_html.md b/vendor/erusev/parsedown/test/data/span-level_html.md deleted file mode 100644 index f221965..0000000 --- a/vendor/erusev/parsedown/test/data/span-level_html.md +++ /dev/null @@ -1,8 +0,0 @@ -an important link - -broken
-line - -inline tag at the beginning - -http://example.com \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/sparse_dense_list.html b/vendor/erusev/parsedown/test/data/sparse_dense_list.html deleted file mode 100644 index 095bc73..0000000 --- a/vendor/erusev/parsedown/test/data/sparse_dense_list.html +++ /dev/null @@ -1,7 +0,0 @@ -
    -
  • -

    li

    -
  • -
  • li
  • -
  • li
  • -
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/sparse_dense_list.md b/vendor/erusev/parsedown/test/data/sparse_dense_list.md deleted file mode 100644 index 5768422..0000000 --- a/vendor/erusev/parsedown/test/data/sparse_dense_list.md +++ /dev/null @@ -1,4 +0,0 @@ -- li - -- li -- li \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/sparse_html.html b/vendor/erusev/parsedown/test/data/sparse_html.html deleted file mode 100644 index 9e89627..0000000 --- a/vendor/erusev/parsedown/test/data/sparse_html.html +++ /dev/null @@ -1,8 +0,0 @@ -
-line 1 - -line 2 -line 3 - -line 4 -
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/sparse_html.md b/vendor/erusev/parsedown/test/data/sparse_html.md deleted file mode 100644 index 9e89627..0000000 --- a/vendor/erusev/parsedown/test/data/sparse_html.md +++ /dev/null @@ -1,8 +0,0 @@ -
-line 1 - -line 2 -line 3 - -line 4 -
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/sparse_list.html b/vendor/erusev/parsedown/test/data/sparse_list.html deleted file mode 100644 index 452b2b8..0000000 --- a/vendor/erusev/parsedown/test/data/sparse_list.html +++ /dev/null @@ -1,15 +0,0 @@ -
    -
  • -

    li

    -
  • -
  • li
  • -
-
-
    -
  • -

    li

    -
      -
    • indented li
    • -
    -
  • -
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/sparse_list.md b/vendor/erusev/parsedown/test/data/sparse_list.md deleted file mode 100644 index 362a35f..0000000 --- a/vendor/erusev/parsedown/test/data/sparse_list.md +++ /dev/null @@ -1,9 +0,0 @@ -- li - -- li - ---- - -- li - - - indented li \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/special_characters.html b/vendor/erusev/parsedown/test/data/special_characters.html deleted file mode 100644 index 3b652c3..0000000 --- a/vendor/erusev/parsedown/test/data/special_characters.html +++ /dev/null @@ -1,6 +0,0 @@ -

AT&T has an ampersand in their name

-

this & that

-

4 < 5 and 6 > 5

-

http://example.com/autolink?a=1&b=2

-

inline link

-

reference link

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/special_characters.md b/vendor/erusev/parsedown/test/data/special_characters.md deleted file mode 100644 index 111b03b..0000000 --- a/vendor/erusev/parsedown/test/data/special_characters.md +++ /dev/null @@ -1,13 +0,0 @@ -AT&T has an ampersand in their name - -this & that - -4 < 5 and 6 > 5 - - - -[inline link](/script?a=1&b=2) - -[reference link][1] - -[1]: http://example.com/?a=1&b=2 \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/strikethrough.html b/vendor/erusev/parsedown/test/data/strikethrough.html deleted file mode 100644 index 2a9da98..0000000 --- a/vendor/erusev/parsedown/test/data/strikethrough.html +++ /dev/null @@ -1,3 +0,0 @@ -

strikethrough

-

here's one followed by another one

-

~~ this ~~ is not one neither is ~this~

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/strikethrough.md b/vendor/erusev/parsedown/test/data/strikethrough.md deleted file mode 100644 index d169144..0000000 --- a/vendor/erusev/parsedown/test/data/strikethrough.md +++ /dev/null @@ -1,5 +0,0 @@ -~~strikethrough~~ - -here's ~~one~~ followed by ~~another one~~ - -~~ this ~~ is not one neither is ~this~ \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/strong_em.html b/vendor/erusev/parsedown/test/data/strong_em.html deleted file mode 100644 index b709c99..0000000 --- a/vendor/erusev/parsedown/test/data/strong_em.html +++ /dev/null @@ -1,6 +0,0 @@ -

em strong em

-

strong em em

-

em strong em em

-

em strong em

-

strong em em

-

em strong em em

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/strong_em.md b/vendor/erusev/parsedown/test/data/strong_em.md deleted file mode 100644 index f2aa3c7..0000000 --- a/vendor/erusev/parsedown/test/data/strong_em.md +++ /dev/null @@ -1,11 +0,0 @@ -*em **strong em*** - -***strong em** em* - -*em **strong em** em* - -_em __strong em___ - -___strong em__ em_ - -_em __strong em__ em_ \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/tab-indented_code_block.html b/vendor/erusev/parsedown/test/data/tab-indented_code_block.html deleted file mode 100644 index 7c140de..0000000 --- a/vendor/erusev/parsedown/test/data/tab-indented_code_block.html +++ /dev/null @@ -1,6 +0,0 @@ -
<?php
-
-$message = 'Hello World!';
-echo $message;
-
-echo "following a blank line";
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/tab-indented_code_block.md b/vendor/erusev/parsedown/test/data/tab-indented_code_block.md deleted file mode 100644 index a405a16..0000000 --- a/vendor/erusev/parsedown/test/data/tab-indented_code_block.md +++ /dev/null @@ -1,6 +0,0 @@ - - - -header 1 -header 2 - - - - -cell 1.1 -cell 1.2 - - -| 2.1 -| 2.2 - - -\| 2.1 -link - - - \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/table_inline_markdown.md b/vendor/erusev/parsedown/test/data/table_inline_markdown.md deleted file mode 100644 index 2f3c620..0000000 --- a/vendor/erusev/parsedown/test/data/table_inline_markdown.md +++ /dev/null @@ -1,5 +0,0 @@ -| _header_ 1 | header 2 | -| ------------ | ------------ | -| _cell_ 1.1 | ~~cell~~ 1.2 | -| `|` 2.1 | \| 2.2 | -| `\|` 2.1 | [link](/) | \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/text_reference.html b/vendor/erusev/parsedown/test/data/text_reference.html deleted file mode 100644 index 11e4d37..0000000 --- a/vendor/erusev/parsedown/test/data/text_reference.html +++ /dev/null @@ -1,8 +0,0 @@ -

reference link

-

one with a semantic name

-

[one][404] with no definition

-

multiline -one defined on 2 lines

-

one with a mixed case label and an upper case definition

-

one with the a label on the next line

-

link

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/text_reference.md b/vendor/erusev/parsedown/test/data/text_reference.md deleted file mode 100644 index 1a66a5c..0000000 --- a/vendor/erusev/parsedown/test/data/text_reference.md +++ /dev/null @@ -1,21 +0,0 @@ -[reference link][1] - -[1]: http://example.com - -[one][website] with a semantic name - -[website]: http://example.com - -[one][404] with no definition - -[multiline -one][website] defined on 2 lines - -[one][Label] with a mixed case label and an upper case definition - -[LABEL]: http://example.com - -[one] -[1] with the a label on the next line - -[`link`][website] \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/unordered_list.html b/vendor/erusev/parsedown/test/data/unordered_list.html deleted file mode 100644 index cd95567..0000000 --- a/vendor/erusev/parsedown/test/data/unordered_list.html +++ /dev/null @@ -1,10 +0,0 @@ -
    -
  • li
  • -
  • li
  • -
-

mixed markers:

-
    -
  • li
  • -
  • li
  • -
  • li
  • -
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/unordered_list.md b/vendor/erusev/parsedown/test/data/unordered_list.md deleted file mode 100644 index cf62c99..0000000 --- a/vendor/erusev/parsedown/test/data/unordered_list.md +++ /dev/null @@ -1,8 +0,0 @@ -- li -- li - -mixed markers: - -* li -+ li -- li \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/untidy_table.html b/vendor/erusev/parsedown/test/data/untidy_table.html deleted file mode 100644 index 88e1c2b..0000000 --- a/vendor/erusev/parsedown/test/data/untidy_table.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - -
header 1header 2
cell 1.1cell 1.2
cell 2.1cell 2.2
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/untidy_table.md b/vendor/erusev/parsedown/test/data/untidy_table.md deleted file mode 100644 index 8524eb1..0000000 --- a/vendor/erusev/parsedown/test/data/untidy_table.md +++ /dev/null @@ -1,4 +0,0 @@ -| header 1 | header 2 | -| ------------- | ----------- | -| cell 1.1 | cell 1.2 | -| cell 2.1 | cell 2.2 | \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/url_autolinking.html b/vendor/erusev/parsedown/test/data/url_autolinking.html deleted file mode 100644 index 58ca94c..0000000 --- a/vendor/erusev/parsedown/test/data/url_autolinking.html +++ /dev/null @@ -1,3 +0,0 @@ -

an autolink http://example.com

-

inside of brackets [http://example.com], inside of braces {http://example.com}, inside of parentheses (http://example.com)

-

trailing slash http://example.com/ and http://example.com/path/

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/url_autolinking.md b/vendor/erusev/parsedown/test/data/url_autolinking.md deleted file mode 100644 index 840f354..0000000 --- a/vendor/erusev/parsedown/test/data/url_autolinking.md +++ /dev/null @@ -1,5 +0,0 @@ -an autolink http://example.com - -inside of brackets [http://example.com], inside of braces {http://example.com}, inside of parentheses (http://example.com) - -trailing slash http://example.com/ and http://example.com/path/ \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/whitespace.html b/vendor/erusev/parsedown/test/data/whitespace.html deleted file mode 100644 index f2dd7a0..0000000 --- a/vendor/erusev/parsedown/test/data/whitespace.html +++ /dev/null @@ -1 +0,0 @@ -
code
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/whitespace.md b/vendor/erusev/parsedown/test/data/whitespace.md deleted file mode 100644 index 4cf926a..0000000 --- a/vendor/erusev/parsedown/test/data/whitespace.md +++ /dev/null @@ -1,5 +0,0 @@ - - - code - - \ No newline at end of file diff --git a/vendor/fguillot/picofeed/LICENSE b/vendor/fguillot/picofeed/LICENSE deleted file mode 100644 index 6a362bc..0000000 --- a/vendor/fguillot/picofeed/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Frederic Guillot - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Client/Client.php b/vendor/fguillot/picofeed/lib/PicoFeed/Client/Client.php deleted file mode 100644 index 24c619c..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Client/Client.php +++ /dev/null @@ -1,668 +0,0 @@ -request_headers = $headers; - } - - /** - * Perform the HTTP request. - * - * @param string $url URL - * - * @return Client - */ - public function execute($url = '') - { - if ($url !== '') { - $this->url = $url; - } - - Logger::setMessage(get_called_class().' Fetch URL: '.$this->url); - Logger::setMessage(get_called_class().' Etag provided: '.$this->etag); - Logger::setMessage(get_called_class().' Last-Modified provided: '.$this->last_modified); - - $response = $this->doRequest(); - - $this->status_code = $response['status']; - $this->handleNotModifiedResponse($response); - $this->handleNotFoundResponse($response); - $this->handleNormalResponse($response); - - return $this; - } - - /** - * Handle not modified response. - * - * @param array $response Client response - */ - public function handleNotModifiedResponse(array $response) - { - if ($response['status'] == 304) { - $this->is_modified = false; - } elseif ($response['status'] == 200) { - $this->is_modified = $this->hasBeenModified($response, $this->etag, $this->last_modified); - $this->etag = $this->getHeader($response, 'ETag'); - $this->last_modified = $this->getHeader($response, 'Last-Modified'); - } - - if ($this->is_modified === false) { - Logger::setMessage(get_called_class().' Resource not modified'); - } - } - - /** - * Handle not found response. - * - * @param array $response Client response - */ - public function handleNotFoundResponse(array $response) - { - if ($response['status'] == 404) { - throw new InvalidUrlException('Resource not found'); - } - } - - /** - * Handle normal response. - * - * @param array $response Client response - */ - public function handleNormalResponse(array $response) - { - if ($response['status'] == 200) { - $this->content = $response['body']; - $this->content_type = $this->findContentType($response); - $this->encoding = $this->findCharset(); - } - } - - /** - * Check if a request has been modified according to the parameters. - * - * @param array $response - * @param string $etag - * @param string $lastModified - * - * @return bool - */ - private function hasBeenModified($response, $etag, $lastModified) - { - $headers = array( - 'Etag' => $etag, - 'Last-Modified' => $lastModified, - ); - - // Compare the values for each header that is present - $presentCacheHeaderCount = 0; - foreach ($headers as $key => $value) { - if (isset($response['headers'][$key])) { - if ($response['headers'][$key] !== $value) { - return true; - } - ++$presentCacheHeaderCount; - } - } - - // If at least one header is present and the values match, the response - // was not modified - if ($presentCacheHeaderCount > 0) { - return false; - } - - return true; - } - - /** - * Find content type from response headers. - * - * @param array $response Client response - * - * @return string - */ - public function findContentType(array $response) - { - return strtolower($this->getHeader($response, 'Content-Type')); - } - - /** - * Find charset from response headers. - * - * @return string - */ - public function findCharset() - { - $result = explode('charset=', $this->content_type); - - return isset($result[1]) ? $result[1] : ''; - } - - /** - * Get header value from a client response. - * - * @param array $response Client response - * @param string $header Header name - * - * @return string - */ - public function getHeader(array $response, $header) - { - return isset($response['headers'][$header]) ? $response['headers'][$header] : ''; - } - - /** - * Set the Last-Modified HTTP header. - * - * @param string $last_modified Header value - * - * @return \PicoFeed\Client\Client - */ - public function setLastModified($last_modified) - { - $this->last_modified = $last_modified; - - return $this; - } - - /** - * Get the value of the Last-Modified HTTP header. - * - * @return string - */ - public function getLastModified() - { - return $this->last_modified; - } - - /** - * Set the value of the Etag HTTP header. - * - * @param string $etag Etag HTTP header value - * - * @return \PicoFeed\Client\Client - */ - public function setEtag($etag) - { - $this->etag = $etag; - - return $this; - } - - /** - * Get the Etag HTTP header value. - * - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Get the final url value. - * - * @return string - */ - public function getUrl() - { - return $this->url; - } - - /** - * Set the url. - * - * @return string - * @return \PicoFeed\Client\Client - */ - public function setUrl($url) - { - $this->url = $url; - - return $this; - } - - /** - * Get the HTTP response status code. - * - * @return int - */ - public function getStatusCode() - { - return $this->status_code; - } - - /** - * Get the body of the HTTP response. - * - * @return string - */ - public function getContent() - { - return $this->content; - } - - /** - * Get the content type value from HTTP headers. - * - * @return string - */ - public function getContentType() - { - return $this->content_type; - } - - /** - * Get the encoding value from HTTP headers. - * - * @return string - */ - public function getEncoding() - { - return $this->encoding; - } - - /** - * Return true if the remote resource has changed. - * - * @return bool - */ - public function isModified() - { - return $this->is_modified; - } - - /** - * return true if passthrough mode is enabled. - * - * @return bool - */ - public function isPassthroughEnabled() - { - return $this->passthrough; - } - - /** - * Set connection timeout. - * - * @param int $timeout Connection timeout - * - * @return \PicoFeed\Client\Client - */ - public function setTimeout($timeout) - { - $this->timeout = $timeout ?: $this->timeout; - - return $this; - } - - /** - * Set a custom user agent. - * - * @param string $user_agent User Agent - * - * @return \PicoFeed\Client\Client - */ - public function setUserAgent($user_agent) - { - $this->user_agent = $user_agent ?: $this->user_agent; - - return $this; - } - - /** - * Set the maximum number of HTTP redirections. - * - * @param int $max Maximum - * - * @return \PicoFeed\Client\Client - */ - public function setMaxRedirections($max) - { - $this->max_redirects = $max ?: $this->max_redirects; - - return $this; - } - - /** - * Set the maximum size of the HTTP body. - * - * @param int $max Maximum - * - * @return \PicoFeed\Client\Client - */ - public function setMaxBodySize($max) - { - $this->max_body_size = $max ?: $this->max_body_size; - - return $this; - } - - /** - * Set the proxy hostname. - * - * @param string $hostname Proxy hostname - * - * @return \PicoFeed\Client\Client - */ - public function setProxyHostname($hostname) - { - $this->proxy_hostname = $hostname ?: $this->proxy_hostname; - - return $this; - } - - /** - * Set the proxy port. - * - * @param int $port Proxy port - * - * @return \PicoFeed\Client\Client - */ - public function setProxyPort($port) - { - $this->proxy_port = $port ?: $this->proxy_port; - - return $this; - } - - /** - * Set the proxy username. - * - * @param string $username Proxy username - * - * @return \PicoFeed\Client\Client - */ - public function setProxyUsername($username) - { - $this->proxy_username = $username ?: $this->proxy_username; - - return $this; - } - - /** - * Set the proxy password. - * - * @param string $password Password - * - * @return \PicoFeed\Client\Client - */ - public function setProxyPassword($password) - { - $this->proxy_password = $password ?: $this->proxy_password; - - return $this; - } - - /** - * Set the username. - * - * @param string $username Basic Auth username - * - * @return \PicoFeed\Client\Client - */ - public function setUsername($username) - { - $this->username = $username ?: $this->username; - - return $this; - } - - /** - * Set the password. - * - * @param string $password Basic Auth Password - * - * @return \PicoFeed\Client\Client - */ - public function setPassword($password) - { - $this->password = $password ?: $this->password; - - return $this; - } - - /** - * Enable the passthrough mode. - * - * @return \PicoFeed\Client\Client - */ - public function enablePassthroughMode() - { - $this->passthrough = true; - - return $this; - } - - /** - * Disable the passthrough mode. - * - * @return \PicoFeed\Client\Client - */ - public function disablePassthroughMode() - { - $this->passthrough = false; - - return $this; - } - - /** - * Set config object. - * - * @param \PicoFeed\Config\Config $config Config instance - * - * @return \PicoFeed\Client\Client - */ - public function setConfig(Config $config) - { - if ($config !== null) { - $this->setTimeout($config->getClientTimeout()); - $this->setUserAgent($config->getClientUserAgent()); - $this->setMaxRedirections($config->getMaxRedirections()); - $this->setMaxBodySize($config->getMaxBodySize()); - $this->setProxyHostname($config->getProxyHostname()); - $this->setProxyPort($config->getProxyPort()); - $this->setProxyUsername($config->getProxyUsername()); - $this->setProxyPassword($config->getProxyPassword()); - } - - return $this; - } - - /** - * Return true if the HTTP status code is a redirection - * - * @access protected - * @param integer $code - * @return boolean - */ - public function isRedirection($code) - { - return $code == 301 || $code == 302 || $code == 303 || $code == 307; - } -} diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Client/ClientException.php b/vendor/fguillot/picofeed/lib/PicoFeed/Client/ClientException.php deleted file mode 100644 index b3a95c9..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Client/ClientException.php +++ /dev/null @@ -1,14 +0,0 @@ -body_length += $length; - - if ($this->body_length > $this->max_body_size) { - return -1; - } - - $this->body .= $buffer; - - return $length; - } - - /** - * cURL callback to read HTTP headers. - * - * @param resource $ch cURL handler - * @param string $buffer Header line - * - * @return int Length of the buffer - */ - public function readHeaders($ch, $buffer) - { - $length = strlen($buffer); - - if ($buffer === "\r\n" || $buffer === "\n") { - ++$this->response_headers_count; - } else { - if (!isset($this->response_headers[$this->response_headers_count])) { - $this->response_headers[$this->response_headers_count] = ''; - } - - $this->response_headers[$this->response_headers_count] .= $buffer; - } - - return $length; - } - - /** - * cURL callback to passthrough the HTTP body to the client. - * - * If the function return -1, curl stop to read the HTTP response - * - * @param resource $ch cURL handler - * @param string $buffer Chunk of data - * - * @return int Length of the buffer - */ - public function passthroughBody($ch, $buffer) - { - // do it only at the beginning of a transmission - if ($this->body_length === 0) { - list($status, $headers) = HttpHeaders::parse(explode("\n", $this->response_headers[$this->response_headers_count - 1])); - - if ($this->isRedirection($status)) { - return $this->handleRedirection($headers['Location']); - } - - header($status); - - if (isset($headers['Content-Type'])) { - header('Content-Type:' .$headers['Content-Type']); - } - } - - $length = strlen($buffer); - $this->body_length += $length; - - echo $buffer; - - return $length; - } - - /** - * Prepare HTTP headers. - * - * @return string[] - */ - private function prepareHeaders() - { - $headers = array( - 'Connection: close', - ); - - if ($this->etag) { - $headers[] = 'If-None-Match: '.$this->etag; - } - - if ($this->last_modified) { - $headers[] = 'If-Modified-Since: '.$this->last_modified; - } - - $headers = array_merge($headers, $this->request_headers); - - return $headers; - } - - /** - * Prepare curl proxy context. - * - * @param resource $ch - * - * @return resource $ch - */ - private function prepareProxyContext($ch) - { - if ($this->proxy_hostname) { - Logger::setMessage(get_called_class().' Proxy: '.$this->proxy_hostname.':'.$this->proxy_port); - - curl_setopt($ch, CURLOPT_PROXYPORT, $this->proxy_port); - curl_setopt($ch, CURLOPT_PROXYTYPE, 'HTTP'); - curl_setopt($ch, CURLOPT_PROXY, $this->proxy_hostname); - - if ($this->proxy_username) { - Logger::setMessage(get_called_class().' Proxy credentials: Yes'); - curl_setopt($ch, CURLOPT_PROXYUSERPWD, $this->proxy_username.':'.$this->proxy_password); - } else { - Logger::setMessage(get_called_class().' Proxy credentials: No'); - } - } - - return $ch; - } - - /** - * Prepare curl auth context. - * - * @param resource $ch - * - * @return resource $ch - */ - private function prepareAuthContext($ch) - { - if ($this->username && $this->password) { - curl_setopt($ch, CURLOPT_USERPWD, $this->username.':'.$this->password); - } - - return $ch; - } - - /** - * Set write/header functions. - * - * @param resource $ch - * - * @return resource $ch - */ - private function prepareDownloadMode($ch) - { - $write_function = 'readBody'; - $header_function = 'readHeaders'; - - if ($this->isPassthroughEnabled()) { - $write_function = 'passthroughBody'; - } - - curl_setopt($ch, CURLOPT_WRITEFUNCTION, array($this, $write_function)); - curl_setopt($ch, CURLOPT_HEADERFUNCTION, array($this, $header_function)); - - return $ch; - } - - /** - * Prepare curl context. - * - * @return resource - */ - private function prepareContext() - { - $ch = curl_init(); - - curl_setopt($ch, CURLOPT_URL, $this->url); - curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); - curl_setopt($ch, CURLOPT_TIMEOUT, $this->timeout); - curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $this->timeout); - curl_setopt($ch, CURLOPT_USERAGENT, $this->user_agent); - curl_setopt($ch, CURLOPT_HTTPHEADER, $this->prepareHeaders()); - curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false); - curl_setopt($ch, CURLOPT_ENCODING, ''); - curl_setopt($ch, CURLOPT_COOKIEJAR, 'php://memory'); - curl_setopt($ch, CURLOPT_COOKIEFILE, 'php://memory'); - - // Disable SSLv3 by enforcing TLSv1.x for curl >= 7.34.0 and < 7.39.0. - // Versions prior to 7.34 and at least when compiled against openssl - // interpret this parameter as "limit to TLSv1.0" which fails for sites - // which enforce TLS 1.1+. - // Starting with curl 7.39.0 SSLv3 is disabled by default. - $version = curl_version(); - if ($version['version_number'] >= 467456 && $version['version_number'] < 468736) { - curl_setopt($ch, CURLOPT_SSLVERSION, 1); - } - - $ch = $this->prepareDownloadMode($ch); - $ch = $this->prepareProxyContext($ch); - $ch = $this->prepareAuthContext($ch); - - return $ch; - } - - /** - * Execute curl context. - */ - private function executeContext() - { - $ch = $this->prepareContext(); - curl_exec($ch); - - Logger::setMessage(get_called_class().' cURL total time: '.curl_getinfo($ch, CURLINFO_TOTAL_TIME)); - Logger::setMessage(get_called_class().' cURL dns lookup time: '.curl_getinfo($ch, CURLINFO_NAMELOOKUP_TIME)); - Logger::setMessage(get_called_class().' cURL connect time: '.curl_getinfo($ch, CURLINFO_CONNECT_TIME)); - Logger::setMessage(get_called_class().' cURL speed download: '.curl_getinfo($ch, CURLINFO_SPEED_DOWNLOAD)); - Logger::setMessage(get_called_class().' cURL effective url: '.curl_getinfo($ch, CURLINFO_EFFECTIVE_URL)); - - $curl_errno = curl_errno($ch); - - if ($curl_errno) { - Logger::setMessage(get_called_class().' cURL error: '.curl_error($ch)); - curl_close($ch); - - $this->handleError($curl_errno); - } - - // Update the url if there where redirects - $this->url = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL); - - curl_close($ch); - } - - /** - * Do the HTTP request. - * - * @return array HTTP response ['body' => ..., 'status' => ..., 'headers' => ...] - */ - public function doRequest() - { - $this->executeContext(); - - list($status, $headers) = HttpHeaders::parse(explode("\n", $this->response_headers[$this->response_headers_count - 1])); - - if ($this->isRedirection($status)) { - return $this->handleRedirection($headers['Location']); - } - - return array( - 'status' => $status, - 'body' => $this->body, - 'headers' => $headers, - ); - } - - /** - * Handle HTTP redirects - * - * @param string $location Redirected URL - * - * @return array - */ - private function handleRedirection($location) - { - $nb_redirects = 0; - $result = array(); - $this->url = Url::resolve($location, $this->url); - $this->body = ''; - $this->body_length = 0; - $this->response_headers = array(); - $this->response_headers_count = 0; - - while (true) { - ++$nb_redirects; - - if ($nb_redirects >= $this->max_redirects) { - throw new MaxRedirectException('Maximum number of redirections reached'); - } - - $result = $this->doRequest(); - - if ($this->isRedirection($result['status'])) { - $this->url = Url::resolve($result['headers']['Location'], $this->url); - $this->body = ''; - $this->body_length = 0; - $this->response_headers = array(); - $this->response_headers_count = 0; - } else { - break; - } - } - - return $result; - } - - /** - * Handle cURL errors (throw individual exceptions). - * - * We don't use constants because they are not necessary always available - * (depends of the version of libcurl linked to php) - * - * @see http://curl.haxx.se/libcurl/c/libcurl-errors.html - * - * @param int $errno cURL error code - */ - private function handleError($errno) - { - switch ($errno) { - case 78: // CURLE_REMOTE_FILE_NOT_FOUND - throw new InvalidUrlException('Resource not found'); - case 6: // CURLE_COULDNT_RESOLVE_HOST - throw new InvalidUrlException('Unable to resolve hostname'); - case 7: // CURLE_COULDNT_CONNECT - throw new InvalidUrlException('Unable to connect to the remote host'); - case 23: // CURLE_WRITE_ERROR - throw new MaxSizeException('Maximum response size exceeded'); - case 28: // CURLE_OPERATION_TIMEDOUT - throw new TimeoutException('Operation timeout'); - case 35: // CURLE_SSL_CONNECT_ERROR - case 51: // CURLE_PEER_FAILED_VERIFICATION - case 58: // CURLE_SSL_CERTPROBLEM - case 60: // CURLE_SSL_CACERT - case 59: // CURLE_SSL_CIPHER - case 64: // CURLE_USE_SSL_FAILED - case 66: // CURLE_SSL_ENGINE_INITFAILED - case 77: // CURLE_SSL_CACERT_BADFILE - case 83: // CURLE_SSL_ISSUER_ERROR - throw new InvalidCertificateException('Invalid SSL certificate'); - case 47: // CURLE_TOO_MANY_REDIRECTS - throw new MaxRedirectException('Maximum number of redirections reached'); - case 63: // CURLE_FILESIZE_EXCEEDED - throw new MaxSizeException('Maximum response size exceeded'); - default: - throw new InvalidUrlException('Unable to fetch the URL'); - } - } -} diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Client/HttpHeaders.php b/vendor/fguillot/picofeed/lib/PicoFeed/Client/HttpHeaders.php deleted file mode 100644 index 5ddcafc..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Client/HttpHeaders.php +++ /dev/null @@ -1,79 +0,0 @@ - $value) { - $this->headers[strtolower($key)] = $value; - } - } - - public function offsetGet($offset) - { - return $this->headers[strtolower($offset)]; - } - - public function offsetSet($offset, $value) - { - $this->headers[strtolower($offset)] = $value; - } - - public function offsetExists($offset) - { - return isset($this->headers[strtolower($offset)]); - } - - public function offsetUnset($offset) - { - unset($this->headers[strtolower($offset)]); - } - - /** - * Parse HTTP headers. - * - * @static - * - * @param array $lines List of headers - * - * @return array - */ - public static function parse(array $lines) - { - $status = 0; - $headers = array(); - - foreach ($lines as $line) { - if (strpos($line, 'HTTP/1') === 0) { - $headers = array(); - $status = (int) substr($line, 9, 3); - } elseif (strpos($line, ': ') !== false) { - list($name, $value) = explode(': ', $line); - if ($value) { - $headers[trim($name)] = trim($value); - } - } - } - - Logger::setMessage(get_called_class().' HTTP status code: '.$status); - - foreach ($headers as $name => $value) { - Logger::setMessage(get_called_class().' HTTP header: '.$name.' => '.$value); - } - - return array($status, new self($headers)); - } -} diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Client/InvalidCertificateException.php b/vendor/fguillot/picofeed/lib/PicoFeed/Client/InvalidCertificateException.php deleted file mode 100644 index 8d25d7e..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Client/InvalidCertificateException.php +++ /dev/null @@ -1,12 +0,0 @@ -user_agent, - ); - - // disable compression in passthrough mode. It could result in double - // compressed content which isn't decodeable by browsers - if (function_exists('gzdecode') && !$this->isPassthroughEnabled()) { - $headers[] = 'Accept-Encoding: gzip'; - } - - if ($this->etag) { - $headers[] = 'If-None-Match: '.$this->etag; - } - - if ($this->last_modified) { - $headers[] = 'If-Modified-Since: '.$this->last_modified; - } - - if ($this->proxy_username) { - $headers[] = 'Proxy-Authorization: Basic '.base64_encode($this->proxy_username.':'.$this->proxy_password); - } - - if ($this->username && $this->password) { - $headers[] = 'Authorization: Basic '.base64_encode($this->username.':'.$this->password); - } - - $headers = array_merge($headers, $this->request_headers); - - return $headers; - } - - /** - * Construct the final URL from location headers. - * - * @param array $headers List of HTTP response header - */ - private function setEffectiveUrl($headers) - { - foreach ($headers as $header) { - if (stripos($header, 'Location') === 0) { - list(, $value) = explode(': ', $header); - - $this->url = Url::resolve($value, $this->url); - } - } - } - - /** - * Prepare stream context. - * - * @return array - */ - private function prepareContext() - { - $context = array( - 'http' => array( - 'method' => 'GET', - 'protocol_version' => 1.1, - 'timeout' => $this->timeout, - 'max_redirects' => $this->max_redirects, - ), - ); - - if ($this->proxy_hostname) { - Logger::setMessage(get_called_class().' Proxy: '.$this->proxy_hostname.':'.$this->proxy_port); - - $context['http']['proxy'] = 'tcp://'.$this->proxy_hostname.':'.$this->proxy_port; - $context['http']['request_fulluri'] = true; - - if ($this->proxy_username) { - Logger::setMessage(get_called_class().' Proxy credentials: Yes'); - } else { - Logger::setMessage(get_called_class().' Proxy credentials: No'); - } - } - - $context['http']['header'] = implode("\r\n", $this->prepareHeaders()); - - return $context; - } - - /** - * Do the HTTP request. - * - * @return array HTTP response ['body' => ..., 'status' => ..., 'headers' => ...] - */ - public function doRequest() - { - $body = ''; - - // Create context - $context = stream_context_create($this->prepareContext()); - - // Make HTTP request - $stream = @fopen($this->url, 'r', false, $context); - if (!is_resource($stream)) { - throw new InvalidUrlException('Unable to establish a connection'); - } - - // Get HTTP headers response - $metadata = stream_get_meta_data($stream); - list($status, $headers) = HttpHeaders::parse($metadata['wrapper_data']); - - if ($this->isPassthroughEnabled()) { - header(':', true, $status); - - if (isset($headers['Content-Type'])) { - header('Content-Type: '.$headers['Content-Type']); - } - - fpassthru($stream); - } else { - // Get the entire body until the max size - $body = stream_get_contents($stream, $this->max_body_size + 1); - - // If the body size is too large abort everything - if (strlen($body) > $this->max_body_size) { - throw new MaxSizeException('Content size too large'); - } - - if ($metadata['timed_out']) { - throw new TimeoutException('Operation timeout'); - } - } - - fclose($stream); - - $this->setEffectiveUrl($metadata['wrapper_data']); - - return array( - 'status' => $status, - 'body' => $this->decodeBody($body, $headers), - 'headers' => $headers, - ); - } - - /** - * Decode body response according to the HTTP headers. - * - * @param string $body Raw body - * @param HttpHeaders $headers HTTP headers - * - * @return string - */ - public function decodeBody($body, HttpHeaders $headers) - { - if (isset($headers['Transfer-Encoding']) && $headers['Transfer-Encoding'] === 'chunked') { - $body = $this->decodeChunked($body); - } - - if (isset($headers['Content-Encoding']) && $headers['Content-Encoding'] === 'gzip') { - $body = gzdecode($body); - } - - return $body; - } - - /** - * Decode a chunked body. - * - * @param string $str Raw body - * - * @return string Decoded body - */ - public function decodeChunked($str) - { - for ($result = ''; !empty($str); $str = trim($str)) { - - // Get the chunk length - $pos = strpos($str, "\r\n"); - $len = hexdec(substr($str, 0, $pos)); - - // Append the chunk to the result - $result .= substr($str, $pos + 2, $len); - $str = substr($str, $pos + 2 + $len); - } - - return $result; - } -} diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Client/TimeoutException.php b/vendor/fguillot/picofeed/lib/PicoFeed/Client/TimeoutException.php deleted file mode 100644 index da98da1..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Client/TimeoutException.php +++ /dev/null @@ -1,12 +0,0 @@ -url = $url; - $this->components = parse_url($url) ?: array(); - - // Issue with PHP < 5.4.7 and protocol relative url - if (version_compare(PHP_VERSION, '5.4.7', '<') && $this->isProtocolRelative()) { - $pos = strpos($this->components['path'], '/', 2); - - if ($pos === false) { - $pos = strlen($this->components['path']); - } - - $this->components['host'] = substr($this->components['path'], 2, $pos - 2); - $this->components['path'] = substr($this->components['path'], $pos); - } - } - - /** - * Shortcut method to get an absolute url from relative url. - * - * @static - * - * @param mixed $item_url Unknown url (can be relative or not) - * @param mixed $website_url Website url - * - * @return string - */ - public static function resolve($item_url, $website_url) - { - $link = is_string($item_url) ? new self($item_url) : $item_url; - $website = is_string($website_url) ? new self($website_url) : $website_url; - - if ($link->isRelativeUrl()) { - if ($link->isRelativePath()) { - return $link->getAbsoluteUrl($website->getBaseUrl($website->getBasePath())); - } - - return $link->getAbsoluteUrl($website->getBaseUrl()); - } elseif ($link->isProtocolRelative()) { - $link->setScheme($website->getScheme()); - } - - return $link->getAbsoluteUrl(); - } - - /** - * Shortcut method to get a base url. - * - * @static - * - * @param string $url - * - * @return string - */ - public static function base($url) - { - $link = new self($url); - - return $link->getBaseUrl(); - } - - /** - * Get the base URL. - * - * @param string $suffix Add a suffix to the url - * - * @return string - */ - public function getBaseUrl($suffix = '') - { - return $this->hasHost() ? $this->getScheme('://').$this->getHost().$this->getPort(':').$suffix : ''; - } - - /** - * Get the absolute URL. - * - * @param string $base_url Use this url as base url - * - * @return string - */ - public function getAbsoluteUrl($base_url = '') - { - if ($base_url) { - $base = new self($base_url); - $url = $base->getAbsoluteUrl().substr($this->getFullPath(), 1); - } else { - $url = $this->hasHost() ? $this->getBaseUrl().$this->getFullPath() : ''; - } - - return $url; - } - - /** - * Return true if the url is relative. - * - * @return bool - */ - public function isRelativeUrl() - { - return !$this->hasScheme() && !$this->isProtocolRelative(); - } - - /** - * Return true if the path is relative. - * - * @return bool - */ - public function isRelativePath() - { - $path = $this->getPath(); - - return empty($path) || $path{0} - !== '/'; - } - - /** - * Filters the path of a URI. - * - * Imported from Guzzle library: https://github.com/guzzle/psr7/blob/master/src/Uri.php#L568-L582 - * - * @param $path - * - * @return string - */ - public function filterPath($path, $charUnreserved = 'a-zA-Z0-9_\-\.~', $charSubDelims = '!\$&\'\(\)\*\+,;=') - { - return preg_replace_callback( - '/(?:[^'.$charUnreserved.$charSubDelims.':@\/%]+|%(?![A-Fa-f0-9]{2}))/', - function (array $matches) { return rawurlencode($matches[0]); }, - $path - ); - } - - /** - * Get the path. - * - * @return string - */ - public function getPath() - { - return $this->filterPath(empty($this->components['path']) ? '' : $this->components['path']); - } - - /** - * Get the base path. - * - * @return string - */ - public function getBasePath() - { - $current_path = $this->getPath(); - - $path = $this->isRelativePath() ? '/' : ''; - $path .= substr($current_path, -1) === '/' ? $current_path : dirname($current_path); - - return preg_replace('/\\\\\/|\/\//', '/', $path.'/'); - } - - /** - * Get the full path (path + querystring + fragment). - * - * @return string - */ - public function getFullPath() - { - $path = $this->isRelativePath() ? '/' : ''; - $path .= $this->getPath(); - $path .= empty($this->components['query']) ? '' : '?'.$this->components['query']; - $path .= empty($this->components['fragment']) ? '' : '#'.$this->components['fragment']; - - return $path; - } - - /** - * Get the hostname. - * - * @return string - */ - public function getHost() - { - return empty($this->components['host']) ? '' : $this->components['host']; - } - - /** - * Return true if the url has a hostname. - * - * @return bool - */ - public function hasHost() - { - return !empty($this->components['host']); - } - - /** - * Get the scheme. - * - * @param string $suffix Suffix to add when there is a scheme - * - * @return string - */ - public function getScheme($suffix = '') - { - return ($this->hasScheme() ? $this->components['scheme'] : 'http').$suffix; - } - - /** - * Set the scheme. - * - * @param string $scheme Set a scheme - * - * @return string - */ - public function setScheme($scheme) - { - $this->components['scheme'] = $scheme; - } - - /** - * Return true if the url has a scheme. - * - * @return bool - */ - public function hasScheme() - { - return !empty($this->components['scheme']); - } - - /** - * Get the port. - * - * @param string $prefix Prefix to add when there is a port - * - * @return string - */ - public function getPort($prefix = '') - { - return $this->hasPort() ? $prefix.$this->components['port'] : ''; - } - - /** - * Return true if the url has a port. - * - * @return bool - */ - public function hasPort() - { - return !empty($this->components['port']); - } - - /** - * Return true if the url is protocol relative (start with //). - * - * @return bool - */ - public function isProtocolRelative() - { - return strpos($this->url, '//') === 0; - } -} diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Config/Config.php b/vendor/fguillot/picofeed/lib/PicoFeed/Config/Config.php deleted file mode 100644 index 127968c..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Config/Config.php +++ /dev/null @@ -1,96 +0,0 @@ -container[$parameter] = $arguments[0]; - - return $this; - } elseif ($prefix === 'get') { - $default_value = isset($arguments[0]) ? $arguments[0] : null; - - return isset($this->container[$parameter]) ? $this->container[$parameter] : $default_value; - } - } -} diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Encoding/Encoding.php b/vendor/fguillot/picofeed/lib/PicoFeed/Encoding/Encoding.php deleted file mode 100644 index fa0917e..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Encoding/Encoding.php +++ /dev/null @@ -1,33 +0,0 @@ - array('controls', 'src'), - 'video' => array('poster', 'controls', 'height', 'width', 'src'), - 'source' => array('src', 'type'), - 'dt' => array(), - 'dd' => array(), - 'dl' => array(), - 'table' => array(), - 'caption' => array(), - 'tr' => array(), - 'th' => array(), - 'td' => array(), - 'tbody' => array(), - 'thead' => array(), - 'h2' => array(), - 'h3' => array(), - 'h4' => array(), - 'h5' => array(), - 'h6' => array(), - 'strong' => array(), - 'em' => array(), - 'code' => array(), - 'pre' => array(), - 'blockquote' => array(), - 'p' => array(), - 'ul' => array(), - 'li' => array(), - 'ol' => array(), - 'br' => array(), - 'del' => array(), - 'a' => array('href'), - 'img' => array('src', 'title', 'alt'), - 'figure' => array(), - 'figcaption' => array(), - 'cite' => array(), - 'time' => array('datetime'), - 'abbr' => array('title'), - 'iframe' => array('width', 'height', 'frameborder', 'src', 'allowfullscreen'), - 'q' => array('cite'), - ); - - /** - * Scheme whitelist. - * - * For a complete list go to http://en.wikipedia.org/wiki/URI_scheme - * - * @var array - */ - private $scheme_whitelist = array( - 'bitcoin:', - 'callto:', - 'ed2k://', - 'facetime://', - 'feed:', - 'ftp://', - 'geo:', - 'git://', - 'http://', - 'https://', - 'irc://', - 'irc6://', - 'ircs://', - 'jabber:', - 'magnet:', - 'mailto:', - 'nntp://', - 'rtmp://', - 'sftp://', - 'sip:', - 'sips:', - 'skype:', - 'smb://', - 'sms:', - 'spotify:', - 'ssh:', - 'steam:', - 'svn://', - 'tel:', - ); - - /** - * Iframe source whitelist, everything else is ignored. - * - * @var array - */ - private $iframe_whitelist = array( - 'http://www.youtube.com', - 'https://www.youtube.com', - 'http://player.vimeo.com', - 'https://player.vimeo.com', - 'http://www.dailymotion.com', - 'https://www.dailymotion.com', - 'http://vk.com', - 'https://vk.com', - ); - - /** - * Blacklisted resources. - * - * @var array - */ - private $media_blacklist = array( - 'api.flattr.com', - 'feeds.feedburner.com', - 'share.feedsportal.com', - 'da.feedsportal.com', - 'rc.feedsportal.com', - 'rss.feedsportal.com', - 'res.feedsportal.com', - 'res1.feedsportal.com', - 'res2.feedsportal.com', - 'res3.feedsportal.com', - 'pi.feedsportal.com', - 'rss.nytimes.com', - 'feeds.wordpress.com', - 'stats.wordpress.com', - 'rss.cnn.com', - 'twitter.com/home?status=', - 'twitter.com/share', - 'twitter_icon_large.png', - 'www.facebook.com/sharer.php', - 'facebook_icon_large.png', - 'plus.google.com/share', - 'www.gstatic.com/images/icons/gplus-16.png', - 'www.gstatic.com/images/icons/gplus-32.png', - 'www.gstatic.com/images/icons/gplus-64.png', - ); - - /** - * Attributes used for external resources. - * - * @var array - */ - private $media_attributes = array( - 'src', - 'href', - 'poster', - ); - - /** - * Attributes that must be integer. - * - * @var array - */ - private $integer_attributes = array( - 'width', - 'height', - 'frameborder', - ); - - /** - * Mandatory attributes for specified tags. - * - * @var array - */ - private $required_attributes = array( - 'a' => array('href'), - 'img' => array('src'), - 'iframe' => array('src'), - 'audio' => array('src'), - 'source' => array('src'), - ); - - /** - * Add attributes to specified tags. - * - * @var array - */ - private $add_attributes = array( - 'a' => array('rel' => 'noreferrer', 'target' => '_blank'), - 'video' => array('controls' => 'true'), - ); - - /** - * List of filters to apply. - * - * @var array - */ - private $filters = array( - 'filterAllowedAttribute', - 'filterIntegerAttribute', - 'rewriteAbsoluteUrl', - 'filterIframeAttribute', - 'filterBlacklistResourceAttribute', - 'filterProtocolUrlAttribute', - 'rewriteImageProxyUrl', - 'secureIframeSrc', - 'removeYouTubeAutoplay', - ); - - /** - * Add attributes to specified tags. - * - * @var \PicoFeed\Client\Url - */ - private $website; - - /** - * Constructor. - * - * @param \PicoFeed\Client\Url $website Website url instance - */ - public function __construct(Url $website) - { - $this->website = $website; - } - - /** - * Apply filters to the attributes list. - * - * @param string $tag Tag name - * @param array $attributes Attributes dictionary - * - * @return array Filtered attributes - */ - public function filter($tag, array $attributes) - { - foreach ($attributes as $attribute => &$value) { - foreach ($this->filters as $filter) { - if (!$this->$filter($tag, $attribute, $value)) { - unset($attributes[$attribute]); - break; - } - } - } - - return $attributes; - } - - /** - * Return true if the value is allowed (remove not allowed attributes). - * - * @param string $tag Tag name - * @param string $attribute Attribute name - * @param string $value Attribute value - * - * @return bool - */ - public function filterAllowedAttribute($tag, $attribute, $value) - { - return isset($this->attribute_whitelist[$tag]) && in_array($attribute, $this->attribute_whitelist[$tag]); - } - - /** - * Return true if the value is not integer (remove attributes that should have an integer value). - * - * @param string $tag Tag name - * @param string $attribute Attribute name - * @param string $value Attribute value - * - * @return bool - */ - public function filterIntegerAttribute($tag, $attribute, $value) - { - if (in_array($attribute, $this->integer_attributes)) { - return ctype_digit($value); - } - - return true; - } - - /** - * Return true if the iframe source is allowed (remove not allowed iframe). - * - * @param string $tag Tag name - * @param string $attribute Attribute name - * @param string $value Attribute value - * - * @return bool - */ - public function filterIframeAttribute($tag, $attribute, $value) - { - if ($tag === 'iframe' && $attribute === 'src') { - foreach ($this->iframe_whitelist as $url) { - if (strpos($value, $url) === 0) { - return true; - } - } - - return false; - } - - return true; - } - - /** - * Return true if the resource is not blacklisted (remove blacklisted resource attributes). - * - * @param string $tag Tag name - * @param string $attribute Attribute name - * @param string $value Attribute value - * - * @return bool - */ - public function filterBlacklistResourceAttribute($tag, $attribute, $value) - { - if ($this->isResource($attribute) && $this->isBlacklistedMedia($value)) { - return false; - } - - return true; - } - - /** - * Convert all relative links to absolute url. - * - * @param string $tag Tag name - * @param string $attribute Attribute name - * @param string $value Attribute value - * - * @return bool - */ - public function rewriteAbsoluteUrl($tag, $attribute, &$value) - { - if ($this->isResource($attribute)) { - $value = Url::resolve($value, $this->website); - } - - return true; - } - - /** - * Turns iframes' src attribute from http to https to prevent - * mixed active content. - * - * @param string $tag Tag name - * @param array $attribute Atttributes name - * @param string $value Attribute value - * - * @return bool - */ - public function secureIframeSrc($tag, $attribute, &$value) - { - if ($tag === 'iframe' && $attribute === 'src' && strpos($value, 'http://') === 0) { - $value = substr_replace($value, 's', 4, 0); - } - - return true; - } - - /** - * Removes YouTube autoplay from iframes. - * - * @param string $tag Tag name - * @param array $attribute Atttributes name - * @param string $value Attribute value - * - * @return bool - */ - public function removeYouTubeAutoplay($tag, $attribute, &$value) - { - $regex = '%^(https://(?:www\.)?youtube.com/.*\?.*autoplay=)(1)(.*)%i'; - if ($tag === 'iframe' && $attribute === 'src' && preg_match($regex, $value)) { - $value = preg_replace($regex, '${1}0$3', $value); - } - - return true; - } - - /** - * Rewrite image url to use with a proxy. - * - * @param string $tag Tag name - * @param string $attribute Attribute name - * @param string $value Attribute value - * - * @return bool - */ - public function rewriteImageProxyUrl($tag, $attribute, &$value) - { - if ($tag === 'img' && $attribute === 'src' - && !($this->image_proxy_limit_protocol !== '' && stripos($value, $this->image_proxy_limit_protocol.':') !== 0)) { - if ($this->image_proxy_url) { - $value = sprintf($this->image_proxy_url, rawurlencode($value)); - } elseif (is_callable($this->image_proxy_callback)) { - $value = call_user_func($this->image_proxy_callback, $value); - } - } - - return true; - } - - /** - * Return true if the scheme is authorized. - * - * @param string $tag Tag name - * @param string $attribute Attribute name - * @param string $value Attribute value - * - * @return bool - */ - public function filterProtocolUrlAttribute($tag, $attribute, $value) - { - if ($this->isResource($attribute) && !$this->isAllowedProtocol($value)) { - return false; - } - - return true; - } - - /** - * Automatically add/override some attributes for specific tags. - * - * @param string $tag Tag name - * @param array $attributes Attributes list - * - * @return array - */ - public function addAttributes($tag, array $attributes) - { - if (isset($this->add_attributes[$tag])) { - $attributes += $this->add_attributes[$tag]; - } - - return $attributes; - } - - /** - * Return true if all required attributes are present. - * - * @param string $tag Tag name - * @param array $attributes Attributes list - * - * @return bool - */ - public function hasRequiredAttributes($tag, array $attributes) - { - if (isset($this->required_attributes[$tag])) { - foreach ($this->required_attributes[$tag] as $attribute) { - if (!isset($attributes[$attribute])) { - return false; - } - } - } - - return true; - } - - /** - * Check if an attribute name is an external resource. - * - * @param string $attribute Attribute name - * - * @return bool - */ - public function isResource($attribute) - { - return in_array($attribute, $this->media_attributes); - } - - /** - * Detect if the protocol is allowed or not. - * - * @param string $value Attribute value - * - * @return bool - */ - public function isAllowedProtocol($value) - { - foreach ($this->scheme_whitelist as $protocol) { - if (strpos($value, $protocol) === 0) { - return true; - } - } - - return false; - } - - /** - * Detect if an url is blacklisted. - * - * @param string $resource Attribute value (URL) - * - * @return bool - */ - public function isBlacklistedMedia($resource) - { - foreach ($this->media_blacklist as $name) { - if (strpos($resource, $name) !== false) { - return true; - } - } - - return false; - } - - /** - * Convert the attribute list to html. - * - * @param array $attributes Attributes - * - * @return string - */ - public function toHtml(array $attributes) - { - $html = array(); - - foreach ($attributes as $attribute => $value) { - $html[] = sprintf('%s="%s"', $attribute, Filter::escape($value)); - } - - return implode(' ', $html); - } - - /** - * Set whitelisted tags and attributes for each tag. - * - * @param array $values List of tags: ['video' => ['src', 'cover'], 'img' => ['src']] - * - * @return Attribute - */ - public function setWhitelistedAttributes(array $values) - { - $this->attribute_whitelist = $values ?: $this->attribute_whitelist; - - return $this; - } - - /** - * Set scheme whitelist. - * - * @param array $values List of scheme: ['http://', 'ftp://'] - * - * @return Attribute - */ - public function setSchemeWhitelist(array $values) - { - $this->scheme_whitelist = $values ?: $this->scheme_whitelist; - - return $this; - } - - /** - * Set media attributes (used to load external resources). - * - * @param array $values List of values: ['src', 'href'] - * - * @return Attribute - */ - public function setMediaAttributes(array $values) - { - $this->media_attributes = $values ?: $this->media_attributes; - - return $this; - } - - /** - * Set blacklisted external resources. - * - * @param array $values List of tags: ['http://google.com/', '...'] - * - * @return Attribute - */ - public function setMediaBlacklist(array $values) - { - $this->media_blacklist = $values ?: $this->media_blacklist; - - return $this; - } - - /** - * Set mandatory attributes for whitelisted tags. - * - * @param array $values List of tags: ['img' => 'src'] - * - * @return Attribute - */ - public function setRequiredAttributes(array $values) - { - $this->required_attributes = $values ?: $this->required_attributes; - - return $this; - } - - /** - * Set attributes to automatically to specific tags. - * - * @param array $values List of tags: ['a' => 'target="_blank"'] - * - * @return Attribute - */ - public function setAttributeOverrides(array $values) - { - $this->add_attributes = $values ?: $this->add_attributes; - - return $this; - } - - /** - * Set attributes that must be an integer. - * - * @param array $values List of tags: ['width', 'height'] - * - * @return Attribute - */ - public function setIntegerAttributes(array $values) - { - $this->integer_attributes = $values ?: $this->integer_attributes; - - return $this; - } - - /** - * Set allowed iframe resources. - * - * @param array $values List of tags: ['http://www.youtube.com'] - * - * @return Attribute - */ - public function setIframeWhitelist(array $values) - { - $this->iframe_whitelist = $values ?: $this->iframe_whitelist; - - return $this; - } - - /** - * Set image proxy URL. - * - * The original image url will be urlencoded - * - * @param string $url Proxy URL - * - * @return Attribute - */ - public function setImageProxyUrl($url) - { - $this->image_proxy_url = $url ?: $this->image_proxy_url; - - return $this; - } - - /** - * Set image proxy callback. - * - * @param \Closure $callback - * - * @return Attribute - */ - public function setImageProxyCallback($callback) - { - $this->image_proxy_callback = $callback ?: $this->image_proxy_callback; - - return $this; - } - - /** - * Set image proxy protocol restriction. - * - * @param string $value - * - * @return Attribute - */ - public function setImageProxyProtocol($value) - { - $this->image_proxy_limit_protocol = $value ?: $this->image_proxy_limit_protocol; - - return $this; - } -} diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Filter/Filter.php b/vendor/fguillot/picofeed/lib/PicoFeed/Filter/Filter.php deleted file mode 100644 index bae2aff..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Filter/Filter.php +++ /dev/null @@ -1,155 +0,0 @@ -]*>\s*~i', '', $data); - } - - /** - * Remove the XML tag from a document. - * - * @static - * - * @param string $data Input data - * - * @return string - */ - public static function stripXmlTag($data) - { - if (strpos($data, '') + 2)); - } - - do { - $pos = strpos($data, '') + 2)); - } - } while ($pos !== false && $pos < 200); - - return $data; - } - - /** - * Strip head tag from the HTML content. - * - * @static - * - * @param string $data Input data - * - * @return string - */ - public static function stripHeadTags($data) - { - return preg_replace('@]*?>.*?@siu', '', $data); - } - - /** - * Trim whitespace from the begining, the end and inside a string and don't break utf-8 string. - * - * @static - * - * @param string $value Raw data - * - * @return string Normalized data - */ - public static function stripWhiteSpace($value) - { - $value = str_replace("\r", ' ', $value); - $value = str_replace("\t", ' ', $value); - $value = str_replace("\n", ' ', $value); - // $value = preg_replace('/\s+/', ' ', $value); <= break utf-8 - return trim($value); - } - - /** - * Fixes before XML parsing. - * - * @static - * - * @param string $data Raw data - * - * @return string Normalized data - */ - public static function normalizeData($data) - { - $entities = array( - '/(&#)(\d+);/m', // decimal encoded - '/(&#x)([a-f0-9]+);/mi', // hex encoded - ); - - // strip invalid XML 1.0 characters which are encoded as entities - $data = preg_replace_callback($entities, function ($matches) { - $code_point = $matches[2]; - - // convert hex entity to decimal - if (strtolower($matches[1]) === '&#x') { - $code_point = hexdec($code_point); - } - - $code_point = (int) $code_point; - - // replace invalid characters - if ($code_point < 9 - || ($code_point > 10 && $code_point < 13) - || ($code_point > 13 && $code_point < 32) - || ($code_point > 55295 && $code_point < 57344) - || ($code_point > 65533 && $code_point < 65536) - || $code_point > 1114111 - ) { - return ''; - }; - - return $matches[0]; - }, $data); - - // strip every utf-8 character than isn't in the range of valid XML 1.0 characters - return (string) preg_replace('/[^\x{0009}\x{000A}\x{000D}\x{0020}-\x{D7FF}\x{E000}-\x{FFFD}\x{10000}-\x{10FFFF}]/u', '', $data); - } -} diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Filter/Html.php b/vendor/fguillot/picofeed/lib/PicoFeed/Filter/Html.php deleted file mode 100644 index 0ccc192..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Filter/Html.php +++ /dev/null @@ -1,243 +0,0 @@ -config = new Config(); - $this->input = XmlParser::htmlToXml($html); - $this->output = ''; - $this->tag = new Tag($this->config); - $this->website = $website; - $this->attribute = new Attribute(new Url($website)); - } - - /** - * Set config object. - * - * @param \PicoFeed\Config\Config $config Config instance - * - * @return \PicoFeed\Filter\Html - */ - public function setConfig($config) - { - $this->config = $config; - - if ($this->config !== null) { - $this->attribute->setImageProxyCallback($this->config->getFilterImageProxyCallback()); - $this->attribute->setImageProxyUrl($this->config->getFilterImageProxyUrl()); - $this->attribute->setImageProxyProtocol($this->config->getFilterImageProxyProtocol()); - $this->attribute->setIframeWhitelist($this->config->getFilterIframeWhitelist(array())); - $this->attribute->setIntegerAttributes($this->config->getFilterIntegerAttributes(array())); - $this->attribute->setAttributeOverrides($this->config->getFilterAttributeOverrides(array())); - $this->attribute->setRequiredAttributes($this->config->getFilterRequiredAttributes(array())); - $this->attribute->setMediaBlacklist($this->config->getFilterMediaBlacklist(array())); - $this->attribute->setMediaAttributes($this->config->getFilterMediaAttributes(array())); - $this->attribute->setSchemeWhitelist($this->config->getFilterSchemeWhitelist(array())); - $this->attribute->setWhitelistedAttributes($this->config->getFilterWhitelistedTags(array())); - $this->tag->setWhitelistedTags(array_keys($this->config->getFilterWhitelistedTags(array()))); - } - - return $this; - } - - /** - * Run tags/attributes filtering. - * - * @return string - */ - public function execute() - { - $this->preFilter(); - - $parser = xml_parser_create(); - - xml_set_object($parser, $this); - xml_set_element_handler($parser, 'startTag', 'endTag'); - xml_set_character_data_handler($parser, 'dataTag'); - xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, false); - xml_parse($parser, $this->input, true); - xml_parser_free($parser); - - $this->postFilter(); - - return $this->output; - } - - /** - * Called before XML parsing. - */ - public function preFilter() - { - $this->input = $this->tag->removeBlacklistedTags($this->input); - } - - /** - * Called after XML parsing. - */ - public function postFilter() - { - $this->output = $this->tag->removeEmptyTags($this->output); - $this->output = $this->filterRules($this->output); - $this->output = $this->tag->removeMultipleBreakTags($this->output); - $this->output = trim($this->output); - } - - /** - * Called after XML parsing. - * - * @param string $content the content that should be filtered - */ - public function filterRules($content) - { - // the constructor should require a config, then this if can be removed - if ($this->config === null) { - $config = new Config(); - } else { - $config = $this->config; - } - - $loader = new RuleLoader($config); - $rules = $loader->getRules($this->website); - - $url = new Url($this->website); - $sub_url = $url->getFullPath(); - - if (isset($rules['filter'])) { - foreach ($rules['filter'] as $pattern => $rule) { - if (preg_match($pattern, $sub_url)) { - foreach ($rule as $search => $replace) { - $content = preg_replace($search, $replace, $content); - } - } - } - } - - return $content; - } - - /** - * Parse opening tag. - * - * @param resource $parser XML parser - * @param string $tag Tag name - * @param array $attributes Tag attributes - */ - public function startTag($parser, $tag, array $attributes) - { - $this->empty = true; - - if ($this->tag->isAllowed($tag, $attributes)) { - $attributes = $this->attribute->filter($tag, $attributes); - - if ($this->attribute->hasRequiredAttributes($tag, $attributes)) { - $attributes = $this->attribute->addAttributes($tag, $attributes); - - $this->output .= $this->tag->openHtmlTag($tag, $this->attribute->toHtml($attributes)); - $this->empty = false; - } - } - - $this->empty_tags[] = $this->empty; - } - - /** - * Parse closing tag. - * - * @param resource $parser XML parser - * @param string $tag Tag name - */ - public function endTag($parser, $tag) - { - if (!array_pop($this->empty_tags) && $this->tag->isAllowedTag($tag)) { - $this->output .= $this->tag->closeHtmlTag($tag); - } - } - - /** - * Parse tag content. - * - * @param resource $parser XML parser - * @param string $content Tag content - */ - public function dataTag($parser, $content) - { - // Replace   with normal space - $content = str_replace("\xc2\xa0", ' ', $content); - $this->output .= Filter::escape($content); - } -} diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Filter/Tag.php b/vendor/fguillot/picofeed/lib/PicoFeed/Filter/Tag.php deleted file mode 100644 index 34e21dc..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Filter/Tag.php +++ /dev/null @@ -1,227 +0,0 @@ -config = $config; - } - - /** - * Check if the tag is allowed and is not a pixel tracker. - * - * @param string $tag Tag name - * @param array $attributes Attributes dictionary - * - * @return bool - */ - public function isAllowed($tag, array $attributes) - { - return $this->isAllowedTag($tag) && !$this->isPixelTracker($tag, $attributes); - } - - /** - * Return the HTML opening tag. - * - * @param string $tag Tag name - * @param string $attributes Attributes converted in html - * - * @return string - */ - public function openHtmlTag($tag, $attributes = '') - { - return '<'.$tag.(empty($attributes) ? '' : ' '.$attributes).($this->isSelfClosingTag($tag) ? '/>' : '>'); - } - - /** - * Return the HTML closing tag. - * - * @param string $tag Tag name - * - * @return string - */ - public function closeHtmlTag($tag) - { - return $this->isSelfClosingTag($tag) ? '' : ''; - } - - /** - * Return true is the tag is self-closing. - * - * @param string $tag Tag name - * - * @return bool - */ - public function isSelfClosingTag($tag) - { - return $tag === 'br' || $tag === 'img'; - } - - /** - * Check if a tag is on the whitelist. - * - * @param string $tag Tag name - * - * @return bool - */ - public function isAllowedTag($tag) - { - return in_array($tag, array_merge( - $this->tag_whitelist, - array_keys($this->config->getFilterWhitelistedTags(array())) - )); - } - - /** - * Detect if an image tag is a pixel tracker. - * - * @param string $tag Tag name - * @param array $attributes Tag attributes - * - * @return bool - */ - public function isPixelTracker($tag, array $attributes) - { - return $tag === 'img' && - isset($attributes['height']) && isset($attributes['width']) && - $attributes['height'] == 1 && $attributes['width'] == 1; - } - - /** - * Remove script tags. - * - * @param string $data Input data - * - * @return string - */ - public function removeBlacklistedTags($data) - { - $dom = XmlParser::getDomDocument($data); - - if ($dom === false) { - return ''; - } - - $xpath = new DOMXpath($dom); - - $nodes = $xpath->query(implode(' | ', $this->tag_blacklist)); - - foreach ($nodes as $node) { - $node->parentNode->removeChild($node); - } - - return $dom->saveXML(); - } - - /** - * Remove empty tags. - * - * @param string $data Input data - * - * @return string - */ - public function removeEmptyTags($data) - { - return preg_replace('/<([^<\/>]*)>([\s]*?|(?R))<\/\1>/imsU', '', $data); - } - - /** - * Replace

by only one. - * - * @param string $data Input data - * - * @return string - */ - public function removeMultipleBreakTags($data) - { - return preg_replace("/(\s*)+/", '
', $data); - } - - /** - * Set whitelisted tags adn attributes for each tag. - * - * @param array $values List of tags: ['video' => ['src', 'cover'], 'img' => ['src']] - * - * @return Tag - */ - public function setWhitelistedTags(array $values) - { - $this->tag_whitelist = $values ?: $this->tag_whitelist; - - return $this; - } -} diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Logging/Logger.php b/vendor/fguillot/picofeed/lib/PicoFeed/Logging/Logger.php deleted file mode 100644 index caec463..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Logging/Logger.php +++ /dev/null @@ -1,114 +0,0 @@ -format('Y-m-d H:i:s').'] '.$message; - } - } - - /** - * Get all logged messages. - * - * @static - * - * @return array - */ - public static function getMessages() - { - return self::$messages; - } - - /** - * Remove all logged messages. - * - * @static - */ - public static function deleteMessages() - { - self::$messages = array(); - } - - /** - * Set a different timezone. - * - * @static - * - * @see http://php.net/manual/en/timezones.php - * - * @param string $timezone Timezone - */ - public static function setTimeZone($timezone) - { - self::$timezone = $timezone ?: self::$timezone; - } - - /** - * Get all messages serialized into a string. - * - * @static - * - * @return string - */ - public static function toString() - { - return implode(PHP_EOL, self::$messages).PHP_EOL; - } -} diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Parser/Atom.php b/vendor/fguillot/picofeed/lib/PicoFeed/Parser/Atom.php deleted file mode 100644 index 356453c..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Parser/Atom.php +++ /dev/null @@ -1,366 +0,0 @@ - 'http://www.w3.org/2005/Atom', - ); - - /** - * Get the path to the items XML tree. - * - * @param SimpleXMLElement $xml Feed xml - * - * @return SimpleXMLElement - */ - public function getItemsTree(SimpleXMLElement $xml) - { - return XmlParser::getXPathResult($xml, 'atom:entry', $this->namespaces) - ?: XmlParser::getXPathResult($xml, 'entry'); - } - - /** - * Find the feed url. - * - * @param SimpleXMLElement $xml Feed xml - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - public function findFeedUrl(SimpleXMLElement $xml, Feed $feed) - { - $feed->feed_url = $this->getUrl($xml, 'self'); - } - - /** - * Find the site url. - * - * @param SimpleXMLElement $xml Feed xml - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - public function findSiteUrl(SimpleXMLElement $xml, Feed $feed) - { - $feed->site_url = $this->getUrl($xml, 'alternate', true); - } - - /** - * Find the feed description. - * - * @param SimpleXMLElement $xml Feed xml - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - public function findFeedDescription(SimpleXMLElement $xml, Feed $feed) - { - $description = XmlParser::getXPathResult($xml, 'atom:subtitle', $this->namespaces) - ?: XmlParser::getXPathResult($xml, 'subtitle'); - - $feed->description = (string) current($description); - } - - /** - * Find the feed logo url. - * - * @param SimpleXMLElement $xml Feed xml - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - public function findFeedLogo(SimpleXMLElement $xml, Feed $feed) - { - $logo = XmlParser::getXPathResult($xml, 'atom:logo', $this->namespaces) - ?: XmlParser::getXPathResult($xml, 'logo'); - - $feed->logo = (string) current($logo); - } - - /** - * Find the feed icon. - * - * @param SimpleXMLElement $xml Feed xml - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - public function findFeedIcon(SimpleXMLElement $xml, Feed $feed) - { - $icon = XmlParser::getXPathResult($xml, 'atom:icon', $this->namespaces) - ?: XmlParser::getXPathResult($xml, 'icon'); - - $feed->icon = (string) current($icon); - } - - /** - * Find the feed title. - * - * @param SimpleXMLElement $xml Feed xml - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - public function findFeedTitle(SimpleXMLElement $xml, Feed $feed) - { - $title = XmlParser::getXPathResult($xml, 'atom:title', $this->namespaces) - ?: XmlParser::getXPathResult($xml, 'title'); - - $feed->title = Filter::stripWhiteSpace((string) current($title)) ?: $feed->getSiteUrl(); - } - - /** - * Find the feed language. - * - * @param SimpleXMLElement $xml Feed xml - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - public function findFeedLanguage(SimpleXMLElement $xml, Feed $feed) - { - $language = XmlParser::getXPathResult($xml, '*[not(self::atom:entry)]/@xml:lang', $this->namespaces) - ?: XmlParser::getXPathResult($xml, '@xml:lang'); - - $feed->language = (string) current($language); - } - - /** - * Find the feed id. - * - * @param SimpleXMLElement $xml Feed xml - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - public function findFeedId(SimpleXMLElement $xml, Feed $feed) - { - $id = XmlParser::getXPathResult($xml, 'atom:id', $this->namespaces) - ?: XmlParser::getXPathResult($xml, 'id'); - - $feed->id = (string) current($id); - } - - /** - * Find the feed date. - * - * @param SimpleXMLElement $xml Feed xml - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - public function findFeedDate(SimpleXMLElement $xml, Feed $feed) - { - $updated = XmlParser::getXPathResult($xml, 'atom:updated', $this->namespaces) - ?: XmlParser::getXPathResult($xml, 'updated'); - - $feed->date = $this->date->getDateTime((string) current($updated)); - } - - /** - * Find the item date. - * - * @param SimpleXMLElement $entry Feed item - * @param Item $item Item object - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - public function findItemDate(SimpleXMLElement $entry, Item $item, Feed $feed) - { - $published = XmlParser::getXPathResult($entry, 'atom:published', $this->namespaces) - ?: XmlParser::getXPathResult($entry, 'published'); - - $updated = XmlParser::getXPathResult($entry, 'atom:updated', $this->namespaces) - ?: XmlParser::getXPathResult($entry, 'updated'); - - $published = !empty($published) ? $this->date->getDateTime((string) current($published)) : null; - $updated = !empty($updated) ? $this->date->getDateTime((string) current($updated)) : null; - - if ($published === null && $updated === null) { - $item->date = $feed->getDate(); // We use the feed date if there is no date for the item - } elseif ($published !== null && $updated !== null) { - $item->date = max($published, $updated); // We use the most recent date between published and updated - } else { - $item->date = $updated ?: $published; - } - } - - /** - * Find the item title. - * - * @param SimpleXMLElement $entry Feed item - * @param Item $item Item object - */ - public function findItemTitle(SimpleXMLElement $entry, Item $item) - { - $title = XmlParser::getXPathResult($entry, 'atom:title', $this->namespaces) - ?: XmlParser::getXPathResult($entry, 'title'); - - $item->title = Filter::stripWhiteSpace((string) current($title)) ?: $item->url; - } - - /** - * Find the item author. - * - * @param SimpleXMLElement $xml Feed - * @param SimpleXMLElement $entry Feed item - * @param \PicoFeed\Parser\Item $item Item object - */ - public function findItemAuthor(SimpleXMLElement $xml, SimpleXMLElement $entry, Item $item) - { - $author = XmlParser::getXPathResult($entry, 'atom:author/atom:name', $this->namespaces) - ?: XmlParser::getXPathResult($entry, 'author/name') - ?: XmlParser::getXPathResult($xml, 'atom:author/atom:name', $this->namespaces) - ?: XmlParser::getXPathResult($xml, 'author/name'); - - $item->author = (string) current($author); - } - - /** - * Find the item content. - * - * @param SimpleXMLElement $entry Feed item - * @param \PicoFeed\Parser\Item $item Item object - */ - public function findItemContent(SimpleXMLElement $entry, Item $item) - { - $item->content = $this->getContent($entry); - } - - /** - * Find the item URL. - * - * @param SimpleXMLElement $entry Feed item - * @param \PicoFeed\Parser\Item $item Item object - */ - public function findItemUrl(SimpleXMLElement $entry, Item $item) - { - $item->url = $this->getUrl($entry, 'alternate', true); - } - - /** - * Genereate the item id. - * - * @param SimpleXMLElement $entry Feed item - * @param \PicoFeed\Parser\Item $item Item object - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - public function findItemId(SimpleXMLElement $entry, Item $item, Feed $feed) - { - $id = XmlParser::getXPathResult($entry, 'atom:id', $this->namespaces) - ?: XmlParser::getXPathResult($entry, 'id'); - - if (!empty($id)) { - $item->id = $this->generateId((string) current($id)); - } else { - $item->id = $this->generateId( - $item->getTitle(), $item->getUrl(), $item->getContent() - ); - } - } - - /** - * Find the item enclosure. - * - * @param SimpleXMLElement $entry Feed item - * @param \PicoFeed\Parser\Item $item Item object - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - public function findItemEnclosure(SimpleXMLElement $entry, Item $item, Feed $feed) - { - $enclosure = $this->findLink($entry, 'enclosure'); - - if ($enclosure) { - $item->enclosure_url = Url::resolve((string) $enclosure['href'], $feed->getSiteUrl()); - $item->enclosure_type = (string) $enclosure['type']; - } - } - - /** - * Find the item language. - * - * @param SimpleXMLElement $entry Feed item - * @param \PicoFeed\Parser\Item $item Item object - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - public function findItemLanguage(SimpleXMLElement $entry, Item $item, Feed $feed) - { - $language = XmlParser::getXPathResult($entry, './/@xml:lang'); - - $item->language = (string) current($language) ?: $feed->language; - } - - /** - * Get the URL from a link tag. - * - * @param SimpleXMLElement $xml XML tag - * @param string $rel Link relationship: alternate, enclosure, related, self, via - * - * @return string - */ - private function getUrl(SimpleXMLElement $xml, $rel, $fallback = false) - { - $link = $this->findLink($xml, $rel); - - if ($link) { - return (string) $link['href']; - } - - if ($fallback) { - $link = $this->findLink($xml, ''); - - return $link ? (string) $link['href'] : ''; - } - - return ''; - } - - /** - * Get a link tag that match a relationship. - * - * @param SimpleXMLElement $xml XML tag - * @param string $rel Link relationship: alternate, enclosure, related, self, via - * - * @return SimpleXMLElement|null - */ - private function findLink(SimpleXMLElement $xml, $rel) - { - $links = XmlParser::getXPathResult($xml, 'atom:link', $this->namespaces) - ?: XmlParser::getXPathResult($xml, 'link'); - - foreach ($links as $link) { - if ($rel === (string) $link['rel']) { - return $link; - } - } - - return; - } - - /** - * Get the entry content. - * - * @param SimpleXMLElement $entry XML Entry - * - * @return string - */ - private function getContent(SimpleXMLElement $entry) - { - $content = current( - XmlParser::getXPathResult($entry, 'atom:content', $this->namespaces) - ?: XmlParser::getXPathResult($entry, 'content') - ); - - if (!empty($content) && count($content->children())) { - $xml_string = ''; - - foreach ($content->children() as $child) { - $xml_string .= $child->asXML(); - } - - return $xml_string; - } elseif (trim((string) $content) !== '') { - return (string) $content; - } - - $summary = XmlParser::getXPathResult($entry, 'atom:summary', $this->namespaces) - ?: XmlParser::getXPathResult($entry, 'summary'); - - return (string) current($summary); - } -} diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Parser/DateParser.php b/vendor/fguillot/picofeed/lib/PicoFeed/Parser/DateParser.php deleted file mode 100644 index e4d08b5..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Parser/DateParser.php +++ /dev/null @@ -1,113 +0,0 @@ - length ]. - * - * @var array - */ - public $formats = array( - DATE_ATOM => null, - DATE_RSS => null, - DATE_COOKIE => null, - DATE_ISO8601 => null, - DATE_RFC822 => null, - DATE_RFC850 => null, - DATE_RFC1036 => null, - DATE_RFC1123 => null, - DATE_RFC2822 => null, - DATE_RFC3339 => null, - 'D, d M Y H:i:s' => 25, - 'D, d M Y h:i:s' => 25, - 'D M d Y H:i:s' => 24, - 'j M Y H:i:s' => 20, - 'Y-m-d H:i:s' => 19, - 'Y-m-d\TH:i:s' => 19, - 'd/m/Y H:i:s' => 19, - 'D, d M Y' => 16, - 'Y-m-d' => 10, - 'd-m-Y' => 10, - 'm-d-Y' => 10, - 'd.m.Y' => 10, - 'm.d.Y' => 10, - 'd/m/Y' => 10, - 'm/d/Y' => 10, - ); - - /** - * Try to parse all date format for broken feeds. - * - * @param string $value Original date format - * - * @return DateTime - */ - public function getDateTime($value) - { - $value = trim($value); - - foreach ($this->formats as $format => $length) { - $truncated_value = $value; - if ($length !== null) { - $truncated_value = substr($truncated_value, 0, $length); - } - - $date = $this->getValidDate($format, $truncated_value); - if ($date !== false) { - return $date; - } - } - - return $this->getCurrentDateTime(); - } - - /** - * Get a valid date from a given format. - * - * @param string $format Date format - * @param string $value Original date value - * - * @return DateTime|bool - */ - public function getValidDate($format, $value) - { - $date = DateTime::createFromFormat($format, $value, new DateTimeZone($this->timezone)); - - if ($date !== false) { - $errors = DateTime::getLastErrors(); - - if ($errors['error_count'] === 0 && $errors['warning_count'] === 0) { - return $date; - } - } - - return false; - } - - /** - * Get the current datetime. - * - * @return DateTime - */ - public function getCurrentDateTime() - { - return new DateTime('now', new DateTimeZone($this->timezone)); - } -} diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Parser/Feed.php b/vendor/fguillot/picofeed/lib/PicoFeed/Parser/Feed.php deleted file mode 100644 index bf2bacf..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Parser/Feed.php +++ /dev/null @@ -1,194 +0,0 @@ -$property.PHP_EOL; - } - - $output .= 'Feed::date = '.$this->date->format(DATE_RFC822).PHP_EOL; - $output .= 'Feed::isRTL() = '.($this->isRTL() ? 'true' : 'false').PHP_EOL; - $output .= 'Feed::items = '.count($this->items).' items'.PHP_EOL; - - foreach ($this->items as $item) { - $output .= '----'.PHP_EOL; - $output .= $item; - } - - return $output; - } - - /** - * Get title. - */ - public function getTitle() - { - return $this->title; - } - - /** - * Get description. - */ - public function getDescription() - { - return $this->description; - } - - /** - * Get the logo url. - */ - public function getLogo() - { - return $this->logo; - } - - /** - * Get the icon url. - */ - public function getIcon() - { - return $this->icon; - } - - /** - * Get feed url. - */ - public function getFeedUrl() - { - return $this->feed_url; - } - - /** - * Get site url. - */ - public function getSiteUrl() - { - return $this->site_url; - } - - /** - * Get date. - */ - public function getDate() - { - return $this->date; - } - - /** - * Get language. - */ - public function getLanguage() - { - return $this->language; - } - - /** - * Get id. - */ - public function getId() - { - return $this->id; - } - - /** - * Get feed items. - */ - public function getItems() - { - return $this->items; - } - - /** - * Return true if the feed is "Right to Left". - * - * @return bool - */ - public function isRTL() - { - return Parser::isLanguageRTL($this->language); - } -} diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Parser/Item.php b/vendor/fguillot/picofeed/lib/PicoFeed/Parser/Item.php deleted file mode 100644 index 22d7c59..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Parser/Item.php +++ /dev/null @@ -1,230 +0,0 @@ -xml, $query, $this->namespaces); - - if ($elements === false) { // xPath error - return false; - } - - return array_map(function ($element) { return (string) $element;}, $elements); - } - - /** - * Return item information. - */ - public function __toString() - { - $output = ''; - - foreach (array('id', 'title', 'url', 'language', 'author', 'enclosure_url', 'enclosure_type') as $property) { - $output .= 'Item::'.$property.' = '.$this->$property.PHP_EOL; - } - - $output .= 'Item::date = '.$this->date->format(DATE_RFC822).PHP_EOL; - $output .= 'Item::isRTL() = '.($this->isRTL() ? 'true' : 'false').PHP_EOL; - $output .= 'Item::content = '.strlen($this->content).' bytes'.PHP_EOL; - - return $output; - } - - /** - * Get title. - */ - public function getTitle() - { - return $this->title; - } - - /** - * Get url. - */ - public function getUrl() - { - return $this->url; - } - - /** - * Get id. - */ - public function getId() - { - return $this->id; - } - - /** - * Get date. - */ - public function getDate() - { - return $this->date; - } - - /** - * Get content. - */ - public function getContent() - { - return $this->content; - } - - /** - * Get enclosure url. - */ - public function getEnclosureUrl() - { - return $this->enclosure_url; - } - - /** - * Get enclosure type. - */ - public function getEnclosureType() - { - return $this->enclosure_type; - } - - /** - * Get language. - */ - public function getLanguage() - { - return $this->language; - } - - /** - * Get author. - */ - public function getAuthor() - { - return $this->author; - } - - /** - * Return true if the item is "Right to Left". - * - * @return bool - */ - public function isRTL() - { - return Parser::isLanguageRTL($this->language); - } -} diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Parser/MalformedXmlException.php b/vendor/fguillot/picofeed/lib/PicoFeed/Parser/MalformedXmlException.php deleted file mode 100644 index 05b0387..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Parser/MalformedXmlException.php +++ /dev/null @@ -1,12 +0,0 @@ -date = new DateParser(); - $this->fallback_url = $fallback_url; - $xml_encoding = XmlParser::getEncodingFromXmlTag($content); - - // Strip XML tag to avoid multiple encoding/decoding in the next XML processing - $this->content = Filter::stripXmlTag($content); - - // Encode everything in UTF-8 - Logger::setMessage(get_called_class().': HTTP Encoding "'.$http_encoding.'" ; XML Encoding "'.$xml_encoding.'"'); - $this->content = Encoding::convert($this->content, $xml_encoding ?: $http_encoding); - } - - /** - * Parse the document. - * - * @return \PicoFeed\Parser\Feed - */ - public function execute() - { - Logger::setMessage(get_called_class().': begin parsing'); - - $xml = XmlParser::getSimpleXml($this->content); - - if ($xml === false) { - Logger::setMessage(get_called_class().': Applying XML workarounds'); - $this->content = Filter::normalizeData($this->content); - $xml = XmlParser::getSimpleXml($this->content); - - if ($xml === false) { - Logger::setMessage(get_called_class().': XML parsing error'); - Logger::setMessage(XmlParser::getErrors()); - throw new MalformedXmlException('XML parsing error'); - } - } - - $this->used_namespaces = $xml->getNamespaces(true); - $xml = $this->registerSupportedNamespaces($xml); - - $feed = new Feed(); - - $this->findFeedUrl($xml, $feed); - $this->checkFeedUrl($feed); - - $this->findSiteUrl($xml, $feed); - $this->checkSiteUrl($feed); - - $this->findFeedTitle($xml, $feed); - $this->findFeedDescription($xml, $feed); - $this->findFeedLanguage($xml, $feed); - $this->findFeedId($xml, $feed); - $this->findFeedDate($xml, $feed); - $this->findFeedLogo($xml, $feed); - $this->findFeedIcon($xml, $feed); - - foreach ($this->getItemsTree($xml) as $entry) { - $entry = $this->registerSupportedNamespaces($entry); - - $item = new Item(); - $item->xml = $entry; - $item->namespaces = $this->used_namespaces; - - $this->findItemAuthor($xml, $entry, $item); - - $this->findItemUrl($entry, $item); - $this->checkItemUrl($feed, $item); - - $this->findItemTitle($entry, $item); - $this->findItemContent($entry, $item); - - // Id generation can use the item url/title/content (order is important) - $this->findItemId($entry, $item, $feed); - - $this->findItemDate($entry, $item, $feed); - $this->findItemEnclosure($entry, $item, $feed); - $this->findItemLanguage($entry, $item, $feed); - - // Order is important (avoid double filtering) - $this->filterItemContent($feed, $item); - $this->scrapWebsite($item); - - $feed->items[] = $item; - } - - Logger::setMessage(get_called_class().PHP_EOL.$feed); - - return $feed; - } - - /** - * Check if the feed url is correct. - * - * @param Feed $feed Feed object - */ - public function checkFeedUrl(Feed $feed) - { - if ($feed->getFeedUrl() === '') { - $feed->feed_url = $this->fallback_url; - } else { - $feed->feed_url = Url::resolve($feed->getFeedUrl(), $this->fallback_url); - } - } - - /** - * Check if the site url is correct. - * - * @param Feed $feed Feed object - */ - public function checkSiteUrl(Feed $feed) - { - if ($feed->getSiteUrl() === '') { - $feed->site_url = Url::base($feed->getFeedUrl()); - } else { - $feed->site_url = Url::resolve($feed->getSiteUrl(), $this->fallback_url); - } - } - - /** - * Check if the item url is correct. - * - * @param Feed $feed Feed object - * @param Item $item Item object - */ - public function checkItemUrl(Feed $feed, Item $item) - { - $item->url = Url::resolve($item->getUrl(), $feed->getSiteUrl()); - } - - /** - * Fetch item content with the content grabber. - * - * @param Item $item Item object - */ - public function scrapWebsite(Item $item) - { - if ($this->enable_grabber && !in_array($item->getUrl(), $this->grabber_ignore_urls)) { - $grabber = new Scraper($this->config); - $grabber->setUrl($item->getUrl()); - - if ($this->grabber_needs_rule_file) { - $grabber->disableCandidateParser(); - } - - $grabber->execute(); - - if ($grabber->hasRelevantContent()) { - $item->content = $grabber->getFilteredContent(); - } - } - } - - /** - * Filter HTML for entry content. - * - * @param Feed $feed Feed object - * @param Item $item Item object - */ - public function filterItemContent(Feed $feed, Item $item) - { - if ($this->isFilteringEnabled()) { - $filter = Filter::html($item->getContent(), $feed->getSiteUrl()); - $filter->setConfig($this->config); - $item->content = $filter->execute(); - } else { - Logger::setMessage(get_called_class().': Content filtering disabled'); - } - } - - /** - * Generate a unique id for an entry (hash all arguments). - * - * @return string - */ - public function generateId() - { - return hash($this->hash_algo, implode(func_get_args())); - } - - /** - * Return true if the given language is "Right to Left". - * - * @static - * - * @param string $language Language: fr-FR, en-US - * - * @return bool - */ - public static function isLanguageRTL($language) - { - $language = strtolower($language); - - $rtl_languages = array( - 'ar', // Arabic (ar-**) - 'fa', // Farsi (fa-**) - 'ur', // Urdu (ur-**) - 'ps', // Pashtu (ps-**) - 'syr', // Syriac (syr-**) - 'dv', // Divehi (dv-**) - 'he', // Hebrew (he-**) - 'yi', // Yiddish (yi-**) - ); - - foreach ($rtl_languages as $prefix) { - if (strpos($language, $prefix) === 0) { - return true; - } - } - - return false; - } - - /** - * Set Hash algorithm used for id generation. - * - * @param string $algo Algorithm name - * - * @return \PicoFeed\Parser\Parser - */ - public function setHashAlgo($algo) - { - $this->hash_algo = $algo ?: $this->hash_algo; - - return $this; - } - - /** - * Set a different timezone. - * - * @see http://php.net/manual/en/timezones.php - * - * @param string $timezone Timezone - * - * @return \PicoFeed\Parser\Parser - */ - public function setTimezone($timezone) - { - if ($timezone) { - $this->date->timezone = $timezone; - } - - return $this; - } - - /** - * Set config object. - * - * @param \PicoFeed\Config\Config $config Config instance - * - * @return \PicoFeed\Parser\Parser - */ - public function setConfig($config) - { - $this->config = $config; - - return $this; - } - - /** - * Enable the content grabber. - * - * @return \PicoFeed\Parser\Parser - */ - public function disableContentFiltering() - { - $this->enable_filter = false; - } - - /** - * Return true if the content filtering is enabled. - * - * @return bool - */ - public function isFilteringEnabled() - { - if ($this->config === null) { - return $this->enable_filter; - } - - return $this->config->getContentFiltering($this->enable_filter); - } - - /** - * Enable the content grabber. - * - * @param bool $needs_rule_file true if only pages with rule files should be - * scraped - * - * @return \PicoFeed\Parser\Parser - */ - public function enableContentGrabber($needs_rule_file = false) - { - $this->enable_grabber = true; - $this->grabber_needs_rule_file = $needs_rule_file; - } - - /** - * Set ignored URLs for the content grabber. - * - * @param array $urls URLs - * - * @return \PicoFeed\Parser\Parser - */ - public function setGrabberIgnoreUrls(array $urls) - { - $this->grabber_ignore_urls = $urls; - } - - /** - * Register all supported namespaces to be used within an xpath query. - * - * @param SimpleXMLElement $xml Feed xml - * - * @return SimpleXMLElement - */ - public function registerSupportedNamespaces(SimpleXMLElement $xml) - { - foreach ($this->namespaces as $prefix => $ns) { - $xml->registerXPathNamespace($prefix, $ns); - } - - return $xml; - } - - /** - * Find the feed url. - * - * @param SimpleXMLElement $xml Feed xml - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - abstract public function findFeedUrl(SimpleXMLElement $xml, Feed $feed); - - /** - * Find the site url. - * - * @param SimpleXMLElement $xml Feed xml - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - abstract public function findSiteUrl(SimpleXMLElement $xml, Feed $feed); - - /** - * Find the feed title. - * - * @param SimpleXMLElement $xml Feed xml - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - abstract public function findFeedTitle(SimpleXMLElement $xml, Feed $feed); - - /** - * Find the feed description. - * - * @param SimpleXMLElement $xml Feed xml - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - abstract public function findFeedDescription(SimpleXMLElement $xml, Feed $feed); - - /** - * Find the feed language. - * - * @param SimpleXMLElement $xml Feed xml - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - abstract public function findFeedLanguage(SimpleXMLElement $xml, Feed $feed); - - /** - * Find the feed id. - * - * @param SimpleXMLElement $xml Feed xml - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - abstract public function findFeedId(SimpleXMLElement $xml, Feed $feed); - - /** - * Find the feed date. - * - * @param SimpleXMLElement $xml Feed xml - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - abstract public function findFeedDate(SimpleXMLElement $xml, Feed $feed); - - /** - * Find the feed logo url. - * - * @param SimpleXMLElement $xml Feed xml - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - abstract public function findFeedLogo(SimpleXMLElement $xml, Feed $feed); - - /** - * Find the feed icon. - * - * @param SimpleXMLElement $xml Feed xml - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - abstract public function findFeedIcon(SimpleXMLElement $xml, Feed $feed); - - /** - * Get the path to the items XML tree. - * - * @param SimpleXMLElement $xml Feed xml - * - * @return SimpleXMLElement - */ - abstract public function getItemsTree(SimpleXMLElement $xml); - - /** - * Find the item author. - * - * @param SimpleXMLElement $xml Feed - * @param SimpleXMLElement $entry Feed item - * @param \PicoFeed\Parser\Item $item Item object - */ - abstract public function findItemAuthor(SimpleXMLElement $xml, SimpleXMLElement $entry, Item $item); - - /** - * Find the item URL. - * - * @param SimpleXMLElement $entry Feed item - * @param \PicoFeed\Parser\Item $item Item object - */ - abstract public function findItemUrl(SimpleXMLElement $entry, Item $item); - - /** - * Find the item title. - * - * @param SimpleXMLElement $entry Feed item - * @param \PicoFeed\Parser\Item $item Item object - */ - abstract public function findItemTitle(SimpleXMLElement $entry, Item $item); - - /** - * Genereate the item id. - * - * @param SimpleXMLElement $entry Feed item - * @param \PicoFeed\Parser\Item $item Item object - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - abstract public function findItemId(SimpleXMLElement $entry, Item $item, Feed $feed); - - /** - * Find the item date. - * - * @param SimpleXMLElement $entry Feed item - * @param Item $item Item object - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - abstract public function findItemDate(SimpleXMLElement $entry, Item $item, Feed $feed); - - /** - * Find the item content. - * - * @param SimpleXMLElement $entry Feed item - * @param \PicoFeed\Parser\Item $item Item object - */ - abstract public function findItemContent(SimpleXMLElement $entry, Item $item); - - /** - * Find the item enclosure. - * - * @param SimpleXMLElement $entry Feed item - * @param \PicoFeed\Parser\Item $item Item object - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - abstract public function findItemEnclosure(SimpleXMLElement $entry, Item $item, Feed $feed); - - /** - * Find the item language. - * - * @param SimpleXMLElement $entry Feed item - * @param \PicoFeed\Parser\Item $item Item object - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - abstract public function findItemLanguage(SimpleXMLElement $entry, Item $item, Feed $feed); -} diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Parser/ParserException.php b/vendor/fguillot/picofeed/lib/PicoFeed/Parser/ParserException.php deleted file mode 100644 index cfd102b..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Parser/ParserException.php +++ /dev/null @@ -1,14 +0,0 @@ - 'http://purl.org/rss/1.0/', - 'dc' => 'http://purl.org/dc/elements/1.1/', - 'content' => 'http://purl.org/rss/1.0/modules/content/', - 'feedburner' => 'http://rssnamespace.org/feedburner/ext/1.0', - ); - - /** - * Get the path to the items XML tree. - * - * @param SimpleXMLElement $xml Feed xml - * - * @return SimpleXMLElement - */ - public function getItemsTree(SimpleXMLElement $xml) - { - return XmlParser::getXPathResult($xml, 'rss:item', $this->namespaces) - ?: XmlParser::getXPathResult($xml, 'item'); - } - - /** - * Find the feed url. - * - * @param SimpleXMLElement $xml Feed xml - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - public function findFeedUrl(SimpleXMLElement $xml, Feed $feed) - { - $feed->feed_url = ''; - } - - /** - * Find the site url. - * - * @param SimpleXMLElement $xml Feed xml - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - public function findSiteUrl(SimpleXMLElement $xml, Feed $feed) - { - $site_url = XmlParser::getXPathResult($xml, 'rss:channel/rss:link', $this->namespaces) - ?: XmlParser::getXPathResult($xml, 'channel/link'); - - $feed->site_url = (string) current($site_url); - } - - /** - * Find the feed description. - * - * @param SimpleXMLElement $xml Feed xml - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - public function findFeedDescription(SimpleXMLElement $xml, Feed $feed) - { - $description = XmlParser::getXPathResult($xml, 'rss:channel/rss:description', $this->namespaces) - ?: XmlParser::getXPathResult($xml, 'channel/description'); - - $feed->description = (string) current($description); - } - - /** - * Find the feed logo url. - * - * @param SimpleXMLElement $xml Feed xml - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - public function findFeedLogo(SimpleXMLElement $xml, Feed $feed) - { - $logo = XmlParser::getXPathResult($xml, 'rss:image/rss:url', $this->namespaces) - ?: XmlParser::getXPathResult($xml, 'image/url'); - - $feed->logo = (string) current($logo); - } - - /** - * Find the feed icon. - * - * @param SimpleXMLElement $xml Feed xml - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - public function findFeedIcon(SimpleXMLElement $xml, Feed $feed) - { - $feed->icon = ''; - } - - /** - * Find the feed title. - * - * @param SimpleXMLElement $xml Feed xml - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - public function findFeedTitle(SimpleXMLElement $xml, Feed $feed) - { - $title = XmlParser::getXPathResult($xml, 'rss:channel/rss:title', $this->namespaces) - ?: XmlParser::getXPathResult($xml, 'channel/title'); - - $feed->title = Filter::stripWhiteSpace((string) current($title)) ?: $feed->getSiteUrl(); - } - - /** - * Find the feed language. - * - * @param SimpleXMLElement $xml Feed xml - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - public function findFeedLanguage(SimpleXMLElement $xml, Feed $feed) - { - $language = XmlParser::getXPathResult($xml, 'rss:channel/dc:language', $this->namespaces) - ?: XmlParser::getXPathResult($xml, 'channel/dc:language', $this->namespaces); - - $feed->language = (string) current($language); - } - - /** - * Find the feed id. - * - * @param SimpleXMLElement $xml Feed xml - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - public function findFeedId(SimpleXMLElement $xml, Feed $feed) - { - $feed->id = $feed->getFeedUrl() ?: $feed->getSiteUrl(); - } - - /** - * Find the feed date. - * - * @param SimpleXMLElement $xml Feed xml - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - public function findFeedDate(SimpleXMLElement $xml, Feed $feed) - { - $date = XmlParser::getXPathResult($xml, 'rss:channel/dc:date', $this->namespaces) - ?: XmlParser::getXPathResult($xml, 'channel/dc:date', $this->namespaces); - - $feed->date = $this->date->getDateTime((string) current($date)); - } - - /** - * Find the item date. - * - * @param SimpleXMLElement $entry Feed item - * @param Item $item Item object - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - public function findItemDate(SimpleXMLElement $entry, Item $item, Feed $feed) - { - $date = XmlParser::getXPathResult($entry, 'dc:date', $this->namespaces); - - $item->date = empty($date) ? $feed->getDate() : $this->date->getDateTime((string) current($date)); - } - - /** - * Find the item title. - * - * @param SimpleXMLElement $entry Feed item - * @param \PicoFeed\Parser\Item $item Item object - */ - public function findItemTitle(SimpleXMLElement $entry, Item $item) - { - $title = XmlParser::getXPathResult($entry, 'rss:title', $this->namespaces) - ?: XmlParser::getXPathResult($entry, 'title'); - - $item->title = Filter::stripWhiteSpace((string) current($title)) ?: $item->url; - } - - /** - * Find the item author. - * - * @param SimpleXMLElement $xml Feed - * @param SimpleXMLElement $entry Feed item - * @param \PicoFeed\Parser\Item $item Item object - */ - public function findItemAuthor(SimpleXMLElement $xml, SimpleXMLElement $entry, Item $item) - { - $author = XmlParser::getXPathResult($entry, 'dc:creator', $this->namespaces) - ?: XmlParser::getXPathResult($xml, 'rss:channel/dc:creator', $this->namespaces) - ?: XmlParser::getXPathResult($xml, 'channel/dc:creator', $this->namespaces); - - $item->author = (string) current($author); - } - - /** - * Find the item content. - * - * @param SimpleXMLElement $entry Feed item - * @param \PicoFeed\Parser\Item $item Item object - */ - public function findItemContent(SimpleXMLElement $entry, Item $item) - { - $content = XmlParser::getXPathResult($entry, 'content:encoded', $this->namespaces); - - if (trim((string) current($content)) === '') { - $content = XmlParser::getXPathResult($entry, 'rss:description', $this->namespaces) - ?: XmlParser::getXPathResult($entry, 'description'); - } - - $item->content = (string) current($content); - } - - /** - * Find the item URL. - * - * @param SimpleXMLElement $entry Feed item - * @param \PicoFeed\Parser\Item $item Item object - */ - public function findItemUrl(SimpleXMLElement $entry, Item $item) - { - $link = XmlParser::getXPathResult($entry, 'feedburner:origLink', $this->namespaces) - ?: XmlParser::getXPathResult($entry, 'rss:link', $this->namespaces) - ?: XmlParser::getXPathResult($entry, 'link'); - - $item->url = trim((string) current($link)); - } - - /** - * Genereate the item id. - * - * @param SimpleXMLElement $entry Feed item - * @param \PicoFeed\Parser\Item $item Item object - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - public function findItemId(SimpleXMLElement $entry, Item $item, Feed $feed) - { - $item->id = $this->generateId( - $item->getTitle(), $item->getUrl(), $item->getContent() - ); - } - - /** - * Find the item enclosure. - * - * @param SimpleXMLElement $entry Feed item - * @param \PicoFeed\Parser\Item $item Item object - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - public function findItemEnclosure(SimpleXMLElement $entry, Item $item, Feed $feed) - { - } - - /** - * Find the item language. - * - * @param SimpleXMLElement $entry Feed item - * @param \PicoFeed\Parser\Item $item Item object - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - public function findItemLanguage(SimpleXMLElement $entry, Item $item, Feed $feed) - { - $language = XmlParser::getXPathResult($entry, 'dc:language', $this->namespaces); - - $item->language = (string) current($language) ?: $feed->language; - } -} diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Parser/Rss20.php b/vendor/fguillot/picofeed/lib/PicoFeed/Parser/Rss20.php deleted file mode 100644 index 005691f..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Parser/Rss20.php +++ /dev/null @@ -1,291 +0,0 @@ - 'http://purl.org/dc/elements/1.1/', - 'content' => 'http://purl.org/rss/1.0/modules/content/', - 'feedburner' => 'http://rssnamespace.org/feedburner/ext/1.0', - 'atom' => 'http://www.w3.org/2005/Atom', - ); - - /** - * Get the path to the items XML tree. - * - * @param SimpleXMLElement $xml Feed xml - * - * @return SimpleXMLElement - */ - public function getItemsTree(SimpleXMLElement $xml) - { - return XmlParser::getXPathResult($xml, 'channel/item'); - } - - /** - * Find the feed url. - * - * @param SimpleXMLElement $xml Feed xml - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - public function findFeedUrl(SimpleXMLElement $xml, Feed $feed) - { - $feed->feed_url = ''; - } - - /** - * Find the site url. - * - * @param SimpleXMLElement $xml Feed xml - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - public function findSiteUrl(SimpleXMLElement $xml, Feed $feed) - { - $site_url = XmlParser::getXPathResult($xml, 'channel/link'); - $feed->site_url = (string) current($site_url); - } - - /** - * Find the feed description. - * - * @param SimpleXMLElement $xml Feed xml - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - public function findFeedDescription(SimpleXMLElement $xml, Feed $feed) - { - $description = XmlParser::getXPathResult($xml, 'channel/description'); - $feed->description = (string) current($description); - } - - /** - * Find the feed logo url. - * - * @param SimpleXMLElement $xml Feed xml - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - public function findFeedLogo(SimpleXMLElement $xml, Feed $feed) - { - $logo = XmlParser::getXPathResult($xml, 'channel/image/url'); - $feed->logo = (string) current($logo); - } - - /** - * Find the feed icon. - * - * @param SimpleXMLElement $xml Feed xml - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - public function findFeedIcon(SimpleXMLElement $xml, Feed $feed) - { - $feed->icon = ''; - } - - /** - * Find the feed title. - * - * @param SimpleXMLElement $xml Feed xml - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - public function findFeedTitle(SimpleXMLElement $xml, Feed $feed) - { - $title = XmlParser::getXPathResult($xml, 'channel/title'); - $feed->title = Filter::stripWhiteSpace((string) current($title)) ?: $feed->getSiteUrl(); - } - - /** - * Find the feed language. - * - * @param SimpleXMLElement $xml Feed xml - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - public function findFeedLanguage(SimpleXMLElement $xml, Feed $feed) - { - $language = XmlParser::getXPathResult($xml, 'channel/language'); - $feed->language = (string) current($language); - } - - /** - * Find the feed id. - * - * @param SimpleXMLElement $xml Feed xml - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - public function findFeedId(SimpleXMLElement $xml, Feed $feed) - { - $feed->id = $feed->getFeedUrl() ?: $feed->getSiteUrl(); - } - - /** - * Find the feed date. - * - * @param SimpleXMLElement $xml Feed xml - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - public function findFeedDate(SimpleXMLElement $xml, Feed $feed) - { - $publish_date = XmlParser::getXPathResult($xml, 'channel/pubDate'); - $update_date = XmlParser::getXPathResult($xml, 'channel/lastBuildDate'); - - $published = !empty($publish_date) ? $this->date->getDateTime((string) current($publish_date)) : null; - $updated = !empty($update_date) ? $this->date->getDateTime((string) current($update_date)) : null; - - if ($published === null && $updated === null) { - $feed->date = $this->date->getCurrentDateTime(); // We use the current date if there is no date for the feed - } elseif ($published !== null && $updated !== null) { - $feed->date = max($published, $updated); // We use the most recent date between published and updated - } else { - $feed->date = $updated ?: $published; - } - } - - /** - * Find the item date. - * - * @param SimpleXMLElement $entry Feed item - * @param Item $item Item object - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - public function findItemDate(SimpleXMLElement $entry, Item $item, Feed $feed) - { - $date = XmlParser::getXPathResult($entry, 'pubDate'); - - $item->date = empty($date) ? $feed->getDate() : $this->date->getDateTime((string) current($date)); - } - - /** - * Find the item title. - * - * @param SimpleXMLElement $entry Feed item - * @param \PicoFeed\Parser\Item $item Item object - */ - public function findItemTitle(SimpleXMLElement $entry, Item $item) - { - $title = XmlParser::getXPathResult($entry, 'title'); - $item->title = Filter::stripWhiteSpace((string) current($title)) ?: $item->url; - } - - /** - * Find the item author. - * - * @param SimpleXMLElement $xml Feed - * @param SimpleXMLElement $entry Feed item - * @param \PicoFeed\Parser\Item $item Item object - */ - public function findItemAuthor(SimpleXMLElement $xml, SimpleXMLElement $entry, Item $item) - { - $author = XmlParser::getXPathResult($entry, 'dc:creator', $this->namespaces) - ?: XmlParser::getXPathResult($entry, 'author') - ?: XmlParser::getXPathResult($xml, 'channel/dc:creator', $this->namespaces) - ?: XmlParser::getXPathResult($xml, 'channel/managingEditor'); - - $item->author = (string) current($author); - } - - /** - * Find the item content. - * - * @param SimpleXMLElement $entry Feed item - * @param \PicoFeed\Parser\Item $item Item object - */ - public function findItemContent(SimpleXMLElement $entry, Item $item) - { - $content = XmlParser::getXPathResult($entry, 'content:encoded', $this->namespaces); - - if (trim((string) current($content)) === '') { - $content = XmlParser::getXPathResult($entry, 'description'); - } - - $item->content = (string) current($content); - } - - /** - * Find the item URL. - * - * @param SimpleXMLElement $entry Feed item - * @param \PicoFeed\Parser\Item $item Item object - */ - public function findItemUrl(SimpleXMLElement $entry, Item $item) - { - $link = XmlParser::getXPathResult($entry, 'feedburner:origLink', $this->namespaces) - ?: XmlParser::getXPathResult($entry, 'link') - ?: XmlParser::getXPathResult($entry, 'atom:link/@href', $this->namespaces); - - if (!empty($link)) { - $item->url = trim((string) current($link)); - } else { - $link = XmlParser::getXPathResult($entry, 'guid'); - $link = trim((string) current($link)); - - if (filter_var($link, FILTER_VALIDATE_URL) !== false) { - $item->url = $link; - } - } - } - - /** - * Genereate the item id. - * - * @param SimpleXMLElement $entry Feed item - * @param \PicoFeed\Parser\Item $item Item object - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - public function findItemId(SimpleXMLElement $entry, Item $item, Feed $feed) - { - $id = (string) current(XmlParser::getXPathResult($entry, 'guid')); - - if ($id) { - $item->id = $this->generateId($id); - } else { - $item->id = $this->generateId( - $item->getTitle(), $item->getUrl(), $item->getContent() - ); - } - } - - /** - * Find the item enclosure. - * - * @param SimpleXMLElement $entry Feed item - * @param \PicoFeed\Parser\Item $item Item object - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - public function findItemEnclosure(SimpleXMLElement $entry, Item $item, Feed $feed) - { - if (isset($entry->enclosure)) { - $enclosure_url = XmlParser::getXPathResult($entry, 'feedburner:origEnclosureLink', $this->namespaces) - ?: XmlParser::getXPathResult($entry, 'enclosure/@url'); - - $enclosure_type = XmlParser::getXPathResult($entry, 'enclosure/@type'); - - $item->enclosure_url = Url::resolve((string) current($enclosure_url), $feed->getSiteUrl()); - $item->enclosure_type = (string) current($enclosure_type); - } - } - - /** - * Find the item language. - * - * @param SimpleXMLElement $entry Feed item - * @param \PicoFeed\Parser\Item $item Item object - * @param \PicoFeed\Parser\Feed $feed Feed object - */ - public function findItemLanguage(SimpleXMLElement $entry, Item $item, Feed $feed) - { - $language = XmlParser::getXPathResult($entry, 'dc:language', $this->namespaces); - - $item->language = (string) current($language) ?: $feed->language; - } -} diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Parser/Rss91.php b/vendor/fguillot/picofeed/lib/PicoFeed/Parser/Rss91.php deleted file mode 100644 index fe195e8..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Parser/Rss91.php +++ /dev/null @@ -1,12 +0,0 @@ -childNodes->length === 0) { - return false; - } - - return $dom; - } - - /** - * Small wrapper around ZendXml to turn their exceptions into picoFeed - * exceptions - * @param $input the xml to load - * @param $dom pass in a dom document or use null/omit if simpleXml should - * be used - */ - private static function scan($input, $dom=null) - { - try { - return Security::scan($input, $dom); - } catch(\ZendXml\Exception\RuntimeException $e) { - throw new XmlEntityException($e->getMessage()); - } - } - - /** - * Load HTML document by using a DomDocument instance or return false on failure. - * - * @static - * - * @param string $input XML content - * - * @return \DOMDocument - */ - public static function getHtmlDocument($input) - { - $dom = new DomDocument(); - - if (empty($input)) { - return $dom; - } - - libxml_use_internal_errors(true); - - if (version_compare(PHP_VERSION, '5.4.0', '>=')) { - $dom->loadHTML($input, LIBXML_NONET); - } else { - $dom->loadHTML($input); - } - - return $dom; - } - - /** - * Convert a HTML document to XML. - * - * @static - * - * @param string $html HTML document - * - * @return string - */ - public static function htmlToXml($html) - { - $dom = self::getHtmlDocument(''.$html); - - return $dom->saveXML($dom->getElementsByTagName('body')->item(0)); - } - - /** - * Get XML parser errors. - * - * @static - * - * @return string - */ - public static function getErrors() - { - $errors = array(); - - foreach (libxml_get_errors() as $error) { - $errors[] = sprintf('XML error: %s (Line: %d - Column: %d - Code: %d)', - $error->message, - $error->line, - $error->column, - $error->code - ); - } - - return implode(', ', $errors); - } - - /** - * Get the encoding from a xml tag. - * - * @static - * - * @param string $data Input data - * - * @return string - */ - public static function getEncodingFromXmlTag($data) - { - $encoding = ''; - - if (strpos($data, '')); - $data = str_replace("'", '"', $data); - - $p1 = strpos($data, 'encoding='); - $p2 = strpos($data, '"', $p1 + 10); - - if ($p1 !== false && $p2 !== false) { - $encoding = substr($data, $p1 + 10, $p2 - $p1 - 10); - $encoding = strtolower($encoding); - } - } - - return $encoding; - } - - /** - * Get the charset from a meta tag. - * - * @static - * - * @param string $data Input data - * - * @return string - */ - public static function getEncodingFromMetaTag($data) - { - $encoding = ''; - - if (preg_match('/;]+)/i', $data, $match) === 1) { - $encoding = strtolower($match[1]); - } - - return $encoding; - } - - /** - * Rewrite XPath query to use namespace-uri and local-name derived from prefix. - * - * @param string $query XPath query - * @param array $ns Prefix to namespace URI mapping - * - * @return string - */ - public static function replaceXPathPrefixWithNamespaceURI($query, array $ns) - { - return preg_replace_callback('/([A-Z0-9]+):([A-Z0-9]+)/iu', function ($matches) use ($ns) { - // don't try to map the special prefix XML - if (strtolower($matches[1]) === 'xml') { - return $matches[0]; - } - - return '*[namespace-uri()="'.$ns[$matches[1]].'" and local-name()="'.$matches[2].'"]'; - }, - $query); - } - - /** - * Get the result elements of a XPath query. - * - * @param \SimpleXMLElement $xml XML element - * @param string $query XPath query - * @param array $ns Prefix to namespace URI mapping - * - * @return \SimpleXMLElement - */ - public static function getXPathResult(SimpleXMLElement $xml, $query, array $ns = array()) - { - if (!empty($ns)) { - $query = static::replaceXPathPrefixWithNamespaceURI($query, $ns); - } - - return $xml->xpath($query); - } -} diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/PicoFeedException.php b/vendor/fguillot/picofeed/lib/PicoFeed/PicoFeedException.php deleted file mode 100644 index 2de9e4b..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/PicoFeedException.php +++ /dev/null @@ -1,14 +0,0 @@ -config = $config ?: new Config(); - } - - /** - * Get the icon file content (available only after the download). - * - * @return string - */ - public function getContent() - { - return $this->content; - } - - /** - * Get the icon file type (available only after the download). - * - * @return string - */ - public function getType() - { - foreach ($this->types as $type) { - if (strpos($this->content_type, $type) === 0) { - return $type; - } - } - - return 'image/x-icon'; - } - - /** - * Get data URI (http://en.wikipedia.org/wiki/Data_URI_scheme). - * - * @return string - */ - public function getDataUri() - { - if (empty($this->content)) { - return ''; - } - - return sprintf( - 'data:%s;base64,%s', - $this->getType(), - base64_encode($this->content) - ); - } - - /** - * Download and check if a resource exists. - * - * @param string $url URL - * - * @return \PicoFeed\Client Client instance - */ - public function download($url) - { - $client = Client::getInstance(); - $client->setConfig($this->config); - - Logger::setMessage(get_called_class().' Download => '.$url); - - try { - $client->execute($url); - } catch (ClientException $e) { - Logger::setMessage(get_called_class().' Download Failed => '.$e->getMessage()); - } - - return $client; - } - - /** - * Check if a remote file exists. - * - * @param string $url URL - * - * @return bool - */ - public function exists($url) - { - return $this->download($url)->getContent() !== ''; - } - - /** - * Get the icon link for a website. - * - * @param string $website_link URL - * @param string $favicon_link optional URL - * - * @return string - */ - public function find($website_link, $favicon_link = '') - { - $website = new Url($website_link); - - if ($favicon_link !== '') { - $icons = array($favicon_link); - } else { - $icons = $this->extract($this->download($website->getBaseUrl('/'))->getContent()); - $icons[] = $website->getBaseUrl('/favicon.ico'); - } - - foreach ($icons as $icon_link) { - $icon_link = Url::resolve($icon_link, $website); - $resource = $this->download($icon_link); - $this->content = $resource->getContent(); - $this->content_type = $resource->getContentType(); - - if ($this->content !== '') { - return $icon_link; - } elseif ($favicon_link !== '') { - return $this->find($website_link); - } - } - - return ''; - } - - /** - * Extract the icon links from the HTML. - * - * @param string $html HTML - * - * @return array - */ - public function extract($html) - { - $icons = array(); - - if (empty($html)) { - return $icons; - } - - $dom = XmlParser::getHtmlDocument($html); - - $xpath = new DOMXpath($dom); - $elements = $xpath->query('//link[@rel="icon" or @rel="shortcut icon" or @rel="icon shortcut"]'); - - for ($i = 0; $i < $elements->length; ++$i) { - $icons[] = $elements->item($i)->getAttribute('href'); - } - - return $icons; - } -} diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Reader/Reader.php b/vendor/fguillot/picofeed/lib/PicoFeed/Reader/Reader.php deleted file mode 100644 index cfe5171..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Reader/Reader.php +++ /dev/null @@ -1,209 +0,0 @@ - '//feed', - 'Rss20' => '//rss[@version="2.0"]', - 'Rss92' => '//rss[@version="0.92"]', - 'Rss91' => '//rss[@version="0.91"]', - 'Rss10' => '//rdf', - ); - - /** - * Config class instance. - * - * @var \PicoFeed\Config\Config - */ - private $config; - - /** - * Constructor. - * - * @param \PicoFeed\Config\Config $config Config class instance - */ - public function __construct(Config $config = null) - { - $this->config = $config ?: new Config(); - Logger::setTimezone($this->config->getTimezone()); - } - - /** - * Download a feed (no discovery). - * - * @param string $url Feed url - * @param string $last_modified Last modified HTTP header - * @param string $etag Etag HTTP header - * @param string $username HTTP basic auth username - * @param string $password HTTP basic auth password - * - * @return \PicoFeed\Client\Client - */ - public function download($url, $last_modified = '', $etag = '', $username = '', $password = '') - { - $url = $this->prependScheme($url); - - return Client::getInstance() - ->setConfig($this->config) - ->setLastModified($last_modified) - ->setEtag($etag) - ->setUsername($username) - ->setPassword($password) - ->execute($url); - } - - /** - * Discover and download a feed. - * - * @param string $url Feed or website url - * @param string $last_modified Last modified HTTP header - * @param string $etag Etag HTTP header - * @param string $username HTTP basic auth username - * @param string $password HTTP basic auth password - * - * @return \PicoFeed\Client\Client - */ - public function discover($url, $last_modified = '', $etag = '', $username = '', $password = '') - { - $client = $this->download($url, $last_modified, $etag, $username, $password); - - // It's already a feed or the feed was not modified - if (!$client->isModified() || $this->detectFormat($client->getContent())) { - return $client; - } - - // Try to find a subscription - $links = $this->find($client->getUrl(), $client->getContent()); - - if (empty($links)) { - throw new SubscriptionNotFoundException('Unable to find a subscription'); - } - - return $this->download($links[0], $last_modified, $etag, $username, $password); - } - - /** - * Find feed urls inside a HTML document. - * - * @param string $url Website url - * @param string $html HTML content - * - * @return array List of feed links - */ - public function find($url, $html) - { - Logger::setMessage(get_called_class().': Try to discover subscriptions'); - - $dom = XmlParser::getHtmlDocument($html); - $xpath = new DOMXPath($dom); - $links = array(); - - $queries = array( - '//link[@type="application/rss+xml"]', - '//link[@type="application/atom+xml"]', - ); - - foreach ($queries as $query) { - $nodes = $xpath->query($query); - - foreach ($nodes as $node) { - $link = $node->getAttribute('href'); - - if (!empty($link)) { - $feedUrl = new Url($link); - $siteUrl = new Url($url); - - $links[] = $feedUrl->getAbsoluteUrl($feedUrl->isRelativeUrl() ? $siteUrl->getBaseUrl() : ''); - } - } - } - - Logger::setMessage(get_called_class().': '.implode(', ', $links)); - - return $links; - } - - /** - * Get a parser instance. - * - * @param string $url Site url - * @param string $content Feed content - * @param string $encoding HTTP encoding - * - * @return \PicoFeed\Parser\Parser - */ - public function getParser($url, $content, $encoding) - { - $format = $this->detectFormat($content); - - if (empty($format)) { - throw new UnsupportedFeedFormatException('Unable to detect feed format'); - } - - $className = '\PicoFeed\Parser\\'.$format; - - $parser = new $className($content, $encoding, $url); - $parser->setHashAlgo($this->config->getParserHashAlgo()); - $parser->setTimezone($this->config->getTimezone()); - $parser->setConfig($this->config); - - return $parser; - } - - /** - * Detect the feed format. - * - * @param string $content Feed content - * - * @return string - */ - public function detectFormat($content) - { - $dom = XmlParser::getHtmlDocument($content); - $xpath = new DOMXPath($dom); - - foreach ($this->formats as $parser_name => $query) { - $nodes = $xpath->query($query); - - if ($nodes->length === 1) { - return $parser_name; - } - } - - return ''; - } - - /** - * Add the prefix "http://" if the end-user just enter a domain name. - * - * @param string $url Url - * @retunr string - */ - public function prependScheme($url) - { - if (!preg_match('%^https?://%', $url)) { - $url = 'http://'.$url; - } - - return $url; - } -} diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Reader/ReaderException.php b/vendor/fguillot/picofeed/lib/PicoFeed/Reader/ReaderException.php deleted file mode 100644 index 4f03dbe..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Reader/ReaderException.php +++ /dev/null @@ -1,14 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://combat.blog.lemonde.fr/2013/08/31/teddy-riner-le-rookie-devenu-rambo/#xtor=RSS-3208', - 'body' => array( - '//div[@class="entry-content"]', - ), - 'strip' => array( - '//*[contains(@class, "fb-like") or contains(@class, "social")]' - ), - ) - ) -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/.blogs.nytimes.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/.blogs.nytimes.com.php deleted file mode 100644 index ee641b0..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/.blogs.nytimes.com.php +++ /dev/null @@ -1,15 +0,0 @@ - array( - '%.*%' => array( - 'title' => '//header/h1', - 'test_url' => 'http://bits.blogs.nytimes.com/2012/01/16/wikipedia-plans-to-go-dark-on-wednesday-to-protest-sopa/', - 'body' => array( - '//div[@class="postContent"]', - ), - 'strip' => array( - '//*[@class="shareToolsBox"]', - ), - ) - ) -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/.igen.fr.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/.igen.fr.php deleted file mode 100644 index f2028f4..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/.igen.fr.php +++ /dev/null @@ -1,13 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.igen.fr/ailleurs/2014/05/nvidia-va-delaisser-les-smartphones-grand-public-86031', - 'body' => array( - '//div[contains(@class, "field-name-body")]' - ), - 'strip' => array( - ), - ) - ) -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/.nytimes.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/.nytimes.com.php deleted file mode 100644 index ed27bb5..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/.nytimes.com.php +++ /dev/null @@ -1,11 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.nytimes.com/2011/05/15/world/middleeast/15prince.html', - 'body' => array( - '//div[@class="articleBody"]', - ), - ) - ) -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/.phoronix.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/.phoronix.com.php deleted file mode 100644 index 867faa4..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/.phoronix.com.php +++ /dev/null @@ -1,12 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.phoronix.com/scan.php?page=article&item=amazon_ec2_bare&num=1', - 'body' => array( - '//div[@class="content"]', - ), - 'strip' => array() - ) - ) -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/.slate.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/.slate.com.php deleted file mode 100644 index a795bca..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/.slate.com.php +++ /dev/null @@ -1,20 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.slate.com/articles/business/moneybox/2013/08/microsoft_ceo_steve_ballmer_retires_a_firsthand_account_of_the_company_s.html', - 'body' => array( - '//div[@class="sl-art-body"]', - ), - 'strip' => array( - '//*[contains(@class, "social") or contains(@class, "comments") or contains(@class, "sl-article-floatin-tools") or contains(@class, "sl-art-pag")]', - '//*[@id="mys_slate_logged_in"]', - '//*[@id="sl_article_tools_myslate_bottom"]', - '//*[@id="mys_myslate"]', - '//*[@class="sl-viral-container"]', - '//*[@class="sl-art-creds-cntr"]', - '//*[@class="sl-art-ad-midflex"]', - ) - ) - ) -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/.theguardian.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/.theguardian.com.php deleted file mode 100644 index e0d6f3f..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/.theguardian.com.php +++ /dev/null @@ -1,14 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.theguardian.com/sustainable-business/2015/feb/02/2015-hyper-transparency-global-business', - 'body' => array( - '//div[contains(@class, "content__main-column--article")]', - ), - 'strip' => array( - '//div[contains(@class, "meta-container")]', - ), - ) - ) -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/.wikipedia.org.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/.wikipedia.org.php deleted file mode 100644 index 7b8f76e..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/.wikipedia.org.php +++ /dev/null @@ -1,29 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'https://en.wikipedia.org/wiki/Grace_Hopper', - 'body' => array( - '//div[@id="bodyContent"]', - ), - 'strip' => array( - "//div[@id='toc']", - "//div[@id='catlinks']", - "//div[@id='jump-to-nav']", - "//div[@class='thumbcaption']//div[@class='magnify']", - "//table[@class='navbox']", - "//table[contains(@class, 'infobox')]", - "//div[@class='dablink']", - "//div[@id='contentSub']", - "//div[@id='siteSub']", - "//table[@id='persondata']", - "//table[contains(@class, 'metadata')]", - "//*[contains(@class, 'noprint')]", - "//*[contains(@class, 'printfooter')]", - "//*[contains(@class, 'editsection')]", - "//*[contains(@class, 'error')]", - "//span[@title='pronunciation:']", - ), - ) - ) -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/.wired.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/.wired.com.php deleted file mode 100644 index b6a1b96..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/.wired.com.php +++ /dev/null @@ -1,31 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.wired.com/gamelife/2013/09/ouya-free-the-games/', - 'body' => array( - '//div[@data-js="gallerySlides"]', - '//article', - ), - 'strip' => array( - '//*[@id="linker_widget"]', - '//*[@class="credit"]', - '//div[@data-js="slideCount"]', - '//*[contains(@class="visually-hidden")]', - '//*[@data-slide-number="_endslate"]', - '//*[@id="related"]', - '//*[contains(@class, "bio")]', - '//*[contains(@class, "entry-footer")]', - '//*[contains(@class, "mobify_backtotop_link")]', - '//*[contains(@class, "gallery-navigation")]', - '//*[contains(@class, "gallery-thumbnail")]', - '//img[contains(@src, "1x1")]', - '//a[contains(@href, "creativecommons")]', - '//a[@href="#start-of-content"]', - '//ul[@id="article-tags"]', - ), - ) - ) -); - - diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/.wsj.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/.wsj.com.php deleted file mode 100644 index f6e6cc1..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/.wsj.com.php +++ /dev/null @@ -1,15 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://online.wsj.com/article/SB10001424127887324108204579023143974408428.html', - 'body' => array( - '//div[@class="articlePage"]', - ), - 'strip' => array( - '//*[@id="articleThumbnail_2"]', - '//*[@class="socialByline"]', - ) - ) - ) -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/01net.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/01net.com.php deleted file mode 100644 index 2f11fd0..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/01net.com.php +++ /dev/null @@ -1,19 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.01net.com/editorial/624550/twitter-rachete-madbits-un-specialiste-francais-de-lanalyse-dimages/', - 'body' => array( - '//div[@class="article_ventre_box"]', - ), - 'strip' => array( - '//link', - '//*[contains(@class, "article_navigation")]', - '//h1', - '//*[contains(@class, "article_toolbarMain")]', - '//*[contains(@class, "article_imagehaute_box")]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/abstrusegoose.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/abstrusegoose.com.php deleted file mode 100644 index 412d6a0..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/abstrusegoose.com.php +++ /dev/null @@ -1,9 +0,0 @@ - array( - '%.*%' => array( - '%alt="(.+)" title="(.+)" */>%' => '/>
$1
$2', - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/alainonline.net.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/alainonline.net.php deleted file mode 100644 index 48a571a..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/alainonline.net.php +++ /dev/null @@ -1,15 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.alainonline.net/news_details.php?lang=arabic&sid=18907', - 'body' => array( - '//div[@class="news_details"]', - ), - 'strip' => array( - '//div[@class="news_details"]/div/div[last()]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/aljazeera.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/aljazeera.com.php deleted file mode 100644 index 81c0086..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/aljazeera.com.php +++ /dev/null @@ -1,22 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.aljazeera.com/news/2015/09/xi-jinping-seattle-china-150922230118373.html', - 'body' => array( - '//figure[@class="article-content"]', - '//div[@class="article-body"]', - ), - 'strip' => array( - '//h1', - '//h3', - '//ul', - '//table[contains(@class, "in-article-item")]', - '//a[@target="_self"]', - '//div[@data-embed-type="Brightcove"]', - '//div[@class="QuoteContainer"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/allafrica.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/allafrica.com.php deleted file mode 100644 index 50a9bd6..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/allafrica.com.php +++ /dev/null @@ -1,20 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.aljazeera.com/news/2015/09/xi-jinping-seattle-china-150922230118373.html', - 'body' => array( - '//div[@class="story-body"]', - ), - 'strip' => array( - '//p[@class="kindofstory"]', - '//cite[@class="byline"]', - '//div[contains(@class,"related-topics")]', - '//links', - '//sharebar', - '//related-topics', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/allgemeine-zeitung.de.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/allgemeine-zeitung.de.php deleted file mode 100644 index 4acdeaf..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/allgemeine-zeitung.de.php +++ /dev/null @@ -1,24 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.allgemeine-zeitung.de/lokales/polizei/mainz-gonsenheim-unbekannte-rauben-esso-tankstelle-in-kurt-schumacher-strasse-aus_14913147.htm', - 'body' => array( - '//div[contains(@class, "article")][1]', - ), - 'strip' => array( - '//read/h1', - '//*[@id="t-map"]', - '//*[contains(@class, "modules")]', - '//*[contains(@class, "adsense")]', - '//*[contains(@class, "linkbox")]', - '//*[contains(@class, "info")]', - '//*[@class="skip"]', - '//*[@class="funcs"]', - '//span[@class="nd address"]', - '//a[contains(@href, "abo-und-services")]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/amazingsuperpowers.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/amazingsuperpowers.com.php deleted file mode 100644 index 634fe37..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/amazingsuperpowers.com.php +++ /dev/null @@ -1,9 +0,0 @@ - array( - '%.*%' => array( - '%title="(.+)" */>%' => '/>
$1', - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/anythingcomic.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/anythingcomic.com.php deleted file mode 100644 index c73ac3b..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/anythingcomic.com.php +++ /dev/null @@ -1,14 +0,0 @@ - array( - '%.*%' => array( - 'body' => array( - '//img[@id="comic_image"]', - '//div[@class="comment-wrapper"][position()=1]', - ), - 'strip' => array(), - 'test_url' => 'http://www.anythingcomic.com/comics/2108929/stress-free/', - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/ap.org.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/ap.org.php deleted file mode 100644 index 6fadc7c..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/ap.org.php +++ /dev/null @@ -1,14 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://hosted.ap.org/dynamic/stories/A/AS_CHINA_GAO_ZHISHENG?SITE=AP&SECTION=HOME&TEMPLATE=DEFAULT', - 'body' => array( - '//img[@class="ap-smallphoto-img"]', - '//span[@class="entry-content"]', - ), - 'strip' => array(), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/areadvd.de.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/areadvd.de.php deleted file mode 100644 index 139fee5..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/areadvd.de.php +++ /dev/null @@ -1,11 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.areadvd.de/news/daily-deals-angebote-bei-lautsprecher-teufel-3/', - 'body' => array('//div[contains(@class,"entry")]'), - 'strip' => array(), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/arstechnica.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/arstechnica.com.php deleted file mode 100644 index d4919a2..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/arstechnica.com.php +++ /dev/null @@ -1,23 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://arstechnica.com/tech-policy/2015/09/judge-warners-2m-happy-birthday-copyright-is-bogus/', - 'body' => array( - '//header/h2', - '//section[@id="article-guts"]', - '//div[@class="superscroll-content show"]', - '//div[@class="gallery"]', - ), - 'next_page' => '//span[@class="numbers"]/a', - 'strip' => array( - '//figcaption', - '//div[@class="post-meta"]', - '//div[@class="gallery-image-credit"]', - '//aside', - '//div[@class="article-expander"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/awkwardzombie.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/awkwardzombie.com.php deleted file mode 100644 index 6dcb0e8..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/awkwardzombie.com.php +++ /dev/null @@ -1,11 +0,0 @@ - array( - '%/index.php.*comic=.*%' => array( - 'test_url' => 'http://www.awkwardzombie.com/index.php?comic=041315', - 'body' => array('//*[@id="comic"]/img'), - 'strip' => array(), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/bangkokpost.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/bangkokpost.com.php deleted file mode 100644 index 4dab77c..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/bangkokpost.com.php +++ /dev/null @@ -1,21 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.bangkokpost.com/news/politics/704204/new-us-ambassador-arrives-in-bangkok', - 'body' => array( - '//div[@class="articleContents"]', - ), - 'strip' => array( - '//h2', - '//h4', - '//div[@class="text-size"]', - '//div[@class="relate-story"]', - '//div[@class="text-ads"]', - '//script', - '//ul', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/bgr.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/bgr.com.php deleted file mode 100644 index d78709b..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/bgr.com.php +++ /dev/null @@ -1,16 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://bgr.com/2015/09/27/iphone-6s-waterproof-testing/', - 'body' => array( - '//img[contains(@class,"img")]', - '//div[@class="text-column"]', - ), - 'strip' => array( - '//strong', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/bigfootjustice.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/bigfootjustice.com.php deleted file mode 100644 index 6d1c667..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/bigfootjustice.com.php +++ /dev/null @@ -1,9 +0,0 @@ - array( - '%.*%' => array( - '%-150x150%' => '', - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/bizjournals.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/bizjournals.com.php deleted file mode 100644 index 6d8a5a9..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/bizjournals.com.php +++ /dev/null @@ -1,13 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.bizjournals.com/milwaukee/news/2015/09/30/bucks-will-hike-prices-on-best-seats-at-new-arena.html', - 'body' => array( - '//figure/div/a/img', - '//p[@class="content__segment"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/blog.fefe.de.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/blog.fefe.de.php deleted file mode 100644 index d3ed697..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/blog.fefe.de.php +++ /dev/null @@ -1,14 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://blog.fefe.de/?ts=ad706a73', - 'body' => array( - '/html/body/ul', - ), - 'strip' => array( - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/blog.mapillary.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/blog.mapillary.com.php deleted file mode 100644 index e67afe7..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/blog.mapillary.com.php +++ /dev/null @@ -1,12 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://blog.mapillary.com/update/2015/08/26/traffic-sign-updates.html', - 'body' => array( - '//div[contains(@class, "blog-post__content")]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/buenosairesherald.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/buenosairesherald.com.php deleted file mode 100644 index 7a6b33f..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/buenosairesherald.com.php +++ /dev/null @@ -1,18 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.buenosairesherald.com/article/199344/manzur-named-next-governor-of-tucum%C3%A1n', - 'body' => array( - '//div[@style="float:none"]', - ), - 'strip' => array( - '//div[contains(@class, "bz_alias_short_desc_container"]', - '//td[@id="bz_show_bug_column_1"]', - '//table[@id="attachment_table"]', - '//table[@class="bz_comment_table"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/bunicomic.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/bunicomic.com.php deleted file mode 100644 index fc54a81..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/bunicomic.com.php +++ /dev/null @@ -1,14 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.bunicomic.com/comic/buni-623/', - 'body' => array( - '//div[@class="comic-table"]', - ), - 'strip' => array( - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/buttersafe.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/buttersafe.com.php deleted file mode 100644 index 04c860e..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/buttersafe.com.php +++ /dev/null @@ -1,14 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://buttersafe.com/2015/04/21/the-incredible-flexible-man/', - 'body' => array( - '//div[@id="comic"]', - '//div[@class="post-comic"]', - ), - 'strip' => array(), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/cad-comic.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/cad-comic.com.php deleted file mode 100644 index 5c05f51..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/cad-comic.com.php +++ /dev/null @@ -1,13 +0,0 @@ - array( - '%/cad/.+%' => array( - 'test_url' => 'http://www.cad-comic.com/cad/20150417', - 'body' => array( - '//*[@id="content"]/img', - ), - 'strip' => array(), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/chaoslife.findchaos.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/chaoslife.findchaos.com.php deleted file mode 100644 index 3bc711a..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/chaoslife.findchaos.com.php +++ /dev/null @@ -1,11 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://chaoslife.findchaos.com/pets-in-the-wild', - 'body' => array('//div[@id="comic"]'), - 'strip' => array(), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/cliquerefresh.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/cliquerefresh.com.php deleted file mode 100644 index 67a59c5..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/cliquerefresh.com.php +++ /dev/null @@ -1,11 +0,0 @@ - array( - '%/comic.*%' => array( - 'test_url' => 'http://cliquerefresh.com/comic/078-stating-the-obvious/', - 'body' => array('//div[@class="comicImg"]/img | //div[@class="comicImg"]/a/img'), - 'strip' => array(), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/cnet.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/cnet.com.php deleted file mode 100644 index 4021968..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/cnet.com.php +++ /dev/null @@ -1,38 +0,0 @@ - array( - '%^/products.*%' => array( - 'test_url' => 'http://www.cnet.com/products/fibaro-flood-sensor/#ftag=CADf328eec', - 'body' => array( - '//li[contains(@class,"slide first"] || //figure[contains(@class,(promoFigure))]', - '//div[@class="quickInfo"]', - '//div[@class="col-6 ratings"]', - '//div[@id="editorReview"]', - ), - 'strip' => array( - '//script', - '//a[@class="clickToEnlarge"]', - '//div[@section="topSharebar"]', - '//div[contains(@class,"related")]', - '//div[contains(@class,"ad-")]', - '//div[@section="shortcodeGallery"]', - ), - ), - '%.*%' => array( - 'test_url' => 'http://cnet.com.feedsportal.com/c/34938/f/645093/s/4a340866/sc/28/l/0L0Scnet0N0Cnews0Cman0Eclaims0Eonline0Epsychic0Emade0Ehim0Ebuy0E10Emillion0Epowerball0Ewinning0Eticket0C0Tftag0FCAD590Aa51e/story01.htm', - 'body' => array( - '//p[@itemprop="description"]', - '//div[@itemprop="articleBody"]', - ), - 'strip' => array( - '//script', - '//a[@class="clickToEnlarge"]', - '//div[@section="topSharebar"]', - '//div[contains(@class,"related")]', - '//div[contains(@class,"ad-")]', - '//div[@section="shortcodeGallery"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/consomac.fr.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/consomac.fr.php deleted file mode 100644 index 31cf6cb..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/consomac.fr.php +++ /dev/null @@ -1,14 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://consomac.fr/news-2430-l-iphone-6-toujours-un-secret-bien-garde.html', - 'body' => array( - '//div[contains(@id, "newscontent")]', - ), - 'strip' => array( - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/cowbirdsinlove.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/cowbirdsinlove.com.php deleted file mode 100644 index 634fe37..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/cowbirdsinlove.com.php +++ /dev/null @@ -1,9 +0,0 @@ - array( - '%.*%' => array( - '%title="(.+)" */>%' => '/>
$1', - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/csmonitor.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/csmonitor.com.php deleted file mode 100644 index 74b149d..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/csmonitor.com.php +++ /dev/null @@ -1,19 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.csmonitor.com/USA/Politics/2015/0925/John-Boehner-steps-down-Self-sacrificing-but-will-it-lead-to-better-government', - 'body' => array( - '//figure[@id="image-top-1"]', - '//div[@id="story-body"]', - ), - 'strip' => array( - '//script', - '//img[@title="hide caption"]', - '//*[contains(@class,"promo_link")]', - '//div[@id="story-embed-column"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/dailyjs.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/dailyjs.com.php deleted file mode 100644 index 809a18a..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/dailyjs.com.php +++ /dev/null @@ -1,20 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://dailyjs.com/2014/08/07/p5js/', - 'body' => array( - '//div[@id="post"]', - ), - 'strip' => array( - '//h2[@class="post"]', - '//div[@class="meta"]', - '//*[contains(@class, "addthis_toolbox")]', - '//*[contains(@class, "addthis_default_style")]', - '//*[@class="navigation small"]', - '//*[@id="related"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/dailyreporter.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/dailyreporter.com.php deleted file mode 100644 index 3ead1e7..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/dailyreporter.com.php +++ /dev/null @@ -1,16 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://dailyreporter.com/2016/01/09/us-supreme-court-case-could-weaken-government-workers-unions/', - 'body' => array( - '//div[contains(@class, "entry-content")]', - ), - 'strip' => array( - '//div[@class="dmcss_login_form"]', - '//*[contains(@class, "sharedaddy")]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/dailytech.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/dailytech.com.php deleted file mode 100644 index 19a23c9..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/dailytech.com.php +++ /dev/null @@ -1,14 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.dailytech.com/Apples+First+Fixes+to+iOS+9+Land+w+iOS++901+Release/article37495.htm', - 'body' => array( - '//div[@class="NewsBodyImage"]', - '//span[@id="lblSummary"]', - '//span[@id="lblBody"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/degroupnews.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/degroupnews.com.php deleted file mode 100644 index c166c51..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/degroupnews.com.php +++ /dev/null @@ -1,15 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.degroupnews.com/medias/vodsvod/amazon-concurrence-la-chromecast-de-google-avec-fire-tv-stick', - 'body' => array( - '//div[@class="contenu"]', - ), - 'strip' => array( - '//div[contains(@class, "a2a")]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/derstandard.at.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/derstandard.at.php deleted file mode 100644 index 66331e1..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/derstandard.at.php +++ /dev/null @@ -1,15 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://derstandard.at/2000010267354/The-Witcher-3-Hohe-Hardware-Anforderungen-fuer-PC-Spieler?ref=rss', - 'body' => array( - '//div[@class="copytext"]', - '//ul[@id="media-list"]', - ), - 'strip' => array( - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/dilbert.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/dilbert.com.php deleted file mode 100644 index 17f2ec2..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/dilbert.com.php +++ /dev/null @@ -1,12 +0,0 @@ - array( - '%.*%' => array( - 'body' => array( - '//img[@class="img-responsive img-comic"]', - ), - 'test_url' => 'http://dilbert.com/strip/2016-01-28', - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/discovermagazine.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/discovermagazine.com.php deleted file mode 100644 index 5b50ad1..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/discovermagazine.com.php +++ /dev/null @@ -1,18 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://blogs.discovermagazine.com/the-extremo-files/2015/09/11/have-scientists-found-the-worlds-deepest-fish/', - 'body' => array( - '//div[@class="entry"]', - ), - 'strip' => array( - '//h1', - '//div[@class="meta"]', - '//div[@class="shareIcons"]', - '//div[@class="navigation"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/distrowatch.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/distrowatch.com.php deleted file mode 100644 index ee0b977..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/distrowatch.com.php +++ /dev/null @@ -1,14 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://distrowatch.com/?newsid=08355', - 'body' => array( - '//td[@class="NewsText"][1]', - ), - 'strip' => array( - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/dozodomo.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/dozodomo.com.php deleted file mode 100644 index b894abf..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/dozodomo.com.php +++ /dev/null @@ -1,16 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://dozodomo.com/bento/2014/03/04/lart-des-maki-de-takayo-kiyota/', - 'body' => array( - '//div[@class="joke"]', - '//div[@class="story-cover"]', - '//div[@class="story-content"]', - ), - 'strip' => array( - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/drawingboardcomic.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/drawingboardcomic.com.php deleted file mode 100644 index 85c623a..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/drawingboardcomic.com.php +++ /dev/null @@ -1,16 +0,0 @@ - array( - '%.*%' => array( - 'body' => array('//img[@id="comicimage"]'), - 'strip' => array(), - 'test_url' => 'http://drawingboardcomic.com/index.php?comic=208', - ), - ), - 'filter' => array( - '%.*%' => array( - '%title="(.+)" */>%' => '/>
$1', - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/endlessorigami.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/endlessorigami.com.php deleted file mode 100644 index 6d1c667..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/endlessorigami.com.php +++ /dev/null @@ -1,9 +0,0 @@ - array( - '%.*%' => array( - '%-150x150%' => '', - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/engadget.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/engadget.com.php deleted file mode 100644 index 87775eb..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/engadget.com.php +++ /dev/null @@ -1,11 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.engadget.com/2015/04/20/dark-matter-discovery/?ncid=rss_truncated', - 'body' => array('//div[@id="page_body"]/div[@class="container@m-"]'), - 'strip' => array('//aside[@role="banner"]'), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/escapistmagazine.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/escapistmagazine.com.php deleted file mode 100644 index 052fc0f..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/escapistmagazine.com.php +++ /dev/null @@ -1,46 +0,0 @@ - array( - '%/articles/view/comicsandcosplay/comics/critical-miss.*%' => array( - 'body' => array('//*[@class="body"]/span/img | //div[@class="folder_nav_links"]/following::p'), - 'test_url' => 'http://www.escapistmagazine.com/articles/view/comicsandcosplay/comics/critical-miss/13776-Critical-Miss-on-Framerates?utm_source=rss&utm_medium=rss&utm_campaign=articles', - 'strip' => array(), - ), - '%/articles/view/comicsandcosplay/comics/namegame.*%' => array( - 'body' => array('//*[@class="body"]/span/p/img[@height != "120"]'), - 'test_url' => 'http://www.escapistmagazine.com/articles/view/comicsandcosplay/comics/namegame/9759-Leaving-the-Nest?utm_source=rss&utm_medium=rss&utm_campaign=articles', - 'strip' => array(), - ), - '%/articles/view/comicsandcosplay/comics/stolen-pixels.*%' => array( - 'body' => array('//*[@class="body"]/span/p[2]/img'), - 'test_url' => 'http://www.escapistmagazine.com/articles/view/comicsandcosplay/comics/stolen-pixels/8866-Stolen-Pixels-258-Where-the-Boys-Are?utm_source=rss&utm_medium=rss&utm_campaign=articles', - 'strip' => array(), - ), - '%/articles/view/comicsandcosplay/comics/bumhugparade.*%' => array( - 'body' => array('//*[@class="body"]/span/p[2]/img'), - 'test_url' => 'http://www.escapistmagazine.com/articles/view/comicsandcosplay/comics/bumhugparade/8262-Bumhug-Parade-13?utm_source=rss&utm_medium=rss&utm_campaign=articles', - 'strip' => array(), - ), - '%/articles/view/comicsandcosplay.*/comics/escapistradiotheater%' => array( - 'body' => array('//*[@class="body"]/span/p[2]/img'), - 'test_url' => 'http://www.escapistmagazine.com/articles/view/comicsandcosplay/comics/escapistradiotheater/8265-The-Escapist-Radio-Theater-13?utm_source=rss&utm_medium=rss&utm_campaign=articles', - 'strip' => array(), - ), - '%/articles/view/comicsandcosplay/comics/paused.*%' => array( - 'body' => array('//*[@class="body"]/span/p[2]/img | //*[@class="body"]/span/div/img'), - 'test_url' => 'http://www.escapistmagazine.com/articles/view/comicsandcosplay/comics/paused/8263-Paused-16?utm_source=rss&utm_medium=rss&utm_campaign=articles', - 'strip' => array(), - ), - '%/articles/view/comicsandcosplay/comics/fraughtwithperil.*%' => array( - 'body' => array('//*[@class="body"]'), - 'test_url' => 'http://www.escapistmagazine.com/articles/view/comicsandcosplay/comics/fraughtwithperil/12166-The-Escapist-Presents-Escapist-Comics-Critical-Miss-B-lyeh-Fhlop?utm_source=rss&utm_medium=rss&utm_campaign=articles', - 'strip' => array(), - ), - '%/articles/view/video-games/columns/.*%' => array( - 'body' => array('//*[@id="article_content"]'), - 'test_url' => 'http://www.escapistmagazine.com/articles/view/video-games/columns/experienced-points/13971-What-50-Shades-and-Batman-Have-in-Common.2', - 'strip' => array(), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/espn.go.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/espn.go.com.php deleted file mode 100644 index 08cfd64..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/espn.go.com.php +++ /dev/null @@ -1,12 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://espn.go.com/nfl/story/_/id/13388208/jason-whitlock-chip-kelly-controversy', - 'body' => array( - '//p', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/exocomics.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/exocomics.com.php deleted file mode 100644 index 1938281..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/exocomics.com.php +++ /dev/null @@ -1,16 +0,0 @@ - array( - '%.*%' => array( - 'body' => array('//a[@class="comic"]/img'), - 'strip' => array(), - 'test_url' => 'http://www.exocomics.com/379', - ), - ), - 'filter' => array( - '%.*%' => array( - '%title="(.+)" */>%' => '/>
$1', - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/explosm.net.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/explosm.net.php deleted file mode 100644 index 1ea2efc..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/explosm.net.php +++ /dev/null @@ -1,14 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://explosm.net/comics/3803/', - 'body' => array( - '//div[@id="comic-container"]', - ), - 'strip' => array( - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/extrafabulouscomics.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/extrafabulouscomics.com.php deleted file mode 100644 index 29e0f19..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/extrafabulouscomics.com.php +++ /dev/null @@ -1,9 +0,0 @@ - array( - '%.*%' => array( - '%-150x150%' => '', - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/fastcodesign.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/fastcodesign.com.php deleted file mode 100644 index 9cfa252..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/fastcodesign.com.php +++ /dev/null @@ -1,14 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.fastcodesign.com/3026548/exposure/peek-inside-the-worlds-forbidden-subway-tunnels', - 'body' => array( - '//article[contains(@class, "body prose")]', - ), - 'strip' => array( - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/fastcoexist.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/fastcoexist.com.php deleted file mode 100644 index b1e42fe..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/fastcoexist.com.php +++ /dev/null @@ -1,14 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.fastcoexist.com/3026114/take-a-seat-on-this-gates-funded-future-toilet-that-will-change-how-we-think-about-poop', - 'body' => array( - '//article[contains(@class, "body prose")]', - ), - 'strip' => array( - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/fastcompany.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/fastcompany.com.php deleted file mode 100644 index acade0c..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/fastcompany.com.php +++ /dev/null @@ -1,14 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.fastcompany.com/3026712/fast-feed/elon-musk-an-apple-tesla-merger-is-very-unlikely', - 'body' => array( - '//article[contains(@class, "body prose")]', - ), - 'strip' => array( - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/ffworld.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/ffworld.com.php deleted file mode 100644 index 7b99c2e..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/ffworld.com.php +++ /dev/null @@ -1,14 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.ffworld.com/?rub=news&page=voir&id=2709', - 'body' => array( - '//div[@class="news_body"]', - ), - 'strip' => array( - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/foreignpolicy.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/foreignpolicy.com.php deleted file mode 100644 index 6b0eb78..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/foreignpolicy.com.php +++ /dev/null @@ -1,22 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://foreignpolicy.com/2016/01/09/networking-giant-pulls-nsa-linked-code-exploited-by-hackers/', - 'body' => array( - '//article', - ), - 'strip' => array( - '//div[@id="post-category"]', - '//div[@id="desktop-right"]', - '//h1', - '//section[@class="article-meta"]', - '//div[@class="side-panel-wrapper"]', - '//*[contains(@class, "share-")]', - '//*[contains(@id, "taboola-")]', - '//div[@class="comments"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/fossbytes.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/fossbytes.com.php deleted file mode 100644 index cc011cd..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/fossbytes.com.php +++ /dev/null @@ -1,19 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://fossbytes.com/fbi-hacked-1000-computers-to-shut-down-largest-child-pornography-site-on-the-dark-web/', - 'body' => array( - '//div[@class="entry-inner"]', - ), - 'strip' => array( - '//*[@class="at-above-post addthis_default_style addthis_toolbox at-wordpress-hide"]', - '//*[@class="at-below-post addthis_default_style addthis_toolbox at-wordpress-hide"]', - '//*[@class="at-below-post-recommended addthis_default_style addthis_toolbox at-wordpress-hide"]', - '//*[@class="code-block code-block-12 ai-desktop"]', - '//*[@class="code-block code-block-13 ai-tablet-phone"]', - ), - ), - ), -); \ No newline at end of file diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/fowllanguagecomics.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/fowllanguagecomics.com.php deleted file mode 100644 index 79ae240..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/fowllanguagecomics.com.php +++ /dev/null @@ -1,11 +0,0 @@ - array( - '%.*%' => array( - 'body' => array('//*[@id="comic"] | //*[@class="post-image"]'), - 'strip' => array(), - 'test_url' => 'http://www.fowllanguagecomics.com/comic/working-out/', - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/geek.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/geek.com.php deleted file mode 100644 index 1f00a88..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/geek.com.php +++ /dev/null @@ -1,17 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.geek.com/news/the-11-best-ways-to-eat-eggs-1634076/', - 'body' => array( - '//div[@class="articleinfo"]/figure', - '//div[@class="articleinfo"]/article', - '//span[@class="by"]', - ), - 'strip' => array( - '//span[@class="red"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/gerbilwithajetpack.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/gerbilwithajetpack.com.php deleted file mode 100644 index 70e8635..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/gerbilwithajetpack.com.php +++ /dev/null @@ -1,13 +0,0 @@ - array( - '%.*%' => array( - 'body' => array( - '//div[@id="comic-1"]', - '//div[@class="entry"]', - ), - 'test_url' => 'http://gerbilwithajetpack.com/passing-the-digital-buck/', - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/giantitp.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/giantitp.com.php deleted file mode 100644 index b7a6a9a..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/giantitp.com.php +++ /dev/null @@ -1,13 +0,0 @@ - array( - '%/comics/oots.*%' => array( - 'test_url' => 'http://www.giantitp.com/comics/oots0989.html', - 'body' => array( - '//td[@align="center"]/img', - ), - 'strip' => array(), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/github.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/github.com.php deleted file mode 100644 index abc41ed..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/github.com.php +++ /dev/null @@ -1,15 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'https://github.com/audreyr/favicon-cheat-sheet', - 'body' => array( - '//article[contains(@class, "entry-content")]', - ), - 'strip' => array( - '//h1', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/gocomics.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/gocomics.com.php deleted file mode 100644 index 5bfbe37..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/gocomics.com.php +++ /dev/null @@ -1,13 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.gocomics.com/pearlsbeforeswine/2015/05/30', - 'body' => array( - '//div[1]/p[1]/a[1]/img', - ), - 'strip' => array(), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/golem.de.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/golem.de.php deleted file mode 100644 index ea1af87..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/golem.de.php +++ /dev/null @@ -1,13 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.golem.de/news/breko-telekom-verzoegert-gezielt-den-vectoring-ausbau-1311-102974.html', - 'body' => array( - '//header[@class="cluster-header"]', - '//div[@class="formatted"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/greekculture.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/greekculture.com.php deleted file mode 100644 index 9410de9..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/greekculture.com.php +++ /dev/null @@ -1,12 +0,0 @@ - array( - '%/joyoftech/.*%' => array( - 'body' => array( - '//img[@width="640"]', - ), - 'test_url' => 'http://www.geekculture.com/joyoftech/joyarchives/2235.html', - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/happletea.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/happletea.com.php deleted file mode 100644 index 5651bf4..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/happletea.com.php +++ /dev/null @@ -1,19 +0,0 @@ - array( - '%.*%' => array( - 'body' => array( - '//div[@id="comic"]', - '//div[@class="entry"]', - ), - 'strip' => array('//div[@class="ssba"]'), - 'test_url' => 'http://www.happletea.com/comic/mans-best-friend/', - ), - ), - 'filter' => array( - '%.*%' => array( - '%title="(.+)" */>%' => '/>
$1', - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/heise.de.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/heise.de.php deleted file mode 100644 index 85904c0..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/heise.de.php +++ /dev/null @@ -1,13 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.heise.de/security/meldung/BND-300-Millionen-Euro-fuer-Fruehwarnsystem-gegen-Cyber-Attacken-2192237.html', - 'body' => array( - '//div[@class="meldung_wrapper"]', - '//div[@class="artikel_content"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/huffingtonpost.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/huffingtonpost.com.php deleted file mode 100644 index adbc581..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/huffingtonpost.com.php +++ /dev/null @@ -1,14 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.huffingtonpost.com/2014/02/20/centscere-social-media-syracuse_n_4823848.html', - 'body' => array( - '//article[@class="content")]', - ), - 'strip' => array( - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/imogenquest.net.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/imogenquest.net.php deleted file mode 100644 index 634fe37..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/imogenquest.net.php +++ /dev/null @@ -1,9 +0,0 @@ - array( - '%.*%' => array( - '%title="(.+)" */>%' => '/>
$1', - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/ing.dk.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/ing.dk.php deleted file mode 100644 index 5081a26..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/ing.dk.php +++ /dev/null @@ -1,13 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://ing.dk/artikel/smart-husisolering-og-styring-skal-mindske-japans-energikrise-164517', - 'body' => array( - '//section[contains(@class, "teaser")]', - '//section[contains(@class, "body")]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/invisiblebread.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/invisiblebread.com.php deleted file mode 100644 index e4fd6ef..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/invisiblebread.com.php +++ /dev/null @@ -1,9 +0,0 @@ - array( - '%.*%' => array( - '%()%' => '$1', - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/ir.amd.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/ir.amd.com.php deleted file mode 100644 index 112165a..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/ir.amd.com.php +++ /dev/null @@ -1,11 +0,0 @@ - array( - '%.*%' => array( - 'body' => array('//span[@class="ccbnTxt"]'), - 'strip' => array(), - 'test_url' => 'http://ir.amd.com/phoenix.zhtml?c=74093&p=RssLanding&cat=news&id=2055819', - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/japantimes.co.jp.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/japantimes.co.jp.php deleted file mode 100644 index b0c8ff2..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/japantimes.co.jp.php +++ /dev/null @@ -1,22 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.japantimes.co.jp/news/2015/09/27/world/social-issues-world/pope-meets-sex-abuse-victims-philadelphia-promises-accountability/', - 'body' => array( - '//article[@role="main"]', - ), - 'strip' => array( - '//script', - '//header', - '//div[contains(@class, "meta")]', - '//div[@class="clearfix"]', - '//div[@class="OUTBRAIN"]', - '//ul[@id="content_footer_menu"]', - '//div[@class="article_footer_ad"]', - '//div[@id="disqus_thread"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/japantoday.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/japantoday.com.php deleted file mode 100644 index 8334689..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/japantoday.com.php +++ /dev/null @@ -1,16 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.japantoday.com/category/politics/view/japan-u-s-to-sign-new-base-environment-pact', - 'body' => array( - '//div[@id="article_container"]', - ), - 'strip' => array( - '//h2', - '//div[@id="article_info"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/journaldugeek.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/journaldugeek.com.php deleted file mode 100644 index 1034c9d..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/journaldugeek.com.php +++ /dev/null @@ -1,12 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www./2014/05/20/le-playstation-now-arrive-en-beta-fermee-aux-etats-unis/', - 'body' => array( - '//div[@class="post-content"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/jsonline.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/jsonline.com.php deleted file mode 100644 index 82322f7..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/jsonline.com.php +++ /dev/null @@ -1,24 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.jsonline.com/news/usandworld/as-many-as-a-million-expected-for-popes-last-mass-in-us-b99585180z1-329688131.html', - 'body' => array( - '//div[@id="mainContent"]', - ), - 'strip' => array( - '//script', - '//h1', - '//h4[@class="credit"]', - '//div[@class="columnist_container"]', - '//div[@class="storyTimestamp"]', - '//ul[@id="sharing-tools"]', - '//div[@class="title"]', - '//img[@class="floatLeft"]', - '//div[@class="first feature"]', - '//div[@class="collateral_article_content"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/kanpai.fr.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/kanpai.fr.php deleted file mode 100644 index a93ef6c..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/kanpai.fr.php +++ /dev/null @@ -1,14 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.kanpai.fr/japon/comment-donner-lheure-en-japonais.html', - 'body' => array( - '//div[@class="single-left"]', - ), - 'strip' => array( - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/karriere.jobfinder.dk.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/karriere.jobfinder.dk.php deleted file mode 100644 index 7c7b456..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/karriere.jobfinder.dk.php +++ /dev/null @@ -1,13 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://karriere.jobfinder.dk/artikel/dansk-professor-skal-lede-smart-grid-forskning-20-millioner-dollars-763', - 'body' => array( - '//section[contains(@class, "teaser")]', - '//section[contains(@class, "body")]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/koreaherald.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/koreaherald.com.php deleted file mode 100644 index dacaa9b..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/koreaherald.com.php +++ /dev/null @@ -1,12 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.koreaherald.com/view.php?ud=20150926000018', - 'body' => array( - '//div[@class="content_view"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/koreatimes.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/koreatimes.php deleted file mode 100644 index 95a9b56..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/koreatimes.php +++ /dev/null @@ -1,16 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.koreatimes.co.kr/www/news/nation/2015/12/116_192409.html', - 'body' => array( - '//div[@id="p"]', - ), - 'strip' => array( - '//script', - '//div[@id="webtalks_btn_listenDiv"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/lastplacecomics.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/lastplacecomics.com.php deleted file mode 100644 index 29e0f19..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/lastplacecomics.com.php +++ /dev/null @@ -1,9 +0,0 @@ - array( - '%.*%' => array( - '%-150x150%' => '', - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/lejapon.fr.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/lejapon.fr.php deleted file mode 100644 index 07cfdbb..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/lejapon.fr.php +++ /dev/null @@ -1,18 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://lejapon.fr/guide-voyage-japon/5223/tokyo-sous-la-neige.htm', - 'body' => array( - '//div[@class="entry"]', - ), - 'strip' => array( - '//*[contains(@class, "addthis_toolbox")]', - '//*[contains(@class, "addthis_default_style")]', - '//*[@class="navigation small"]', - '//*[@id="related"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/lesjoiesducode.fr.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/lesjoiesducode.fr.php deleted file mode 100644 index 12177e9..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/lesjoiesducode.fr.php +++ /dev/null @@ -1,14 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://lesjoiesducode.fr/post/75576211207/quand-lappli-ne-fonctionne-plus-sans-aucune-raison', - 'body' => array( - '//div[@class="blog-post-content"]', - ), - 'strip' => array( - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/lfg.co.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/lfg.co.php deleted file mode 100644 index 1073f0e..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/lfg.co.php +++ /dev/null @@ -1,13 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.lfg.co/page/871/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+LookingForGroup+%28Looking+For+Group%29&utm_content=FeedBurner', - 'body' => array( - '//*[@id="comic"]/img | //*[@class="content"]', - ), - 'strip' => array(), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/lifehacker.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/lifehacker.com.php deleted file mode 100644 index a42df27..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/lifehacker.com.php +++ /dev/null @@ -1,19 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://lifehacker.com/bring-water-bottle-caps-into-concerts-to-protect-your-d-1269334973', - 'body' => array( - '//div[contains(@class, "row")/img', - '//div[contains(@class, "content-column")]', - ), - 'strip' => array( - '//*[contains(@class, "meta")]', - '//span[contains(@class, "icon")]', - '//h1', - '//aside', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/linux.org.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/linux.org.php deleted file mode 100644 index c31bc8d..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/linux.org.php +++ /dev/null @@ -1,15 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.linux.org/threads/lua-the-scripting-interpreter.8352/', - 'body' => array( - '//div[@class="messageContent"]', - ), - 'strip' => array( - '//aside', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/linuxinsider.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/linuxinsider.com.php deleted file mode 100644 index 2ad69cc..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/linuxinsider.com.php +++ /dev/null @@ -1,21 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.linuxinsider.com/story/82526.html?rss=1', - 'body' => array( - '//div[@id="story"]', - ), - 'strip' => array( - '//script', - '//h1', - '//div[@id="story-toolbox1"]', - '//div[@id="story-byline"]', - '//div[@id="story"]/p', - '//div[@class="story-advertisement"]', - '//iframe', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/lists.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/lists.php deleted file mode 100644 index c707551..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/lists.php +++ /dev/null @@ -1,14 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://lists.freebsd.org/pipermail/freebsd-announce/2013-September/001504.html', - 'body' => array( - '//pre', - ), - 'strip' => array( - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/loadingartist.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/loadingartist.com.php deleted file mode 100644 index 6d1c667..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/loadingartist.com.php +++ /dev/null @@ -1,9 +0,0 @@ - array( - '%.*%' => array( - '%-150x150%' => '', - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/loldwell.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/loldwell.com.php deleted file mode 100644 index 6954ebf..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/loldwell.com.php +++ /dev/null @@ -1,11 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://loldwell.com/?comic=food-math-101', - 'body' => array('//*[@id="comic"]'), - 'strip' => array(), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/lukesurl.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/lukesurl.com.php deleted file mode 100644 index 15850e4..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/lukesurl.com.php +++ /dev/null @@ -1,16 +0,0 @@ - array( - '%.*%' => array( - 'body' => array('//div[@id="comic"]//img'), - 'strip' => array(), - 'test_url' => 'http://www.lukesurl.com/archives/comic/665-3-of-clubs', - ), - ), - 'filter' => array( - '%.*%' => array( - '%title="(.+)" */>%' => '/>
$1', - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/macg.co.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/macg.co.php deleted file mode 100644 index 1d84ffa..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/macg.co.php +++ /dev/null @@ -1,14 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.macg.co//logiciels/2014/05/feedly-sameliore-un-petit-peu-sur-mac-82205', - 'body' => array( - '//div[contains(@class, "field-name-body")]', - ), - 'strip' => array( - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/marc.info.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/marc.info.php deleted file mode 100644 index 5603940..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/marc.info.php +++ /dev/null @@ -1,14 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://marc.info/?l=openbsd-misc&m=141987113202061&w=2', - 'body' => array( - '//pre', - ), - 'strip' => array( - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/marriedtothesea.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/marriedtothesea.com.php deleted file mode 100644 index b33b0d0..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/marriedtothesea.com.php +++ /dev/null @@ -1,13 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.marriedtothesea.com/index.php?date=052915', - 'body' => array( - '//div[@align]/a/img', - ), - 'strip' => array(), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/marycagle.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/marycagle.com.php deleted file mode 100644 index 3a8c783..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/marycagle.com.php +++ /dev/null @@ -1,14 +0,0 @@ - array( - '%.*%' => array( - 'body' => array( - '//img[@id="cc-comic"]', - '//div[@class="cc-newsbody"]', - ), - 'strip' => array(), - 'test_url' => 'http://www.marycagle.com/letsspeakenglish/74-grim-reality/', - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/maximumble.thebookofbiff.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/maximumble.thebookofbiff.com.php deleted file mode 100644 index a94a166..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/maximumble.thebookofbiff.com.php +++ /dev/null @@ -1,11 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://maximumble.thebookofbiff.com/2015/04/20/1084-change/', - 'body' => array('//div[@id="comic"]/div/a/img'), - 'strip' => array(), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/medium.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/medium.com.php deleted file mode 100644 index 880a42c..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/medium.com.php +++ /dev/null @@ -1,14 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'https://medium.com/lessons-learned/917b8b63ae3e', - 'body' => array( - '//div[contains(@class, "post-field body")]', - ), - 'strip' => array( - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/mercworks.net.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/mercworks.net.php deleted file mode 100644 index e478ddf..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/mercworks.net.php +++ /dev/null @@ -1,18 +0,0 @@ - array( - '%.*%' => array( - 'body' => array('//div[@id="comic"]', - '//div[contains(@class,"entry-content")]', - ), - 'strip' => array(), - 'test_url' => 'http://mercworks.net/comicland/healthy-choice/', - ), - ), - 'filter' => array( - '%.*%' => array( - '%title="(.+)" */>%' => '/>
$1', - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/metronieuws.nl.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/metronieuws.nl.php deleted file mode 100644 index ee505a1..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/metronieuws.nl.php +++ /dev/null @@ -1,11 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.metronieuws.nl/sport/2015/04/broer-fellaini-zorgde-bijna-voor-paniek-bij-mourinho', - 'body' => array('//div[contains(@class,"article-top")]/div[contains(@class,"image-component")] | //div[@class="article-full-width"]/div[1]'), - 'strip' => array(), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/milwaukeenns.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/milwaukeenns.php deleted file mode 100644 index 58677a6..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/milwaukeenns.php +++ /dev/null @@ -1,15 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://milwaukeenns.org/2016/01/08/united-way-grant-enables-sdc-to-restore-free-tax-assistance-program/', - 'body' => array( - '//div[@class="pf-content"]', - ), - 'strip' => array( - '//div[@class="printfriendly"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/mlb.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/mlb.com.php deleted file mode 100644 index 55dbfff..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/mlb.com.php +++ /dev/null @@ -1,19 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://m.brewers.mlb.com/news/article/161364798', - 'body' => array( - '//article', - ), - 'strip' => array( - '//div[@class="article-top"]', - '//div[contains(@class, "contributor-bottom")]', - '//p[@class="tagline"]', - '//div[contains(@class, "social-")]', - '//div[@class="button-wrap"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/mokepon.smackjeeves.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/mokepon.smackjeeves.com.php deleted file mode 100644 index b76812b..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/mokepon.smackjeeves.com.php +++ /dev/null @@ -1,11 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://mokepon.smackjeeves.com/comics/2120096/chapter-9-page-68/', - 'body' => array('//*[@id="comic_area_inner"]/img | //*[@id="comic_area_inner"]/a/img'), - 'strip' => array(), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/monwindowsphone.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/monwindowsphone.com.php deleted file mode 100644 index 47c93d7..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/monwindowsphone.com.php +++ /dev/null @@ -1,14 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.monwindowsphone.com/tout-savoir-sur-le-centre-d-action-de-windows-phone-8-1-t40574.html', - 'body' => array( - '//div[@class="blog-post-body"]', - ), - 'strip' => array( - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/mrlovenstein.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/mrlovenstein.com.php deleted file mode 100644 index fb6ae75..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/mrlovenstein.com.php +++ /dev/null @@ -1,10 +0,0 @@ - array( - '%.*%' => array( - '%alt="(.+)" */>%' => '/>
$1', - '%\.png%' => '_rollover.png', - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/muckrock.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/muckrock.com.php deleted file mode 100644 index 845b18e..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/muckrock.com.php +++ /dev/null @@ -1,17 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'https://www.muckrock.com/news/archives/2016/jan/13/5-concerns-private-prisons/', - 'body' => array( - '//div[@class="content"]', - ), - 'strip' => array( - '//h1', - '//div[@class="secondary"]', - '//aside', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/nationaljournal.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/nationaljournal.com.php deleted file mode 100644 index 124afc3..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/nationaljournal.com.php +++ /dev/null @@ -1,16 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.nationaljournal.com/s/354962/south-carolina-evangelicals-outstrip-establishment?mref=home_top_main', - 'body' => array( - '//div[@class="section-body"]', - ), - 'strip' => array( - '//*[contains(@class, "-related")]', - '//*[contains(@class, "social")]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/nature.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/nature.com.php deleted file mode 100644 index 6b9e87f..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/nature.com.php +++ /dev/null @@ -1,13 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.nature.com/doifinder/10.1038/nature.2015.18340', - 'body' => array( - '//div[contains(@class,"main-content")]', - ), - 'strip' => array(), - ), - ), -); - diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/nba.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/nba.com.php deleted file mode 100644 index a9afb62..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/nba.com.php +++ /dev/null @@ -1,16 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.nba.com/2015/news/09/25/knicks-jackson-to-spend-more-time-around-coaching-staff.ap/index.html?rss=true', - 'body' => array( - '//section[@id="nbaArticleContent"]', - ), - 'strip' => array( - '//div[@id="nbaArticleSocialWrapper_bot"]', - '//h5', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/nedroid.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/nedroid.com.php deleted file mode 100644 index 634fe37..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/nedroid.com.php +++ /dev/null @@ -1,9 +0,0 @@ - array( - '%.*%' => array( - '%title="(.+)" */>%' => '/>
$1', - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/networkworld.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/networkworld.com.php deleted file mode 100644 index e5485f6..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/networkworld.com.php +++ /dev/null @@ -1,21 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.networkworld.com/article/3020585/security/the-incident-response-fab-five.html', - 'body' => array( - '//figure/img[@class="hero-img"]', - '//section[@class="deck"]', - '//div[@itemprop="articleBody"] | //div[@itemprop="reviewBody"]', - '//div[@class="carousel-inside-crop"]', - ), - 'strip' => array( - '//script', - '//aside', - '//div[@class="credit"]', - '//div[@class="view-large"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/neustadt-ticker.de.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/neustadt-ticker.de.php deleted file mode 100644 index 60d9bfa..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/neustadt-ticker.de.php +++ /dev/null @@ -1,16 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.neustadt-ticker.de/41302/alltag/kultur/demo-auf-der-boehmischen', - 'body' => array( - '//div[@class="entry-content"]', - ), - 'strip' => array( - '//*[contains(@class, "sharedaddy")]', - '//*[contains(@class, "yarpp-related")]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/news.sciencemag.org.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/news.sciencemag.org.php deleted file mode 100644 index 9b572ef..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/news.sciencemag.org.php +++ /dev/null @@ -1,18 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://news.sciencemag.org/biology/2015/09/genetic-engineering-turns-common-plant-cancer-fighter', - 'body' => array( - '//div[@class="content"]', - ), - 'strip' => array( - '//h1[@class="snews-article__headline"]', - '//div[contains(@class,"easy_social_box")]', - '//div[@class="author-teaser"]', - '//div[@class="article-byline"]', - ), - ), - ) -); - diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/niceteethcomic.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/niceteethcomic.com.php deleted file mode 100644 index a1d495d..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/niceteethcomic.com.php +++ /dev/null @@ -1,11 +0,0 @@ - array( - '%/archives.*%' => array( - 'test_url' => 'http://niceteethcomic.com/archives/page119/', - 'body' => array('//*[@class="comicpane"]/a/img'), - 'strip' => array(), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/nichtlustig.de.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/nichtlustig.de.php deleted file mode 100644 index 2083fdd..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/nichtlustig.de.php +++ /dev/null @@ -1,9 +0,0 @@ - array( - '%.*%' => array( - '%.*static.nichtlustig.de/comics/full/(\\d+).*%s' => '', - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/oglaf.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/oglaf.com.php deleted file mode 100644 index 8614985..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/oglaf.com.php +++ /dev/null @@ -1,20 +0,0 @@ - array( - '%.*%' => array( - 'body' => array( - '//img[@id="strip"]', - '//a/div[@id="nx"]/..', - ), - 'strip' => array(), - 'test_url' => 'http://oglaf.com/slodging/', - ), - ), - 'filter' => array( - '%.*%' => array( - '%alt="(.+)" title="(.+)" */>%' => '/>
$1
$2
', - '%%' => 'Next page', - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/onhax.net.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/onhax.net.php deleted file mode 100644 index d2e2894..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/onhax.net.php +++ /dev/null @@ -1,16 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://onhax.net/process-lasso-8-9-1-4-pro-key-portable-is-here-latest', - 'body' => array( - '//div[@class="postcontent"]', - ), - 'strip' => array( - '//*[@class="sharedaddy sd-sharing-enabled"]', - '//*[@class="yarpp-related"]', - ), - ), - ), -); \ No newline at end of file diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/onmilwaukee.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/onmilwaukee.php deleted file mode 100644 index c1ef6b0..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/onmilwaukee.php +++ /dev/null @@ -1,24 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://onmilwaukee.com/movies/articles/downerspelunking.html', - 'body' => array( - '//article[contains(@class, "show")]', - ), - 'strip' => array( - '//h1', - '//div[contains(@class, "-ad")]', - '//div[contains(@class, "_ad")]', - '//div[@id="pub_wrapper"]', - '//div[contains(@class, "share_tools")]', - '//div[@class="clearfix"]', - '//div[contains(@class,"image_control")]', - '//section[@class="ribboned"]', - '//div[contains(@class,"sidebar")]', - '//aside[@class="article_tag_list"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/openrightsgroup.org.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/openrightsgroup.org.php deleted file mode 100644 index 0440009..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/openrightsgroup.org.php +++ /dev/null @@ -1,21 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'https://www.openrightsgroup.org/blog/2014/3-days-to-go-till-orgcon2014', - 'body' => array( - '//div[contains(@class, "content")]/div', - ), - 'strip' => array( - '//h2[1]', - '//div[@class="info"]', - '//div[@class="tags"]', - '//div[@class="comments"]', - '//div[@class="breadcrumbs"]', - '//h1[@class="pageTitle"]', - '//p[@class="bookmarkThis"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/opensource.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/opensource.com.php deleted file mode 100644 index 52c2ffa..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/opensource.com.php +++ /dev/null @@ -1,12 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://opensource.com/life/15/10/how-internet-things-will-change-way-we-think', - 'body' => array( - '//img[@class="image-full-size"]', - '//div[contains(@class="field-type-text-with-summary")]', - ), - ) - ) -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/optipess.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/optipess.com.php deleted file mode 100644 index 634fe37..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/optipess.com.php +++ /dev/null @@ -1,9 +0,0 @@ - array( - '%.*%' => array( - '%title="(.+)" */>%' => '/>
$1', - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/osnews.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/osnews.com.php deleted file mode 100644 index 10bd0b1..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/osnews.com.php +++ /dev/null @@ -1,12 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://osnews.com/story/28863/Google_said_to_be_under_US_antitrust_scrutiny_over_Android', - 'body' => array( - '//div[@class="newscontent1"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/pastebin.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/pastebin.com.php deleted file mode 100644 index 4cfc859..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/pastebin.com.php +++ /dev/null @@ -1,14 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://pastebin.com/ed1pP9Ak', - 'body' => array( - '//div[@class="text"]', - ), - 'strip' => array( - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/peebleslab.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/peebleslab.com.php deleted file mode 100644 index 0689f87..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/peebleslab.com.php +++ /dev/null @@ -1,10 +0,0 @@ - array( - '%.*%' => array( - // the extra space is required to strip the title cleanly - '%title="(.+) " */>%' => '/>
$1', - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/penny-arcade.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/penny-arcade.com.php deleted file mode 100644 index 84596fa..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/penny-arcade.com.php +++ /dev/null @@ -1,22 +0,0 @@ - array( - '%/news/.*%' => array( - 'test_url' => 'http://penny-arcade.com/news/post/2015/04/15/101-part-two', - 'body' => array( - '//*[@class="postBody"]/*', - ), - 'strip' => array( - ), - ), - '%/comic/.*%' => array( - 'test_url' => 'http://penny-arcade.com/comic/2015/04/15', - 'body' => array( - '//*[@id="comicFrame"]/a/img', - ), - 'strip' => array( - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/pixelbeat.org.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/pixelbeat.org.php deleted file mode 100644 index 289f839..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/pixelbeat.org.php +++ /dev/null @@ -1,13 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.pixelbeat.org/programming/sigpipe_handling.html#1425573246', - 'body' => array( - '//div[@class="contentText"]', - ), - 'strip' => array(), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/plus.google.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/plus.google.com.php deleted file mode 100644 index f6e3d37..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/plus.google.com.php +++ /dev/null @@ -1,12 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'https://plus.google.com/+LarryPage/posts/Lh8SKC6sED1', - 'body' => array( - '//div[@role="article"]/div[contains(@class, "eE")]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/popstrip.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/popstrip.com.php deleted file mode 100644 index 7c4da00..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/popstrip.com.php +++ /dev/null @@ -1,9 +0,0 @@ - array( - '%.*%' => array( - '%( '$1$2$1bonus.png"/>', - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/putaindecode.fr.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/putaindecode.fr.php deleted file mode 100644 index f3885f5..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/putaindecode.fr.php +++ /dev/null @@ -1,17 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://putaindecode.fr/posts/js/etat-lieux-js-modulaire-front/', - 'body' => array( - '//*[@class="putainde-Post-md"]', - ), - 'strip' => array( - '//*[contains(@class, "inlineimg")]', - '//*[contains(@class, "comment-respond")]', - '//header', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/recode.net.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/recode.net.php deleted file mode 100644 index 5511411..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/recode.net.php +++ /dev/null @@ -1,21 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://recode.net/2015/09/26/big-tech-rolls-out-red-carpet-for-indian-prime-minister-lobbies-behind-closed-doors/', - 'body' => array( - '//img[contains(@class,"attachment-large")]', - '//div[contains(@class,"postarea")]', - '//li[@class,"author"]', - ), - 'strip' => array( - '//script', - '//div[contains(@class,"sharedaddy")]', - '//div[@class="post-send-off"]', - '//div[@class="large-12 columns"]', - '//div[contains(@class,"inner-related-article")]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/retractionwatch.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/retractionwatch.com.php deleted file mode 100644 index b97c73e..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/retractionwatch.com.php +++ /dev/null @@ -1,18 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://retractionwatch.com/2015/11/12/psychologist-jens-forster-settles-case-by-agreeing-to-2-retractions/', - 'body' => array( - '//*[@class="main"]', - '//*[@class="entry-content"]', - ), - 'strip' => array( - '//*[contains(@class, "sharedaddy")]', - '//*[contains(@class, "jp-relatedposts")]', - '//p[@class="p1"]', - ) - ) - ) -); - diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/rue89.nouvelobs.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/rue89.nouvelobs.com.php deleted file mode 100644 index ba5bb48..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/rue89.nouvelobs.com.php +++ /dev/null @@ -1,14 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://rue89.feedsportal.com/c/33822/f/608948/s/30999fa0/sc/24/l/0L0Srue890N0C20A130C0A80C30A0Cfaisait0Eboris0Eboillon0Eex0Esarko0Eboy0E350A0E0A0A0A0Eeuros0Egare0Enord0E245315/story01.htm', - 'body' => array( - '//*[@id="article"]/div[contains(@class, "content")]', - ), - 'strip' => array( - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/satwcomic.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/satwcomic.com.php deleted file mode 100644 index 836cc97..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/satwcomic.com.php +++ /dev/null @@ -1,14 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://satwcomic.com/day-at-the-beach', - 'body' => array( - '//div[@class="container"]/center/a/img', - '//span[@itemprop="articleBody"]', - ), - 'strip' => array(), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/scrumalliance.org.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/scrumalliance.org.php deleted file mode 100644 index 1715edd..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/scrumalliance.org.php +++ /dev/null @@ -1,13 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'https://www.scrumalliance.org/community/articles/2015/march/an-introduction-to-agile-project-intake?feed=articles', - 'body' => array( - '//div[@class="article_content"]', - ), - 'strip' => array(), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/securityfocus.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/securityfocus.com.php deleted file mode 100644 index 0b1b98b..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/securityfocus.com.php +++ /dev/null @@ -1,12 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.securityfocus.com/news/11569?ref=rss', - 'body' => array( - '//div[@class="expanded"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/sentfromthemoon.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/sentfromthemoon.com.php deleted file mode 100644 index 94955b2..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/sentfromthemoon.com.php +++ /dev/null @@ -1,19 +0,0 @@ - array( - '%.*%' => array( - 'body' => array( - '//div[@class="comicpane"]/a/img', - '//div[@class="entry"]', - ), - 'strip' => array(), - 'test_url' => 'http://sentfromthemoon.com/archives/1417', - ), - ), - 'filter' => array( - '%.*%' => array( - '%title="(.+)" */>%' => '/>
$1', - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/sitepoint.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/sitepoint.com.php deleted file mode 100644 index b7b9fbe..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/sitepoint.com.php +++ /dev/null @@ -1,14 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.sitepoint.com/creating-hello-world-app-swift/', - 'body' => array( - '//section[@class="article_body"]', - ), - 'strip' => array( - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/slashdot.org.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/slashdot.org.php deleted file mode 100644 index f3496ba..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/slashdot.org.php +++ /dev/null @@ -1,12 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://science.slashdot.org/story/15/04/20/0528253/pull-top-can-tabs-at-50-reach-historic-archaeological-status', - 'body' => array( - '//article/div[@class="body"] | //article[@class="layout-article"]/div[@class="elips"]', ), - 'strip' => array(), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/smallhousebliss.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/smallhousebliss.com.php deleted file mode 100644 index bc0aa48..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/smallhousebliss.com.php +++ /dev/null @@ -1,20 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://smallhousebliss.com/2013/08/29/house-g-by-lode-architecture/', - 'body' => array( - '//div[@class="post-content"]', - ), - 'strip' => array( - '//*[contains(@class, "gallery")]', - '//*[contains(@class, "share")]', - '//*[contains(@class, "wpcnt")]', - '//*[contains(@class, "meta")]', - '//*[contains(@class, "postitle")]', - '//*[@id="nav-below"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/smarthomewelt.de.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/smarthomewelt.de.php deleted file mode 100644 index fe6e79a..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/smarthomewelt.de.php +++ /dev/null @@ -1,11 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://smarthomewelt.de/apple-tv-amazon-echo-smart-home/', - 'body' => array('//div[@class="entry-inner"]/p | //div[@class="entry-inner"]/div[contains(@class,"wp-caption")]'), - 'strip' => array(), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/smashingmagazine.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/smashingmagazine.com.php deleted file mode 100644 index 2e95d1c..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/smashingmagazine.com.php +++ /dev/null @@ -1,11 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.smashingmagazine.com/2015/04/17/using-sketch-for-responsive-web-design-case-study/', - 'body' => array('//article[contains(@class,"post")]/p'), - 'strip' => array(), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/smbc-comics.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/smbc-comics.com.php deleted file mode 100644 index cbf6c99..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/smbc-comics.com.php +++ /dev/null @@ -1,9 +0,0 @@ - array( - '%.*%' => array( - '%()%' => '$1$2$1after$2', - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/soundandvision.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/soundandvision.com.php deleted file mode 100644 index 214ba29..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/soundandvision.com.php +++ /dev/null @@ -1,22 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.soundandvision.com/content/james-guthrie-mixing-roger-waters-and-pink-floyd-51', - 'body' => array( - '//div[@id="left"]', - ), - 'strip' => array( - '//div[@class="meta"]', - '//div[@class="ratingsbox"]', - '//h1', - '//h2', - '//addthis', - '//comment-links', - '//div[@class="book-navigation"]', - '//div[@class="comment-links"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/spiegel.de.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/spiegel.de.php deleted file mode 100644 index 9348ae0..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/spiegel.de.php +++ /dev/null @@ -1,12 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.spiegel.de/politik/ausland/afrika-angola-geht-gegen-islam-vor-und-schliesst-moscheen-a-935788.html', - 'body' => array( - '//div[contains(@class, "article-section")]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/stereophile.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/stereophile.com.php deleted file mode 100644 index 9ea43b3..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/stereophile.com.php +++ /dev/null @@ -1,12 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.stereophile.com/content/2015-rocky-mountain-audio-fest-starts-friday', - 'body' => array( - '//div[@class="content clear-block"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/stupidfox.net.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/stupidfox.net.php deleted file mode 100644 index b8aef24..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/stupidfox.net.php +++ /dev/null @@ -1,14 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://stupidfox.net/134-sleepy-time', - 'body' => array( - '//div[@class="comicmid"]/center/a/img', - '//div[@class="stand_high"]', - ), - 'strip' => array(), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/subtraction.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/subtraction.com.php deleted file mode 100644 index 37ce1cc..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/subtraction.com.php +++ /dev/null @@ -1,16 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.subtraction.com/2015/06/06/time-lapse-video-of-one-world-trade-center/', - 'body' => array('//article/div[@class="entry-content"]'), - 'strip' => array(), - ), - ), - 'filter' => array( - '%.*%' => array( - '%\+%' => '', - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/sz.de.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/sz.de.php deleted file mode 100644 index 53f8b6c..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/sz.de.php +++ /dev/null @@ -1,11 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://sz.de/1.2443161', - 'body' => array('//article[@id="sitecontent"]/section[@class="topenrichment"]//img | //article[@id="sitecontent"]/section[@class="body"]/section[@class="authors"]/preceding-sibling::*[not(contains(@class, "ad"))]'), - 'strip' => array(), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/techcrunch.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/techcrunch.com.php deleted file mode 100644 index 8671ac5..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/techcrunch.com.php +++ /dev/null @@ -1,16 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://techcrunch.com/2013/08/31/indias-visa-maze/', - 'body' => array( - '//div[contains(@class, "media-container")]', - '//div[@class="body-copy"]', - ), - 'strip' => array( - '//*[contains(@class, "module-crunchbase")]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/the-ebook-reader.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/the-ebook-reader.com.php deleted file mode 100644 index 127b216..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/the-ebook-reader.com.php +++ /dev/null @@ -1,12 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://blog.the-ebook-reader.com/2015/09/25/kobo-glo-hd-and-kobo-touch-2-0-covers-and-cases-roundup/', - 'body' => array( - '//div[@class="entry"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/theatlantic.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/theatlantic.com.php deleted file mode 100644 index 0c3201b..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/theatlantic.com.php +++ /dev/null @@ -1,23 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.theatlantic.com/politics/archive/2015/09/what-does-it-mean-to-lament-the-poor-inside-panem/407317/', - 'body' => array( - '//picture[@class="img"]', - '//figure/figcaption/span', - '//div/p[@itemprop="description"]', - '//div[@class="article-body"]', - ), - 'strip' => array( - '//aside[@class="callout"]', - '//span[@class="credit"]', - '//figcaption[@class="credit"]', - '//aside[contains(@class,"partner-box")]', - '//div[contains(@class,"ad")]', - '//a[contains(@class,"social-icon")]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/theawkwardyeti.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/theawkwardyeti.com.php deleted file mode 100644 index 29e0f19..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/theawkwardyeti.com.php +++ /dev/null @@ -1,9 +0,0 @@ - array( - '%.*%' => array( - '%-150x150%' => '', - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/thecodinglove.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/thecodinglove.com.php deleted file mode 100644 index fb7f174..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/thecodinglove.com.php +++ /dev/null @@ -1,11 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://thecodinglove.com/post/116897934767', - 'body' => array('//div[@class="bodytype"]'), - 'strip' => array(), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/thedoghousediaries.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/thedoghousediaries.com.php deleted file mode 100644 index e1c4970..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/thedoghousediaries.com.php +++ /dev/null @@ -1,19 +0,0 @@ - array( - '%.*%' => array( - 'body' => array( - '//div[@class="comicpane"]/a/img', - '//div[@class="entry"]', - ), - 'strip' => array(), - 'test_url' => 'http://thedoghousediaries.com/6023', - ), - ), - 'filter' => array( - '%.*%' => array( - '%title="(.+)" */>%' => '/>
$1', - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/thegamercat.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/thegamercat.com.php deleted file mode 100644 index e1a1318..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/thegamercat.com.php +++ /dev/null @@ -1,11 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.thegamercat.com/comic/just-no/', - 'body' => array('//div[@id="comic"] | //div[@class="post-content"]/div[@class="entry"]/p'), - 'strip' => array(), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/thehindu.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/thehindu.com.php deleted file mode 100644 index f743985..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/thehindu.com.php +++ /dev/null @@ -1,20 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.thehindu.com/sci-tech/science/why-is-the-shape-of-cells-in-a-honeycomb-always-hexagonal/article7692306.ece?utm_source=RSS_Feed&utm_medium=RSS&utm_campaign=RSS_Syndication', - 'body' => array( - '//div/img[@class="main-image"]', - '//div[@class="photo-caption"]', - '//div[@class="articleLead"]', - '//p', - '//span[@class="upper"]', - ), - 'strip' => array( - '//div[@id="articleKeywords"]', - '//div[@class="photo-source"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/thelocal.se.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/thelocal.se.php deleted file mode 100644 index 4e6051e..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/thelocal.se.php +++ /dev/null @@ -1,21 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.thelocal.se/20151018/swedish-moderates-tighten-focus-on-begging-ban', - 'body' => array( - '//article', - ), - 'strip' => array( - '//p[@id="mobile-signature"]', - '//article/div[4]', - '//article/ul[1]', - '//div[@class="clr"]', - '//p[@class="small"]', - '//p[@style="font-weight: bold; font-size: 14px;"]', - '//div[@class="author"]', - '//div[@class="ad_container"]', - ) - ) - ) -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/themerepublic.net.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/themerepublic.net.php deleted file mode 100644 index d537eb8..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/themerepublic.net.php +++ /dev/null @@ -1,11 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.themerepublic.net/2015/04/david-lopez-pitoko.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+blogspot%2FDngUJ+%28Theme+Republic%29&utm_content=FeedBurner', - 'body' => array('//*[@class="post-body"]'), - 'strip' => array(), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/themoscowtimes.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/themoscowtimes.com.php deleted file mode 100644 index db21b15..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/themoscowtimes.com.php +++ /dev/null @@ -1,19 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.themoscowtimes.com/business/article/535500.html', - 'body' => array( - '//div[@class="article_main_img"]', - '//div[@class="article_text"]', - ), - 'strip' => array( - '//div[@class="articlebottom"]', - '//p/b', - '//p/a[contains(@href, "/article.php?id=")]', - '//div[@class="disqus_wrap"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/thenewslens.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/thenewslens.com.php deleted file mode 100644 index 8085cff..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/thenewslens.com.php +++ /dev/null @@ -1,28 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://international.thenewslens.com/post/255032/', - 'body' => array( - '//article/main[contains(@class, "content-post")]', - ), - 'strip' => array( - '//div[@class="photo-credit"]', - '//p[@align="center"]', - '//div[@class="clearfix"]', - '//div[@class="authorZone"]', - '//style', - '//div[@id="ttsbox"]', - '//div[@id="ttscontrols"]', - '//div[@class="author-info"]', - '//div[contains(@id, "-ad")]', - '//div[@style="font-size:small;margin:3px 0 0 0;vertical-align:top;line-height:24px;"]', - '//div[contains(@class, "hidden-xs")]', - '//div[contains(@class, "visible-xs")]', - '//div[contains(@class, "visible-lg")]', - '//a[@name="comment-panel"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/theodd1sout.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/theodd1sout.com.php deleted file mode 100644 index 6d1c667..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/theodd1sout.com.php +++ /dev/null @@ -1,9 +0,0 @@ - array( - '%.*%' => array( - '%-150x150%' => '', - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/theonion.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/theonion.com.php deleted file mode 100644 index c1a51da..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/theonion.com.php +++ /dev/null @@ -1,13 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.theonion.com/article/wild-eyed-jim-harbaugh-informs-players-they-must-k-51397?utm_medium=RSS&utm_campaign=feeds', - 'body' => array( - '//div[@class="content-masthead"]/figure/div/noscript/img', - '//div[@class="content-text"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/thestandard.com.hk.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/thestandard.com.hk.php deleted file mode 100644 index 31ea096..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/thestandard.com.hk.php +++ /dev/null @@ -1,23 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.thestandard.com.hk/breaking_news_detail.asp?id=67156', - 'body' => array( - '//table/tr/td/span[@class="bodyCopy"]', - ), - 'strip' => array( - '//script', - '//br', - '//map[@name="gif_bar"]', - '//img[contains(@usemap,"gif_bar")]', - '//a', - '//span[@class="bodyHeadline"]', - '//i', - '//b', - '//table', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/threepanelsoul.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/threepanelsoul.com.php deleted file mode 100644 index 5407158..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/threepanelsoul.com.php +++ /dev/null @@ -1,12 +0,0 @@ - array( - '%.*%' => array( - 'body' => array( - '//img[@id="cc-comic"]', - ), - 'test_url' => 'http://www.threepanelsoul.com/comic/uncloaking', - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/timesofindia.indiatimes.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/timesofindia.indiatimes.com.php deleted file mode 100644 index 873a46d..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/timesofindia.indiatimes.com.php +++ /dev/null @@ -1,15 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://timesofindia.indiatimes.com/city/mangaluru/Adani-UPCL-to-release-CSR-grant-of-Rs-3-74-crore-to-YellurGram-Panchayat/articleshow/50512116.cms', - 'body' => array( - '//div[@class="article_content clearfix"]', - '//section[@class="highlight clearfix"]', - ), - 'strip' => array( - ), - ), - ), -); \ No newline at end of file diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/travel-dealz.de.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/travel-dealz.de.php deleted file mode 100644 index 76d22ca..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/travel-dealz.de.php +++ /dev/null @@ -1,16 +0,0 @@ - array( - '%^/blog.*%' => array( - 'test_url' => 'http://travel-dealz.de/blog/venere-gutschein/', - 'body' => array('//div[@class="post-entry"]'), - 'strip' => array( - '//*[@id="jp-relatedposts"]', - '//*[@class="post-meta"]', - '//*[@class="post-data"]', - '//*[@id="author-meta"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/treehugger.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/treehugger.com.php deleted file mode 100644 index 8be61aa..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/treehugger.com.php +++ /dev/null @@ -1,15 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.treehugger.com/uncategorized/top-ten-posts-week-bunnies-2.html', - 'body' => array( - '//div[contains(@class, "promo-image")]', - '//div[contains(@id, "entry-body")]', - ), - 'strip' => array( - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/treelobsters.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/treelobsters.com.php deleted file mode 100644 index 634fe37..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/treelobsters.com.php +++ /dev/null @@ -1,9 +0,0 @@ - array( - '%.*%' => array( - '%title="(.+)" */>%' => '/>
$1', - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/twogag.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/twogag.com.php deleted file mode 100644 index 36c260d..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/twogag.com.php +++ /dev/null @@ -1,9 +0,0 @@ - array( - '%.*%' => array( - '%http://www.twogag.com/comics-rss/([^.]+)\\.jpg%' => 'http://www.twogag.com/comics/$1.jpg', - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/twokinds.keenspot.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/twokinds.keenspot.com.php deleted file mode 100644 index f86ae34..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/twokinds.keenspot.com.php +++ /dev/null @@ -1,11 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://twokinds.keenspot.com/archive.php?p=0', - 'body' => array('//*[@class="comic"]/div/a/img | //*[@class="comic"]/div/img | //*[@id="cg_img"]/img | //*[@id="cg_img"]/a/img'), - 'strip' => array(), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/undeadly.org.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/undeadly.org.php deleted file mode 100644 index 3fe8261..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/undeadly.org.php +++ /dev/null @@ -1,15 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://undeadly.org/cgi?action=article&sid=20141101181155', - 'body' => array( - '/html/body/table[3]/tbody/tr/td[1]/table[2]/tr/td[1]', - ), - 'strip' => array( - '//font', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/upi.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/upi.com.php deleted file mode 100644 index cc34eb1..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/upi.com.php +++ /dev/null @@ -1,16 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.upi.com/Top_News/US/2015/09/26/Tech-giants-Hollywood-stars-among-guests-at-state-dinner-for-Chinas-Xi-Jinping/4541443281006/', - 'body' => array( - '//div[@class="img"]', - '//div/article[@itemprop="articleBody"]', - ), - 'strip' => array( - '//div[@align="center"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/version2.dk.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/version2.dk.php deleted file mode 100644 index a961b90..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/version2.dk.php +++ /dev/null @@ -1,13 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.version2.dk/artikel/surface-pro-2-fungerer-bedre-til-arbejde-end-fornoejelse-55195', - 'body' => array( - '//section[contains(@class, "teaser")]', - '//section[contains(@class, "body")]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/vgcats.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/vgcats.com.php deleted file mode 100644 index c36b16c..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/vgcats.com.php +++ /dev/null @@ -1,16 +0,0 @@ - array( - '%/comics.*%' => array( - 'test_url' => 'http://www.vgcats.com/comics/?strip_id=358', - 'body' => array('//*[@align="center"]/img'), - 'strip' => array(), - ), - '%/super.*%' => array( - 'test_url' => 'http://www.vgcats.com/super/?strip_id=84', - 'body' => array('//*[@align="center"]/p/img'), - 'strip' => array(), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/vuxml.org.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/vuxml.org.php deleted file mode 100644 index d8c286e..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/vuxml.org.php +++ /dev/null @@ -1,18 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.vuxml.org/freebsd/a5f160fa-deee-11e4-99f8-080027ef73ec.html', - 'body' => array( - '//body', - ), - 'strip' => array( - '//h1', - '//div[@class="blurb"]', - '//hr', - '//p[@class="copyright"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.bbc.co.uk.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.bbc.co.uk.php deleted file mode 100644 index 1996c3d..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.bbc.co.uk.php +++ /dev/null @@ -1,34 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.bbc.co.uk/news/world-middle-east-23911833', - 'body' => array( - '//div[@class="story-body__inner"] | //div[@class="article"]', - '//div[@class="indPost"]', - ), - 'strip' => array( - '//form', - '//div[@id="headline"]', - '//*[@class="warning"]', - '//span[@class="off-screen"]', - '//span[@class="story-image-copyright"]', - '//ul[@class="story-body__unordered-list"]', - '//div[@class="ad_wrapper"]', - '//div[@id="article-sidebar"]', - '//div[@class="data-table-outer"]', - '//*[@class="story-date"]', - '//*[@class="story-header"]', - '//figure[contains(@class,"has-caption")]', - '//*[@class="story-related"]', - '//*[contains(@class, "byline")]', - '//p[contains(@class, "media-message")]', - '//*[contains(@class, "story-feature")]', - '//*[@id="video-carousel-container"]', - '//*[@id="also-related-links"]', - '//*[contains(@class, "share") or contains(@class, "hidden") or contains(@class, "hyper")]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.bdgest.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.bdgest.com.php deleted file mode 100644 index ffb13ac..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.bdgest.com.php +++ /dev/null @@ -1,16 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.bdgest.com/chronique-6027-BD-Adrastee-Tome-2.html', - 'body' => array( - '//*[contains(@class, "chronique")]', - ), - 'strip' => array( - '//*[contains(@class, "post-review")]', - '//*[contains(@class, "footer-review")]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.bgr.in.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.bgr.in.php deleted file mode 100644 index ee95495..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.bgr.in.php +++ /dev/null @@ -1,24 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.bgr.in/news/xiaomi-redmi-3-with-13-megapixel-camera-snapdragon-616-launched-price-specifications-and-features/', - 'body' => array( - '//div[@class="article-content"]', - ), - 'strip' => array( - '//*[@class="article-meta"]', - '//*[@class="contentAdsense300"]', - '//*[@class="iwpl-social-hide"]', - '//iframe[@class="iframeads"]', - '//*[@class="disqus_thread"]', - '//*[@class="outb-mobile OUTBRAIN"]', - '//*[@class="wdt_smart_alerts"]', - '//*[@class="footnote"]', - '//*[@id="gadget-widget"]', - '//header[@class="article-title entry-header"]', - ), - ), - ), -); \ No newline at end of file diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.businessweek.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.businessweek.com.php deleted file mode 100644 index 6f805f2..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.businessweek.com.php +++ /dev/null @@ -1,16 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.businessweek.com/articles/2013-09-18/elon-musks-hyperloop-will-work-says-some-very-smart-software', - 'body' => array( - '//div[@id="lead_graphic"]', - '//div[@id="article_body"]', - ), - 'strip' => array( - '//*[contains(@class, "related_item")]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.cnn.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.cnn.com.php deleted file mode 100644 index a8f772f..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.cnn.com.php +++ /dev/null @@ -1,25 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.cnn.com/2013/08/31/world/meast/syria-civil-war/index.html?hpt=hp_t1', - 'body' => array( - '//div[@class="cnn_strycntntlft"]', - ), - 'strip' => array( - '//div[@class="cnn_stryshrwdgtbtm"]', - '//div[@class="cnn_strybtmcntnt"]', - '//div[@class="cnn_strylftcntnt"]', - '//div[contains(@class, "cnnGalleryContainer")]', - '//div[contains(@class, "cnn_strylftcexpbx")]', - '//div[contains(@class, "articleGalleryNavContainer")]', - '//div[contains(@class, "cnnArticleGalleryCaptionControl")]', - '//div[contains(@class, "cnnArticleGalleryNavPrevNextDisabled")]', - '//div[contains(@class, "cnnArticleGalleryNavPrevNext")]', - '//div[contains(@class, "cnn_html_media_title_new")]', - '//div[contains(@id, "disqus")]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.developpez.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.developpez.com.php deleted file mode 100644 index cc7e125..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.developpez.com.php +++ /dev/null @@ -1,22 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.developpez.com/actu/81757/Mozilla-annonce-la-disponibilite-de-Firefox-36-qui-passe-au-HTTP-2-et-permet-la-synchronisation-de-son-ecran-d-accueil/', - 'body' => array( - '//*[@itemprop="articleBody"]', - ), - 'strip' => array( - '//form', - '//div[@class="content"]/img', - '//a[last()]/following-sibling::*', - '//*[contains(@class,"actuTitle")]', - '//*[contains(@class,"date")]', - '//*[contains(@class,"inlineimg")]', - '//*[@id="signaler"]', - '//*[@id="signalerFrame"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.egscomics.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.egscomics.com.php deleted file mode 100644 index 49befe1..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.egscomics.com.php +++ /dev/null @@ -1,13 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.egscomics.com/index.php?id=1690', - 'title' => '/html/head/title', - 'body' => array( - '//img[@id="comic"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.fakingnews.firstpost.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.fakingnews.firstpost.com.php deleted file mode 100644 index 4ea4166..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.fakingnews.firstpost.com.php +++ /dev/null @@ -1,18 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.fakingnews.firstpost.com/2016/01/engineering-student-creates-record-in-a-decade-becomes-the-first-to-completely-exhaust-ball-pen-refill/', - 'body' => array( - '//div[@class="entry"]', - ), - 'strip' => array( - '//*[@class="socialshare_bar"]', - '//*[@class="authorbox"]', - '//*[@class="cf5_rps"]', - '//*[@class="60563 fb-comments fb-social-plugin"]', - ), - ), - ), -); \ No newline at end of file diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.forbes.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.forbes.com.php deleted file mode 100644 index 2167ff9..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.forbes.com.php +++ /dev/null @@ -1,21 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.forbes.com/sites/andygreenberg/2013/09/05/follow-the-bitcoins-how-we-got-busted-buying-drugs-on-silk-roads-black-market/', - 'body' => array( - '//div[@id="leftRail"]/div[contains(@class, body)]', - ), - 'strip' => array( - '//aside', - '//div[contains(@class, "entity_block")]', - '//div[contains(@class, "vestpocket") and not contains(@class, "body")]', - '//div[contains(@style, "display")]', - '//div[contains(@id, "comment")]', - '//div[contains(@class, "widget")]', - '//div[contains(@class, "pagination")]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.franceculture.fr.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.franceculture.fr.php deleted file mode 100644 index b56a29b..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.franceculture.fr.php +++ /dev/null @@ -1,14 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.franceculture.fr/emission-culture-eco-la-finance-aime-toujours-la-france-2016-01-08', - 'body' => array( - '//div[@class="listen"]', - '//div[@class="field-items"]', - ), - 'strip' => array( - ), - ) - ) -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.futura-sciences.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.futura-sciences.com.php deleted file mode 100644 index 7fe324b..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.futura-sciences.com.php +++ /dev/null @@ -1,20 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.futura-sciences.com/magazines/espace/infos/actu/d/astronautique-curiosity-franchi-succes-dune-dingo-gap-52289/#xtor=RSS-8', - 'body' => array( - '//div[contains(@class, "content fiche-")]', - ), - 'strip' => array( - '//h1', - '//*[contains(@class, "content-date")]', - '//*[contains(@class, "diaporama")]', - '//*[contains(@class, "slider")]', - '//*[contains(@class, "cartouche")]', - '//*[contains(@class, "noprint")]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.geekculture.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.geekculture.com.php deleted file mode 100644 index 7f03a1d..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.geekculture.com.php +++ /dev/null @@ -1,13 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.geekculture.com/joyoftech/joyarchives/2180.html', - 'body' => array( - '//p[contains(@class,"Maintext")][2]/img', - ), - 'strip' => array(), - ), - ), -); - diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.howtogeek.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.howtogeek.com.php deleted file mode 100644 index 39ac0c5..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.howtogeek.com.php +++ /dev/null @@ -1,15 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.howtogeek.com/235283/what-is-a-wireless-hard-drive-and-should-i-get-one/', - 'body' => array( - '//div[@class="thecontent"]', - ), - 'strip' => array( - '//*[@class="relatedside"]', - ), - ), - ), -); \ No newline at end of file diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.lepoint.fr.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.lepoint.fr.php deleted file mode 100644 index f7386a5..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.lepoint.fr.php +++ /dev/null @@ -1,19 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.lepoint.fr/c-est-arrive-aujourd-hui/19-septembre-1783-pour-la-premiere-fois-un-mouton-un-canard-et-un-coq-s-envoient-en-l-air-devant-louis-xvi-18-09-2012-1507704_494.php', - 'body' => array( - '//article', - ), - 'strip' => array( - '//*[contains(@class, "info_article")]', - '//*[contains(@class, "fildariane_titre")]', - '//*[contains(@class, "entete2_article")]', - '//*[contains(@class, "signature_article")]', - '//*[contains(@id, "share")]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.lesnumeriques.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.lesnumeriques.com.php deleted file mode 100644 index dfc0de6..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.lesnumeriques.com.php +++ /dev/null @@ -1,26 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.lesnumeriques.com/blender/kitchenaid-diamond-5ksb1585-p27473/test.html', - 'body' => array( - '//*[@id="product-content"]', - '//*[@id="news-content"]', - '//*[@id="article-content"]', - ), - 'strip' => array( - '//form', - '//div[contains(@class, "price-v4"])', - '//div[contains(@class, "authors-and-date")]', - '//div[contains(@class, "mini-product")]', - '//div[@id="articles-related-authors"]', - '//div[@id="tags-socials"]', - '//div[@id="user-reviews"]', - '//div[@id="product-reviews"]', - '//div[@id="publication-breadcrumbs-and-date"]', - '//div[@id="publication-breadcrumbs-and-date"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.mac4ever.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.mac4ever.com.php deleted file mode 100644 index a280bd3..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.mac4ever.com.php +++ /dev/null @@ -1,14 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.mac4ever.com/actu/87392_video-quand-steve-jobs-et-bill-gates-jouaient-au-bachelor-avec-le-mac', - 'body' => array( - '//div[contains(@class, "news-news-content")]', - ), - 'strip' => array( - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.makeuseof.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.makeuseof.com.php deleted file mode 100644 index d5d3bf4..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.makeuseof.com.php +++ /dev/null @@ -1,19 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.makeuseof.com/tag/having-problems-with-audio-in-windows-10-heres-a-likely-fix/', - 'body' => array( - '//div[@class="entry"]', - ), - 'strip' => array( - '//*[@class="new_sharebar"]', - '//*[@class="author"]', - '//*[@class="wdt_grouvi"]', - '//*[@class="wdt_smart_alerts"]', - '//*[@class="modal fade grouvi"]', - ), - ), - ), -); \ No newline at end of file diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.npr.org.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.npr.org.php deleted file mode 100644 index 0205d7d..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.npr.org.php +++ /dev/null @@ -1,21 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.npr.org/blogs/thesalt/2013/09/17/223345977/auto-brewery-syndrome-apparently-you-can-make-beer-in-your-gut', - 'body' => array( - '//div[@id="storytext"]', - ), - 'strip' => array( - '//*[@class="bucket img"]', - '//*[@class="creditwrap"]', - '//div[@class="credit-caption"]', - '//*[@class="credit"]', - '//*[@class="captionwrap"]', - '//*[@class="toggle-caption"]', - '//*[contains(@class, "enlargebtn")]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.numerama.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.numerama.com.php deleted file mode 100644 index d18ed1c..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.numerama.com.php +++ /dev/null @@ -1,16 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.numerama.com/sciences/125959-recherches-ladn-recompensees-nobel-de-chimie.html', - 'body' => array( - '//article', - ), - 'strip' => array( - '//footer', - '//section[@class="related-article"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.oneindia.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.oneindia.com.php deleted file mode 100644 index 810f138..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.oneindia.com.php +++ /dev/null @@ -1,15 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.oneindia.com/india/b-luru-govt-likely-remove-word-eunuch-from-sec-36-a-karnataka-police-act-1981173.html', - 'body' => array( - '//div[@class="ecom-ad-content"]', - ), - 'strip' => array( - '//*[@id="view_cmtns"]', - ), - ), - ), -); \ No newline at end of file diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.pcinpact.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.pcinpact.com.php deleted file mode 100644 index 24e9a2f..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.pcinpact.com.php +++ /dev/null @@ -1,14 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.pcinpact.com/news/85954-air-france-ne-vous-demande-plus-deteindre-vos-appareils-electroniques.htm?utm_source=PCi_RSS_Feed&utm_medium=news&utm_campaign=pcinpact', - 'body' => array( - '//div[contains(@id, "actu_content")]', - ), - 'strip' => array( - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.pseudo-sciences.org.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.pseudo-sciences.org.php deleted file mode 100644 index 017f916..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.pseudo-sciences.org.php +++ /dev/null @@ -1,17 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.pseudo-sciences.org/spip.php?article2275', - 'body' => array( - '//div[@id="art_main"]', - ), - 'strip' => array( - '//div[@id="art_print"]', - '//div[@id="art_chapo"]', - '//img[@class="puce"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.slate.fr.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.slate.fr.php deleted file mode 100644 index 3591f39..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.slate.fr.php +++ /dev/null @@ -1,20 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.slate.fr/monde/77034/allemagne-2013-couacs-campagne', - 'body' => array( - '//div[@class="article_content"]', - ), - 'strip' => array( - '//*[@id="slate_associated_bn"]', - '//*[@id="ligatus-article"]', - '//*[@id="article_sidebar"]', - '//div[contains(@id, "reseaux")]', - '//*[contains(@class, "smart") or contains(@class, "article_tags") or contains(@class, "article_reactions")]', - '//*[contains(@class, "OUTBRAIN") or contains(@class, "related_item") or contains(@class, "share")]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.universfreebox.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.universfreebox.com.php deleted file mode 100644 index fe9b54a..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.universfreebox.com.php +++ /dev/null @@ -1,16 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://www.universfreebox.com/article/24305/4G-Bouygues-Telecom-lance-une-vente-flash-sur-son-forfait-Sensation-3Go', - 'body' => array( - '//div[@id="corps_corps"]', - ), - 'strip' => array( - '//*[@id="formulaire"]', - '//*[@id="commentaire"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.zeit.de.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.zeit.de.php deleted file mode 100644 index cdac1cb..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/www.zeit.de.php +++ /dev/null @@ -1,41 +0,0 @@ - array( - '%^/zeit-magazin.*%' => array( - 'test_url' => 'http://www.zeit.de/zeit-magazin/2015/15/pegida-kathrin-oertel-lutz-bachmann', - 'body' => array( - '//article[@class="article"]', - ), - 'strip' => array( - '//header/div/h1', - '//header/div/div[@class="article__head__subtitle"]', - '//header/div/div[@class="article__column__author"]', - '//header/div/div[@class="article__column__author"]', - '//header/div/span[@class="article__head__meta-wrap"]', - '//form', - '//style', - '//div[contains(@class, "ad-tile")]', - '//div[@class="iqd-mobile-adplace"]', - '//div[@id="iq-artikelanker"]', - '//div[@id="js-social-services"]', - '//section[@id="js-comments"]', - '//aside', - ), - ), - '%.*%' => array( - 'test_url' => 'http://www.zeit.de/politik/ausland/2015-04/thessaloniki-krise-griechenland-yannis-boutaris/', - 'body' => array( - '//div[@class="article-body"]', - ), - 'strip' => array( - '//*[@class="articleheader"]', - '//*[@class="excerpt"]', - '//div[contains(@class, "ad")]', - '//div[@itemprop="video"]', - '//*[@class="articlemeta"]', - '//*[@class="articlemeta-clear"]', - '//*[@class="zol_inarticletools"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/xkcd.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/xkcd.com.php deleted file mode 100644 index 7a04bec..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/xkcd.com.php +++ /dev/null @@ -1,9 +0,0 @@ - array( - '%.*%' => array( - '%alt="(.+)" */>%' => '/>
$1', - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/zdnet.com.php b/vendor/fguillot/picofeed/lib/PicoFeed/Rules/zdnet.com.php deleted file mode 100644 index 45fa3cc..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Rules/zdnet.com.php +++ /dev/null @@ -1,24 +0,0 @@ - array( - '%.*%' => array( - 'test_url' => 'http://zdnet.com.feedsportal.com/c/35462/f/675637/s/4a33c93e/sc/11/l/0L0Szdnet0N0Carticle0Cchina0Eus0Eagree0Eon0Ecybercrime0Ecooperation0Eamid0Econtinued0Etension0C0Tftag0FRSSbaffb68/story01.htm', - 'body' => array( - '//p[@class="summary"]', - '//div[contains(@class,"storyBody")]', - ), - 'strip' => array( - '//*[contains(@class,"ad-")]', - '//p/span', - '//script', - '//p[@class="summary"]', - '//div[contains(@class,"relatedContent")]', - '//div[contains(@class,"loader")]', - '//p[@class="photoDetails"]', - '//div[@class="thumbnailSlider"]', - '//div[@class="shortcodeGalleryWrapper"]', - ), - ), - ), -); diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Scraper/CandidateParser.php b/vendor/fguillot/picofeed/lib/PicoFeed/Scraper/CandidateParser.php deleted file mode 100644 index 802b01b..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Scraper/CandidateParser.php +++ /dev/null @@ -1,273 +0,0 @@ -dom = XmlParser::getHtmlDocument(''.$html); - $this->xpath = new DOMXPath($this->dom); - } - - /** - * Get the relevant content with the list of potential attributes. - * - * @return string - */ - public function execute() - { - $content = $this->findContentWithCandidates(); - - if (strlen($content) < 200) { - $content = $this->findContentWithArticle(); - } - - if (strlen($content) < 50) { - $content = $this->findContentWithBody(); - } - - return $this->stripGarbage($content); - } - - /** - * Find content based on the list of tag candidates. - * - * @return string - */ - public function findContentWithCandidates() - { - foreach ($this->candidatesAttributes as $candidate) { - Logger::setMessage(get_called_class().': Try this candidate: "'.$candidate.'"'); - - $nodes = $this->xpath->query('//*[(contains(@class, "'.$candidate.'") or @id="'.$candidate.'") and not (contains(@class, "nav") or contains(@class, "page"))]'); - - if ($nodes !== false && $nodes->length > 0) { - Logger::setMessage(get_called_class().': Find candidate "'.$candidate.'"'); - - return $this->dom->saveXML($nodes->item(0)); - } - } - - return ''; - } - - /** - * Find
tag. - * - * @return string - */ - public function findContentWithArticle() - { - $nodes = $this->xpath->query('//article'); - - if ($nodes !== false && $nodes->length > 0) { - Logger::setMessage(get_called_class().': Find
tag'); - - return $this->dom->saveXML($nodes->item(0)); - } - - return ''; - } - - /** - * Find tag. - * - * @return string - */ - public function findContentWithBody() - { - $nodes = $this->xpath->query('//body'); - - if ($nodes !== false && $nodes->length > 0) { - Logger::setMessage(get_called_class().' Find '); - - return $this->dom->saveXML($nodes->item(0)); - } - - return ''; - } - - /** - * Strip useless tags. - * - * @param string $content - * - * @return string - */ - public function stripGarbage($content) - { - $dom = XmlParser::getDomDocument($content); - - if ($dom !== false) { - $xpath = new DOMXPath($dom); - - $this->stripTags($xpath); - $this->stripAttributes($dom, $xpath); - - $content = $dom->saveXML($dom->documentElement); - } - - return $content; - } - - /** - * Remove blacklisted tags. - * - * @param DOMXPath $xpath - */ - public function stripTags(DOMXPath $xpath) - { - foreach ($this->stripTags as $tag) { - $nodes = $xpath->query('//'.$tag); - - if ($nodes !== false && $nodes->length > 0) { - Logger::setMessage(get_called_class().': Strip tag: "'.$tag.'"'); - - foreach ($nodes as $node) { - $node->parentNode->removeChild($node); - } - } - } - } - - /** - * Remove blacklisted attributes. - * - * @param DomDocument $dom - * @param DOMXPath $xpath - */ - public function stripAttributes(DomDocument $dom, DOMXPath $xpath) - { - foreach ($this->stripAttributes as $attribute) { - $nodes = $xpath->query('//*[contains(@class, "'.$attribute.'") or contains(@id, "'.$attribute.'")]'); - - if ($nodes !== false && $nodes->length > 0) { - Logger::setMessage(get_called_class().': Strip attribute: "'.$attribute.'"'); - - foreach ($nodes as $node) { - if ($this->shouldRemove($dom, $node)) { - $node->parentNode->removeChild($node); - } - } - } - } - } - - /** - * Return false if the node should not be removed. - * - * @param DomDocument $dom - * @param DomNode $node - * - * @return bool - */ - public function shouldRemove(DomDocument $dom, $node) - { - $document_length = strlen($dom->textContent); - $node_length = strlen($node->textContent); - - if ($document_length === 0) { - return true; - } - - $ratio = $node_length * 100 / $document_length; - - if ($ratio >= 90) { - Logger::setMessage(get_called_class().': Should not remove this node ('.$node->nodeName.') ratio: '.$ratio.'%'); - - return false; - } - - return true; - } -} diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Scraper/ParserInterface.php b/vendor/fguillot/picofeed/lib/PicoFeed/Scraper/ParserInterface.php deleted file mode 100644 index a33fefc..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Scraper/ParserInterface.php +++ /dev/null @@ -1,13 +0,0 @@ -config = $config; - } - - /** - * Get the rules for an URL. - * - * @param string $url the URL that should be looked up - * - * @return array the array containing the rules - */ - public function getRules($url) - { - $hostname = parse_url($url, PHP_URL_HOST); - - if ($hostname !== false) { - $files = $this->getRulesFileList($hostname); - - foreach ($this->getRulesFolders() as $folder) { - $rule = $this->loadRuleFile($folder, $files); - - if (!empty($rule)) { - return $rule; - } - } - } - - return array(); - } - - /** - * Get the list of possible rules file names for a given hostname. - * - * @param string $hostname Hostname - * - * @return array - */ - public function getRulesFileList($hostname) - { - $files = array($hostname); // subdomain.domain.tld - $parts = explode('.', $hostname); - $len = count($parts); - - if ($len > 2) { - $subdomain = array_shift($parts); - $files[] = implode('.', $parts); // domain.tld - $files[] = '.'.implode('.', $parts); // .domain.tld - $files[] = $subdomain; // subdomain - } elseif ($len === 2) { - $files[] = '.'.implode('.', $parts); // .domain.tld - $files[] = $parts[0]; // domain - } - - return $files; - } - - /** - * Load a rule file from the defined folder. - * - * @param string $folder Rule directory - * @param array $files List of possible file names - * - * @return array - */ - public function loadRuleFile($folder, array $files) - { - foreach ($files as $file) { - $filename = $folder.'/'.$file.'.php'; - if (file_exists($filename)) { - Logger::setMessage(get_called_class().' Load rule: '.$file); - - return include $filename; - } - } - - return array(); - } - - /** - * Get the list of folders that contains rules. - * - * @return array - */ - public function getRulesFolders() - { - $folders = array(__DIR__.'/../Rules'); - - if ($this->config !== null && $this->config->getGrabberRulesFolder() !== null) { - $folders[] = $this->config->getGrabberRulesFolder(); - } - - return $folders; - } -} diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Scraper/RuleParser.php b/vendor/fguillot/picofeed/lib/PicoFeed/Scraper/RuleParser.php deleted file mode 100644 index 95665bf..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Scraper/RuleParser.php +++ /dev/null @@ -1,83 +0,0 @@ -rules = $rules; - $this->dom = XmlParser::getHtmlDocument(''.$html); - $this->xpath = new DOMXPath($this->dom); - } - - /** - * Get the relevant content with predefined rules. - * - * @return string - */ - public function execute() - { - $this->stripTags(); - - return $this->findContent(); - } - - /** - * Remove HTML tags. - */ - public function stripTags() - { - if (isset($this->rules['strip']) && is_array($this->rules['strip'])) { - foreach ($this->rules['strip'] as $pattern) { - $nodes = $this->xpath->query($pattern); - - if ($nodes !== false && $nodes->length > 0) { - foreach ($nodes as $node) { - $node->parentNode->removeChild($node); - } - } - } - } - } - - /** - * Fetch content based on Xpath rules. - */ - public function findContent() - { - $content = ''; - - if (isset($this->rules['body']) && is_array($this->rules['body'])) { - foreach ($this->rules['body'] as $pattern) { - $nodes = $this->xpath->query($pattern); - - if ($nodes !== false && $nodes->length > 0) { - foreach ($nodes as $node) { - $content .= $this->dom->saveXML($node); - } - } - } - } - - return $content; - } -} diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Scraper/Scraper.php b/vendor/fguillot/picofeed/lib/PicoFeed/Scraper/Scraper.php deleted file mode 100644 index f1d1222..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Scraper/Scraper.php +++ /dev/null @@ -1,341 +0,0 @@ -config = $config; - Logger::setTimezone($this->config->getTimezone()); - } - - /** - * Disable candidates parsing. - * - * @return Scraper - */ - public function disableCandidateParser() - { - $this->enableCandidateParser = false; - - return $this; - } - - /** - * Get encoding. - * - * @return string - */ - public function getEncoding() - { - return $this->encoding; - } - - /** - * Set encoding. - * - * @param string $encoding - * - * @return Scraper - */ - public function setEncoding($encoding) - { - $this->encoding = $encoding; - - return $this; - } - - /** - * Get URL to download. - * - * @return string - */ - public function getUrl() - { - return $this->url; - } - - /** - * Set URL to download. - * - * @param string $url URL - * - * @return Scraper - */ - public function setUrl($url) - { - $this->url = $url; - - return $this; - } - - /** - * Return true if the scraper found relevant content. - * - * @return bool - */ - public function hasRelevantContent() - { - return !empty($this->content); - } - - /** - * Get relevant content. - * - * @return string - */ - public function getRelevantContent() - { - return $this->content; - } - - /** - * Get raw content (unfiltered). - * - * @return string - */ - public function getRawContent() - { - return $this->html; - } - - /** - * Set raw content (unfiltered). - * - * @param string $html - * - * @return Scraper - */ - public function setRawContent($html) - { - $this->html = $html; - - return $this; - } - - /** - * Get filtered relevant content. - * - * @return string - */ - public function getFilteredContent() - { - $filter = Filter::html($this->content, $this->url); - $filter->setConfig($this->config); - - return $filter->execute(); - } - - /** - * Download the HTML content. - * - * @return bool - */ - public function download() - { - if (!empty($this->url)) { - - // Clear everything - $this->html = ''; - $this->content = ''; - $this->encoding = ''; - - try { - $client = Client::getInstance(); - $client->setConfig($this->config); - $client->setTimeout($this->config->getGrabberTimeout()); - $client->setUserAgent($this->config->getGrabberUserAgent()); - $client->execute($this->url); - - $this->url = $client->getUrl(); - $this->html = $client->getContent(); - $this->encoding = $client->getEncoding(); - - return true; - } catch (ClientException $e) { - Logger::setMessage(get_called_class().': '.$e->getMessage()); - } - } - - return false; - } - - /** - * Execute the scraper. - */ - public function execute() - { - $this->download(); - - if (!$this->skipProcessing()) { - $this->prepareHtml(); - - $parser = $this->getParser(); - - if ($parser !== null) { - $this->content = $parser->execute(); - Logger::setMessage(get_called_class().': Content length: '.strlen($this->content).' bytes'); - } - } - } - - /** - * Returns true if the parsing must be skipped. - * - * @return bool - */ - public function skipProcessing() - { - $handlers = array( - 'detectStreamingVideos', - 'detectPdfFiles', - ); - - foreach ($handlers as $handler) { - if ($this->$handler()) { - return true; - } - } - - if (empty($this->html)) { - Logger::setMessage(get_called_class().': Raw HTML is empty'); - - return true; - } - - return false; - } - - /** - * Get the parser. - * - * @return ParserInterface - */ - public function getParser() - { - $ruleLoader = new RuleLoader($this->config); - $rules = $ruleLoader->getRules($this->url); - - if (!empty($rules['grabber'])) { - Logger::setMessage(get_called_class().': Parse content with rules'); - - foreach ($rules['grabber'] as $pattern => $rule) { - $url = new Url($this->url); - $sub_url = $url->getFullPath(); - - if (preg_match($pattern, $sub_url)) { - Logger::setMessage(get_called_class().': Matched url '.$sub_url); - - return new RuleParser($this->html, $rule); - } - } - } elseif ($this->enableCandidateParser) { - Logger::setMessage(get_called_class().': Parse content with candidates'); - - return new CandidateParser($this->html); - } - - return; - } - - /** - * Normalize encoding and strip head tag. - */ - public function prepareHtml() - { - $html_encoding = XmlParser::getEncodingFromMetaTag($this->html); - - $this->html = Encoding::convert($this->html, $html_encoding ?: $this->encoding); - $this->html = Filter::stripHeadTags($this->html); - - Logger::setMessage(get_called_class().': HTTP Encoding "'.$this->encoding.'" ; HTML Encoding "'.$html_encoding.'"'); - } - - /** - * Return the Youtube embed player and skip processing. - * - * @return bool - */ - public function detectStreamingVideos() - { - if (preg_match("#(?<=v=|v\/|vi=|vi\/|youtu.be\/)[a-zA-Z0-9_-]{11}#", $this->url, $matches)) { - $this->content = ''; - - return true; - } - - return false; - } - - /** - * Skip processing for PDF documents. - * - * @return bool - */ - public function detectPdfFiles() - { - return substr($this->url, -3) === 'pdf'; - } -} diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Serialization/Export.php b/vendor/fguillot/picofeed/lib/PicoFeed/Serialization/Export.php deleted file mode 100644 index e5b6197..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Serialization/Export.php +++ /dev/null @@ -1,122 +0,0 @@ -content = $content; - } - - /** - * Get the OPML document. - * - * @return string - */ - public function execute() - { - $xml = new SimpleXMLElement(''); - - $head = $xml->addChild('head'); - $head->addChild('title', 'OPML Export'); - - $body = $xml->addChild('body'); - - foreach ($this->content as $category => $values) { - if (is_string($category)) { - $this->createCategory($body, $category, $values); - } else { - $this->createEntry($body, $values); - } - } - - return $xml->asXML(); - } - - /** - * Create a feed entry. - * - * @param SimpleXMLElement $parent Parent Element - * @param array $feed Feed properties - */ - public function createEntry(SimpleXMLElement $parent, array $feed) - { - $valid = true; - - foreach ($this->required_fields as $field) { - if (!isset($feed[$field])) { - $valid = false; - break; - } - } - - if ($valid) { - $outline = $parent->addChild('outline'); - $outline->addAttribute('xmlUrl', $feed['feed_url']); - $outline->addAttribute('htmlUrl', $feed['site_url']); - $outline->addAttribute('title', $feed['title']); - $outline->addAttribute('text', $feed['title']); - $outline->addAttribute('description', isset($feed['description']) ? $feed['description'] : $feed['title']); - $outline->addAttribute('type', 'rss'); - $outline->addAttribute('version', 'RSS'); - } - } - - /** - * Create entries for a feed list. - * - * @param SimpleXMLElement $parent Parent Element - * @param array $feeds Feed list - */ - public function createEntries(SimpleXMLElement $parent, array $feeds) - { - foreach ($feeds as $feed) { - $this->createEntry($parent, $feed); - } - } - - /** - * Create a category entry. - * - * @param SimpleXMLElement $parent Parent Element - * @param string $category Category - * @param array $feeds Feed properties - */ - public function createCategory(SimpleXMLElement $parent, $category, array $feeds) - { - $outline = $parent->addChild('outline'); - $outline->addAttribute('text', $category); - $this->createEntries($outline, $feeds); - } -} diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Serialization/Import.php b/vendor/fguillot/picofeed/lib/PicoFeed/Serialization/Import.php deleted file mode 100644 index 5a426e6..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Serialization/Import.php +++ /dev/null @@ -1,162 +0,0 @@ -content = $content; - } - - /** - * Parse the OPML file. - * - * @return array|false - */ - public function execute() - { - Logger::setMessage(get_called_class().': start importation'); - - $xml = XmlParser::getSimpleXml(trim($this->content)); - - if ($xml === false || $xml->getName() !== 'opml' || !isset($xml->body)) { - Logger::setMessage(get_called_class().': OPML tag not found or malformed XML document'); - - return false; - } - - $this->parseEntries($xml->body); - Logger::setMessage(get_called_class().': '.count($this->items).' subscriptions found'); - - return $this->items; - } - - /** - * Parse each entries of the subscription list. - * - * @param SimpleXMLElement $tree XML node - */ - public function parseEntries(SimpleXMLElement $tree) - { - if (isset($tree->outline)) { - foreach ($tree->outline as $item) { - if (isset($item->outline)) { - $this->parseEntries($item); - } elseif ((isset($item['text']) || isset($item['title'])) && isset($item['xmlUrl'])) { - $entry = new StdClass(); - $entry->category = $this->findCategory($tree); - $entry->title = $this->findTitle($item); - $entry->feed_url = $this->findFeedUrl($item); - $entry->site_url = $this->findSiteUrl($item, $entry); - $entry->type = $this->findType($item); - $entry->description = $this->findDescription($item, $entry); - $this->items[] = $entry; - } - } - } - } - - /** - * Find category. - * - * @param SimpleXmlElement $tree XML tree - * - * @return string - */ - public function findCategory(SimpleXmlElement $tree) - { - return isset($tree['title']) ? (string) $tree['title'] : (string) $tree['text']; - } - - /** - * Find title. - * - * @param SimpleXmlElement $item XML tree - * - * @return string - */ - public function findTitle(SimpleXmlElement $item) - { - return isset($item['title']) ? (string) $item['title'] : (string) $item['text']; - } - - /** - * Find feed url. - * - * @param SimpleXmlElement $item XML tree - * - * @return string - */ - public function findFeedUrl(SimpleXmlElement $item) - { - return (string) $item['xmlUrl']; - } - - /** - * Find site url. - * - * @param SimpleXmlElement $item XML tree - * @param StdClass $entry Feed entry - * - * @return string - */ - public function findSiteUrl(SimpleXmlElement $item, StdClass $entry) - { - return isset($item['htmlUrl']) ? (string) $item['htmlUrl'] : $entry->feed_url; - } - - /** - * Find type. - * - * @param SimpleXmlElement $item XML tree - * - * @return string - */ - public function findType(SimpleXmlElement $item) - { - return isset($item['version']) ? (string) $item['version'] : isset($item['type']) ? (string) $item['type'] : 'rss'; - } - - /** - * Find description. - * - * @param SimpleXmlElement $item XML tree - * @param StdClass $entry Feed entry - * - * @return string - */ - public function findDescription(SimpleXmlElement $item, StdClass $entry) - { - return isset($item['description']) ? (string) $item['description'] : $entry->title; - } -} diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Syndication/Atom.php b/vendor/fguillot/picofeed/lib/PicoFeed/Syndication/Atom.php deleted file mode 100644 index 759f35b..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Syndication/Atom.php +++ /dev/null @@ -1,215 +0,0 @@ -checkRequiredProperties($this->required_feed_properties, $this); - - $this->dom = new DomDocument('1.0', 'UTF-8'); - $this->dom->formatOutput = true; - - // - $feed = $this->dom->createElement('feed'); - $feed->setAttributeNodeNS(new DomAttr('xmlns', 'http://www.w3.org/2005/Atom')); - - // - $generator = $this->dom->createElement('generator', 'PicoFeed'); - $generator->setAttribute('uri', 'https://github.com/fguillot/picoFeed'); - $feed->appendChild($generator); - - // - $title = $this->dom->createElement('title'); - $title->appendChild($this->dom->createTextNode($this->title)); - $feed->appendChild($title); - - // <id/> - $id = $this->dom->createElement('id'); - $id->appendChild($this->dom->createTextNode($this->site_url)); - $feed->appendChild($id); - - // <updated/> - $this->addUpdated($feed, $this->updated); - - // <link rel="alternate" type="text/html" href="http://example.org/"/> - $this->addLink($feed, $this->site_url); - - // <link rel="self" type="application/atom+xml" href="http://example.org/feed.atom"/> - $this->addLink($feed, $this->feed_url, 'self', 'application/atom+xml'); - - // <author/> - if (isset($this->author)) { - $this->addAuthor($feed, $this->author); - } - - // <entry/> - foreach ($this->items as $item) { - $this->checkRequiredProperties($this->required_item_properties, $item); - $feed->appendChild($this->createEntry($item)); - } - - $this->dom->appendChild($feed); - - if ($filename) { - $this->dom->save($filename); - } else { - return $this->dom->saveXML(); - } - } - - /** - * Create item entry. - * - * @param arrray $item Item properties - * - * @return DomElement - */ - public function createEntry(array $item) - { - $entry = $this->dom->createElement('entry'); - - // <title/> - $title = $this->dom->createElement('title'); - $title->appendChild($this->dom->createTextNode($item['title'])); - $entry->appendChild($title); - - // <id/> - $id = $this->dom->createElement('id'); - $id->appendChild($this->dom->createTextNode(isset($item['id']) ? $item['id'] : $item['url'])); - $entry->appendChild($id); - - // <updated/> - $this->addUpdated($entry, isset($item['updated']) ? $item['updated'] : ''); - - // <published/> - if (isset($item['published'])) { - $entry->appendChild($this->dom->createElement('published', date(DATE_ATOM, $item['published']))); - } - - // <link rel="alternate" type="text/html" href="http://example.org/"/> - $this->addLink($entry, $item['url']); - - // <summary/> - if (isset($item['summary'])) { - $summary = $this->dom->createElement('summary'); - $summary->appendChild($this->dom->createTextNode($item['summary'])); - $entry->appendChild($summary); - } - - // <content/> - if (isset($item['content'])) { - $content = $this->dom->createElement('content'); - $content->setAttribute('type', 'html'); - $content->appendChild($this->dom->createCDATASection($item['content'])); - $entry->appendChild($content); - } - - // <author/> - if (isset($item['author'])) { - $this->addAuthor($entry, $item['author']); - } - - return $entry; - } - - /** - * Add Link. - * - * @param DomElement $xml XML node - * @param string $url URL - * @param string $rel Link rel attribute - * @param string $type Link type attribute - */ - public function addLink(DomElement $xml, $url, $rel = 'alternate', $type = 'text/html') - { - $link = $this->dom->createElement('link'); - $link->setAttribute('rel', $rel); - $link->setAttribute('type', $type); - $link->setAttribute('href', $url); - $xml->appendChild($link); - } - - /** - * Add publication date. - * - * @param DomElement $xml XML node - * @param int $value Timestamp - */ - public function addUpdated(DomElement $xml, $value = 0) - { - $xml->appendChild($this->dom->createElement( - 'updated', - date(DATE_ATOM, $value ?: time()) - )); - } - - /** - * Add author. - * - * @param DomElement $xml XML node - * @param array $values Author name and email - */ - public function addAuthor(DomElement $xml, array $values) - { - $author = $this->dom->createElement('author'); - - if (isset($values['name'])) { - $name = $this->dom->createElement('name'); - $name->appendChild($this->dom->createTextNode($values['name'])); - $author->appendChild($name); - } - - if (isset($values['email'])) { - $email = $this->dom->createElement('email'); - $email->appendChild($this->dom->createTextNode($values['email'])); - $author->appendChild($email); - } - - if (isset($values['url'])) { - $uri = $this->dom->createElement('uri'); - $uri->appendChild($this->dom->createTextNode($values['url'])); - $author->appendChild($uri); - } - - $xml->appendChild($author); - } -} diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Syndication/Rss20.php b/vendor/fguillot/picofeed/lib/PicoFeed/Syndication/Rss20.php deleted file mode 100644 index 3d0150d..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Syndication/Rss20.php +++ /dev/null @@ -1,206 +0,0 @@ -<?php - -namespace PicoFeed\Syndication; - -use DomDocument; -use DomAttr; -use DomElement; - -/** - * Rss 2.0 writer class. - * - * @author Frederic Guillot - */ -class Rss20 extends Writer -{ - /** - * List of required properties for each feed. - * - * @var array - */ - private $required_feed_properties = array( - 'title', - 'site_url', - 'feed_url', - ); - - /** - * List of required properties for each item. - * - * @var array - */ - private $required_item_properties = array( - 'title', - 'url', - ); - - /** - * Get the Rss 2.0 document. - * - * @param string $filename Optional filename - * - * @return string - */ - public function execute($filename = '') - { - $this->checkRequiredProperties($this->required_feed_properties, $this); - - $this->dom = new DomDocument('1.0', 'UTF-8'); - $this->dom->formatOutput = true; - - // <rss/> - $rss = $this->dom->createElement('rss'); - $rss->setAttribute('version', '2.0'); - $rss->setAttributeNodeNS(new DomAttr('xmlns:content', 'http://purl.org/rss/1.0/modules/content/')); - $rss->setAttributeNodeNS(new DomAttr('xmlns:atom', 'http://www.w3.org/2005/Atom')); - - $channel = $this->dom->createElement('channel'); - - // <generator/> - $generator = $this->dom->createElement('generator', 'PicoFeed (https://github.com/fguillot/picoFeed)'); - $channel->appendChild($generator); - - // <title/> - $title = $this->dom->createElement('title'); - $title->appendChild($this->dom->createTextNode($this->title)); - $channel->appendChild($title); - - // <description/> - $description = $this->dom->createElement('description'); - $description->appendChild($this->dom->createTextNode($this->description ?: $this->title)); - $channel->appendChild($description); - - // <pubDate/> - $this->addPubDate($channel, $this->updated); - - // <atom:link/> - $link = $this->dom->createElement('atom:link'); - $link->setAttribute('href', $this->feed_url); - $link->setAttribute('rel', 'self'); - $link->setAttribute('type', 'application/rss+xml'); - $channel->appendChild($link); - - // <link/> - $link = $this->dom->createElement('link'); - $link->appendChild($this->dom->createTextNode($this->site_url)); - $channel->appendChild($link); - - // <webMaster/> - if (isset($this->author)) { - $this->addAuthor($channel, 'webMaster', $this->author); - } - - // <item/> - foreach ($this->items as $item) { - $this->checkRequiredProperties($this->required_item_properties, $item); - $channel->appendChild($this->createEntry($item)); - } - - $rss->appendChild($channel); - $this->dom->appendChild($rss); - - if ($filename) { - $this->dom->save($filename); - } else { - return $this->dom->saveXML(); - } - } - - /** - * Create item entry. - * - * @param arrray $item Item properties - * - * @return DomElement - */ - public function createEntry(array $item) - { - $entry = $this->dom->createElement('item'); - - // <title/> - $title = $this->dom->createElement('title'); - $title->appendChild($this->dom->createTextNode($item['title'])); - $entry->appendChild($title); - - // <link/> - $link = $this->dom->createElement('link'); - $link->appendChild($this->dom->createTextNode($item['url'])); - $entry->appendChild($link); - - // <guid/> - if (isset($item['id'])) { - $guid = $this->dom->createElement('guid'); - $guid->setAttribute('isPermaLink', 'false'); - $guid->appendChild($this->dom->createTextNode($item['id'])); - $entry->appendChild($guid); - } else { - $guid = $this->dom->createElement('guid'); - $guid->setAttribute('isPermaLink', 'true'); - $guid->appendChild($this->dom->createTextNode($item['url'])); - $entry->appendChild($guid); - } - - // <pubDate/> - $this->addPubDate($entry, isset($item['updated']) ? $item['updated'] : ''); - - // <description/> - if (isset($item['summary'])) { - $description = $this->dom->createElement('description'); - $description->appendChild($this->dom->createTextNode($item['summary'])); - $entry->appendChild($description); - } - - // <content/> - if (isset($item['content'])) { - $content = $this->dom->createElement('content:encoded'); - $content->appendChild($this->dom->createCDATASection($item['content'])); - $entry->appendChild($content); - } - - // <author/> - if (isset($item['author'])) { - $this->addAuthor($entry, 'author', $item['author']); - } - - return $entry; - } - - /** - * Add publication date. - * - * @param DomElement $xml XML node - * @param int $value Timestamp - */ - public function addPubDate(DomElement $xml, $value = 0) - { - $xml->appendChild($this->dom->createElement( - 'pubDate', - date(DATE_RSS, $value ?: time()) - )); - } - - /** - * Add author. - * - * @param DomElement $xml XML node - * @param string $tag Tag name - * @param array $values Author name and email - */ - public function addAuthor(DomElement $xml, $tag, array $values) - { - $value = ''; - - if (isset($values['email'])) { - $value .= $values['email']; - } - if ($value && isset($values['name'])) { - $value .= ' ('.$values['name'].')'; - } - - if ($value) { - $author = $this->dom->createElement($tag); - $author->appendChild($this->dom->createTextNode($value)); - $xml->appendChild($author); - } - } -} diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Syndication/Writer.php b/vendor/fguillot/picofeed/lib/PicoFeed/Syndication/Writer.php deleted file mode 100644 index 9312e7e..0000000 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Syndication/Writer.php +++ /dev/null @@ -1,95 +0,0 @@ -<?php - -namespace PicoFeed\Syndication; - -use RuntimeException; - -/** - * Base writer class. - * - * @author Frederic Guillot - */ -abstract class Writer -{ - /** - * Dom object. - * - * @var \DomDocument - */ - protected $dom; - - /** - * Items. - * - * @var array - */ - public $items = array(); - - /** - * Author. - * - * @var array - */ - public $author = array(); - - /** - * Feed URL. - * - * @var string - */ - public $feed_url = ''; - - /** - * Website URL. - * - * @var string - */ - public $site_url = ''; - - /** - * Feed title. - * - * @var string - */ - public $title = ''; - - /** - * Feed description. - * - * @var string - */ - public $description = ''; - - /** - * Feed modification date (timestamp). - * - * @var int - */ - public $updated = 0; - - /** - * Generate the XML document. - * - * @abstract - * - * @param string $filename Optional filename - * - * @return string - */ - abstract public function execute($filename = ''); - - /** - * Check required properties to generate the output. - * - * @param array $properties List of properties - * @param mixed $container Object or array container - */ - public function checkRequiredProperties(array $properties, $container) - { - foreach ($properties as $property) { - if ((is_object($container) && !isset($container->$property)) || (is_array($container) && !isset($container[$property]))) { - throw new RuntimeException('Required property missing: '.$property); - } - } - } -} diff --git a/vendor/fguillot/picofeed/picofeed b/vendor/fguillot/picofeed/picofeed deleted file mode 100755 index b1a8d80..0000000 --- a/vendor/fguillot/picofeed/picofeed +++ /dev/null @@ -1,125 +0,0 @@ -#!/usr/bin/env php -<?php - -require_once 'vendor/autoload.php'; - -use PicoFeed\Config\Config; -use PicoFeed\Scraper\Scraper; -use PicoFeed\Reader\Reader; -use PicoFeed\Logging\Logger; -use PicoFeed\PicoFeedException; - -Logger::enable(); - -function get_feed($url, $disable_filtering = false) -{ - try { - - $reader = new Reader; - $resource = $reader->discover($url); - - $parser = $reader->getParser( - $resource->getUrl(), - $resource->getContent(), - $resource->getEncoding() - ); - - if ($disable_filtering) { - $parser->disableContentFiltering(); - } - - return $parser->execute(); - } - catch (PicoFeedException $e) { - echo 'Exception thrown ===> "'.$e->getMessage().'"'.PHP_EOL; - return false; - } -} - -function get_item($feed, $item_id) -{ - foreach ($feed->items as $item) { - if ($item->getId() === $item_id) { - echo $item; - echo "============= CONTENT ================\n"; - echo $item->getContent(); - echo "\n============= CONTENT ================\n"; - break; - } - } -} - -function dump_feed($url) -{ - $feed = get_feed($url); - echo $feed; -} - -function debug_feed($url) -{ - get_feed($url); - print_r(Logger::getMessages()); -} - -function dump_item($url, $item_id) -{ - $feed = get_feed($url); - - if ($feed !== false) { - get_item($feed, $item_id); - } -} - -function nofilter_item($url, $item_id) -{ - $feed = get_feed($url, true); - - if ($feed !== false) { - get_item($feed, $item_id); - } -} - -function grabber($url) -{ - $grabber = new Scraper(new Config); - $grabber->setUrl($url); - $grabber->execute(); - - print_r(Logger::getMessages()); - echo "============= CONTENT ================\n"; - echo $grabber->getRelevantContent().PHP_EOL; - echo "============= FILTERED ================\n"; - echo $grabber->getFilteredContent().PHP_EOL; -} - -// Parse command line arguments -if ($argc === 4) { - switch ($argv[1]) { - case 'item': - dump_item($argv[2], $argv[3]); - die; - case 'nofilter': - nofilter_item($argv[2], $argv[3]); - die; - } -} -else if ($argc === 3) { - switch ($argv[1]) { - case 'feed': - dump_feed($argv[2]); - die; - case 'debug': - debug_feed($argv[2]); - die; - case 'grabber': - grabber($argv[2]); - die; - } -} - -printf("Usage:\n"); -printf("%s feed <feed-url>\n", $argv[0]); -printf("%s debug <feed-url>\n", $argv[0]); -printf("%s item <feed-url> <item-id>\n", $argv[0]); -printf("%s nofilter <feed-url> <item-id>\n", $argv[0]); -printf("%s grabber <url>\n", $argv[0]); diff --git a/vendor/zendframework/zendxml/.gitignore b/vendor/zendframework/zendxml/.gitignore deleted file mode 100644 index 0a4f6e2..0000000 --- a/vendor/zendframework/zendxml/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -composer.lock -vendor -.buildpath -.project -.settings diff --git a/vendor/zendframework/zendxml/.travis.yml b/vendor/zendframework/zendxml/.travis.yml deleted file mode 100644 index 877b065..0000000 --- a/vendor/zendframework/zendxml/.travis.yml +++ /dev/null @@ -1,43 +0,0 @@ -sudo: false - -language: php - -branches: - except: - - /^release-.*$/ - - /^ghgfk-.*$/ - -cache: - directories: - - $HOME/.composer/cache - -matrix: - allow_failures: - - php: hhvm -matrix: - fast_finish: true - include: - - php: 5.3 - - php: 5.4 - - php: 5.5 - env: - - EXECUTE_CS_CHECK=true - - php: 5.6 - - php: 7 - - php: hhvm - allow_failures: - - php: hhvm - -before_install: - - composer self-update - -install: - - travis_retry composer install --no-interaction --ignore-platform-reqs - -script: - - ./vendor/bin/phpunit -c ./tests - - if [[ $EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/phpcs --standard=PSR2 --ignore=tests/Bootstrap.php library tests ; fi - -notifications: - irc: "irc.freenode.org#zftalk.dev" - email: false diff --git a/vendor/zendframework/zendxml/CHANGELOG.md b/vendor/zendframework/zendxml/CHANGELOG.md deleted file mode 100644 index bca2961..0000000 --- a/vendor/zendframework/zendxml/CHANGELOG.md +++ /dev/null @@ -1,24 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file, in reverse chronological order by release. - -## 1.0.2 - 2016-02-04 - -### Added - -- Nothing. - -### Deprecated - -- Nothing. - -### Removed - -- Nothing. - -### Fixed - -- [#11](https://github.com/zendframework/ZendXml/pull/11) updates the - dependencies to PHP `^5.3.3 || ^7.0` and PHPUnit `^3.7 || ^4.0`, ensuring - better compatibility with other components, and with PHP 7. The test matrix - was also expanded to add PHP 7 as a required platform. diff --git a/vendor/zendframework/zendxml/LICENSE.md b/vendor/zendframework/zendxml/LICENSE.md deleted file mode 100644 index 141d3a2..0000000 --- a/vendor/zendframework/zendxml/LICENSE.md +++ /dev/null @@ -1,12 +0,0 @@ -Copyright (c) 2014-2015, Zend Technologies USA, Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -- Neither the name of Zend Technologies USA, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/zendframework/zendxml/README.md b/vendor/zendframework/zendxml/README.md deleted file mode 100644 index 2c67008..0000000 --- a/vendor/zendframework/zendxml/README.md +++ /dev/null @@ -1,50 +0,0 @@ -ZendXml -======= - -An utility component for XML usage and best practices in PHP - -Installation ------------- - -You can install using: - -``` -curl -s https://getcomposer.org/installer | php -php composer.phar install -``` - -Notice that this library doesn't have any external dependencies, the usage of composer is for autoloading and standard purpose. - - -ZendXml\Security ----------------- - -This is a security component to prevent [XML eXternal Entity](https://www.owasp.org/index.php/XML_External_Entity_%28XXE%29_Processing) (XXE) and [XML Entity Expansion](http://projects.webappsec.org/w/page/13247002/XML%20Entity%20Expansion) (XEE) attacks on XML documents. - -The XXE attack is prevented disabling the load of external entities in the libxml library used by PHP, using the function [libxml_disable_entity_loader](http://www.php.net/manual/en/function.libxml-disable-entity-loader.php). - -The XEE attack is prevented looking inside the XML document for ENTITY usage. If the XML document uses ENTITY the library throw an Exception. - -We have two static methods to scan and load XML document from a string (scan) and from a file (scanFile). You can decide to get a SimpleXMLElement or DOMDocument as result, using the following use cases: - -```php -use ZendXml\Security as XmlSecurity; - -$xml = <<<XML -<?xml version="1.0"?> -<results> - <result>test</result> -</results> -XML; - -// SimpleXML use case -$simplexml = XmlSecurity::scan($xml); -printf ("SimpleXMLElement: %s\n", ($simplexml instanceof \SimpleXMLElement) ? 'yes' : 'no'); - -// DOMDocument use case -$dom = new \DOMDocument('1.0'); -$dom = XmlSecurity::scan($xml, $dom); -printf ("DOMDocument: %s\n", ($dom instanceof \DOMDocument) ? 'yes' : 'no'); -``` - - diff --git a/vendor/zendframework/zendxml/composer.json b/vendor/zendframework/zendxml/composer.json deleted file mode 100644 index d9efb22..0000000 --- a/vendor/zendframework/zendxml/composer.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "zendframework/zendxml", - "description": "Utility library for XML usage, best practices, and security in PHP", - "type": "library", - "license": "BSD-3-Clause", - "keywords": [ - "zf2", - "xml", - "security" - ], - "homepage": "http://packages.zendframework.com/", - "autoload": { - "psr-0": { - "ZendXml\\": "library/" - } - }, - "autoload-dev": { - "psr-4": { - "ZendTest\\Xml\\": "tests/ZendXmlTest/" - } - }, - "repositories": [ - { - "type": "composer", - "url": "http://packages.zendframework.com/" - } - ], - "require": { - "php": "^5.3.3 || ^7.0" - }, - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "require-dev": { - "phpunit/phpunit": "^3.7 || ^4.0", - "squizlabs/php_codesniffer": "^1.5" - } -} diff --git a/vendor/zendframework/zendxml/library/ZendXml/Exception/ExceptionInterface.php b/vendor/zendframework/zendxml/library/ZendXml/Exception/ExceptionInterface.php deleted file mode 100644 index c55eb90..0000000 --- a/vendor/zendframework/zendxml/library/ZendXml/Exception/ExceptionInterface.php +++ /dev/null @@ -1,14 +0,0 @@ -<?php -/** - * Zend Framework (http://framework.zend.com/) - * - * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License - */ - -namespace ZendXml\Exception; - -interface ExceptionInterface -{ -} diff --git a/vendor/zendframework/zendxml/library/ZendXml/Exception/InvalidArgumentException.php b/vendor/zendframework/zendxml/library/ZendXml/Exception/InvalidArgumentException.php deleted file mode 100644 index 0fef6b2..0000000 --- a/vendor/zendframework/zendxml/library/ZendXml/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,17 +0,0 @@ -<?php -/** - * Zend Framework (http://framework.zend.com/) - * - * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License - */ - -namespace ZendXml\Exception; - -/** - * Invalid argument exception - */ -class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface -{ -} diff --git a/vendor/zendframework/zendxml/library/ZendXml/Exception/RuntimeException.php b/vendor/zendframework/zendxml/library/ZendXml/Exception/RuntimeException.php deleted file mode 100644 index b730da4..0000000 --- a/vendor/zendframework/zendxml/library/ZendXml/Exception/RuntimeException.php +++ /dev/null @@ -1,17 +0,0 @@ -<?php -/** - * Zend Framework (http://framework.zend.com/) - * - * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License - */ - -namespace ZendXml\Exception; - -/** - * Runtime exception - */ -class RuntimeException extends \RuntimeException implements ExceptionInterface -{ -} diff --git a/vendor/zendframework/zendxml/library/ZendXml/Security.php b/vendor/zendframework/zendxml/library/ZendXml/Security.php deleted file mode 100644 index 892e2ab..0000000 --- a/vendor/zendframework/zendxml/library/ZendXml/Security.php +++ /dev/null @@ -1,374 +0,0 @@ -<?php -/** - * Zend Framework (http://framework.zend.com/) - * - * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License - */ -namespace ZendXml; - -use DOMDocument; -use SimpleXMLElement; - -class Security -{ - const ENTITY_DETECT = 'Detected use of ENTITY in XML, disabled to prevent XXE/XEE attacks'; - - /** - * Heuristic scan to detect entity in XML - * - * @param string $xml - * @throws Exception\RuntimeException If entity expansion or external entity declaration was discovered. - */ - protected static function heuristicScan($xml) - { - foreach (self::getEntityComparison($xml) as $compare) { - if (strpos($xml, $compare) !== false) { - throw new Exception\RuntimeException(self::ENTITY_DETECT); - } - } - } - - /** - * Scan XML string for potential XXE and XEE attacks - * - * @param string $xml - * @param DomDocument $dom - * @throws Exception\RuntimeException - * @return SimpleXMLElement|DomDocument|boolean - */ - public static function scan($xml, DOMDocument $dom = null) - { - // If running with PHP-FPM we perform an heuristic scan - // We cannot use libxml_disable_entity_loader because of this bug - // @see https://bugs.php.net/bug.php?id=64938 - if (self::isPhpFpm()) { - self::heuristicScan($xml); - } - - if (null === $dom) { - $simpleXml = true; - $dom = new DOMDocument(); - } - - if (!self::isPhpFpm()) { - $loadEntities = libxml_disable_entity_loader(true); - $useInternalXmlErrors = libxml_use_internal_errors(true); - } - - // Load XML with network access disabled (LIBXML_NONET) - // error disabled with @ for PHP-FPM scenario - set_error_handler(function ($errno, $errstr) { - if (substr_count($errstr, 'DOMDocument::loadXML()') > 0) { - return true; - } - return false; - }, E_WARNING); - $result = $dom->loadXml($xml, LIBXML_NONET); - restore_error_handler(); - - if (!$result) { - // Entity load to previous setting - if (!self::isPhpFpm()) { - libxml_disable_entity_loader($loadEntities); - libxml_use_internal_errors($useInternalXmlErrors); - } - return false; - } - - // Scan for potential XEE attacks using ENTITY, if not PHP-FPM - if (!self::isPhpFpm()) { - foreach ($dom->childNodes as $child) { - if ($child->nodeType === XML_DOCUMENT_TYPE_NODE) { - if ($child->entities->length > 0) { - throw new Exception\RuntimeException(self::ENTITY_DETECT); - } - } - } - } - - // Entity load to previous setting - if (!self::isPhpFpm()) { - libxml_disable_entity_loader($loadEntities); - libxml_use_internal_errors($useInternalXmlErrors); - } - - if (isset($simpleXml)) { - $result = simplexml_import_dom($dom); - if (!$result instanceof SimpleXMLElement) { - return false; - } - return $result; - } - return $dom; - } - - /** - * Scan XML file for potential XXE/XEE attacks - * - * @param string $file - * @param DOMDocument $dom - * @throws Exception\InvalidArgumentException - * @return SimpleXMLElement|DomDocument - */ - public static function scanFile($file, DOMDocument $dom = null) - { - if (!file_exists($file)) { - throw new Exception\InvalidArgumentException( - "The file $file specified doesn't exist" - ); - } - return self::scan(file_get_contents($file), $dom); - } - - /** - * Return true if PHP is running with PHP-FPM - * - * This method is mainly used to determine whether or not heuristic checks - * (vs libxml checks) should be made, due to threading issues in libxml; - * under php-fpm, threading becomes a concern. - * - * However, PHP versions 5.5.22+ and 5.6.6+ contain a patch to the - * libxml support in PHP that makes the libxml checks viable; in such - * versions, this method will return false to enforce those checks, which - * are more strict and accurate than the heuristic checks. - * - * @return boolean - */ - public static function isPhpFpm() - { - $isVulnerableVersion = ( - version_compare(PHP_VERSION, '5.5.22', 'lt') - || ( - version_compare(PHP_VERSION, '5.6', 'gte') - && version_compare(PHP_VERSION, '5.6.6', 'lt') - ) - ); - - if (substr(php_sapi_name(), 0, 3) === 'fpm' && $isVulnerableVersion) { - return true; - } - return false; - } - - /** - * Determine and return the string(s) to use for the <!ENTITY comparison. - * - * @param string $xml - * @return string[] - */ - protected static function getEntityComparison($xml) - { - $encodingMap = self::getAsciiEncodingMap(); - return array_map(function ($encoding) use ($encodingMap) { - $generator = isset($encodingMap[$encoding]) ? $encodingMap[$encoding] : $encodingMap['UTF-8']; - return $generator('<!ENTITY'); - }, self::detectXmlEncoding($xml, self::detectStringEncoding($xml))); - } - - /** - * Determine the string encoding. - * - * Determines string encoding from either a detected BOM or a - * heuristic. - * - * @param string $xml - * @return string File encoding - */ - protected static function detectStringEncoding($xml) - { - return self::detectBom($xml) ?: self::detectXmlStringEncoding($xml); - } - - /** - * Attempt to match a known BOM. - * - * Iterates through the return of getBomMap(), comparing the initial bytes - * of the provided string to the BOM of each; if a match is determined, - * it returns the encoding. - * - * @param string $string - * @return false|string Returns encoding on success. - */ - protected static function detectBom($string) - { - foreach (self::getBomMap() as $criteria) { - if (0 === strncmp($string, $criteria['bom'], $criteria['length'])) { - return $criteria['encoding']; - } - } - return false; - } - - /** - * Attempt to detect the string encoding of an XML string. - * - * @param string $xml - * @return string Encoding - */ - protected static function detectXmlStringEncoding($xml) - { - foreach (self::getAsciiEncodingMap() as $encoding => $generator) { - $prefix = $generator('<' . '?xml'); - if (0 === strncmp($xml, $prefix, strlen($prefix))) { - return $encoding; - } - } - - // Fallback - return 'UTF-8'; - } - - /** - * Attempt to detect the specified XML encoding. - * - * Using the file's encoding, determines if an "encoding" attribute is - * present and well-formed in the XML declaration; if so, it returns a - * list with both the ASCII representation of that declaration and the - * original file encoding. - * - * If not, a list containing only the provided file encoding is returned. - * - * @param string $xml - * @param string $fileEncoding - * @return string[] Potential XML encodings - */ - protected static function detectXmlEncoding($xml, $fileEncoding) - { - $encodingMap = self::getAsciiEncodingMap(); - $generator = $encodingMap[$fileEncoding]; - $encAttr = $generator('encoding="'); - $quote = $generator('"'); - $close = $generator('>'); - - $closePos = strpos($xml, $close); - if (false === $closePos) { - return array($fileEncoding); - } - - $encPos = strpos($xml, $encAttr); - if (false === $encPos - || $encPos > $closePos - ) { - return array($fileEncoding); - } - - $encPos += strlen($encAttr); - $quotePos = strpos($xml, $quote, $encPos); - if (false === $quotePos) { - return array($fileEncoding); - } - - $encoding = self::substr($xml, $encPos, $quotePos); - return array( - // Following line works because we're only supporting 8-bit safe encodings at this time. - str_replace('\0', '', $encoding), // detected encoding - $fileEncoding, // file encoding - ); - } - - /** - * Return a list of BOM maps. - * - * Returns a list of common encoding -> BOM maps, along with the character - * length to compare against. - * - * @link https://en.wikipedia.org/wiki/Byte_order_mark - * @return array - */ - protected static function getBomMap() - { - return array( - array( - 'encoding' => 'UTF-32BE', - 'bom' => pack('CCCC', 0x00, 0x00, 0xfe, 0xff), - 'length' => 4, - ), - array( - 'encoding' => 'UTF-32LE', - 'bom' => pack('CCCC', 0xff, 0xfe, 0x00, 0x00), - 'length' => 4, - ), - array( - 'encoding' => 'GB-18030', - 'bom' => pack('CCCC', 0x84, 0x31, 0x95, 0x33), - 'length' => 4, - ), - array( - 'encoding' => 'UTF-16BE', - 'bom' => pack('CC', 0xfe, 0xff), - 'length' => 2, - ), - array( - 'encoding' => 'UTF-16LE', - 'bom' => pack('CC', 0xff, 0xfe), - 'length' => 2, - ), - array( - 'encoding' => 'UTF-8', - 'bom' => pack('CCC', 0xef, 0xbb, 0xbf), - 'length' => 3, - ), - ); - } - - /** - * Return a map of encoding => generator pairs. - * - * Returns a map of encoding => generator pairs, where the generator is a - * callable that accepts a string and returns the appropriate byte order - * sequence of that string for the encoding. - * - * @return array - */ - protected static function getAsciiEncodingMap() - { - return array( - 'UTF-32BE' => function ($ascii) { - return preg_replace('/(.)/', "\0\0\0\\1", $ascii); - }, - 'UTF-32LE' => function ($ascii) { - return preg_replace('/(.)/', "\\1\0\0\0", $ascii); - }, - 'UTF-32odd1' => function ($ascii) { - return preg_replace('/(.)/', "\0\\1\0\0", $ascii); - }, - 'UTF-32odd2' => function ($ascii) { - return preg_replace('/(.)/', "\0\0\\1\0", $ascii); - }, - 'UTF-16BE' => function ($ascii) { - return preg_replace('/(.)/', "\0\\1", $ascii); - }, - 'UTF-16LE' => function ($ascii) { - return preg_replace('/(.)/', "\\1\0", $ascii); - }, - 'UTF-8' => function ($ascii) { - return $ascii; - }, - 'GB-18030' => function ($ascii) { - return $ascii; - }, - ); - } - - /** - * Binary-safe substr. - * - * substr() is not binary-safe; this method loops by character to ensure - * multi-byte characters are aggregated correctly. - * - * @param string $string - * @param int $start - * @param int $end - * @return string - */ - protected static function substr($string, $start, $end) - { - $substr = ''; - for ($i = $start; $i < $end; $i += 1) { - $substr .= $string[$i]; - } - return $substr; - } -} diff --git a/vendor/zendframework/zendxml/tests/Bootstrap.php b/vendor/zendframework/zendxml/tests/Bootstrap.php deleted file mode 100644 index a9d0e6a..0000000 --- a/vendor/zendframework/zendxml/tests/Bootstrap.php +++ /dev/null @@ -1,92 +0,0 @@ -<?php -/** - * Zend Framework (http://framework.zend.com/) - * - * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend - */ - -/** - * Set error reporting to the level to which Zend Framework code must comply. - */ -error_reporting( E_ALL | E_STRICT ); - -if (class_exists('PHPUnit_Runner_Version', true)) { - $phpUnitVersion = PHPUnit_Runner_Version::id(); - if ('@package_version@' !== $phpUnitVersion && version_compare($phpUnitVersion, '3.7.0', '<')) { - echo 'This version of PHPUnit (' . - PHPUnit_Runner_Version::id() . - ') is not supported for ZendXml unit tests - use v 3.7.0 or higher.' - . PHP_EOL - ; - exit(1); - } - unset($phpUnitVersion); -} - -/** - * Setup autoloading - */ -// Try to use Composer autoloader -if (file_exists(__DIR__ . '/../vendor/autoload.php')) { - include_once __DIR__ . '/../vendor/autoload.php'; -} -// ... or use a simple SPL autoloader -else{ - - // update include path - set_include_path(implode(PATH_SEPARATOR, array( - __DIR__.'/../src', - __DIR__, - get_include_path() - ))); - - /** - * @link https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md#example-implementation - */ - spl_autoload_register(function ($className) { - $className = ltrim($className, '\\'); - $fileName = ''; - $namespace = ''; - if ($lastNsPos = strrpos($className, '\\')) { - $namespace = substr($className, 0, $lastNsPos); - $className = substr($className, $lastNsPos + 1); - $fileName = str_replace('\\', DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR; - } - $fileName .= str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php'; - require $fileName; - }); - -} - -/** - * Code coverage option - */ -if (defined('TESTS_GENERATE_REPORT') && TESTS_GENERATE_REPORT === true) { - $codeCoverageFilter = new PHP_CodeCoverage_Filter(); - - $lastArg = end($_SERVER['argv']); - if (is_dir($zfCoreTests . '/' . $lastArg)) { - $codeCoverageFilter->addDirectoryToWhitelist($zfCoreLibrary . '/' . $lastArg); - } elseif (is_file($zfCoreTests . '/' . $lastArg)) { - $codeCoverageFilter->addDirectoryToWhitelist(dirname($zfCoreLibrary . '/' . $lastArg)); - } else { - $codeCoverageFilter->addDirectoryToWhitelist($zfCoreLibrary); - } - - /* - * Omit from code coverage reports the contents of the tests directory - */ - $codeCoverageFilter->addDirectoryToBlacklist($zfCoreTests, ''); - $codeCoverageFilter->addDirectoryToBlacklist(PEAR_INSTALL_DIR, ''); - $codeCoverageFilter->addDirectoryToBlacklist(PHP_LIBDIR, ''); - - unset($codeCoverageFilter); -} - -/* - * Unset global variables that are no longer needed. - */ -unset($phpUnitVersion); diff --git a/vendor/zendframework/zendxml/tests/ZendXmlTest/MultibyteTest.php b/vendor/zendframework/zendxml/tests/ZendXmlTest/MultibyteTest.php deleted file mode 100644 index 165e8fa..0000000 --- a/vendor/zendframework/zendxml/tests/ZendXmlTest/MultibyteTest.php +++ /dev/null @@ -1,125 +0,0 @@ -<?php -/** - * Zend Framework (http://framework.zend.com/) - * - * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License - */ -namespace ZendTest\Xml; - -use ZendXml\Security as XmlSecurity; -use ZendXml\Exception; -use DOMDocument; -use ReflectionMethod; -use SimpleXMLElement; - -/** - * @group ZF2015-06 - */ -class MultibyteTest extends \PHPUnit_Framework_TestCase -{ - public function multibyteEncodings() - { - return array( - 'UTF-16LE' => array('UTF-16LE', pack('CC', 0xff, 0xfe), 3), - 'UTF-16BE' => array('UTF-16BE', pack('CC', 0xfe, 0xff), 3), - 'UTF-32LE' => array('UTF-32LE', pack('CCCC', 0xff, 0xfe, 0x00, 0x00), 4), - 'UTF-32BE' => array('UTF-32BE', pack('CCCC', 0x00, 0x00, 0xfe, 0xff), 4), - ); - } - - public function getXmlWithXXE() - { - return <<<XML -<?xml version="1.0" encoding="{ENCODING}"?> -<!DOCTYPE methodCall [ - <!ENTITY pocdata SYSTEM "file:///etc/passwd"> -]> -<methodCall> - <methodName>retrieved: &pocdata;</methodName> -</methodCall> -XML; - } - - /** - * Invoke ZendXml\Security::heuristicScan with the provided XML. - * - * @param string $xml - * @return void - * @throws Exception\RuntimeException - */ - public function invokeHeuristicScan($xml) - { - $r = new ReflectionMethod('ZendXml\Security', 'heuristicScan'); - $r->setAccessible(true); - return $r->invoke(null, $xml); - } - - /** - * @dataProvider multibyteEncodings - * @group heuristicDetection - */ - public function testDetectsMultibyteXXEVectorsUnderFPMWithEncodedStringMissingBOM($encoding, $bom, $bomLength) - { - $xml = $this->getXmlWithXXE(); - $xml = str_replace('{ENCODING}', $encoding, $xml); - $xml = iconv('UTF-8', $encoding, $xml); - $this->assertNotSame(0, strncmp($xml, $bom, $bomLength)); - $this->setExpectedException('ZendXml\Exception\RuntimeException', 'ENTITY'); - $this->invokeHeuristicScan($xml); - } - - /** - * @dataProvider multibyteEncodings - */ - public function testDetectsMultibyteXXEVectorsUnderFPMWithEncodedStringUsingBOM($encoding, $bom) - { - $xml = $this->getXmlWithXXE(); - $xml = str_replace('{ENCODING}', $encoding, $xml); - $orig = iconv('UTF-8', $encoding, $xml); - $xml = $bom . $orig; - $this->setExpectedException('ZendXml\Exception\RuntimeException', 'ENTITY'); - $this->invokeHeuristicScan($xml); - } - - public function getXmlWithoutXXE() - { - return <<<XML -<?xml version="1.0" encoding="{ENCODING}"?> -<methodCall> - <methodName>retrieved: &pocdata;</methodName> -</methodCall> -XML; - } - - /** - * @dataProvider multibyteEncodings - */ - public function testDoesNotFlagValidMultibyteXmlAsInvalidUnderFPM($encoding) - { - $xml = $this->getXmlWithoutXXE(); - $xml = str_replace('{ENCODING}', $encoding, $xml); - $xml = iconv('UTF-8', $encoding, $xml); - try { - $result = $this->invokeHeuristicScan($xml); - $this->assertNull($result); - } catch (\Exception $e) { - $this->fail('Security scan raised exception when it should not have'); - } - } - - /** - * @dataProvider multibyteEncodings - * @group mixedEncoding - */ - public function testDetectsXXEWhenXMLDocumentEncodingDiffersFromFileEncoding($encoding, $bom) - { - $xml = $this->getXmlWithXXE(); - $xml = str_replace('{ENCODING}', 'UTF-8', $xml); - $xml = iconv('UTF-8', $encoding, $xml); - $xml = $bom . $xml; - $this->setExpectedException('ZendXml\Exception\RuntimeException', 'ENTITY'); - $this->invokeHeuristicScan($xml); - } -} diff --git a/vendor/zendframework/zendxml/tests/ZendXmlTest/SecurityTest.php b/vendor/zendframework/zendxml/tests/ZendXmlTest/SecurityTest.php deleted file mode 100644 index fa3b30b..0000000 --- a/vendor/zendframework/zendxml/tests/ZendXmlTest/SecurityTest.php +++ /dev/null @@ -1,135 +0,0 @@ -<?php -/** - * Zend Framework (http://framework.zend.com/) - * - * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License - */ -namespace ZendTest\Xml; - -use ZendXml\Security as XmlSecurity; -use ZendXml\Exception; -use DOMDocument; -use SimpleXMLElement; - -class SecurityTest extends \PHPUnit_Framework_TestCase -{ - /** - * @expectedException ZendXml\Exception\RuntimeException - */ - public function testScanForXEE() - { - $xml = <<<XML -<?xml version="1.0"?> -<!DOCTYPE results [<!ENTITY harmless "completely harmless">]> -<results> - <result>This result is &harmless;</result> -</results> -XML; - - $this->setExpectedException('ZendXml\Exception\RuntimeException'); - $result = XmlSecurity::scan($xml); - } - - public function testScanForXXE() - { - $file = tempnam(sys_get_temp_dir(), 'ZendXml_Security'); - file_put_contents($file, 'This is a remote content!'); - $xml = <<<XML -<?xml version="1.0"?> -<!DOCTYPE root -[ -<!ENTITY foo SYSTEM "file://$file"> -]> -<results> - <result>&foo;</result> -</results> -XML; - - try { - $result = XmlSecurity::scan($xml); - } catch (Exception\RuntimeException $e) { - unlink($file); - return; - } - $this->fail('An expected exception has not been raised.'); - } - - public function testScanSimpleXmlResult() - { - $result = XmlSecurity::scan($this->getXml()); - $this->assertTrue($result instanceof SimpleXMLElement); - $this->assertEquals($result->result, 'test'); - } - - public function testScanDom() - { - $dom = new DOMDocument('1.0'); - $result = XmlSecurity::scan($this->getXml(), $dom); - $this->assertTrue($result instanceof DOMDocument); - $node = $result->getElementsByTagName('result')->item(0); - $this->assertEquals($node->nodeValue, 'test'); - } - - public function testScanInvalidXml() - { - $xml = <<<XML -<foo>test</bar> -XML; - - $result = XmlSecurity::scan($xml); - $this->assertFalse($result); - } - - public function testScanInvalidXmlDom() - { - $xml = <<<XML -<foo>test</bar> -XML; - - $dom = new DOMDocument('1.0'); - $result = XmlSecurity::scan($xml, $dom); - $this->assertFalse($result); - } - - public function testScanFile() - { - $file = tempnam(sys_get_temp_dir(), 'ZendXml_Security'); - file_put_contents($file, $this->getXml()); - - $result = XmlSecurity::scanFile($file); - $this->assertTrue($result instanceof SimpleXMLElement); - $this->assertEquals($result->result, 'test'); - unlink($file); - } - - public function testScanXmlWithDTD() - { - $xml = <<<XML -<?xml version="1.0"?> -<!DOCTYPE results [ -<!ELEMENT results (result+)> -<!ELEMENT result (#PCDATA)> -]> -<results> - <result>test</result> -</results> -XML; - - $dom = new DOMDocument('1.0'); - $result = XmlSecurity::scan($xml, $dom); - $this->assertTrue($result instanceof DOMDocument); - $this->assertTrue($result->validate()); - } - - protected function getXml() - { - return <<<XML -<?xml version="1.0"?> -<results> - <result>test</result> -</results> -XML; - } -} diff --git a/vendor/zendframework/zendxml/tests/phpunit.xml.dist b/vendor/zendframework/zendxml/tests/phpunit.xml.dist deleted file mode 100755 index 069784b..0000000 --- a/vendor/zendframework/zendxml/tests/phpunit.xml.dist +++ /dev/null @@ -1,27 +0,0 @@ -<phpunit bootstrap="./Bootstrap.php" colors="true"> - <testsuites> - <testsuite name="ZendXml Test Suite"> - <directory>./ZendXmlTest</directory> - <exclude>./ZendXmlTest/TestAsset</exclude> - </testsuite> - </testsuites> - - <groups> - <exclude> - </exclude> - </groups> - - <listeners> - </listeners> - - <filter> - <blacklist> - <directory suffix=".php">./ZendXmlTest</directory> - <directory>../vendor</directory> - </blacklist> - </filter> - - <php> - </php> - -</phpunit> From 2c4ce6cb5072fa84a0851573c3815bcf3cb5d569 Mon Sep 17 00:00:00 2001 From: "Marcel Kapfer (mmk2410)" <marcelmichaelkapfer@yahoo.co.nz> Date: Mon, 18 Apr 2016 09:57:11 +0200 Subject: [PATCH 08/32] API: List --- rcc/api/list/index.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rcc/api/list/index.php b/rcc/api/list/index.php index 8ba39ff..b55e919 100644 --- a/rcc/api/list/index.php +++ b/rcc/api/list/index.php @@ -18,7 +18,8 @@ if ($settings["rcc"]["api"] == "on" && $settings["rcc"]["rcc"] == "on") { $app = new \Slim\App(); /** - * api for fetching a blog post + * api for get the list of blogs and if $_GET["blog"] is set the list of + * blogs posts in that blog * * @param string $_GET["blog"] optional name of the blog * From 339e2eee36a3d38f47cca4dbe12c638f1c3a31d4 Mon Sep 17 00:00:00 2001 From: "Marcel Kapfer (mmk2410)" <marcelmichaelkapfer@yahoo.co.nz> Date: Mon, 18 Apr 2016 11:04:26 +0200 Subject: [PATCH 09/32] Composer: codeguy/Upload --- composer.json | 3 ++- composer.lock | 61 +++++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 56 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index c265a1e..f730591 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,8 @@ "erusev/parsedown": "^1.6", "fguillot/picofeed": "^0.1.18", "slim/slim": "^3.0", - "symfony/yaml": "^3.0" + "symfony/yaml": "^3.0", + "codeguy/upload": "^1.3" }, "license": "MIT License", "authors": [ diff --git a/composer.lock b/composer.lock index c096997..fc3ae67 100644 --- a/composer.lock +++ b/composer.lock @@ -4,9 +4,56 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "9dd7a02ced81071c430f6ac395855013", - "content-hash": "805975f3cf5b0b95d0be593e4599d471", + "hash": "4c701c9d01392fc6ae8ab2c7417f2290", + "content-hash": "ccdcfdb56ed68253e2388261fbb6d1b3", "packages": [ + { + "name": "codeguy/upload", + "version": "1.3.2", + "source": { + "type": "git", + "url": "https://github.com/codeguy/Upload.git", + "reference": "6a9e5e1fb58d65346d0e557db2d46fb25efd3e37" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/codeguy/Upload/zipball/6a9e5e1fb58d65346d0e557db2d46fb25efd3e37", + "reference": "6a9e5e1fb58d65346d0e557db2d46fb25efd3e37", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "3.7.*" + }, + "type": "library", + "autoload": { + "psr-0": { + "Upload": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Josh Lockhart", + "email": "info@joshlockhart.com", + "homepage": "http://www.joshlockhart.com/" + } + ], + "description": "Handle file uploads with extensible validation and storage strategies", + "homepage": "http://github.com/codeguy/Upload", + "keywords": [ + "file", + "upload", + "validation" + ], + "time": "2013-07-07 17:01:41" + }, { "name": "container-interop/container-interop", "version": "1.1.0", @@ -75,16 +122,16 @@ }, { "name": "fguillot/picofeed", - "version": "v0.1.18", + "version": "v0.1.23", "source": { "type": "git", "url": "https://github.com/fguillot/picoFeed.git", - "reference": "8f776343b0dada397c2a950a7c3f7be57442fa35" + "reference": "a7c3d420c239fe9ffc39b0d06b6e57db39ce3797" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fguillot/picoFeed/zipball/8f776343b0dada397c2a950a7c3f7be57442fa35", - "reference": "8f776343b0dada397c2a950a7c3f7be57442fa35", + "url": "https://api.github.com/repos/fguillot/picoFeed/zipball/a7c3d420c239fe9ffc39b0d06b6e57db39ce3797", + "reference": "a7c3d420c239fe9ffc39b0d06b6e57db39ce3797", "shasum": "" }, "require": { @@ -119,7 +166,7 @@ ], "description": "Modern library to handle RSS/Atom feeds", "homepage": "https://github.com/fguillot/picoFeed", - "time": "2016-02-09 02:49:54" + "time": "2016-04-17 22:31:55" }, { "name": "nikic/fast-route", From 01a6fb914faed58b73ceb09f94a9f21271bf58eb Mon Sep 17 00:00:00 2001 From: "Marcel Kapfer (mmk2410)" <marcelmichaelkapfer@yahoo.co.nz> Date: Mon, 18 Apr 2016 11:04:41 +0200 Subject: [PATCH 10/32] API: Media files --- rcc/api/media/index.php | 46 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 rcc/api/media/index.php diff --git a/rcc/api/media/index.php b/rcc/api/media/index.php new file mode 100644 index 0000000..6efca5f --- /dev/null +++ b/rcc/api/media/index.php @@ -0,0 +1,46 @@ +<?php +// Marcel Kapfer (mmk2410) +// License: MIT License +// api for uploading files + +use \Psr\Http\Message\ServerRequestInterface as Request; +use \Psr\Http\Message\ResponseInterface as Response; + +require '../../../vendor/autoload.php'; +require '../../../res/php/Config.php'; +require '../../../res/php/ArticleGenerator.php'; + +use \mmk2410\rbe\config\Config as Config; + +$config = new Config("../../../config.yaml", '../../../vendor/autoload.php'); +$settings = $config->getConfig(); + +if ($settings["rcc"]["api"] == "on" && $settings["rcc"]["rcc"] == "on") { + $app = new \Slim\App(); + + /** + * api for uploading files + * + * @return JSON json string with status + */ + $app->post('/', function (Request $request, Response $response) { + $storage = new \Upload\Storage\FileSystem('../../../media/'); + $file = new \Upload\File('file', $storage); + + try { + $file->upload(); + $data = array("code" => 201); + $response = $response->withHeader('Content-type', 'application/json'); + $response = $response->withJson($data, 201); + } catch (\Exception $e) { + $errors = $file->getErrors(); + $data = array("code" => 500, "error" => $Errors); + $response = $response->withHeader('Content-type', 'application/json'); + $response = $response->withJson($data, 500); + } + + return $response; + }); + + $app->run(); +} From 4e91eeb3abefaa8b77549f963447ef95bead3cc4 Mon Sep 17 00:00:00 2001 From: "Marcel Kapfer (mmk2410)" <marcelmichaelkapfer@yahoo.co.nz> Date: Mon, 18 Apr 2016 17:30:12 +0200 Subject: [PATCH 11/32] API: Auth implementation --- composer.lock | 53 +++++++++++++++++++++++++++++++++++-- rcc/api/auth/DigestAuth.php | 52 ++++++++++++++++++++++++++++++++++++ rcc/api/auth/auth.php | 38 ++++++++++++++++++++++++++ rcc/api/list/index.php | 2 ++ rcc/api/media/index.php | 2 ++ rcc/api/post/index.php | 2 ++ 6 files changed, 147 insertions(+), 2 deletions(-) create mode 100644 rcc/api/auth/DigestAuth.php create mode 100644 rcc/api/auth/auth.php diff --git a/composer.lock b/composer.lock index fc3ae67..278d103 100644 --- a/composer.lock +++ b/composer.lock @@ -4,9 +4,58 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "4c701c9d01392fc6ae8ab2c7417f2290", - "content-hash": "ccdcfdb56ed68253e2388261fbb6d1b3", + "hash": "bf0772b9501ce6231c06bfbcdb671d1d", + "content-hash": "49b3f5550e60b62ffeb5306a75a87d97", "packages": [ + { + "name": "bshaffer/oauth2-server-php", + "version": "v1.8.0", + "source": { + "type": "git", + "url": "https://github.com/bshaffer/oauth2-server-php.git", + "reference": "058c98f73209f9c49495e1799d32c035196fe8b8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/bshaffer/oauth2-server-php/zipball/058c98f73209f9c49495e1799d32c035196fe8b8", + "reference": "058c98f73209f9c49495e1799d32c035196fe8b8", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "suggest": { + "aws/aws-sdk-php": "~2.8 is required to use the DynamoDB storage engine", + "firebase/php-jwt": "~2.2 is required to use JWT features", + "predis/predis": "Required to use the Redis storage engine", + "thobbs/phpcassa": "Required to use the Cassandra storage engine" + }, + "type": "library", + "autoload": { + "psr-0": { + "OAuth2": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Brent Shaffer", + "email": "bshafs@gmail.com", + "homepage": "http://brentertainment.com" + } + ], + "description": "OAuth2 Server for PHP", + "homepage": "http://github.com/bshaffer/oauth2-server-php", + "keywords": [ + "auth", + "oauth", + "oauth2" + ], + "time": "2015-09-18 18:05:10" + }, { "name": "codeguy/upload", "version": "1.3.2", diff --git a/rcc/api/auth/DigestAuth.php b/rcc/api/auth/DigestAuth.php new file mode 100644 index 0000000..ed3ea1d --- /dev/null +++ b/rcc/api/auth/DigestAuth.php @@ -0,0 +1,52 @@ +<?php +/** + * PHP Version 7 + * + * Authentication Helper Class + * + * @category Authentication + * @package Rbe + * @author Marcel Kapfer (mmk2410) <marcelmichaelkapfer@yahoo.co.nz> + * @license MIT License + * @link http://marcel-kapfer.de/rangitaki + */ +namespace mmk2410\rbe\digestAuth; + +/** + * PHP Version 7 + * + * Authentication Helper Class + * + * @category Authentication + * @package Rbe + * @author Marcel Kapfer (mmk2410) <marcelmichaelkapfer@yahoo.co.nz> + * @license MIT License + * @link http://marcel-kapfer.de/rangitaki + */ +class DigestAuth +{ + + /** + * parser for http digest + * + * @param $txt data to parse + * + * @return parsed data or FALSE + */ + public function httpDigestParse($txt) + { + // protect against missing data + $needed_parts = array('nonce'=>1, 'nc'=>1, 'cnonce'=>1, 'qop'=>1, 'username'=>1, 'uri'=>1, 'response'=>1); + $data = array(); + $keys = implode('|', array_keys($needed_parts)); + + preg_match_all('@(' . $keys . ')=(?:([\'"])([^\2]+?)\2|([^\s,]+))@', $txt, $matches, PREG_SET_ORDER); + + foreach ($matches as $m) { + $data[$m[1]] = $m[3] ? $m[3] : $m[4]; + unset($needed_parts[$m[1]]); + } + + return $needed_parts ? false : $data; + } +} diff --git a/rcc/api/auth/auth.php b/rcc/api/auth/auth.php new file mode 100644 index 0000000..001c312 --- /dev/null +++ b/rcc/api/auth/auth.php @@ -0,0 +1,38 @@ +<?php +// Marcel Kapfer (mmk2410) +// License: MIT License +// api digest auth + +require 'DigestAuth.php'; + +use \mmk2410\rbe\digestAuth\DigestAuth as DigestAuth; + +$realm = 'Restricted area'; + +//user => password +$users = array('admin' => 'mypass', 'guest' => 'guest'); + +if (empty($_SERVER['PHP_AUTH_DIGEST'])) { + header('HTTP/1.1 401 Unauthorized'); + header('WWW-Authenticate: Digest realm="'.$realm. + '",qop="auth",nonce="'.uniqid().'",opaque="'.md5($realm).'"'); + + die('Access to RCC API not granted'); +} + + +// analyze the PHP_AUTH_DIGEST variable +if (!($data = DigestAuth::httpDigestParse($_SERVER['PHP_AUTH_DIGEST'])) || + !isset($users[$data['username']])) { + die('Wrong Credentials!'); +} + + +// generate the valid response +$A1 = md5($data['username'] . ':' . $realm . ':' . $users[$data['username']]); +$A2 = md5($_SERVER['REQUEST_METHOD'].':'.$data['uri']); +$valid_response = md5($A1.':'.$data['nonce'].':'.$data['nc'].':'.$data['cnonce'].':'.$data['qop'].':'.$A2); + +if ($data['response'] != $valid_response) { + die('Wrong Credentials!'); +} diff --git a/rcc/api/list/index.php b/rcc/api/list/index.php index b55e919..287f073 100644 --- a/rcc/api/list/index.php +++ b/rcc/api/list/index.php @@ -9,6 +9,8 @@ use \Psr\Http\Message\ResponseInterface as Response; require '../../../vendor/autoload.php'; require '../../../res/php/Config.php'; +include '../auth/auth.php'; + use \mmk2410\rbe\config\Config as Config; $config = new Config("../../../config.yaml", '../../../vendor/autoload.php'); diff --git a/rcc/api/media/index.php b/rcc/api/media/index.php index 6efca5f..fd6804c 100644 --- a/rcc/api/media/index.php +++ b/rcc/api/media/index.php @@ -10,6 +10,8 @@ require '../../../vendor/autoload.php'; require '../../../res/php/Config.php'; require '../../../res/php/ArticleGenerator.php'; +include '../auth/auth.php'; + use \mmk2410\rbe\config\Config as Config; $config = new Config("../../../config.yaml", '../../../vendor/autoload.php'); diff --git a/rcc/api/post/index.php b/rcc/api/post/index.php index 9c4c67b..cc04e70 100644 --- a/rcc/api/post/index.php +++ b/rcc/api/post/index.php @@ -10,6 +10,8 @@ require '../../../vendor/autoload.php'; require '../../../res/php/Config.php'; require '../../../res/php/ArticleGenerator.php'; +include '../auth/auth.php'; + use \mmk2410\rbe\config\Config as Config; $config = new Config("../../../config.yaml", '../../../vendor/autoload.php'); From d82f8e8011515a3c46d33290251f8072357be428 Mon Sep 17 00:00:00 2001 From: "Marcel Kapfer (mmk2410)" <marcelmichaelkapfer@yahoo.co.nz> Date: Thu, 21 Apr 2016 09:46:45 +0200 Subject: [PATCH 12/32] Config class: write yaml file --- res/php/Config.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/res/php/Config.php b/res/php/Config.php index 32dfda7..7eab4f4 100644 --- a/res/php/Config.php +++ b/res/php/Config.php @@ -54,4 +54,21 @@ class Config $yaml = new \Symfony\Component\Yaml\Parser(); return $yaml->parse(file_get_contents($this->file)); } + + /* + * Write array into confi* + * Write array into config file + * + * @param array config new config + * + * @return FALSE if failed to write + */ + public function writeConfig($config) + { + $dumper = new \Symfony\Component\Yaml\Dumper(); + + $yaml = $dumper->dump($config, 2); + + return file_put_contents($this->file, $yaml); + } } From 39da838ebddd6de50e605260e84d0590dd78da65 Mon Sep 17 00:00:00 2001 From: "Marcel Kapfer (mmk2410)" <marcelmichaelkapfer@yahoo.co.nz> Date: Thu, 21 Apr 2016 09:56:53 +0200 Subject: [PATCH 13/32] RCC init script --- bin/init_rcc.php | 71 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 bin/init_rcc.php diff --git a/bin/init_rcc.php b/bin/init_rcc.php new file mode 100644 index 0000000..1f7481c --- /dev/null +++ b/bin/init_rcc.php @@ -0,0 +1,71 @@ +<?php +// Marcel Kapfer (mmk2410) +// PHP script for initializing the RCC +// License: MIT + +require 'res/php/Config.php'; + +use mmk2410\rbe\config\Config as Config; + +echo 'RCC Initializion Script' . "\n"; +$username = readline("Username: "); + +if ($username == "") { + echo "No username given. Aborting...\n"; + exit(); +} + +echo 'Password: '; +$password = exec('read -s PW; echo $PW'); + +if ($password == "") { + echo "No password given. Aborting...\n"; + exit(); +} + +$hash = password_hash($password, PASSWORD_BCRYPT); + +$username = '$username = "' . $username . '";'; +$hash = '$hash = "' . $hash . '";'; + +$file = '<?php' . "\n" . $username . "\n" . $hash . "\n"; + +if (file_put_contents('./rcc/password.php', $file)) { + echo "\nPassword hash successfully saved.\n"; +} + +$config = new Config('config.yaml', 'vendor/autoload.php'); + +$yaml = $config->getConfig(); + +$rccOn = ""; + +while (!(in_array($rccOn, array("y", "Y", "n", "N")))) { + $rccOn = readline("Enable RCC: (y/n) "); +} + +if (in_array($rccOn, array("y", "Y"))) { + $yaml["rcc"]["rcc"] = "on"; +} else { + $yaml["rcc"]["rcc"] = "off"; +} + +$apiOn = ""; + +while (!(in_array($apiOn, array("Y", "y", "n", "N")))) { + $apiOn = readline("Enable RCC API: (y/n) "); +} + +if (in_array($apiOn, array("y", "Y"))) { + $yaml["rcc"]["api"] = "on"; +} else { + $yaml["rcc"]["api"] = "off"; +} + +$config = new Config('config.yaml', 'vendor/autoload.php'); + +if ($config->writeConfig($yaml)) { + echo "Changes saved.\n"; +} else { + echo "Failed to save changes.\n"; +} From e0dc2622c2286751923a1704e0f5c4e74dab76b0 Mon Sep 17 00:00:00 2001 From: "Marcel Kapfer (mmk2410)" <marcelmichaelkapfer@yahoo.co.nz> Date: Fri, 22 Apr 2016 18:18:21 +0200 Subject: [PATCH 14/32] API auth --- bin/init_rcc.php | 11 +++++------ config.yaml | 6 +++--- rcc/api/auth/auth.php | 7 +++++-- rcc/password.php | 4 ++-- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/bin/init_rcc.php b/bin/init_rcc.php index 1f7481c..54f236f 100644 --- a/bin/init_rcc.php +++ b/bin/init_rcc.php @@ -16,22 +16,21 @@ if ($username == "") { } echo 'Password: '; -$password = exec('read -s PW; echo $PW'); +$password = readline("Password: "); if ($password == "") { echo "No password given. Aborting...\n"; exit(); } -$hash = password_hash($password, PASSWORD_BCRYPT); - $username = '$username = "' . $username . '";'; -$hash = '$hash = "' . $hash . '";'; +$password = '$password = "' . $password . '";'; -$file = '<?php' . "\n" . $username . "\n" . $hash . "\n"; +$file = '<?php' . "\n" . $username . "\n" . $password . "\n"; if (file_put_contents('./rcc/password.php', $file)) { - echo "\nPassword hash successfully saved.\n"; + chmod('./rcc/password.php', 0640); + echo "\nPassword successfully saved.\n"; } $config = new Config('config.yaml', 'vendor/autoload.php'); diff --git a/config.yaml b/config.yaml index 947e5b8..c3c3c2c 100644 --- a/config.yaml +++ b/config.yaml @@ -1,3 +1,3 @@ -rcc: # settings concerning the rangitaki control center - rcc: on # enable rangitaki control center (enable: 'on') - api: on # enable rangitaki api (enable: 'on') +rcc: + rcc: 'off' + api: 'on' diff --git a/rcc/api/auth/auth.php b/rcc/api/auth/auth.php index 001c312..9c3b5df 100644 --- a/rcc/api/auth/auth.php +++ b/rcc/api/auth/auth.php @@ -5,12 +5,13 @@ require 'DigestAuth.php'; +require '../../password.php'; + use \mmk2410\rbe\digestAuth\DigestAuth as DigestAuth; $realm = 'Restricted area'; -//user => password -$users = array('admin' => 'mypass', 'guest' => 'guest'); +$users = array($username => $password); if (empty($_SERVER['PHP_AUTH_DIGEST'])) { header('HTTP/1.1 401 Unauthorized'); @@ -24,6 +25,7 @@ if (empty($_SERVER['PHP_AUTH_DIGEST'])) { // analyze the PHP_AUTH_DIGEST variable if (!($data = DigestAuth::httpDigestParse($_SERVER['PHP_AUTH_DIGEST'])) || !isset($users[$data['username']])) { + var_dump($_SERVER["PHP_AUTH_DIGEST"]); die('Wrong Credentials!'); } @@ -34,5 +36,6 @@ $A2 = md5($_SERVER['REQUEST_METHOD'].':'.$data['uri']); $valid_response = md5($A1.':'.$data['nonce'].':'.$data['nc'].':'.$data['cnonce'].':'.$data['qop'].':'.$A2); if ($data['response'] != $valid_response) { + var_dump($_SERVER["PHP_AUTH_PW"]); die('Wrong Credentials!'); } diff --git a/rcc/password.php b/rcc/password.php index 973ada0..d267c54 100644 --- a/rcc/password.php +++ b/rcc/password.php @@ -1,3 +1,3 @@ <?php -// Set here your RCC password -$password = "setyourpassword"; +$username = "example"; +$password = "example"; From f632bf2de5a0a45f9bcefdb88d0a0ac604b341ed Mon Sep 17 00:00:00 2001 From: "Marcel Kapfer (mmk2410)" <marcelmichaelkapfer@yahoo.co.nz> Date: Fri, 22 Apr 2016 18:20:40 +0200 Subject: [PATCH 15/32] Remove Debug Outputs --- rcc/api/auth/auth.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/rcc/api/auth/auth.php b/rcc/api/auth/auth.php index 9c3b5df..f02646e 100644 --- a/rcc/api/auth/auth.php +++ b/rcc/api/auth/auth.php @@ -25,7 +25,6 @@ if (empty($_SERVER['PHP_AUTH_DIGEST'])) { // analyze the PHP_AUTH_DIGEST variable if (!($data = DigestAuth::httpDigestParse($_SERVER['PHP_AUTH_DIGEST'])) || !isset($users[$data['username']])) { - var_dump($_SERVER["PHP_AUTH_DIGEST"]); die('Wrong Credentials!'); } @@ -36,6 +35,5 @@ $A2 = md5($_SERVER['REQUEST_METHOD'].':'.$data['uri']); $valid_response = md5($A1.':'.$data['nonce'].':'.$data['nc'].':'.$data['cnonce'].':'.$data['qop'].':'.$A2); if ($data['response'] != $valid_response) { - var_dump($_SERVER["PHP_AUTH_PW"]); die('Wrong Credentials!'); } From 977366968421189478fef9f70886444e2e3fc45f Mon Sep 17 00:00:00 2001 From: "Marcel Kapfer (mmk2410)" <marcelmichaelkapfer@yahoo.co.nz> Date: Fri, 22 Apr 2016 18:49:14 +0200 Subject: [PATCH 16/32] Config switch script --- bin/config.php | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++ config.yaml | 22 ++++++++++++++++- 2 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 bin/config.php diff --git a/bin/config.php b/bin/config.php new file mode 100644 index 0000000..05f4535 --- /dev/null +++ b/bin/config.php @@ -0,0 +1,67 @@ +<?php +// Marcel Kapfer (mmk2410) +// Script for moving from config.php to config.yaml +// License: MIT + +require 'res/php/Config.php'; + +require 'config.php'; + +use mmk2410\rbe\config\Config as Config; + +if ($bloghome == "yes") { + $bloghome = "on"; +} + +if ($blogintro == "yes") { + $blogintro = "on"; +} + +if ($sharefab == "yes") { + $sharefab = "on"; +} + +if ($rcc == "yes") { + $rcc = "on"; +} + +if ($nav_drawer == "yes") { + $nav_drawer = "on"; +} + +$yaml = array( + "blog" => array( + "title" => $blogtitle, + "author" => $blogauthor, + "description" => $blogdescription, + "home" => $bloghome, + "homeurl" => $bloghomeurl, + "homename" => $bloghomename, + "mainname" => $blogmainname, + "intro" => $blogintro, + "disqus" => $blogdisqus, + "analytics" => $bloganalytics, + "footer" => $blogfooter, + "url" => $blogurl + ), + "design" => array( + "fab" => $sharefab, + "drawer" => $nav_drawer, + "theme" => $theme, + "pagination" => $pagination, + "favicon" => $favicon, + ), + "rcc" => array( + "rcc" => "off", + "api" => "off", + ), + "language" => $language, +); + +$config = new Config('config.yaml', 'vendor/autoload.php'); + +if ($config->writeConfig($yaml)) { + echo "YAML config saved.\nYou can delete the config.php file\n"; +} else { + echo "Failed to save YAML config."; +} diff --git a/config.yaml b/config.yaml index c3c3c2c..818a280 100644 --- a/config.yaml +++ b/config.yaml @@ -1,3 +1,23 @@ +blog: + title: 'Example Blog' + author: John + description: 'A short description of your blog' + home: 'on' + homeurl: ../ + homename: Home + mainname: '' + intro: 'on' + disqus: rangitaki + analytics: '' + footer: "Rangitaki 2016 <a href=\"https://github.com/mmk2410/Rangitaki\" target=\"blank\">\n github.com/mmk2410/Rangitaki</a>" + url: 'https://example.com/blog/' +design: + fab: 'on' + drawer: 'on' + theme: material-light + pagination: 0 + favicon: 'http://example.com/res/img/favicon.png' rcc: - rcc: 'off' + rcc: 'on' api: 'on' +language: en From edca0cc8cce0c9db6c94cc00eff4607e1f002080 Mon Sep 17 00:00:00 2001 From: "Marcel Kapfer (mmk2410)" <marcelmichaelkapfer@yahoo.co.nz> Date: Fri, 22 Apr 2016 18:50:07 +0200 Subject: [PATCH 17/32] removed obsolete config.php --- config.php | 87 ------------------------------------------------------ 1 file changed, 87 deletions(-) delete mode 100644 config.php diff --git a/config.php b/config.php deleted file mode 100644 index af390bf..0000000 --- a/config.php +++ /dev/null @@ -1,87 +0,0 @@ -<?php -/** - * PHP Version 7 - * - * Rangitaki Project - * This is the configuration file. You can configure here all necessary - * (and possible) options without editing the index.php file. - * Every line has an description about what you can change here. - * Don't delete any strings. You can set your value after the '=' sign - * and between the apostrophes. - * - * Make sure that every line ends with an semicolon (';'). - * - * @category Config - * @package Rbe - * @author Marcel Kapfer (mmk2410) <marcelmichaelkapfer@yahoo.co.nz> - * @license MIT License - * @link http://marcel-kapfer.de/rangitaki - */ - -// Blog Title / Set here an individual title of yourblog by replacing -// Rangitaki Blog with it. -$blogtitle = 'Example Blog'; - -// Blog Author - Set here your name -$blogauthor = 'John'; - -// Blog description -$blogdescription = 'A short description of your blog'; - -// Home - set yes if you want to link to your homepage and no if not -$bloghome = 'yes'; - -// Home URL - Set here the url to your main page. Either as a path (e.g. '../') -// or as an url (e.g. 'http://github.com') -$bloghomeurl = '../'; - -// Home name - Set here an individual name for your main page -$bloghomename = 'Home'; - -// Main Blog name -> Set a specific name for your main blog -// This value is empty by default -$blogmainname = ''; - -// Intro - set yes if you have a blog intro and no if you don't have one -$blogintro = 'yes'; - -// Disqus - Provide here your Disqus shortname. Leave empty if you don't -// want to use it. -$blogdisqus = 'rangitaki'; - -// Share FAB - this enables or disables the share button -$sharefab = 'yes'; - -// Google Analytics - Provide here your Google Analytics Tracking-ID. Leave -// empty if you don't want to use it. -$bloganalytics = ''; - -// Footer - set here the text for your footer (e.g. a copyright info). You can -// replace the whole text after the '=' with your own one. -$blogfooter = 'Rangitaki ' . date("Y") . - ' <a href="https://github.com/mmk2410/Rangitaki" target="blank"> - github.com/mmk2410/Rangitaki</a>'; - -// This enables the optional rangitaki control center. Please read the -// documentation before you enable it. -$rcc = 'yes'; - -// Here you can disable and enable the navigation menu. Usefull if you have -// no subblogs and no home directory -$nav_drawer = 'yes'; - -// Set here the name of your theme. Read the documentation for more themes -$theme = 'material-light'; - -// Set here your language. The file must exist in the lang directory -$language = "en"; - -// pagination: how many articles should be on one page -// set to 0 to disable it -$pagination = 0; - -// Favicon - Set here the path to your favicon -$favicon = "http://example.com/res/img/favicon.png"; - -// Blog url - set here the blog url -$blogurl = "https://example.com/blog/"; From ac65f5ee700634ccfcefd70583005d18b7d1b117 Mon Sep 17 00:00:00 2001 From: "Marcel Kapfer (mmk2410)" <marcelmichaelkapfer@yahoo.co.nz> Date: Fri, 22 Apr 2016 19:28:27 +0200 Subject: [PATCH 18/32] Config switch to YAML --- index.php | 96 +++++++++++++++++++------------------ rcc/index.php | 10 ++-- res/php/Disqus.php | 2 +- res/php/GoogleAnalytics.php | 2 +- 4 files changed, 58 insertions(+), 52 deletions(-) diff --git a/index.php b/index.php index d22c4de..7b3e7df 100644 --- a/index.php +++ b/index.php @@ -1,15 +1,11 @@ <!DOCTYPE HTML> <!-- Rangitaki Blogging Engine - GitHub: https://github.com/mmk2410/Rangitaki + Code: https://gitlab.com/mmk2410/rangitaki + Issus and Project Management: https://phab.mmk2410.org Web: https://marcel-kapfer.de/rangitaki - Twitter: @Rangitaki - Google+: +Rangitaki ---> -<!-- -COPYRIGHT (c) 2015 mmk2410 - -MIT License + 2015 - 2016 Marcel Kapfer (mmk2410) + License: MIT --> <html> <?php @@ -28,8 +24,14 @@ MIT License date_default_timezone_set('UTC'); require __DIR__ . '/vendor/autoload.php'; // loading composer libs -require 'config.php'; // Config file (this must be the first line) -require './lang/' . $language . ".php"; // Language file +require './res/php/Config.php'; +use mmk2410\rbe\config\Config as Config; + +$configParser = new Config('config.yaml', 'vendor/autoload.php'); + +$config = $configParser->getConfig(); + +require './lang/' . $config["language"] . ".php"; // Language file require_once 'res/php/ArticleGenerator.php'; // The article generator require_once './res/php/BlogListGenerator.php'; // and the blog list generator @@ -42,16 +44,16 @@ $url = "http://" . filter_input(INPUT_SERVER, "HTTP_HOST") . $pagenumber = filter_input(INPUT_GET, "page"); // get the pagenumber // Pagination algorithm -if ($pagination == 0) { - $pagination = false; +if ($config["design"]["pagination"] == 0) { + $config["design"]["pagination"] = false; } else { // pag_max: the newest post to show on a page - $pag_max = $pagination * ( $pagenumber + 1 ); + $pag_max = $config["design"]["pagination"] * ( $pagenumber + 1 ); // pag_min: the oldest post to show on a page - $pag_min = $pag_max - $pagination; + $pag_min = $pag_max - $config["design"]["pagination"]; if ($pagenumber > 0) { // Disable the blog intro if not on first page - $blogintro = "no"; + $config["blog"]["intro"] = "off"; } } @@ -72,10 +74,10 @@ if (isset($getarticle)) { = ArticleGenerator::getTitle($articlesdir, $getarticle . '.md'); } // Make sure that the entry has a title, because main.md hasn't one -if (empty($blogmainname)) { - $blogmaintitle = $blogtitle; +if (empty($config["blog"]["mainname"])) { + $blogmaintitle = $config["blog"]["title"]; } else { - $blogmaintitle = $blogmainname; + $blogmaintitle = $config["blog"]["mainname"]; } if (isset($getblog)) { $subblogtitle = BlogListGenerator::getName('./blogs/' . $getblog . '.md'); @@ -90,18 +92,18 @@ if (isset($getarticle)) { } // url of the feed -$feedurl = $blogurl . "/feed/" . $blog . ".atom"; +$feedurl = $config["blog"]["url"] . "/feed/" . $blog . ".atom"; ?> <head> <meta charset="utf-8"> - <title><?php echo $blogtitle . " » " .$hd_subblog_title; ?> + <?php echo $config["blog"]["title"] . " » " .$hd_subblog_title; ?> + content=""/> + content=""/> "/> + - - + + + href="themes/.css"/> - + href=""/> + @@ -160,7 +162,7 @@ $feedurl = $blogurl . "/feed/" . $blog . ".atom"; skip it -if ($nav_drawer == "yes") { +if ($config["design"]["drawer"] == "on") { ?> - + @@ -276,7 +278,7 @@ if ($nav_drawer == "yes") { // Blog Intro text if (file_exists("blogs/$blog.md") && $getarticle == "" - && $blogintro == "yes" + && $config["blog"]["intro"] == "on" && $gettag == "" ) { // only shown if not in article or tag view @@ -332,7 +334,7 @@ if ($nav_drawer == "yes") { // check if the file is a article file if (strlen($article) >= 3 && substr($article, -3) == ".md") { // generate the article - if ($pagination) { + if ($config["design"]["pagination"]) { if ($posts_amount < $pag_max && $posts_amount >= $pag_min) { ArticleGenerator::newArticle( $articlesdir, $article, $getblog @@ -346,7 +348,7 @@ if ($nav_drawer == "yes") { } $posts_amount++; } - if ($pagination) { + if ($config["design"]["pagination"]) { include './res/php/Pagination.php'; } } elseif (isset($getarticle)) { // ARTICLE VIEW @@ -360,16 +362,16 @@ if ($nav_drawer == "yes") { } ?>
: &t=' target="blank"> diff --git a/rcc/index.php b/rcc/index.php index df64979..79c7878 100644 --- a/rcc/index.php +++ b/rcc/index.php @@ -64,17 +64,21 @@
getConfig(); + +if ($config["rcc"]["rcc"] == "on") { include 'password.php'; session_start(); if (isset($_POST['passwd'])) { $passwd = $_POST['passwd']; $_SESSION['passwd'] = $_POST['passwd']; - } else if (isset($_SESSION['passwd'])) { + } elseif (isset($_SESSION['passwd'])) { $passwd = $_SESSION['passwd']; } diff --git a/res/php/Disqus.php b/res/php/Disqus.php index c97f89f..45c1f20 100644 --- a/res/php/Disqus.php +++ b/res/php/Disqus.php @@ -27,7 +27,7 @@ THE SOFTWARE.