diff --git a/.gitignore b/.gitignore index 4c658bf7..d28d273b 100644 --- a/.gitignore +++ b/.gitignore @@ -226,3 +226,9 @@ pip-log.txt ############## /cache /whitelist.txt +DEBUG + +###################### +## VisualStudioCode ## +###################### +.vscode/* \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..969c1b32 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,19 @@ +language: php +php: + - '5.6' + - '7.0' + - hhvm + - nightly + +install: + - pear install PHP_CodeSniffer + +script: + - phpenv rehash + - phpcs . --standard=phpcs.xml --warning-severity=0 --extensions=php -p + +matrix: + fast_finish: true + allow_failures: + - php: hhvm + - php: nightly \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 48da45b0..2aee3bf8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,27 +3,169 @@ rss-bridge Changelog Alpha 0.1 === - * Firt tagged version. - * Includes refactoring. - * Unstable. +* First tagged version. +* Includes refactoring. +* Unstable. -Current development version +Alpha 0.2 (current development version) === - * Corrected GoogleBridge (URI extraction was incorrect) - * Corrected ATOM format: - * mime-type was incorrect - * Hyperlinks were not clickable. - * non-UTF8 characters are now properly filtered. - * Corrected HTML format output: - * Hyperlinks were not clickable. - * Corrected error message when SimpleHtmlDom library is not installed. - * Added changelog. - * (many many fixes on bridges) - * Media RSS format - * input types (list) - * cache purge function - * refactoring - -Alpha 0.2 -=== --TBA- + +## Important changes +* RSS-Bridge has been [UNLICENSED](UNLICENSE) +* RSS-Bridge is now a community-managed project on [GitHub](https://github.com/rss-bridge/rss-bridge) +* RSS-Bridge now has a [Wiki](https://github.com/rss-bridge/rss-bridge/wiki) + +## General changes +* Added [CHANGELOG](CHANGELOG.md) (this file) +* Added [PHP Simple HTML DOM Parser](http://simplehtmldom.sourceforge.net) to [vendor](vendor/simplehtmldom/) +* Added cache purging function (cache will be force-purged after 24 hours or as defined by bridge) +* Added new format [MrssFormat](formats/MrssFormat.php) +* Added parameter `author` - for display of the feed author name - to all formats +* Added new abstractions of the BridgeInterface: + - [HttpCachingBridgeAbstract](https://github.com/RSS-Bridge/rss-bridge/wiki/Bridge-API) + - [RssExpander](https://github.com/RSS-Bridge/rss-bridge/wiki/Bridge-API) +* Added optional support for proxy usage on each individual bridge +* Added support for [custom bridge parameter](https://github.com/RSS-Bridge/rss-bridge/wiki/BridgeAbstract#format-specifications) (text, number, list, checkbox) +* Changed design of the welcome screen +* Changed design of HtmlFormat +* Changed behavior of debug mode: + - Enable debug mode by placing a file called "DEBUG" in the root folder + - Debug mode automatically disables caching +* Changed implementation of bridges - see [Wiki](https://github.com/rss-bridge/rss-bridge/wiki) + - Changed comment-style metadata to public function [`loadMetadatas`](https://github.com/RSS-Bridge/rss-bridge/wiki/BridgeAbstract#the-loadmetadatas-function) + - Added support for multiple utilizations per bridge +* Many bug fixes + +## Modified Bridges +* FlickrExploreBridge +* GoogleSearchBridge +* TwitterBridge + +## New Bridges +* ABCTabsBridge +* AcrimedBridge +* AllocineFRBridge +* AnimeUltimeBridge +* ArstechnicaBridge +* Arte7Bridge +* AskfmBridge +* BandcampBridge +* BastaBridge +* BlaguesDeMerdeBridge +* BooruprojectBridge +* CADBridge +* CNETBridge +* CastorusBridge +* CollegeDeFranceBridge +* CommonDreamsBridge +* CopieDoubleBridge +* CourrierInternationalBridge +* CpasbienBridge +* CryptomeBridge +* DailymotionBridge +* DanbooruBridge +* DansTonChatBridge +* DauphineLibereBridge +* DemoBridge +* DeveloppezDotComBridge +* DilbertBridge +* DollbooruBridge +* DuckDuckGoBridge +* EZTVBridge +* EliteDangerousGalnetBridge +* ElsevierBridge +* EstCeQuonMetEnProdBridge +* FacebookBridge +* FierPandaBridge +* FlickrTagBridge +* FootitoBridge +* FourchanBridge +* Freenews +* FuturaSciencesBridge +* GBAtempBridge +* Gawker +* GelbooruBridge +* GiphyBridge +* GithubIssueBridge +* GitlabCommitsBridge +* GizmodoFRBridge +* GooglePlusPostBridge +* GuruMedBridge +* HDWallpapersBridge +* HentaiHavenBridge +* IdenticaBridge +* InstagramBridge +* IsoHuntBridge +* JapanExpoBridge +* KonachanBridge +* KoreusBridge +* KununuBridge +* LWNprevBridge +* LeBonCoinBridge +* LeJournalDuGeekBridge +* LeMondeInformatiqueBridge +* Les400Culs +* LesJoiesDuCodeBridge +* LichessBridge +* LinkedInCompany +* LolibooruBridge +* MangareaderBridge +* MilbooruBridge +* MondeDiploBridge +* MsnMondeBridge +* MspabooruBridge +* NakedSecurityBridge +* NasaApodBridge +* NeuviemeArtBridge +* NextInpactBridge +* NextgovBridge +* NiceMatinBridge +* NovelUpdatesBridge +* NumeramaBridge +* OpenClassroomsBridge +* ParuVenduImmoBridge +* PickyWallpapersBridge +* PinterestBridge +* PlanetLibreBridge +* ProjectMGameBridge +* RTBFBridge +* Releases3DSBridge +* ReporterreBridge +* Rue89Bridge +* Rule34Bridge +* Rule34pahealBridge +* SafebooruBridge +* SakugabooruBridge +* ScmbBridge +* ScoopItBridge +* SensCritiqueBridge +* Sexactu +* ShanaprojectBridge +* SiliconBridge +* SoundcloudBridge +* StripeAPIChangeLogBridge +* SuperbWallpapersBridge +* T411Bridge +* TagBoardBridge +* TbibBridge +* TheCodingLoveBridge +* TheHackerNewsBridge +* TheOatMealBridge +* ThePirateBayBridge +* TwitchApiBridge +* UnsplashBridge +* ViadeoCompany +* VineBridge +* VkBridge +* WallpaperStopBridge +* WeLiveSecurityBridge +* WhydBridge +* WikipediaBridge +* WordPressBridge +* WorldOfTanks +* XbooruBridge +* YandereBridge +* YoutubeBridge +* ZDNetBridge +* ZatazBridge +* ZoneTelechargementBridge diff --git a/CREATE_BRIDGE.md b/CREATE_BRIDGE.md deleted file mode 100644 index 9948050c..00000000 --- a/CREATE_BRIDGE.md +++ /dev/null @@ -1,105 +0,0 @@ -# Howto create a bridge - -A bridge is an interface that allows rss-bridge to create a RSS feed from a website. -The bridge is a PHP file, located in the `bridges/` folder. - -##Specifications - -A rss bridge must extend the `BridgeAbstract` class, and implement the following functions : - -* The `loadMetadatas` function, described below, -* The `getCacheDuration` function, describing the time during which rss-bridge will output cached values instead of re-generating a RSS feed. -* The `collectData` function, also described below. - -##The `collectData` function - -This function takes as a parameter an array called `$param`, that is automatically filled with values from the user, according to the values setted in `loadMetadatas`. -This function is the place where all the website scrapping and the RSS feed generation process will go. - -The RSS elements are stored in the class variable `items[]`. - -Every RSS element is an instance of the `Item` class. - -##The `loadMetadatas` function - -This function is the one used by rss-bridge core to determine the name, maintainer name, website, last updated date... of the bridge, and the user parameters. - -### Basic metadatas. - -The basic metadatas are the following : - -```PHP -$this->maintainer -$this->name -$this->uri -$this->description -$this->update -``` - -The default values are the following : - -```PHP -$this->name = "Unnamed bridge"; -$this->uri = ""; -$this->description = 'No description provided'; -$this->maintainer = 'No maintainer'; -``` - -### Parameters - -Parameters use a JSON-like format, which is parsed and transformed to HTML `
` by rss-bridge. - -These datas goes into the `$this->parameters` array, which is not mandatory if your bridge doesn't take any parameter. - -Every possible usage of a bridge is an array element. - -The array can be a key-based array, but it is not necessary. The following syntaxes are hereby correct : - -```PHP -$this->parameters[] = ... -$this->parameters['First usage of my bridge'] = ... -``` -It is worth mentionning that you can also define a set of parameters that will be applied to every possible utilisation of your bridge. -To do this, just create a parameter array with the `global` key. - -### Format specifications - -Every `$this->parameters` element is a JSON array (`[ ... ]`) containing every input. - -It needs the following elements to be setted : -* name, the input name as displayed to the user -* identifier, which will be the key in the `$param` array for the corresponding data. - -Hence, the most basic parameter definition is the following: - -```PHP - $this->parameters = - '[ - { - "name" : "Username", - "identifier" : "u" - - } - ]'; -``` - -####Optional parameters - -Here is a list of optional parameters for the input : - -Parameter Name | Parameter values | Description ----------------|------------------|------------ -type|text, number, list, checkbox| Type of the input, default is text -required| true | Set this if you want your attribute to be required -values| [ {"name" : option1Name, "value" : "option1Value"}, ...] | Values list, required with the 'list' type -title| text | Will be shown as tooltip when mouse-hovering over the input - -#### Guidelines - - * scripts (eg. Javascript) must be stripped out. Make good use of `strip_tags()` and `preg_replace()` - * bridge must present data within 8 seconds (adjust iterators accordingly) - * cache timeout must be fine-tuned so that each refresh can provide 1 or 2 new elements on busy periods - * `