From 4eac721473fcb60b0093cb8cc0444104ff779df8 Mon Sep 17 00:00:00 2001 From: Clement Desmidt Date: Thu, 13 Apr 2023 11:44:42 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20update=20README?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 77 +++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 69 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index eb53ea0..81a2dd3 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,29 @@ -All documentation @ http://labs.shikiryu.com/SRSS/#_how +# SћíкïяўЦЯSS + +> PHP library reading and creating RSS **disclaimer:** -This class is functionnal. Anyway, use it only if you don't have other choices. +This class is functional. Anyway, use it only if you don't have other choices. For example, [Zend](http://framework.zend.com/manual/current/en/modules/zend.feed.introduction.html) and Symfony got their own RSS factory, don't add another one in. + +## :books: Table of Contents + +- [Installation](#package-installation) +- [Usage](#rocket-usage) +- [Features](#sparkles-features) +- [Support](#hammer_and_wrench-support) +- [Contributing](#memo-contributing) +- [License](#scroll-license) + +## :package: Installation + +```sh +composer install shikiryu/shikiryurss +``` + +## :rocket: Usage + ---------------------------------- How to make it read RSS? @@ -22,8 +42,7 @@ Then, you can take care of articles. You can select a precise article : Or looping them : - foreach($rss as $article) - { + foreach($rss as $article) { echo ''. SRSSTools::formatDate('d/m/y', $item->pubDate).' '.$item->title.''; } @@ -34,7 +53,11 @@ If you like arrays, you can transform the RSS into an array : You can also save it into your server with : $rss->save('/www/rss/rss.xml'); // example - + +Or finally, you can display it with : + + $rss->show(); + ---------------------------------- How to make it create RSS? @@ -53,7 +76,7 @@ Those 3 are mandatory to validate your RSS, other options can be added. Then, you can add articles. Let's imagine $content contains an array from your database. foreach($content as $item){ - $rssitem= new SRSSItem; // we create an item + $rssitem = new Item(); // we create an item $rssitem->title = $item["title"]; // adding title (option) $rssitem->link = $item['link']; // adding link (option) $rssitem->pubDate = $item["date"]; // date automatically transformed into RSS format (option) @@ -72,5 +95,43 @@ The other one does the opposite and add the next item in top of your RSS ---------------------------------- -Contact : -https://shikiryu.com/contact +## :sparkles: Features + +
+
Read every RSS 2.0
+
+ Based on RSS 2.0 specifications. +
+
+ +
+
Write and validate RSS 2.0 file
+
+ Based on RSS 2.0 specifications. +
+
+ +## :hammer_and_wrench: Support + +Please [open an issue](https://github.com/Chouchen/ShikiryuRSS/issues) for support. + + +## :memo: Contributing + +Please contribute using [Github Flow](https://guides.github.com/introduction/flow/). Create a branch, add commits, and [open a pull request](https://github.com/Chouchen/ShikiryuRSS/pulls). + +## :scroll: License + +[Creative Commons Attribution NonCommercial (CC-BY-NC)]() © [Chouchen](https://github.com/Chouchen/) + +All documentation @ http://labs.shikiryu.com/SRSS/#_how. + +Contact : https://shikiryu.com/contact + + + + + + + +