mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-07-30 21:30:14 +02:00
Deploying to gh-pages from @ RSS-Bridge/rss-bridge@76f5de3d0f 🚀
This commit is contained in:
265
For_Developers/Actions.html
Normal file
265
For_Developers/Actions.html
Normal file
@@ -0,0 +1,265 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="no-js" lang="en">
|
||||
<head>
|
||||
<title>Actions - RSS-Bridge</title>
|
||||
<meta name="description" content="The RSS feed for websites missing it">
|
||||
<meta name="author" content="RSS-Bridge Contributors">
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
|
||||
<link rel="icon" href="../themes/daux/img/favicon-blue.png" type="image/x-icon">
|
||||
|
||||
<!-- Mobile -->
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<!-- JS -->
|
||||
<script>
|
||||
window.base_url = "../";
|
||||
document.documentElement.classList.remove('no-js');
|
||||
</script>
|
||||
|
||||
<!-- Font -->
|
||||
|
||||
<!-- CSS -->
|
||||
<link href='../themes/daux/css/theme-blue.min.css' rel='stylesheet' type='text/css'>
|
||||
<link href='../daux_libraries/search.css' rel='stylesheet' type='text/css'>
|
||||
</head>
|
||||
<body class="">
|
||||
<div class="Columns content">
|
||||
<aside class="Columns__left Collapsible">
|
||||
<button type="button" class="Button Collapsible__trigger" aria-controls="sidebar_content" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="Collapsible__trigger__bar"></span>
|
||||
<span class="Collapsible__trigger__bar"></span>
|
||||
<span class="Collapsible__trigger__bar"></span>
|
||||
</button>
|
||||
|
||||
<a class="Brand" href="../index.html">RSS-Bridge</a>
|
||||
|
||||
<form role='search' action="/" method="get" class="Search" id="search_form">
|
||||
<label for="search_input">
|
||||
<span class='u-visuallyHidden'>Search</span>
|
||||
</label>
|
||||
<input
|
||||
type="search"
|
||||
id="search_input"
|
||||
class="Search__field"
|
||||
placeholder="Search..."
|
||||
aria-label="Search..."
|
||||
autocomplete="on"
|
||||
results=25
|
||||
autosave=text_search
|
||||
>
|
||||
<label>
|
||||
<input type="submit" class='u-visuallyHidden' />
|
||||
<span class='u-visuallyHidden'>Search...</span>
|
||||
<svg class="Search__icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 451 451">
|
||||
<path d="M447.05 428l-109.6-109.6c29.4-33.8 47.2-77.9 47.2-126.1C384.65 86.2 298.35 0 192.35 0 86.25 0 .05 86.3.05 192.3s86.3 192.3 192.3 192.3c48.2 0 92.3-17.8 126.1-47.2L428.05 447c2.6 2.6 6.1 4 9.5 4s6.9-1.3 9.5-4c5.2-5.2 5.2-13.8 0-19zM26.95 192.3c0-91.2 74.2-165.3 165.3-165.3 91.2 0 165.3 74.2 165.3 165.3s-74.1 165.4-165.3 165.4c-91.1 0-165.3-74.2-165.3-165.4z"/>
|
||||
</svg>
|
||||
</label>
|
||||
</form>
|
||||
|
||||
<div class="Collapsible__content" id="sidebar_content">
|
||||
<!-- Navigation -->
|
||||
<ul class='Nav'><li class='Nav__item has-children'><a href="../General/Project_goals.html" class="Nav__item__link"><i class="Nav__arrow"> </i>General</a><ul class='Nav'><li class='Nav__item '><a href="../General/Project_goals.html">Project-goals</a></li><li class='Nav__item '><a href="../General/Contribute.html">Contribute</a></li><li class='Nav__item '><a href="../General/Requirements.html">Requirements</a></li><li class='Nav__item '><a href="../General/Screenshots.html">Screenshots</a></li><li class='Nav__item '><a href="../General/FAQ.html">FAQ</a></li><li class='Nav__item '><a href="../General/Public_Hosts.html">Public Hosts</a></li></ul></li><li class='Nav__item '><a href="../CLI/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>CLI</a><ul class='Nav'></ul></li><li class='Nav__item has-children'><a href="../For_Hosts/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>For Hosts</a><ul class='Nav'><li class='Nav__item '><a href="../For_Hosts/Installation.html">Installation</a></li><li class='Nav__item '><a href="../For_Hosts/Updating.html">Updating</a></li><li class='Nav__item '><a href="../For_Hosts/Docker_Installation.html">Docker Installation</a></li><li class='Nav__item '><a href="../For_Hosts/Heroku_Installation.html">Heroku Installation</a></li><li class='Nav__item '><a href="../For_Hosts/Whitelisting.html">Whitelisting</a></li><li class='Nav__item '><a href="../For_Hosts/Authentication.html">Authentication</a></li><li class='Nav__item '><a href="../For_Hosts/Customizations.html">Customizations</a></li><li class='Nav__item '><a href="../For_Hosts/Custom_Configuration.html">Custom Configuration</a></li></ul></li><li class='Nav__item Nav__item--open has-children'><a href="../For_Developers/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>For Developers</a><ul class='Nav'><li class='Nav__item '><a href="../For_Developers/Coding_style_policy.html">Coding style policy</a></li><li class='Nav__item '><a href="../For_Developers/Pull_Request_policy.html">Pull Request policy</a></li><li class='Nav__item '><a href="../For_Developers/Folder_structure.html">Folder structure</a></li><li class='Nav__item Nav__item--active'><a href="../For_Developers/Actions.html">Actions</a></li><li class='Nav__item '><a href="../For_Developers/Debug_mode.html">Debug mode</a></li></ul></li><li class='Nav__item has-children'><a href="../Bridge_API/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>Bridge API</a><ul class='Nav'><li class='Nav__item '><a href="../Bridge_API/How_to_create_a_new_bridge.html">How to create a new bridge</a></li><li class='Nav__item '><a href="../Bridge_API/BridgeAbstract.html">BridgeAbstract</a></li><li class='Nav__item '><a href="../Bridge_API/FeedExpander.html">FeedExpander</a></li><li class='Nav__item '><a href="../Bridge_API/XPathAbstract.html">XPathAbstract</a></li></ul></li><li class='Nav__item '><a href="../Helper_functions/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>Helper functions</a><ul class='Nav'></ul></li><li class='Nav__item has-children'><a href="../Cache_API/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>Cache API</a><ul class='Nav'><li class='Nav__item '><a href="../Cache_API/How_to_create_a_new_cache.html">How to create a new cache</a></li><li class='Nav__item '><a href="../Cache_API/CacheInterface.html">CacheInterface</a></li></ul></li><li class='Nav__item has-children'><a href="../Format_API/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>Format API</a><ul class='Nav'><li class='Nav__item '><a href="../Format_API/How_to_create_a_new_format.html">How to create a new format</a></li><li class='Nav__item '><a href="../Format_API/FormatInterface.html">FormatInterface</a></li><li class='Nav__item '><a href="../Format_API/FormatAbstract.html">FormatAbstract</a></li></ul></li><li class='Nav__item '><a href="../Technical_recommendations/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>Technical recommendations</a><ul class='Nav'></ul></li></ul>
|
||||
<div class="Links">
|
||||
<hr/>
|
||||
<a href="https://github.com/RSS-Bridge/rss-bridge" target="_blank" rel="noopener noreferrer">GitHub Repository</a>
|
||||
<br />
|
||||
<a href="https://github.com/RSS-Bridge/rss-bridge/issues" target="_blank" rel="noopener noreferrer">Help/Support/Bugs</a>
|
||||
<br />
|
||||
<a href="https://github.com/RSS-Bridge/rss-bridge/pkgs/container/rss-bridge" target="_blank" rel="noopener noreferrer">Docker Images</a>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<div class="CodeToggler">
|
||||
<hr/>
|
||||
<label class="Checkbox">Show Code Blocks <input type="checkbox" class="CodeToggler__button--main" checked="checked"/>
|
||||
<div class="Checkbox__indicator"></div>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="PoweredBy">
|
||||
<hr/>
|
||||
Powered by Daux.io </div>
|
||||
</div>
|
||||
</aside>
|
||||
<div class="Columns__right">
|
||||
<div class="Columns__right__content">
|
||||
<div class="doc_content">
|
||||
<article class="Page">
|
||||
|
||||
<div class="Page__header">
|
||||
<h1><a href="../For_Developers/index.html">For Developers</a> <svg class="Page__header--separator" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 477.175 477.175"><path d="M360.73 229.075l-225.1-225.1c-5.3-5.3-13.8-5.3-19.1 0s-5.3 13.8 0 19.1l215.5 215.5-215.5 215.5c-5.3 5.3-5.3 13.8 0 19.1 2.6 2.6 6.1 4 9.5 4 3.4 0 6.9-1.3 9.5-4l225.1-225.1c5.3-5.2 5.3-13.8.1-19z"/></svg> <a href="../For_Developers/Actions.html">Actions</a></h1>
|
||||
<span class="ModifiedDate">
|
||||
March 22, 2022 at 1:33 PM </span>
|
||||
<span class="EditOn">
|
||||
<a href="https://github.com/RSS-Bridge/rss-bridge/tree/master/docs/04_For_Developers/04_Actions.md" target="_blank">
|
||||
Edit on GitHub </a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="s-content">
|
||||
<p>RSS-Bridge currently supports three ‘actions’ which it can operate:</p>
|
||||
<ol>
|
||||
<li>
|
||||
<a href="#display">Display</a> (<code>?action=display</code>)</li>
|
||||
<li>
|
||||
<a href="#detect">Detect</a> (<code>?action=detect</code>)</li>
|
||||
<li>
|
||||
<a href="#list">List</a> (<code>?action=list</code>)</li>
|
||||
</ol>
|
||||
<h2><a id="display" href="#display" class="Permalink" aria-hidden="true" title="Permalink">#</a>Display</h2>
|
||||
<p>The <code>display</code> action returns feeds generated by <a href="../Bridge_API/index.html">bridges</a>. It requires additional parameter, some of which are specific to each bridge (see implementation details for your specific bridge). The following list contains mandatory parameter applicable to all bridges, excluding parameters that require <a href="../For_Hosts/Custom_Configuration.html">additional options</a>. Errors are returned for missing mandatory parameters:</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Parameter</th>
|
||||
<th>Required</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>bridge</code></td>
|
||||
<td>yes</td>
|
||||
<td>Specifies the name of the bridge to display. Possible values are determined from the bridges available to the current instance of RSS-Bridge and the <a href="../For_Hosts/Whitelisting.html">whitelist</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>format</code></td>
|
||||
<td>yes</td>
|
||||
<td>Specifies the name of the format to use for displaying the feed. Possible values are determined from the formats available to the current instance of RSS-Bridge.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h2><a id="detect" href="#detect" class="Permalink" aria-hidden="true" title="Permalink">#</a>Detect</h2>
|
||||
<p>The <code>detect</code> action attempts to redirect the user to an appropriate <code>display</code> action for a feed based on a supplied URL. As bridges have to individually implement this it may not work for every bridge.</p>
|
||||
<p>If an appropriate bridge is found, a <code>301 Moved Permanently</code> HTTP status code is returned with a relative location for a <code>display</code> action. If no appropriate bridge is found or a required parameter is missing, a <code>400 Bad Request</code> status code is returned.</p>
|
||||
<p>The parameters for this action are listed bellow:</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Parameter</th>
|
||||
<th>Required</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>url</code></td>
|
||||
<td>yes</td>
|
||||
<td>Specifies the URL to attempt to find a feed from. The value of this should be URL encoded.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>format</code></td>
|
||||
<td>yes</td>
|
||||
<td>Specifies the name of the format to use for displaying the feed. This is passed to the detected <code>display</code> action. Possible values are determined from the formats available to the current instance of RSS-Bridge.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h2><a id="list" href="#list" class="Permalink" aria-hidden="true" title="Permalink">#</a>List</h2>
|
||||
<p>The <code>list</code> action returns a JSON formatted text containing information on all bridges available to the current instance of RSS-Bridge. Inactive bridges (not <a href="../For_Hosts/Whitelisting.html">whitelisted</a>) are included as well. Broken bridges are also included, but with limited parameters (only <code>"status": "inactive"</code>).</p>
|
||||
<p>This example shows JSON data for a single bridge:</p>
|
||||
<pre><code class="language-JSON">{
|
||||
"bridges": {
|
||||
"ABCTabs": {
|
||||
"status": "active",
|
||||
"uri": "https:\/\/www.abc-tabs.com\/",
|
||||
"name": "ABC Tabs Bridge",
|
||||
"parameters": [],
|
||||
"maintainer": "kranack",
|
||||
"description": "Returns 22 newest tabs"
|
||||
}
|
||||
},
|
||||
"total": 1
|
||||
}
|
||||
</code></pre>
|
||||
<p>The top-level JSON object contains two parameters:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="#bridges"><code>bridges</code></a>: A collection of bridges</li>
|
||||
<li>
|
||||
<a href="#total"><code>total</code></a>: The total number of bridges</li>
|
||||
</ul>
|
||||
<pre><code class="language-JSON">{
|
||||
"bridges": { },
|
||||
"total": 0
|
||||
}
|
||||
</code></pre>
|
||||
<h3><a id="bridges" href="#bridges" class="Permalink" aria-hidden="true" title="Permalink">#</a><code>bridges</code></h3>
|
||||
<p>The <code>bridges</code> parameter is a collection of bridge objects. The name of each object represents the name of the bridge as needed for the <a href="#display"><code>display</code> action</a>. Each object contains parameters, most of which are optional. The following table summarizes the parameters:</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Parameter</th>
|
||||
<th>Optional</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>status</code></td>
|
||||
<td>No</td>
|
||||
<td>Indicates the status of the bridge. Possible values are ‘<code>active</code>’ and ‘<code>inactive</code>’. Only <code>active</code> bridges can be used for the <a href="#display"><code>display</code> action</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>uri</code></td>
|
||||
<td>Yes</td>
|
||||
<td>Returns the URI of the bridge, as returned by the <a href="../Bridge_API/BridgeAbstract.html#geturi"><code>getURI</code></a> function of the bridge.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>name</code></td>
|
||||
<td>Yes</td>
|
||||
<td>Returns the name of the bridge, as returned by the <a href="../Bridge_API/BridgeAbstract.html#getname"><code>getName</code></a> function of the bridge.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>parameters</code></td>
|
||||
<td>Yes</td>
|
||||
<td>Returns the <code>PARAMETERS</code> object of the bridge</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>maintainer</code></td>
|
||||
<td>Yes</td>
|
||||
<td>Returns the name(s) of maintainer(s) for the bridge</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>description</code></td>
|
||||
<td>Yes</td>
|
||||
<td>Returns the description of the bridge</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a id="total" href="#total" class="Permalink" aria-hidden="true" title="Permalink">#</a><code>total</code></h3>
|
||||
<p>This parameter represents the total number of bridges available to the current instance of RSS-Bridge.</p>
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<ul class="Pager">
|
||||
<li class=Pager--prev><a href="../For_Developers/Folder_structure.html">Previous</a></li> <li class=Pager--next><a href="../For_Developers/Debug_mode.html">Next</a></li> </ul>
|
||||
</nav>
|
||||
</article>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- JS -->
|
||||
<script src="../themes/daux/js/daux.min.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
window.searchLanguage = "";
|
||||
window.searchTranslation = {"Search_one_result":"1 result","Search_results":"!count results","Search_no_results":"Nothing found","Search_common_words_ignored":"Common words are largely ignored","Search_too_short":"Search too short","Search_one_character_or_more":"Should be one character or more","Search_should_be_x_or_more":"Should be !min characters or more","Link_previous":"Previous","Link_next":"Next"};
|
||||
</script>
|
||||
|
||||
<!-- Search -->
|
||||
<script type="text/javascript" src="../daux_libraries/search.min.js"></script>
|
||||
|
||||
<script>
|
||||
window.search({'base_url': '../'})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
559
For_Developers/Coding_style_policy.html
Normal file
559
For_Developers/Coding_style_policy.html
Normal file
@@ -0,0 +1,559 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="no-js" lang="en">
|
||||
<head>
|
||||
<title>Coding style policy - RSS-Bridge</title>
|
||||
<meta name="description" content="The RSS feed for websites missing it">
|
||||
<meta name="author" content="RSS-Bridge Contributors">
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
|
||||
<link rel="icon" href="../themes/daux/img/favicon-blue.png" type="image/x-icon">
|
||||
|
||||
<!-- Mobile -->
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<!-- JS -->
|
||||
<script>
|
||||
window.base_url = "../";
|
||||
document.documentElement.classList.remove('no-js');
|
||||
</script>
|
||||
|
||||
<!-- Font -->
|
||||
|
||||
<!-- CSS -->
|
||||
<link href='../themes/daux/css/theme-blue.min.css' rel='stylesheet' type='text/css'>
|
||||
<link href='../daux_libraries/search.css' rel='stylesheet' type='text/css'>
|
||||
</head>
|
||||
<body class="">
|
||||
<div class="Columns content">
|
||||
<aside class="Columns__left Collapsible">
|
||||
<button type="button" class="Button Collapsible__trigger" aria-controls="sidebar_content" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="Collapsible__trigger__bar"></span>
|
||||
<span class="Collapsible__trigger__bar"></span>
|
||||
<span class="Collapsible__trigger__bar"></span>
|
||||
</button>
|
||||
|
||||
<a class="Brand" href="../index.html">RSS-Bridge</a>
|
||||
|
||||
<form role='search' action="/" method="get" class="Search" id="search_form">
|
||||
<label for="search_input">
|
||||
<span class='u-visuallyHidden'>Search</span>
|
||||
</label>
|
||||
<input
|
||||
type="search"
|
||||
id="search_input"
|
||||
class="Search__field"
|
||||
placeholder="Search..."
|
||||
aria-label="Search..."
|
||||
autocomplete="on"
|
||||
results=25
|
||||
autosave=text_search
|
||||
>
|
||||
<label>
|
||||
<input type="submit" class='u-visuallyHidden' />
|
||||
<span class='u-visuallyHidden'>Search...</span>
|
||||
<svg class="Search__icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 451 451">
|
||||
<path d="M447.05 428l-109.6-109.6c29.4-33.8 47.2-77.9 47.2-126.1C384.65 86.2 298.35 0 192.35 0 86.25 0 .05 86.3.05 192.3s86.3 192.3 192.3 192.3c48.2 0 92.3-17.8 126.1-47.2L428.05 447c2.6 2.6 6.1 4 9.5 4s6.9-1.3 9.5-4c5.2-5.2 5.2-13.8 0-19zM26.95 192.3c0-91.2 74.2-165.3 165.3-165.3 91.2 0 165.3 74.2 165.3 165.3s-74.1 165.4-165.3 165.4c-91.1 0-165.3-74.2-165.3-165.4z"/>
|
||||
</svg>
|
||||
</label>
|
||||
</form>
|
||||
|
||||
<div class="Collapsible__content" id="sidebar_content">
|
||||
<!-- Navigation -->
|
||||
<ul class='Nav'><li class='Nav__item has-children'><a href="../General/Project_goals.html" class="Nav__item__link"><i class="Nav__arrow"> </i>General</a><ul class='Nav'><li class='Nav__item '><a href="../General/Project_goals.html">Project-goals</a></li><li class='Nav__item '><a href="../General/Contribute.html">Contribute</a></li><li class='Nav__item '><a href="../General/Requirements.html">Requirements</a></li><li class='Nav__item '><a href="../General/Screenshots.html">Screenshots</a></li><li class='Nav__item '><a href="../General/FAQ.html">FAQ</a></li><li class='Nav__item '><a href="../General/Public_Hosts.html">Public Hosts</a></li></ul></li><li class='Nav__item '><a href="../CLI/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>CLI</a><ul class='Nav'></ul></li><li class='Nav__item has-children'><a href="../For_Hosts/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>For Hosts</a><ul class='Nav'><li class='Nav__item '><a href="../For_Hosts/Installation.html">Installation</a></li><li class='Nav__item '><a href="../For_Hosts/Updating.html">Updating</a></li><li class='Nav__item '><a href="../For_Hosts/Docker_Installation.html">Docker Installation</a></li><li class='Nav__item '><a href="../For_Hosts/Heroku_Installation.html">Heroku Installation</a></li><li class='Nav__item '><a href="../For_Hosts/Whitelisting.html">Whitelisting</a></li><li class='Nav__item '><a href="../For_Hosts/Authentication.html">Authentication</a></li><li class='Nav__item '><a href="../For_Hosts/Customizations.html">Customizations</a></li><li class='Nav__item '><a href="../For_Hosts/Custom_Configuration.html">Custom Configuration</a></li></ul></li><li class='Nav__item Nav__item--open has-children'><a href="../For_Developers/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>For Developers</a><ul class='Nav'><li class='Nav__item Nav__item--active'><a href="../For_Developers/Coding_style_policy.html">Coding style policy</a></li><li class='Nav__item '><a href="../For_Developers/Pull_Request_policy.html">Pull Request policy</a></li><li class='Nav__item '><a href="../For_Developers/Folder_structure.html">Folder structure</a></li><li class='Nav__item '><a href="../For_Developers/Actions.html">Actions</a></li><li class='Nav__item '><a href="../For_Developers/Debug_mode.html">Debug mode</a></li></ul></li><li class='Nav__item has-children'><a href="../Bridge_API/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>Bridge API</a><ul class='Nav'><li class='Nav__item '><a href="../Bridge_API/How_to_create_a_new_bridge.html">How to create a new bridge</a></li><li class='Nav__item '><a href="../Bridge_API/BridgeAbstract.html">BridgeAbstract</a></li><li class='Nav__item '><a href="../Bridge_API/FeedExpander.html">FeedExpander</a></li><li class='Nav__item '><a href="../Bridge_API/XPathAbstract.html">XPathAbstract</a></li></ul></li><li class='Nav__item '><a href="../Helper_functions/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>Helper functions</a><ul class='Nav'></ul></li><li class='Nav__item has-children'><a href="../Cache_API/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>Cache API</a><ul class='Nav'><li class='Nav__item '><a href="../Cache_API/How_to_create_a_new_cache.html">How to create a new cache</a></li><li class='Nav__item '><a href="../Cache_API/CacheInterface.html">CacheInterface</a></li></ul></li><li class='Nav__item has-children'><a href="../Format_API/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>Format API</a><ul class='Nav'><li class='Nav__item '><a href="../Format_API/How_to_create_a_new_format.html">How to create a new format</a></li><li class='Nav__item '><a href="../Format_API/FormatInterface.html">FormatInterface</a></li><li class='Nav__item '><a href="../Format_API/FormatAbstract.html">FormatAbstract</a></li></ul></li><li class='Nav__item '><a href="../Technical_recommendations/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>Technical recommendations</a><ul class='Nav'></ul></li></ul>
|
||||
<div class="Links">
|
||||
<hr/>
|
||||
<a href="https://github.com/RSS-Bridge/rss-bridge" target="_blank" rel="noopener noreferrer">GitHub Repository</a>
|
||||
<br />
|
||||
<a href="https://github.com/RSS-Bridge/rss-bridge/issues" target="_blank" rel="noopener noreferrer">Help/Support/Bugs</a>
|
||||
<br />
|
||||
<a href="https://github.com/RSS-Bridge/rss-bridge/pkgs/container/rss-bridge" target="_blank" rel="noopener noreferrer">Docker Images</a>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<div class="CodeToggler">
|
||||
<hr/>
|
||||
<label class="Checkbox">Show Code Blocks <input type="checkbox" class="CodeToggler__button--main" checked="checked"/>
|
||||
<div class="Checkbox__indicator"></div>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="PoweredBy">
|
||||
<hr/>
|
||||
Powered by Daux.io </div>
|
||||
</div>
|
||||
</aside>
|
||||
<div class="Columns__right">
|
||||
<div class="Columns__right__content">
|
||||
<div class="doc_content">
|
||||
<article class="Page">
|
||||
|
||||
<div class="Page__header">
|
||||
<h1><a href="../For_Developers/index.html">For Developers</a> <svg class="Page__header--separator" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 477.175 477.175"><path d="M360.73 229.075l-225.1-225.1c-5.3-5.3-13.8-5.3-19.1 0s-5.3 13.8 0 19.1l215.5 215.5-215.5 215.5c-5.3 5.3-5.3 13.8 0 19.1 2.6 2.6 6.1 4 9.5 4 3.4 0 6.9-1.3 9.5-4l225.1-225.1c5.3-5.2 5.3-13.8.1-19z"/></svg> <a href="../For_Developers/Coding_style_policy.html">Coding style policy</a></h1>
|
||||
<span class="ModifiedDate">
|
||||
March 22, 2022 at 1:33 PM </span>
|
||||
<span class="EditOn">
|
||||
<a href="https://github.com/RSS-Bridge/rss-bridge/tree/master/docs/04_For_Developers/01_Coding_style_policy.md" target="_blank">
|
||||
Edit on GitHub </a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="s-content">
|
||||
<p>This section explains the coding style policy for RSS-Bridge with examples and references to external resources. Please make sure your code is compliant before opening a pull request.</p>
|
||||
<p>RSS-Bridge uses <a href="https://travis-ci.org/" class="Link--external" rel="noopener noreferrer">Travis-CI</a> to validate code quality. You will automatically be notified if issues were found in your pull request. You must fix those issues before the pull request will be merged. Refer to <a href="https://github.com/RSS-Bridge/rss-bridge/blob/master/phpcs.xml" class="Link--external" rel="noopener noreferrer">phpcs.xml</a> for a complete list of policies enforced by Travis-CI.</p>
|
||||
<p>If you want to run the checks locally, make sure you have <a href="https://github.com/squizlabs/PHP_CodeSniffer" class="Link--external" rel="noopener noreferrer"><code>phpcs</code></a> and <a href="https://phpunit.de/" class="Link--external" rel="noopener noreferrer"><code>phpunit</code></a> installed on your machine and run following commands in the root directory of RSS-Bridge (tested on Debian):</p>
|
||||
<pre><code class="hljs shell">phpcs . --standard=phpcs.xml --warning-severity=0 --extensions=php -p
|
||||
phpunit --configuration=phpunit.xml --include-path=lib/
|
||||
</code></pre>
|
||||
<p>The following list provides an overview of all policies applied to RSS-Bridge.</p>
|
||||
<h1><a id="whitespace" href="#whitespace" class="Permalink" aria-hidden="true" title="Permalink">#</a>Whitespace</h1>
|
||||
<h2><a id="add-a-new-line-at-the-end-of-a-file" href="#add-a-new-line-at-the-end-of-a-file" class="Permalink" aria-hidden="true" title="Permalink">#</a>Add a new line at the end of a file</h2>
|
||||
<p>Each PHP/CSS/HTML file must end with a new line at the end of a file.</p>
|
||||
<details><summary>Example</summary><div><br>
|
||||
<p><strong>Bad</strong></p>
|
||||
<pre><code class="language-PHP">{
|
||||
// code here
|
||||
} // This is the end of the file
|
||||
</code></pre>
|
||||
<p><strong>Good</strong></p>
|
||||
<pre><code class="language-PHP">{
|
||||
// code here
|
||||
}
|
||||
// This is the end of the file
|
||||
</code></pre>
|
||||
</div></details><br>
|
||||
<p><em>Reference</em>: <a href="https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/PSR2/Sniffs/Files/EndFileNewlineSniff.php" class="Link--external" rel="noopener noreferrer"><code>PSR2.Files.EndFileNewline</code></a></p>
|
||||
<h2><a id="do-not-add-a-whitespace-before-a-semicolon" href="#do-not-add-a-whitespace-before-a-semicolon" class="Permalink" aria-hidden="true" title="Permalink">#</a>Do not add a whitespace before a semicolon</h2>
|
||||
<p>A semicolon indicates the end of a line of code. Spaces before the semicolon is unnecessary and must be removed.</p>
|
||||
<details><summary>Example</summary><div><br>
|
||||
<p><strong>Bad</strong></p>
|
||||
<pre><code class="language-PHP">echo 'Hello World!' ;
|
||||
</code></pre>
|
||||
<p><strong>Good</strong></p>
|
||||
<pre><code class="language-PHP">echo 'Hello World!';
|
||||
</code></pre>
|
||||
</div></details><br>
|
||||
<p><em>Reference</em>: <a href="https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/Squiz/Sniffs/WhiteSpace/SemicolonSpacingSniff.php" class="Link--external" rel="noopener noreferrer"><code>Squiz.WhiteSpace.SemicolonSpacing</code></a></p>
|
||||
<h2><a id="do-not-add-whitespace-at-start-or-end-of-a-file-or-end-of-a-line" href="#do-not-add-whitespace-at-start-or-end-of-a-file-or-end-of-a-line" class="Permalink" aria-hidden="true" title="Permalink">#</a>Do not add whitespace at start or end of a file or end of a line</h2>
|
||||
<p>Whitespace at the end of lines or at the start or end of a file is invisible to the reader and absolutely unnecessary. Thus it must be removed.</p>
|
||||
<p><em>Reference</em>: <a href="https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/Squiz/Sniffs/WhiteSpace/SuperfluousWhitespaceSniff.php" class="Link--external" rel="noopener noreferrer"><code>Squiz.WhiteSpace.SuperfluousWhitespace</code></a></p>
|
||||
<h1><a id="indentation" href="#indentation" class="Permalink" aria-hidden="true" title="Permalink">#</a>Indentation</h1>
|
||||
<h2><a id="use-tabs-for-indentation" href="#use-tabs-for-indentation" class="Permalink" aria-hidden="true" title="Permalink">#</a>Use tabs for indentation</h2>
|
||||
<p>RSS-Bridge uses tabs for indentation on all PHP files in the repository (except files located in the <code>vendor</code> directory)</p>
|
||||
<p><em>Reference</em>: <a href="https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/Generic/Sniffs/WhiteSpace/DisallowSpaceIndentSniff.php" class="Link--external" rel="noopener noreferrer"><code>Generic.WhiteSpace.DisallowSpaceIndent</code></a></p>
|
||||
<h1><a id="maximum-line-length" href="#maximum-line-length" class="Permalink" aria-hidden="true" title="Permalink">#</a>Maximum Line Length</h1>
|
||||
<h2><a id="the-maximum-line-length-should-not-exceed-80-characters" href="#the-maximum-line-length-should-not-exceed-80-characters" class="Permalink" aria-hidden="true" title="Permalink">#</a>The maximum line length should not exceed 80 characters</h2>
|
||||
<p>One line of code should have no more than <strong>80 characters</strong> (soft limit) and must never exceed <strong>120 characters</strong> (hard limit).</p>
|
||||
<p><em>Notice</em>: Travis-CI enforces the hard limit of 120 characters. Maintainers may ask you to indent lines longer than 80 characters before merging. This is generally done to keep the code as readable and maintainable as possible.</p>
|
||||
<p>For long conditional statements, consider indenting the statement into multiple lines.</p>
|
||||
<details><summary>Example</summary><div><br>
|
||||
<p><strong>Bad</strong> (the total length of the line is <strong>94</strong> characters)</p>
|
||||
<pre><code class="language-PHP">if($time !== false && (time() - $duration < $time) && (!defined('DEBUG') || DEBUG !== true)) {
|
||||
|
||||
}
|
||||
</code></pre>
|
||||
<p><strong>Good</strong> (add line breaks)</p>
|
||||
<pre><code class="language-PHP">if($time !== false
|
||||
&& (time() - $duration < $time)
|
||||
&& (!defined('DEBUG') || DEBUG !== true)) {
|
||||
|
||||
}
|
||||
</code></pre>
|
||||
</div></details><br>
|
||||
<p>For long text, either add line feeds, or make use of the <a href="http://php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc" class="Link--external" rel="noopener noreferrer"><code>heredoc</code></a> syntax.</p>
|
||||
<details><summary>Example</summary><div><br>
|
||||
<p><strong>Bad</strong> (the total length of the line is <strong>340</strong> characters - from <a href="https://www.lipsum.com/feed/html" class="Link--external" rel="noopener noreferrer">Lorem Ipsum</a>)</p>
|
||||
<pre><code class="language-PHP">$longtext = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse condimentum nec est eget posuere. Proin at sagittis risus. Fusce faucibus lectus leo, eu ornare velit tristique eu. Curabitur elementum facilisis ultricies. Praesent dictum fermentum lectus a rhoncus. Donec vitae justo metus. Sed molestie faucibus egestas.';
|
||||
</code></pre>
|
||||
<p><strong>Good</strong> (use <code>heredoc</code> syntax - this will add line-breaks)</p>
|
||||
<pre><code class="language-PHP">$longtext = <<<EOD
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse
|
||||
condimentum nec est eget posuere. Proin at sagittis risus. Fusce faucibus
|
||||
lectus leo, eu ornare velit tristique eu. Curabitur elementum facilisis
|
||||
ultricies. Praesent dictum fermentum lectus a rhoncus. Donec vitae justo metus.
|
||||
Sed molestie faucibus egestas.
|
||||
EOD;
|
||||
</code></pre>
|
||||
</div></details><br>
|
||||
<p><em>Reference</em>: <a href="https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/Generic/Sniffs/Files/LineLengthSniff.php" class="Link--external" rel="noopener noreferrer"><code>Generic.Files.LineLength</code></a></p>
|
||||
<h1><a id="strings" href="#strings" class="Permalink" aria-hidden="true" title="Permalink">#</a>Strings</h1>
|
||||
<h2><a id="whenever-possible-use-single-quote-strings" href="#whenever-possible-use-single-quote-strings" class="Permalink" aria-hidden="true" title="Permalink">#</a>Whenever possible use single quote strings</h2>
|
||||
<p>PHP supports both single quote strings and double quote strings. For pure text you must use single quote strings for consistency. Double quote strings are only allowed for special characters (i.e. <code>"\n"</code>) or inlined variables (i.e. <code>"My name is {$name}"</code>);</p>
|
||||
<details><summary>Example</summary><div><br>
|
||||
<p><strong>Bad</strong></p>
|
||||
<pre><code class="language-PHP">echo "Hello World!";
|
||||
</code></pre>
|
||||
<p><strong>Good</strong></p>
|
||||
<pre><code class="language-PHP">echo 'Hello World!';
|
||||
</code></pre>
|
||||
</div></details><br>
|
||||
<p><em>Reference</em>: <a href="https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/Squiz/Sniffs/Strings/DoubleQuoteUsageSniff.php" class="Link--external" rel="noopener noreferrer"><code>Squiz.Strings.DoubleQuoteUsage</code></a></p>
|
||||
<h2><a id="add-spaces-around-the-concatenation-operator" href="#add-spaces-around-the-concatenation-operator" class="Permalink" aria-hidden="true" title="Permalink">#</a>Add spaces around the concatenation operator</h2>
|
||||
<p>The concatenation operator should have one space on both sides in order to improve readability.</p>
|
||||
<details><summary>Example</summary><div><br>
|
||||
<p><strong>Bad</strong></p>
|
||||
<pre><code class="language-PHP">$text = $greeting.' '.$name.'!';
|
||||
</code></pre>
|
||||
<p><strong>Good</strong> (add spaces)</p>
|
||||
<pre><code class="language-PHP">$text = $greeting . ' ' . $name . '!';
|
||||
</code></pre>
|
||||
</div></details><br>
|
||||
<p>You may break long lines into multiple lines using the concatenation operator. That way readability can improve considerable when combining lots of variables.</p>
|
||||
<details><summary>Example</summary><div><br>
|
||||
<p><strong>Bad</strong></p>
|
||||
<pre><code class="language-PHP">$text = $greeting.' '.$name.'!';
|
||||
</code></pre>
|
||||
<p><strong>Good</strong> (split into multiple lines)</p>
|
||||
<pre><code class="language-PHP">$text = $greeting
|
||||
. ' '
|
||||
. $name
|
||||
. '!';
|
||||
</code></pre>
|
||||
</div></details><br>
|
||||
<p><em>Reference</em>: <a href="https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/Squiz/Sniffs/Strings/ConcatenationSpacingSniff.php" class="Link--external" rel="noopener noreferrer"><code>Squiz.Strings.ConcatenationSpacing</code></a></p>
|
||||
<h2><a id="use-a-single-string-instead-of-concatenating" href="#use-a-single-string-instead-of-concatenating" class="Permalink" aria-hidden="true" title="Permalink">#</a>Use a single string instead of concatenating</h2>
|
||||
<p>While concatenation is useful for combining variables with other variables or static text. It should not be used to combine two sets of static text. See also: <a href="#maximum-line-length">Maximum line length</a></p>
|
||||
<details><summary>Example</summary><div><br>
|
||||
<p><strong>Bad</strong></p>
|
||||
<pre><code class="language-PHP">$text = 'This is' . 'a bad idea!';
|
||||
</code></pre>
|
||||
<p><strong>Good</strong></p>
|
||||
<pre><code class="language-PHP">$text = 'This is a good idea!';
|
||||
</code></pre>
|
||||
</div></details><br>
|
||||
<p><em>Reference</em>: <a href="https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/Generic/Sniffs/Strings/UnnecessaryStringConcatSniff.php" class="Link--external" rel="noopener noreferrer"><code>Generic.Strings.UnnecessaryStringConcat</code></a></p>
|
||||
<h1><a id="constants" href="#constants" class="Permalink" aria-hidden="true" title="Permalink">#</a>Constants</h1>
|
||||
<h2><a id="use-uppercase-for-constants" href="#use-uppercase-for-constants" class="Permalink" aria-hidden="true" title="Permalink">#</a>Use UPPERCASE for constants</h2>
|
||||
<p>As in most languages, constants should be written in UPPERCASE.</p>
|
||||
<p><em>Notice</em>: This does not apply to keywords!</p>
|
||||
<details><summary>Example</summary><div><br>
|
||||
<p><strong>Bad</strong></p>
|
||||
<pre><code class="language-PHP">const pi = 3.14;
|
||||
</code></pre>
|
||||
<p><strong>Good</strong></p>
|
||||
<pre><code class="language-PHP">const PI = 3.14;
|
||||
</code></pre>
|
||||
</div></details><br>
|
||||
<p><em>Reference</em>: <a href="https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/Generic/Sniffs/NamingConventions/UpperCaseConstantNameSniff.php" class="Link--external" rel="noopener noreferrer"><code>Generic.NamingConventions.UpperCaseConstantName</code></a></p>
|
||||
<h1><a id="keywords" href="#keywords" class="Permalink" aria-hidden="true" title="Permalink">#</a>Keywords</h1>
|
||||
<h2><a id="use-lowercase-for-true-false-and-null" href="#use-lowercase-for-true-false-and-null" class="Permalink" aria-hidden="true" title="Permalink">#</a>Use lowercase for <code>true</code>, <code>false</code> and <code>null</code></h2>
|
||||
<p><code>true</code>, <code>false</code> and <code>null</code> must be written in lower case letters.</p>
|
||||
<details><summary>Example</summary><div><br>
|
||||
<p><strong>Bad</strong></p>
|
||||
<pre><code class="language-PHP">if($condition === TRUE && $error === FALSE) {
|
||||
return NULL;
|
||||
}
|
||||
</code></pre>
|
||||
<p><strong>Good</strong></p>
|
||||
<pre><code class="language-PHP">if($condition === true && $error === false) {
|
||||
return null;
|
||||
}
|
||||
</code></pre>
|
||||
</div></details><br>
|
||||
<p><em>Reference</em>: <a href="https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/Generic/Sniffs/PHP/LowerCaseConstantSniff.php" class="Link--external" rel="noopener noreferrer"><code>Generic.PHP.LowerCaseConstant</code></a></p>
|
||||
<h1><a id="operators" href="#operators" class="Permalink" aria-hidden="true" title="Permalink">#</a>Operators</h1>
|
||||
<h2><a id="operators-must-have-a-space-around-them" href="#operators-must-have-a-space-around-them" class="Permalink" aria-hidden="true" title="Permalink">#</a>Operators must have a space around them</h2>
|
||||
<p>Operators must be readable and therefore should have spaces around them.</p>
|
||||
<details><summary>Example</summary><div><br>
|
||||
<p><strong>Bad</strong></p>
|
||||
<pre><code class="language-PHP">$text='Hello '.$name.'!';
|
||||
</code></pre>
|
||||
<p><strong>Good</strong></p>
|
||||
<pre><code class="language-PHP">$text = 'Hello ' . $name . '!';
|
||||
</code></pre>
|
||||
</div></details><br>
|
||||
<p><em>Reference</em>: <a href="https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/Squiz/Sniffs/WhiteSpace/OperatorSpacingSniff.php" class="Link--external" rel="noopener noreferrer"><code>Squiz.WhiteSpace.OperatorSpacing</code></a></p>
|
||||
<h1><a id="functions" href="#functions" class="Permalink" aria-hidden="true" title="Permalink">#</a>Functions</h1>
|
||||
<h2><a id="parameters-with-default-values-must-appear-last-in-functions" href="#parameters-with-default-values-must-appear-last-in-functions" class="Permalink" aria-hidden="true" title="Permalink">#</a>Parameters with default values must appear last in functions</h2>
|
||||
<p>It is considered good practice to make parameters with default values last in function declarations.</p>
|
||||
<details><summary>Example</summary><div><br>
|
||||
<p><strong>Bad</strong></p>
|
||||
<pre><code class="language-PHP">function showTitle($duration = 60000, $title) { ... }
|
||||
</code></pre>
|
||||
<p><strong>Good</strong></p>
|
||||
<pre><code class="language-PHP">function showTitle($title, $duration = 60000) { ... }
|
||||
</code></pre>
|
||||
</div></details><br>
|
||||
<p><em>Reference</em>: <a href="https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/PEAR/Sniffs/Functions/ValidDefaultValueSniff.php" class="Link--external" rel="noopener noreferrer"><code>PEAR.Functions.ValidDefaultValue</code></a></p>
|
||||
<h2><a id="calling-functions" href="#calling-functions" class="Permalink" aria-hidden="true" title="Permalink">#</a>Calling functions</h2>
|
||||
<p>Function calls must follow a few rules in order to maintain readability throughout the project:</p>
|
||||
<p><strong>Do not add whitespace before the opening parenthesis</strong></p>
|
||||
<details><summary>Example</summary><div><br>
|
||||
<p><strong>Bad</strong></p>
|
||||
<pre><code class="language-PHP">$result = my_function ($param);
|
||||
</code></pre>
|
||||
<p><strong>Good</strong></p>
|
||||
<pre><code class="language-PHP">$result = my_function($param);
|
||||
</code></pre>
|
||||
</div></details><br>
|
||||
<p><strong>Do not add whitespace after the opening parenthesis</strong></p>
|
||||
<details><summary>Example</summary><div><br>
|
||||
<p><strong>Bad</strong></p>
|
||||
<pre><code class="language-PHP">$result = my_function( $param);
|
||||
</code></pre>
|
||||
<p><strong>Good</strong></p>
|
||||
<pre><code class="language-PHP">$result = my_function($param);
|
||||
</code></pre>
|
||||
</div></details><br>
|
||||
<p><strong>Do not add a space before the closing parenthesis</strong></p>
|
||||
<details><summary>Example</summary><div><br>
|
||||
<p><strong>Bad</strong></p>
|
||||
<pre><code class="language-PHP">$result = my_function($param );
|
||||
</code></pre>
|
||||
<p><strong>Good</strong></p>
|
||||
<pre><code class="language-PHP">$result = my_function($param);
|
||||
</code></pre>
|
||||
</div></details><br>
|
||||
<p><strong>Do not add a space before a comma</strong></p>
|
||||
<details><summary>Example</summary><div><br>
|
||||
<p><strong>Bad</strong></p>
|
||||
<pre><code class="language-PHP">$result = my_function($param1 ,$param2);
|
||||
</code></pre>
|
||||
<p><strong>Good</strong></p>
|
||||
<pre><code class="language-PHP">$result = my_function($param1, $param2);
|
||||
</code></pre>
|
||||
</div></details><br>
|
||||
<p><strong>Add a space after a comma</strong></p>
|
||||
<details><summary>Example</summary><div><br>
|
||||
<p><strong>Bad</strong></p>
|
||||
<pre><code class="language-PHP">$result = my_function($param1,$param2);
|
||||
</code></pre>
|
||||
<p><strong>Good</strong></p>
|
||||
<pre><code class="language-PHP">$result = my_function($param1, $param2);
|
||||
</code></pre>
|
||||
</div></details><br>
|
||||
<p><em>Reference</em>: <a href="https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/Generic/Sniffs/Functions/FunctionCallArgumentSpacingSniff.php" class="Link--external" rel="noopener noreferrer"><code>Generic.Functions.FunctionCallArgumentSpacing</code></a></p>
|
||||
<h2><a id="do-not-add-spaces-after-opening-or-before-closing-bracket" href="#do-not-add-spaces-after-opening-or-before-closing-bracket" class="Permalink" aria-hidden="true" title="Permalink">#</a>Do not add spaces after opening or before closing bracket</h2>
|
||||
<p>Parenthesis must tightly enclose parameters.</p>
|
||||
<details><summary>Example</summary><div><br>
|
||||
<p><strong>Bad</strong></p>
|
||||
<pre><code class="language-PHP">if( $condition ) { ... }
|
||||
</code></pre>
|
||||
<p><strong>Good</strong></p>
|
||||
<pre><code class="language-PHP">if($condition) { ... }
|
||||
</code></pre>
|
||||
</div></details><br>
|
||||
<p><em>Reference</em>: <a href="https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/PSR2/Sniffs/ControlStructures/ControlStructureSpacingSniff.php" class="Link--external" rel="noopener noreferrer"><code>PSR2.ControlStructures.ControlStructureSpacing</code></a></p>
|
||||
<h1><a id="structures" href="#structures" class="Permalink" aria-hidden="true" title="Permalink">#</a>Structures</h1>
|
||||
<h2><a id="structures-must-always-be-formatted-as-multi-line-blocks" href="#structures-must-always-be-formatted-as-multi-line-blocks" class="Permalink" aria-hidden="true" title="Permalink">#</a>Structures must always be formatted as multi-line blocks</h2>
|
||||
<p>A structure should always be treated as if it contains a multi-line block.</p>
|
||||
<p><strong>Add a space after closing parenthesis</strong></p>
|
||||
<details><summary>Example</summary><div><br>
|
||||
<p><strong>Bad</strong></p>
|
||||
<pre><code class="language-PHP">if($condition){
|
||||
...
|
||||
}
|
||||
</code></pre>
|
||||
<p><strong>Good</strong></p>
|
||||
<pre><code class="language-PHP">if($condition) {
|
||||
...
|
||||
}
|
||||
</code></pre>
|
||||
</div></details><br>
|
||||
<p><strong>Add body into new line</strong></p>
|
||||
<details><summary>Example</summary><div><br>
|
||||
<p><strong>Bad</strong></p>
|
||||
<pre><code class="language-PHP">if($condition){ ... }
|
||||
</code></pre>
|
||||
<p><strong>Good</strong></p>
|
||||
<pre><code class="language-PHP">if($condition) {
|
||||
...
|
||||
}
|
||||
</code></pre>
|
||||
</div></details><br>
|
||||
<p><strong>Close body in new line</strong></p>
|
||||
<details><summary>Example</summary><div><br>
|
||||
<p><strong>Bad</strong></p>
|
||||
<pre><code class="language-PHP">if($condition){
|
||||
... }
|
||||
</code></pre>
|
||||
<p><strong>Good</strong></p>
|
||||
<pre><code class="language-PHP">if($condition) {
|
||||
...
|
||||
}
|
||||
</code></pre>
|
||||
</div></details><br>
|
||||
<p><em>Reference</em>: <a href="https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/Squiz/Sniffs/ControlStructures/ControlSignatureSniff.php" class="Link--external" rel="noopener noreferrer"><code>Squiz.ControlStructures.ControlSignature</code></a></p>
|
||||
<h1><a id="if-statements" href="#if-statements" class="Permalink" aria-hidden="true" title="Permalink">#</a>If-Statements</h1>
|
||||
<h2><a id="use-elseif-instead-of-else-if" href="#use-elseif-instead-of-else-if" class="Permalink" aria-hidden="true" title="Permalink">#</a>Use <code>elseif</code> instead of <code>else if</code></h2>
|
||||
<p>For sake of consistency <code>else if</code> is considered bad practice.</p>
|
||||
<details><summary>Example</summary><div><br>
|
||||
<p><strong>Bad</strong></p>
|
||||
<pre><code class="language-PHP">if($conditionA) {
|
||||
|
||||
} else if($conditionB) {
|
||||
|
||||
}
|
||||
</code></pre>
|
||||
<p><strong>Good</strong></p>
|
||||
<pre><code class="language-PHP">if($conditionA) {
|
||||
|
||||
} elseif($conditionB) {
|
||||
|
||||
}
|
||||
</code></pre>
|
||||
</div></details><br>
|
||||
<p><em>Reference</em>: <a href="https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/PSR2/Sniffs/ControlStructures/ElseIfDeclarationSniff.php" class="Link--external" rel="noopener noreferrer"><code>PSR2.ControlStructures.ElseIfDeclaration</code></a></p>
|
||||
<h2><a id="do-not-write-empty-statements" href="#do-not-write-empty-statements" class="Permalink" aria-hidden="true" title="Permalink">#</a>Do not write empty statements</h2>
|
||||
<p>Empty statements are considered bad practice and must be avoided.</p>
|
||||
<details><summary>Example</summary><div><br>
|
||||
<p><strong>Bad</strong></p>
|
||||
<pre><code class="language-PHP">if($condition) {
|
||||
// empty statement
|
||||
} else {
|
||||
// do something here
|
||||
}
|
||||
</code></pre>
|
||||
<p><strong>Good</strong> (invert condition)</p>
|
||||
<pre><code class="language-PHP">if(!$condition) {
|
||||
// do something
|
||||
}
|
||||
</code></pre>
|
||||
</div></details><br>
|
||||
<p><em>Reference</em>: <a href="https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/Generic/Sniffs/CodeAnalysis/EmptyStatementSniff.php" class="Link--external" rel="noopener noreferrer"><code>Generic.CodeAnalysis.EmptyStatement</code></a></p>
|
||||
<h2><a id="do-not-write-unconditional-if-statements" href="#do-not-write-unconditional-if-statements" class="Permalink" aria-hidden="true" title="Permalink">#</a>Do not write unconditional if-statements</h2>
|
||||
<p>If-statements without conditions are considered bad practice and must be avoided.</p>
|
||||
<details><summary>Example</summary><div><br>
|
||||
<pre><code class="language-PHP">if(true) {
|
||||
|
||||
}
|
||||
</code></pre>
|
||||
</div></details><br>
|
||||
<p><em>Reference</em>: <a href="https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/Generic/Sniffs/CodeAnalysis/UnconditionalIfStatementSniff.php" class="Link--external" rel="noopener noreferrer"><code>Generic.CodeAnalysis.UnconditionalIfStatement</code></a></p>
|
||||
<h1><a id="classes" href="#classes" class="Permalink" aria-hidden="true" title="Permalink">#</a>Classes</h1>
|
||||
<h2><a id="use-pascalcase-for-class-names" href="#use-pascalcase-for-class-names" class="Permalink" aria-hidden="true" title="Permalink">#</a>Use PascalCase for class names</h2>
|
||||
<p>Class names must be written in <a href="http://wiki.c2.com/?PascalCase" class="Link--external" rel="noopener noreferrer">PascalCase</a>.</p>
|
||||
<details><summary>Example</summary><div><br>
|
||||
<p><strong>Bad</strong></p>
|
||||
<pre><code class="language-PHP">class mySUPERclass { ... }
|
||||
</code></pre>
|
||||
<p><strong>Good</strong></p>
|
||||
<pre><code class="language-PHP">class MySuperClass { ... }
|
||||
</code></pre>
|
||||
</div></details><br>
|
||||
<p><em>Reference</em>: <a href="https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/PEAR/Sniffs/NamingConventions/ValidClassNameSniff.php" class="Link--external" rel="noopener noreferrer"><code>PEAR.NamingConventions.ValidClassName</code></a></p>
|
||||
<h2><a id="do-not-use-final-statements-inside-final-classes" href="#do-not-use-final-statements-inside-final-classes" class="Permalink" aria-hidden="true" title="Permalink">#</a>Do not use final statements inside final classes</h2>
|
||||
<p>Final classes cannot be extended, so it doesn’t make sense to add the final keyword to class members.</p>
|
||||
<details><summary>Example</summary><div><br>
|
||||
<p><strong>Bad</strong></p>
|
||||
<pre><code class="language-PHP">final class MyClass {
|
||||
final public function MyFunction() {
|
||||
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
<p><strong>Good</strong> (remove the final keyword from class members)</p>
|
||||
<pre><code class="language-PHP">final class MyClass {
|
||||
public function MyFunction() {
|
||||
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
</div></details><br>
|
||||
<p><em>Reference</em>: <a href="https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/Generic/Sniffs/CodeAnalysis/UnnecessaryFinalModifierSniff.php" class="Link--external" rel="noopener noreferrer"><code>Generic.CodeAnalysis.UnnecessaryFinalModifier</code></a></p>
|
||||
<h2><a id="do-not-override-methods-to-call-their-parent" href="#do-not-override-methods-to-call-their-parent" class="Permalink" aria-hidden="true" title="Permalink">#</a>Do not override methods to call their parent</h2>
|
||||
<p>It doesn’t make sense to override a method only to call their parent. When overriding methods, make sure to add some functionality to it.</p>
|
||||
<details><summary>Example</summary><div><br>
|
||||
<p><strong>Bad</strong></p>
|
||||
<pre><code class="language-PHP">class MyClass extends BaseClass {
|
||||
public function BaseFunction() {
|
||||
parent::BaseFunction();
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
<p><strong>Good</strong> (don’t override the function)</p>
|
||||
<pre><code class="language-PHP">class MyClass extends BaseClass {
|
||||
|
||||
}
|
||||
</code></pre>
|
||||
</div></details><br>
|
||||
<p><em>Reference</em>: <a href="https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/Generic/Sniffs/CodeAnalysis/UselessOverridingMethodSniff.php" class="Link--external" rel="noopener noreferrer"><code>Generic.CodeAnalysis.UselessOverridingMethod</code></a></p>
|
||||
<h2><a id="abstract-and-final-declarations-must-precede-the-visibility-declaration" href="#abstract-and-final-declarations-must-precede-the-visibility-declaration" class="Permalink" aria-hidden="true" title="Permalink">#</a>abstract and final declarations MUST precede the visibility declaration</h2>
|
||||
<p>When declaring <code>abstract</code> and <code>final</code> functions, the visibility (scope) must follow after <code>abstract</code> or <code>final</code>.</p>
|
||||
<details><summary>Example</summary><div><br>
|
||||
<p><strong>Bad</strong></p>
|
||||
<pre><code class="language-PHP">class MyClass extends BaseClass {
|
||||
public abstract function AbstractFunction() { }
|
||||
public final function FinalFunction() { }
|
||||
}
|
||||
</code></pre>
|
||||
<p><strong>Good</strong> (<code>abstract</code> and <code>final</code> before <code>public</code>)</p>
|
||||
<pre><code class="language-PHP">class MyClass extends BaseClass {
|
||||
abstract public function AbstractFunction() { }
|
||||
final public function FinalFunction() { }
|
||||
}
|
||||
</code></pre>
|
||||
</div></details><br>
|
||||
<p><em>Reference</em>: <a href="https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/PSR2/Sniffs/Methods/MethodDeclarationSniff.php" class="Link--external" rel="noopener noreferrer"><code>PSR2.Methods.MethodDeclaration</code></a></p>
|
||||
<h2><a id="static-declaration-must-come-after-the-visibility-declaration" href="#static-declaration-must-come-after-the-visibility-declaration" class="Permalink" aria-hidden="true" title="Permalink">#</a>static declaration MUST come after the visibility declaration</h2>
|
||||
<p>The <code>static</code> keyword must come after the visibility (scope) parameter.</p>
|
||||
<details><summary>Example</summary><div><br>
|
||||
<p><strong>Bad</strong></p>
|
||||
<pre><code class="language-PHP">class MyClass extends BaseClass {
|
||||
static public function StaticFunction() { }
|
||||
}
|
||||
</code></pre>
|
||||
<p><strong>Good</strong> (<code>static</code> after <code>public</code>)</p>
|
||||
<pre><code class="language-PHP">class MyClass extends BaseClass {
|
||||
public static function StaticFunction() { }
|
||||
}
|
||||
</code></pre>
|
||||
</div></details><br>
|
||||
<p><em>Reference</em>: <a href="https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/PSR2/Sniffs/Methods/MethodDeclarationSniff.php" class="Link--external" rel="noopener noreferrer"><code>PSR2.Methods.MethodDeclaration</code></a></p>
|
||||
<h1><a id="casting" href="#casting" class="Permalink" aria-hidden="true" title="Permalink">#</a>Casting</h1>
|
||||
<h2><a id="do-not-add-spaces-when-casting" href="#do-not-add-spaces-when-casting" class="Permalink" aria-hidden="true" title="Permalink">#</a>Do not add spaces when casting</h2>
|
||||
<p>The casting type should be put into parenthesis without spaces.</p>
|
||||
<details><summary>Example</summary><div><br>
|
||||
<p><strong>Bad</strong></p>
|
||||
<pre><code class="language-PHP">$text = ( string )$number;
|
||||
</code></pre>
|
||||
<p><strong>Good</strong></p>
|
||||
<pre><code class="language-PHP">$text = (string)$number;
|
||||
</code></pre>
|
||||
</div></details><br>
|
||||
<p><em>Reference</em>: <a href="https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/Squiz/Sniffs/WhiteSpace/CastSpacingSniff.php" class="Link--external" rel="noopener noreferrer"><code>Squiz.WhiteSpace.CastSpacing</code></a></p>
|
||||
<h1><a id="arrays" href="#arrays" class="Permalink" aria-hidden="true" title="Permalink">#</a>Arrays</h1>
|
||||
<h2><a id="always-use-the-long-array-syntax" href="#always-use-the-long-array-syntax" class="Permalink" aria-hidden="true" title="Permalink">#</a>Always use the long array syntax</h2>
|
||||
<p>Arrays should be initialized using the long array syntax.</p>
|
||||
<details><summary>Example</summary><div><br>
|
||||
<p><strong>Bad</strong></p>
|
||||
<pre><code class="language-PHP">$data = [ 'hello' => 'world' ];
|
||||
</code></pre>
|
||||
<p><strong>Good</strong></p>
|
||||
<pre><code class="language-PHP">$data = array('hello' => 'world');
|
||||
</code></pre>
|
||||
</div></details><br>
|
||||
<p><em>Reference</em>: <a href="https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/Generic/Sniffs/Arrays/DisallowShortArraySyntaxSniff.php" class="Link--external" rel="noopener noreferrer"><code>Generic.Arrays.DisallowShortArraySyntax</code></a></p>
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<ul class="Pager">
|
||||
<li class=Pager--prev><a href="../For_Developers/index.html">Previous</a></li> <li class=Pager--next><a href="../For_Developers/Pull_Request_policy.html">Next</a></li> </ul>
|
||||
</nav>
|
||||
</article>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- JS -->
|
||||
<script src="../themes/daux/js/daux.min.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
window.searchLanguage = "";
|
||||
window.searchTranslation = {"Search_one_result":"1 result","Search_results":"!count results","Search_no_results":"Nothing found","Search_common_words_ignored":"Common words are largely ignored","Search_too_short":"Search too short","Search_one_character_or_more":"Should be one character or more","Search_should_be_x_or_more":"Should be !min characters or more","Link_previous":"Previous","Link_next":"Next"};
|
||||
</script>
|
||||
|
||||
<!-- Search -->
|
||||
<script type="text/javascript" src="../daux_libraries/search.min.js"></script>
|
||||
|
||||
<script>
|
||||
window.search({'base_url': '../'})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
152
For_Developers/Debug_mode.html
Normal file
152
For_Developers/Debug_mode.html
Normal file
@@ -0,0 +1,152 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="no-js" lang="en">
|
||||
<head>
|
||||
<title>Debug mode - RSS-Bridge</title>
|
||||
<meta name="description" content="The RSS feed for websites missing it">
|
||||
<meta name="author" content="RSS-Bridge Contributors">
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
|
||||
<link rel="icon" href="../themes/daux/img/favicon-blue.png" type="image/x-icon">
|
||||
|
||||
<!-- Mobile -->
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<!-- JS -->
|
||||
<script>
|
||||
window.base_url = "../";
|
||||
document.documentElement.classList.remove('no-js');
|
||||
</script>
|
||||
|
||||
<!-- Font -->
|
||||
|
||||
<!-- CSS -->
|
||||
<link href='../themes/daux/css/theme-blue.min.css' rel='stylesheet' type='text/css'>
|
||||
<link href='../daux_libraries/search.css' rel='stylesheet' type='text/css'>
|
||||
</head>
|
||||
<body class="">
|
||||
<div class="Columns content">
|
||||
<aside class="Columns__left Collapsible">
|
||||
<button type="button" class="Button Collapsible__trigger" aria-controls="sidebar_content" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="Collapsible__trigger__bar"></span>
|
||||
<span class="Collapsible__trigger__bar"></span>
|
||||
<span class="Collapsible__trigger__bar"></span>
|
||||
</button>
|
||||
|
||||
<a class="Brand" href="../index.html">RSS-Bridge</a>
|
||||
|
||||
<form role='search' action="/" method="get" class="Search" id="search_form">
|
||||
<label for="search_input">
|
||||
<span class='u-visuallyHidden'>Search</span>
|
||||
</label>
|
||||
<input
|
||||
type="search"
|
||||
id="search_input"
|
||||
class="Search__field"
|
||||
placeholder="Search..."
|
||||
aria-label="Search..."
|
||||
autocomplete="on"
|
||||
results=25
|
||||
autosave=text_search
|
||||
>
|
||||
<label>
|
||||
<input type="submit" class='u-visuallyHidden' />
|
||||
<span class='u-visuallyHidden'>Search...</span>
|
||||
<svg class="Search__icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 451 451">
|
||||
<path d="M447.05 428l-109.6-109.6c29.4-33.8 47.2-77.9 47.2-126.1C384.65 86.2 298.35 0 192.35 0 86.25 0 .05 86.3.05 192.3s86.3 192.3 192.3 192.3c48.2 0 92.3-17.8 126.1-47.2L428.05 447c2.6 2.6 6.1 4 9.5 4s6.9-1.3 9.5-4c5.2-5.2 5.2-13.8 0-19zM26.95 192.3c0-91.2 74.2-165.3 165.3-165.3 91.2 0 165.3 74.2 165.3 165.3s-74.1 165.4-165.3 165.4c-91.1 0-165.3-74.2-165.3-165.4z"/>
|
||||
</svg>
|
||||
</label>
|
||||
</form>
|
||||
|
||||
<div class="Collapsible__content" id="sidebar_content">
|
||||
<!-- Navigation -->
|
||||
<ul class='Nav'><li class='Nav__item has-children'><a href="../General/Project_goals.html" class="Nav__item__link"><i class="Nav__arrow"> </i>General</a><ul class='Nav'><li class='Nav__item '><a href="../General/Project_goals.html">Project-goals</a></li><li class='Nav__item '><a href="../General/Contribute.html">Contribute</a></li><li class='Nav__item '><a href="../General/Requirements.html">Requirements</a></li><li class='Nav__item '><a href="../General/Screenshots.html">Screenshots</a></li><li class='Nav__item '><a href="../General/FAQ.html">FAQ</a></li><li class='Nav__item '><a href="../General/Public_Hosts.html">Public Hosts</a></li></ul></li><li class='Nav__item '><a href="../CLI/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>CLI</a><ul class='Nav'></ul></li><li class='Nav__item has-children'><a href="../For_Hosts/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>For Hosts</a><ul class='Nav'><li class='Nav__item '><a href="../For_Hosts/Installation.html">Installation</a></li><li class='Nav__item '><a href="../For_Hosts/Updating.html">Updating</a></li><li class='Nav__item '><a href="../For_Hosts/Docker_Installation.html">Docker Installation</a></li><li class='Nav__item '><a href="../For_Hosts/Heroku_Installation.html">Heroku Installation</a></li><li class='Nav__item '><a href="../For_Hosts/Whitelisting.html">Whitelisting</a></li><li class='Nav__item '><a href="../For_Hosts/Authentication.html">Authentication</a></li><li class='Nav__item '><a href="../For_Hosts/Customizations.html">Customizations</a></li><li class='Nav__item '><a href="../For_Hosts/Custom_Configuration.html">Custom Configuration</a></li></ul></li><li class='Nav__item Nav__item--open has-children'><a href="../For_Developers/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>For Developers</a><ul class='Nav'><li class='Nav__item '><a href="../For_Developers/Coding_style_policy.html">Coding style policy</a></li><li class='Nav__item '><a href="../For_Developers/Pull_Request_policy.html">Pull Request policy</a></li><li class='Nav__item '><a href="../For_Developers/Folder_structure.html">Folder structure</a></li><li class='Nav__item '><a href="../For_Developers/Actions.html">Actions</a></li><li class='Nav__item Nav__item--active'><a href="../For_Developers/Debug_mode.html">Debug mode</a></li></ul></li><li class='Nav__item has-children'><a href="../Bridge_API/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>Bridge API</a><ul class='Nav'><li class='Nav__item '><a href="../Bridge_API/How_to_create_a_new_bridge.html">How to create a new bridge</a></li><li class='Nav__item '><a href="../Bridge_API/BridgeAbstract.html">BridgeAbstract</a></li><li class='Nav__item '><a href="../Bridge_API/FeedExpander.html">FeedExpander</a></li><li class='Nav__item '><a href="../Bridge_API/XPathAbstract.html">XPathAbstract</a></li></ul></li><li class='Nav__item '><a href="../Helper_functions/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>Helper functions</a><ul class='Nav'></ul></li><li class='Nav__item has-children'><a href="../Cache_API/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>Cache API</a><ul class='Nav'><li class='Nav__item '><a href="../Cache_API/How_to_create_a_new_cache.html">How to create a new cache</a></li><li class='Nav__item '><a href="../Cache_API/CacheInterface.html">CacheInterface</a></li></ul></li><li class='Nav__item has-children'><a href="../Format_API/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>Format API</a><ul class='Nav'><li class='Nav__item '><a href="../Format_API/How_to_create_a_new_format.html">How to create a new format</a></li><li class='Nav__item '><a href="../Format_API/FormatInterface.html">FormatInterface</a></li><li class='Nav__item '><a href="../Format_API/FormatAbstract.html">FormatAbstract</a></li></ul></li><li class='Nav__item '><a href="../Technical_recommendations/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>Technical recommendations</a><ul class='Nav'></ul></li></ul>
|
||||
<div class="Links">
|
||||
<hr/>
|
||||
<a href="https://github.com/RSS-Bridge/rss-bridge" target="_blank" rel="noopener noreferrer">GitHub Repository</a>
|
||||
<br />
|
||||
<a href="https://github.com/RSS-Bridge/rss-bridge/issues" target="_blank" rel="noopener noreferrer">Help/Support/Bugs</a>
|
||||
<br />
|
||||
<a href="https://github.com/RSS-Bridge/rss-bridge/pkgs/container/rss-bridge" target="_blank" rel="noopener noreferrer">Docker Images</a>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<div class="CodeToggler">
|
||||
<hr/>
|
||||
<label class="Checkbox">Show Code Blocks <input type="checkbox" class="CodeToggler__button--main" checked="checked"/>
|
||||
<div class="Checkbox__indicator"></div>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="PoweredBy">
|
||||
<hr/>
|
||||
Powered by Daux.io </div>
|
||||
</div>
|
||||
</aside>
|
||||
<div class="Columns__right">
|
||||
<div class="Columns__right__content">
|
||||
<div class="doc_content">
|
||||
<article class="Page">
|
||||
|
||||
<div class="Page__header">
|
||||
<h1><a href="../For_Developers/index.html">For Developers</a> <svg class="Page__header--separator" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 477.175 477.175"><path d="M360.73 229.075l-225.1-225.1c-5.3-5.3-13.8-5.3-19.1 0s-5.3 13.8 0 19.1l215.5 215.5-215.5 215.5c-5.3 5.3-5.3 13.8 0 19.1 2.6 2.6 6.1 4 9.5 4 3.4 0 6.9-1.3 9.5-4l225.1-225.1c5.3-5.2 5.3-13.8.1-19z"/></svg> <a href="../For_Developers/Debug_mode.html">Debug mode</a></h1>
|
||||
<span class="ModifiedDate">
|
||||
March 22, 2022 at 1:33 PM </span>
|
||||
<span class="EditOn">
|
||||
<a href="https://github.com/RSS-Bridge/rss-bridge/tree/master/docs/04_For_Developers/05_Debug_mode.md" target="_blank">
|
||||
Edit on GitHub </a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="s-content">
|
||||
<h1 align="center">Warning!</h1>
|
||||
<p>Enabling debug mode on a public server may result in malicious clients retrieving sensitive data about your server and possibly gaining access to it. Do not enable debug mode on a public server, unless you understand the implications of your doing!</p>
|
||||
<hr />
|
||||
<p>Debug mode enables error reporting and prevents loading data from the cache (data is still written to the cache).
|
||||
To enable debug mode, create a file named ‘DEBUG’ in the root directory of RSS-Bridge (next to <code>index.php</code>). For further security, insert your IP address in the file. You can add multiple addresses, one per line.</p>
|
||||
<p><em>Notice</em>:</p>
|
||||
<ul>
|
||||
<li>An empty file enables debug mode for anyone!</li>
|
||||
<li>The bridge whitelist still applies! (debug mode does <strong>not</strong> enable all bridges)</li>
|
||||
</ul>
|
||||
<p>RSS-Bridge will give you a visual feedback when debug mode is enabled:</p>
|
||||
<p><img src="../images/debug_mode.png" alt="twitter bridge" /></p>
|
||||
<p>While debug mode is active, RSS-Bridge will write additional data to your servers <code>error.log</code>.</p>
|
||||
<p>Debug mode is controlled by the static class <code>Debug</code>. It provides three core functions:</p>
|
||||
<p><code>Debug::isEnabled()</code>: Returns <code>true</code> if debug mode is enabled.
|
||||
<code>Debug::isSecure()</code>: Returns <code>true</code> if your client is on the debug whitelist.
|
||||
<code>Debug::log($message)</code>: Adds a message to <code>error.log</code>. It takes one parameter, which can be anything. For example: <code>Debug::log('Hello World!');</code></p>
|
||||
<p><strong>Notice</strong>: <code>Debug::log($message)</code> calls <code>Debug::isEnabled()</code> internally. You don’t have to do that manually.</p>
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<ul class="Pager">
|
||||
<li class=Pager--prev><a href="../For_Developers/Actions.html">Previous</a></li> <li class=Pager--next><a href="../Bridge_API/index.html">Next</a></li> </ul>
|
||||
</nav>
|
||||
</article>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- JS -->
|
||||
<script src="../themes/daux/js/daux.min.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
window.searchLanguage = "";
|
||||
window.searchTranslation = {"Search_one_result":"1 result","Search_results":"!count results","Search_no_results":"Nothing found","Search_common_words_ignored":"Common words are largely ignored","Search_too_short":"Search too short","Search_one_character_or_more":"Should be one character or more","Search_should_be_x_or_more":"Should be !min characters or more","Link_previous":"Previous","Link_next":"Next"};
|
||||
</script>
|
||||
|
||||
<!-- Search -->
|
||||
<script type="text/javascript" src="../daux_libraries/search.min.js"></script>
|
||||
|
||||
<script>
|
||||
window.search({'base_url': '../'})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
169
For_Developers/Folder_structure.html
Normal file
169
For_Developers/Folder_structure.html
Normal file
@@ -0,0 +1,169 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="no-js" lang="en">
|
||||
<head>
|
||||
<title>Folder structure - RSS-Bridge</title>
|
||||
<meta name="description" content="The RSS feed for websites missing it">
|
||||
<meta name="author" content="RSS-Bridge Contributors">
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
|
||||
<link rel="icon" href="../themes/daux/img/favicon-blue.png" type="image/x-icon">
|
||||
|
||||
<!-- Mobile -->
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<!-- JS -->
|
||||
<script>
|
||||
window.base_url = "../";
|
||||
document.documentElement.classList.remove('no-js');
|
||||
</script>
|
||||
|
||||
<!-- Font -->
|
||||
|
||||
<!-- CSS -->
|
||||
<link href='../themes/daux/css/theme-blue.min.css' rel='stylesheet' type='text/css'>
|
||||
<link href='../daux_libraries/search.css' rel='stylesheet' type='text/css'>
|
||||
</head>
|
||||
<body class="">
|
||||
<div class="Columns content">
|
||||
<aside class="Columns__left Collapsible">
|
||||
<button type="button" class="Button Collapsible__trigger" aria-controls="sidebar_content" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="Collapsible__trigger__bar"></span>
|
||||
<span class="Collapsible__trigger__bar"></span>
|
||||
<span class="Collapsible__trigger__bar"></span>
|
||||
</button>
|
||||
|
||||
<a class="Brand" href="../index.html">RSS-Bridge</a>
|
||||
|
||||
<form role='search' action="/" method="get" class="Search" id="search_form">
|
||||
<label for="search_input">
|
||||
<span class='u-visuallyHidden'>Search</span>
|
||||
</label>
|
||||
<input
|
||||
type="search"
|
||||
id="search_input"
|
||||
class="Search__field"
|
||||
placeholder="Search..."
|
||||
aria-label="Search..."
|
||||
autocomplete="on"
|
||||
results=25
|
||||
autosave=text_search
|
||||
>
|
||||
<label>
|
||||
<input type="submit" class='u-visuallyHidden' />
|
||||
<span class='u-visuallyHidden'>Search...</span>
|
||||
<svg class="Search__icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 451 451">
|
||||
<path d="M447.05 428l-109.6-109.6c29.4-33.8 47.2-77.9 47.2-126.1C384.65 86.2 298.35 0 192.35 0 86.25 0 .05 86.3.05 192.3s86.3 192.3 192.3 192.3c48.2 0 92.3-17.8 126.1-47.2L428.05 447c2.6 2.6 6.1 4 9.5 4s6.9-1.3 9.5-4c5.2-5.2 5.2-13.8 0-19zM26.95 192.3c0-91.2 74.2-165.3 165.3-165.3 91.2 0 165.3 74.2 165.3 165.3s-74.1 165.4-165.3 165.4c-91.1 0-165.3-74.2-165.3-165.4z"/>
|
||||
</svg>
|
||||
</label>
|
||||
</form>
|
||||
|
||||
<div class="Collapsible__content" id="sidebar_content">
|
||||
<!-- Navigation -->
|
||||
<ul class='Nav'><li class='Nav__item has-children'><a href="../General/Project_goals.html" class="Nav__item__link"><i class="Nav__arrow"> </i>General</a><ul class='Nav'><li class='Nav__item '><a href="../General/Project_goals.html">Project-goals</a></li><li class='Nav__item '><a href="../General/Contribute.html">Contribute</a></li><li class='Nav__item '><a href="../General/Requirements.html">Requirements</a></li><li class='Nav__item '><a href="../General/Screenshots.html">Screenshots</a></li><li class='Nav__item '><a href="../General/FAQ.html">FAQ</a></li><li class='Nav__item '><a href="../General/Public_Hosts.html">Public Hosts</a></li></ul></li><li class='Nav__item '><a href="../CLI/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>CLI</a><ul class='Nav'></ul></li><li class='Nav__item has-children'><a href="../For_Hosts/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>For Hosts</a><ul class='Nav'><li class='Nav__item '><a href="../For_Hosts/Installation.html">Installation</a></li><li class='Nav__item '><a href="../For_Hosts/Updating.html">Updating</a></li><li class='Nav__item '><a href="../For_Hosts/Docker_Installation.html">Docker Installation</a></li><li class='Nav__item '><a href="../For_Hosts/Heroku_Installation.html">Heroku Installation</a></li><li class='Nav__item '><a href="../For_Hosts/Whitelisting.html">Whitelisting</a></li><li class='Nav__item '><a href="../For_Hosts/Authentication.html">Authentication</a></li><li class='Nav__item '><a href="../For_Hosts/Customizations.html">Customizations</a></li><li class='Nav__item '><a href="../For_Hosts/Custom_Configuration.html">Custom Configuration</a></li></ul></li><li class='Nav__item Nav__item--open has-children'><a href="../For_Developers/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>For Developers</a><ul class='Nav'><li class='Nav__item '><a href="../For_Developers/Coding_style_policy.html">Coding style policy</a></li><li class='Nav__item '><a href="../For_Developers/Pull_Request_policy.html">Pull Request policy</a></li><li class='Nav__item Nav__item--active'><a href="../For_Developers/Folder_structure.html">Folder structure</a></li><li class='Nav__item '><a href="../For_Developers/Actions.html">Actions</a></li><li class='Nav__item '><a href="../For_Developers/Debug_mode.html">Debug mode</a></li></ul></li><li class='Nav__item has-children'><a href="../Bridge_API/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>Bridge API</a><ul class='Nav'><li class='Nav__item '><a href="../Bridge_API/How_to_create_a_new_bridge.html">How to create a new bridge</a></li><li class='Nav__item '><a href="../Bridge_API/BridgeAbstract.html">BridgeAbstract</a></li><li class='Nav__item '><a href="../Bridge_API/FeedExpander.html">FeedExpander</a></li><li class='Nav__item '><a href="../Bridge_API/XPathAbstract.html">XPathAbstract</a></li></ul></li><li class='Nav__item '><a href="../Helper_functions/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>Helper functions</a><ul class='Nav'></ul></li><li class='Nav__item has-children'><a href="../Cache_API/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>Cache API</a><ul class='Nav'><li class='Nav__item '><a href="../Cache_API/How_to_create_a_new_cache.html">How to create a new cache</a></li><li class='Nav__item '><a href="../Cache_API/CacheInterface.html">CacheInterface</a></li></ul></li><li class='Nav__item has-children'><a href="../Format_API/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>Format API</a><ul class='Nav'><li class='Nav__item '><a href="../Format_API/How_to_create_a_new_format.html">How to create a new format</a></li><li class='Nav__item '><a href="../Format_API/FormatInterface.html">FormatInterface</a></li><li class='Nav__item '><a href="../Format_API/FormatAbstract.html">FormatAbstract</a></li></ul></li><li class='Nav__item '><a href="../Technical_recommendations/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>Technical recommendations</a><ul class='Nav'></ul></li></ul>
|
||||
<div class="Links">
|
||||
<hr/>
|
||||
<a href="https://github.com/RSS-Bridge/rss-bridge" target="_blank" rel="noopener noreferrer">GitHub Repository</a>
|
||||
<br />
|
||||
<a href="https://github.com/RSS-Bridge/rss-bridge/issues" target="_blank" rel="noopener noreferrer">Help/Support/Bugs</a>
|
||||
<br />
|
||||
<a href="https://github.com/RSS-Bridge/rss-bridge/pkgs/container/rss-bridge" target="_blank" rel="noopener noreferrer">Docker Images</a>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<div class="CodeToggler">
|
||||
<hr/>
|
||||
<label class="Checkbox">Show Code Blocks <input type="checkbox" class="CodeToggler__button--main" checked="checked"/>
|
||||
<div class="Checkbox__indicator"></div>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="PoweredBy">
|
||||
<hr/>
|
||||
Powered by Daux.io </div>
|
||||
</div>
|
||||
</aside>
|
||||
<div class="Columns__right">
|
||||
<div class="Columns__right__content">
|
||||
<div class="doc_content">
|
||||
<article class="Page">
|
||||
|
||||
<div class="Page__header">
|
||||
<h1><a href="../For_Developers/index.html">For Developers</a> <svg class="Page__header--separator" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 477.175 477.175"><path d="M360.73 229.075l-225.1-225.1c-5.3-5.3-13.8-5.3-19.1 0s-5.3 13.8 0 19.1l215.5 215.5-215.5 215.5c-5.3 5.3-5.3 13.8 0 19.1 2.6 2.6 6.1 4 9.5 4 3.4 0 6.9-1.3 9.5-4l225.1-225.1c5.3-5.2 5.3-13.8.1-19z"/></svg> <a href="../For_Developers/Folder_structure.html">Folder structure</a></h1>
|
||||
<span class="ModifiedDate">
|
||||
March 22, 2022 at 1:33 PM </span>
|
||||
<span class="EditOn">
|
||||
<a href="https://github.com/RSS-Bridge/rss-bridge/tree/master/docs/04_For_Developers/03_Folder_structure.md" target="_blank">
|
||||
Edit on GitHub </a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="s-content">
|
||||
<p>The repository contains a few folders that make up <strong>RSS-Bridge</strong>. Here is a brief description of what you can expect to find where:</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Folder</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a href="https://github.com/RSS-Bridge/rss-bridge/tree/master/bridges" class="Link--external" rel="noopener noreferrer"><code>bridges/</code></a></td>
|
||||
<td>Contains all bridges that are currently supported by <strong>RSS-Bridge</strong>. Each file represents one Bridge that is displayed on the <a href="../General/Screenshots.html#welcome-screen">Welcome screen</a> of <strong>RSS-Bridge</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://github.com/RSS-Bridge/rss-bridge/tree/master/caches" class="Link--external" rel="noopener noreferrer"><code>caches/</code></a></td>
|
||||
<td>Contains all cache types for <strong>RSS-Bridge</strong>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://github.com/RSS-Bridge/rss-bridge/tree/master/css" class="Link--external" rel="noopener noreferrer"><code>css/</code></a></td>
|
||||
<td>Contains all <a href="https://en.wikipedia.org/wiki/Cascading_Style_Sheets" class="Link--external" rel="noopener noreferrer">Cascading Style Sheets</a> for <strong>RSS-Bridge</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://github.com/RSS-Bridge/rss-bridge/tree/master/formats" class="Link--external" rel="noopener noreferrer"><code>formats/</code></a></td>
|
||||
<td>Contains all export formats for <strong>RSS-Bridge</strong>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://github.com/RSS-Bridge/rss-bridge/tree/master/lib" class="Link--external" rel="noopener noreferrer"><code>lib/</code></a></td>
|
||||
<td>Contains the core API of <strong>RSS-Bridge</strong>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://github.com/RSS-Bridge/rss-bridge/tree/master/vendor" class="Link--external" rel="noopener noreferrer"><code>vendor/</code></a></td>
|
||||
<td>Contains vendor specific files to support <strong>RSS-Bridge</strong>. Development of all files in this folder must be done in the vendor specific repository (not part of <strong>RSS-Bridge</strong>)</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<ul class="Pager">
|
||||
<li class=Pager--prev><a href="../For_Developers/Pull_Request_policy.html">Previous</a></li> <li class=Pager--next><a href="../For_Developers/Actions.html">Next</a></li> </ul>
|
||||
</nav>
|
||||
</article>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- JS -->
|
||||
<script src="../themes/daux/js/daux.min.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
window.searchLanguage = "";
|
||||
window.searchTranslation = {"Search_one_result":"1 result","Search_results":"!count results","Search_no_results":"Nothing found","Search_common_words_ignored":"Common words are largely ignored","Search_too_short":"Search too short","Search_one_character_or_more":"Should be one character or more","Search_should_be_x_or_more":"Should be !min characters or more","Link_previous":"Previous","Link_next":"Next"};
|
||||
</script>
|
||||
|
||||
<!-- Search -->
|
||||
<script type="text/javascript" src="../daux_libraries/search.min.js"></script>
|
||||
|
||||
<script>
|
||||
window.search({'base_url': '../'})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
146
For_Developers/Pull_Request_policy.html
Normal file
146
For_Developers/Pull_Request_policy.html
Normal file
@@ -0,0 +1,146 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="no-js" lang="en">
|
||||
<head>
|
||||
<title>Pull Request policy - RSS-Bridge</title>
|
||||
<meta name="description" content="The RSS feed for websites missing it">
|
||||
<meta name="author" content="RSS-Bridge Contributors">
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
|
||||
<link rel="icon" href="../themes/daux/img/favicon-blue.png" type="image/x-icon">
|
||||
|
||||
<!-- Mobile -->
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<!-- JS -->
|
||||
<script>
|
||||
window.base_url = "../";
|
||||
document.documentElement.classList.remove('no-js');
|
||||
</script>
|
||||
|
||||
<!-- Font -->
|
||||
|
||||
<!-- CSS -->
|
||||
<link href='../themes/daux/css/theme-blue.min.css' rel='stylesheet' type='text/css'>
|
||||
<link href='../daux_libraries/search.css' rel='stylesheet' type='text/css'>
|
||||
</head>
|
||||
<body class="">
|
||||
<div class="Columns content">
|
||||
<aside class="Columns__left Collapsible">
|
||||
<button type="button" class="Button Collapsible__trigger" aria-controls="sidebar_content" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="Collapsible__trigger__bar"></span>
|
||||
<span class="Collapsible__trigger__bar"></span>
|
||||
<span class="Collapsible__trigger__bar"></span>
|
||||
</button>
|
||||
|
||||
<a class="Brand" href="../index.html">RSS-Bridge</a>
|
||||
|
||||
<form role='search' action="/" method="get" class="Search" id="search_form">
|
||||
<label for="search_input">
|
||||
<span class='u-visuallyHidden'>Search</span>
|
||||
</label>
|
||||
<input
|
||||
type="search"
|
||||
id="search_input"
|
||||
class="Search__field"
|
||||
placeholder="Search..."
|
||||
aria-label="Search..."
|
||||
autocomplete="on"
|
||||
results=25
|
||||
autosave=text_search
|
||||
>
|
||||
<label>
|
||||
<input type="submit" class='u-visuallyHidden' />
|
||||
<span class='u-visuallyHidden'>Search...</span>
|
||||
<svg class="Search__icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 451 451">
|
||||
<path d="M447.05 428l-109.6-109.6c29.4-33.8 47.2-77.9 47.2-126.1C384.65 86.2 298.35 0 192.35 0 86.25 0 .05 86.3.05 192.3s86.3 192.3 192.3 192.3c48.2 0 92.3-17.8 126.1-47.2L428.05 447c2.6 2.6 6.1 4 9.5 4s6.9-1.3 9.5-4c5.2-5.2 5.2-13.8 0-19zM26.95 192.3c0-91.2 74.2-165.3 165.3-165.3 91.2 0 165.3 74.2 165.3 165.3s-74.1 165.4-165.3 165.4c-91.1 0-165.3-74.2-165.3-165.4z"/>
|
||||
</svg>
|
||||
</label>
|
||||
</form>
|
||||
|
||||
<div class="Collapsible__content" id="sidebar_content">
|
||||
<!-- Navigation -->
|
||||
<ul class='Nav'><li class='Nav__item has-children'><a href="../General/Project_goals.html" class="Nav__item__link"><i class="Nav__arrow"> </i>General</a><ul class='Nav'><li class='Nav__item '><a href="../General/Project_goals.html">Project-goals</a></li><li class='Nav__item '><a href="../General/Contribute.html">Contribute</a></li><li class='Nav__item '><a href="../General/Requirements.html">Requirements</a></li><li class='Nav__item '><a href="../General/Screenshots.html">Screenshots</a></li><li class='Nav__item '><a href="../General/FAQ.html">FAQ</a></li><li class='Nav__item '><a href="../General/Public_Hosts.html">Public Hosts</a></li></ul></li><li class='Nav__item '><a href="../CLI/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>CLI</a><ul class='Nav'></ul></li><li class='Nav__item has-children'><a href="../For_Hosts/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>For Hosts</a><ul class='Nav'><li class='Nav__item '><a href="../For_Hosts/Installation.html">Installation</a></li><li class='Nav__item '><a href="../For_Hosts/Updating.html">Updating</a></li><li class='Nav__item '><a href="../For_Hosts/Docker_Installation.html">Docker Installation</a></li><li class='Nav__item '><a href="../For_Hosts/Heroku_Installation.html">Heroku Installation</a></li><li class='Nav__item '><a href="../For_Hosts/Whitelisting.html">Whitelisting</a></li><li class='Nav__item '><a href="../For_Hosts/Authentication.html">Authentication</a></li><li class='Nav__item '><a href="../For_Hosts/Customizations.html">Customizations</a></li><li class='Nav__item '><a href="../For_Hosts/Custom_Configuration.html">Custom Configuration</a></li></ul></li><li class='Nav__item Nav__item--open has-children'><a href="../For_Developers/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>For Developers</a><ul class='Nav'><li class='Nav__item '><a href="../For_Developers/Coding_style_policy.html">Coding style policy</a></li><li class='Nav__item Nav__item--active'><a href="../For_Developers/Pull_Request_policy.html">Pull Request policy</a></li><li class='Nav__item '><a href="../For_Developers/Folder_structure.html">Folder structure</a></li><li class='Nav__item '><a href="../For_Developers/Actions.html">Actions</a></li><li class='Nav__item '><a href="../For_Developers/Debug_mode.html">Debug mode</a></li></ul></li><li class='Nav__item has-children'><a href="../Bridge_API/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>Bridge API</a><ul class='Nav'><li class='Nav__item '><a href="../Bridge_API/How_to_create_a_new_bridge.html">How to create a new bridge</a></li><li class='Nav__item '><a href="../Bridge_API/BridgeAbstract.html">BridgeAbstract</a></li><li class='Nav__item '><a href="../Bridge_API/FeedExpander.html">FeedExpander</a></li><li class='Nav__item '><a href="../Bridge_API/XPathAbstract.html">XPathAbstract</a></li></ul></li><li class='Nav__item '><a href="../Helper_functions/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>Helper functions</a><ul class='Nav'></ul></li><li class='Nav__item has-children'><a href="../Cache_API/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>Cache API</a><ul class='Nav'><li class='Nav__item '><a href="../Cache_API/How_to_create_a_new_cache.html">How to create a new cache</a></li><li class='Nav__item '><a href="../Cache_API/CacheInterface.html">CacheInterface</a></li></ul></li><li class='Nav__item has-children'><a href="../Format_API/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>Format API</a><ul class='Nav'><li class='Nav__item '><a href="../Format_API/How_to_create_a_new_format.html">How to create a new format</a></li><li class='Nav__item '><a href="../Format_API/FormatInterface.html">FormatInterface</a></li><li class='Nav__item '><a href="../Format_API/FormatAbstract.html">FormatAbstract</a></li></ul></li><li class='Nav__item '><a href="../Technical_recommendations/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>Technical recommendations</a><ul class='Nav'></ul></li></ul>
|
||||
<div class="Links">
|
||||
<hr/>
|
||||
<a href="https://github.com/RSS-Bridge/rss-bridge" target="_blank" rel="noopener noreferrer">GitHub Repository</a>
|
||||
<br />
|
||||
<a href="https://github.com/RSS-Bridge/rss-bridge/issues" target="_blank" rel="noopener noreferrer">Help/Support/Bugs</a>
|
||||
<br />
|
||||
<a href="https://github.com/RSS-Bridge/rss-bridge/pkgs/container/rss-bridge" target="_blank" rel="noopener noreferrer">Docker Images</a>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<div class="CodeToggler">
|
||||
<hr/>
|
||||
<label class="Checkbox">Show Code Blocks <input type="checkbox" class="CodeToggler__button--main" checked="checked"/>
|
||||
<div class="Checkbox__indicator"></div>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="PoweredBy">
|
||||
<hr/>
|
||||
Powered by Daux.io </div>
|
||||
</div>
|
||||
</aside>
|
||||
<div class="Columns__right">
|
||||
<div class="Columns__right__content">
|
||||
<div class="doc_content">
|
||||
<article class="Page">
|
||||
|
||||
<div class="Page__header">
|
||||
<h1><a href="../For_Developers/index.html">For Developers</a> <svg class="Page__header--separator" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 477.175 477.175"><path d="M360.73 229.075l-225.1-225.1c-5.3-5.3-13.8-5.3-19.1 0s-5.3 13.8 0 19.1l215.5 215.5-215.5 215.5c-5.3 5.3-5.3 13.8 0 19.1 2.6 2.6 6.1 4 9.5 4 3.4 0 6.9-1.3 9.5-4l225.1-225.1c5.3-5.2 5.3-13.8.1-19z"/></svg> <a href="../For_Developers/Pull_Request_policy.html">Pull Request policy</a></h1>
|
||||
<span class="ModifiedDate">
|
||||
March 22, 2022 at 1:33 PM </span>
|
||||
<span class="EditOn">
|
||||
<a href="https://github.com/RSS-Bridge/rss-bridge/tree/master/docs/04_For_Developers/02_Pull_Request_policy.md" target="_blank">
|
||||
Edit on GitHub </a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="s-content">
|
||||
<p>Pull requests allow you to improve RSS-Bridge. Maintainers will have to understand your changes before merging. In order to make this process as efficient as possible, please follow the policies explained below. Maintainers will merge your pull request much faster that way.</p>
|
||||
<h1><a id="fix-one-issue-per-pull-request" href="#fix-one-issue-per-pull-request" class="Permalink" aria-hidden="true" title="Permalink">#</a>Fix one issue per pull request</h1>
|
||||
<p>It is considered good practice to fix one specific (or a specific set of) error(s). You can open multiple pull requests if you need to address multiple subjects. The same applies to adding features to RSS-Bridge. Maintainers must be able to comprehend your pull request for it to be merged quickly.</p>
|
||||
<h1><a id="respect-the-coding-style-policy" href="#respect-the-coding-style-policy" class="Permalink" aria-hidden="true" title="Permalink">#</a>Respect the coding style policy</h1>
|
||||
<p>The <a href="Coding_style_policy.html">coding style policy</a> requires you to write your code in certain ways. If you plan to get it merged into RSS-Bridge, please make sure your code follows the policy. Maintainers will only merge pull requests that pass all tests.</p>
|
||||
<h1><a id="properly-name-your-commits" href="#properly-name-your-commits" class="Permalink" aria-hidden="true" title="Permalink">#</a>Properly name your commits</h1>
|
||||
<p>Commits are not only for show, they do help maintainers understand what you did in your pull request, just like a table of contents in a well formed book (or Wiki). Here are a few rules you should follow:</p>
|
||||
<ul>
|
||||
<li>When fixing a bridge (located in the <code>bridges</code> directory), write <code>[BridgeName] Feature</code> <br>(i.e. <code>[YoutubeBridge] Fix typo in video titles</code>).</li>
|
||||
<li>When fixing other files, use <code>[FileName] Feature</code> <br>(i.e. <code>[index.php] Add multilingual support</code>).</li>
|
||||
<li>When fixing a general problem that applies to multiple files, write <code>category: feature</code> <br>(i.e. <code>bridges: Fix various typos</code>).</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<ul class="Pager">
|
||||
<li class=Pager--prev><a href="../For_Developers/Coding_style_policy.html">Previous</a></li> <li class=Pager--next><a href="../For_Developers/Folder_structure.html">Next</a></li> </ul>
|
||||
</nav>
|
||||
</article>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- JS -->
|
||||
<script src="../themes/daux/js/daux.min.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
window.searchLanguage = "";
|
||||
window.searchTranslation = {"Search_one_result":"1 result","Search_results":"!count results","Search_no_results":"Nothing found","Search_common_words_ignored":"Common words are largely ignored","Search_too_short":"Search too short","Search_one_character_or_more":"Should be one character or more","Search_should_be_x_or_more":"Should be !min characters or more","Link_previous":"Previous","Link_next":"Next"};
|
||||
</script>
|
||||
|
||||
<!-- Search -->
|
||||
<script type="text/javascript" src="../daux_libraries/search.min.js"></script>
|
||||
|
||||
<script>
|
||||
window.search({'base_url': '../'})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
159
For_Developers/index.html
Normal file
159
For_Developers/index.html
Normal file
@@ -0,0 +1,159 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="no-js" lang="en">
|
||||
<head>
|
||||
<title>For Developers - RSS-Bridge</title>
|
||||
<meta name="description" content="The RSS feed for websites missing it">
|
||||
<meta name="author" content="RSS-Bridge Contributors">
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
|
||||
<link rel="icon" href="../themes/daux/img/favicon-blue.png" type="image/x-icon">
|
||||
|
||||
<!-- Mobile -->
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<!-- JS -->
|
||||
<script>
|
||||
window.base_url = "../";
|
||||
document.documentElement.classList.remove('no-js');
|
||||
</script>
|
||||
|
||||
<!-- Font -->
|
||||
|
||||
<!-- CSS -->
|
||||
<link href='../themes/daux/css/theme-blue.min.css' rel='stylesheet' type='text/css'>
|
||||
<link href='../daux_libraries/search.css' rel='stylesheet' type='text/css'>
|
||||
</head>
|
||||
<body class="">
|
||||
<div class="Columns content">
|
||||
<aside class="Columns__left Collapsible">
|
||||
<button type="button" class="Button Collapsible__trigger" aria-controls="sidebar_content" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="Collapsible__trigger__bar"></span>
|
||||
<span class="Collapsible__trigger__bar"></span>
|
||||
<span class="Collapsible__trigger__bar"></span>
|
||||
</button>
|
||||
|
||||
<a class="Brand" href="../index.html">RSS-Bridge</a>
|
||||
|
||||
<form role='search' action="/" method="get" class="Search" id="search_form">
|
||||
<label for="search_input">
|
||||
<span class='u-visuallyHidden'>Search</span>
|
||||
</label>
|
||||
<input
|
||||
type="search"
|
||||
id="search_input"
|
||||
class="Search__field"
|
||||
placeholder="Search..."
|
||||
aria-label="Search..."
|
||||
autocomplete="on"
|
||||
results=25
|
||||
autosave=text_search
|
||||
>
|
||||
<label>
|
||||
<input type="submit" class='u-visuallyHidden' />
|
||||
<span class='u-visuallyHidden'>Search...</span>
|
||||
<svg class="Search__icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 451 451">
|
||||
<path d="M447.05 428l-109.6-109.6c29.4-33.8 47.2-77.9 47.2-126.1C384.65 86.2 298.35 0 192.35 0 86.25 0 .05 86.3.05 192.3s86.3 192.3 192.3 192.3c48.2 0 92.3-17.8 126.1-47.2L428.05 447c2.6 2.6 6.1 4 9.5 4s6.9-1.3 9.5-4c5.2-5.2 5.2-13.8 0-19zM26.95 192.3c0-91.2 74.2-165.3 165.3-165.3 91.2 0 165.3 74.2 165.3 165.3s-74.1 165.4-165.3 165.4c-91.1 0-165.3-74.2-165.3-165.4z"/>
|
||||
</svg>
|
||||
</label>
|
||||
</form>
|
||||
|
||||
<div class="Collapsible__content" id="sidebar_content">
|
||||
<!-- Navigation -->
|
||||
<ul class='Nav'><li class='Nav__item has-children'><a href="../General/Project_goals.html" class="Nav__item__link"><i class="Nav__arrow"> </i>General</a><ul class='Nav'><li class='Nav__item '><a href="../General/Project_goals.html">Project-goals</a></li><li class='Nav__item '><a href="../General/Contribute.html">Contribute</a></li><li class='Nav__item '><a href="../General/Requirements.html">Requirements</a></li><li class='Nav__item '><a href="../General/Screenshots.html">Screenshots</a></li><li class='Nav__item '><a href="../General/FAQ.html">FAQ</a></li><li class='Nav__item '><a href="../General/Public_Hosts.html">Public Hosts</a></li></ul></li><li class='Nav__item '><a href="../CLI/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>CLI</a><ul class='Nav'></ul></li><li class='Nav__item has-children'><a href="../For_Hosts/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>For Hosts</a><ul class='Nav'><li class='Nav__item '><a href="../For_Hosts/Installation.html">Installation</a></li><li class='Nav__item '><a href="../For_Hosts/Updating.html">Updating</a></li><li class='Nav__item '><a href="../For_Hosts/Docker_Installation.html">Docker Installation</a></li><li class='Nav__item '><a href="../For_Hosts/Heroku_Installation.html">Heroku Installation</a></li><li class='Nav__item '><a href="../For_Hosts/Whitelisting.html">Whitelisting</a></li><li class='Nav__item '><a href="../For_Hosts/Authentication.html">Authentication</a></li><li class='Nav__item '><a href="../For_Hosts/Customizations.html">Customizations</a></li><li class='Nav__item '><a href="../For_Hosts/Custom_Configuration.html">Custom Configuration</a></li></ul></li><li class='Nav__item Nav__item--open has-children'><a href="../For_Developers/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>For Developers</a><ul class='Nav'><li class='Nav__item '><a href="../For_Developers/Coding_style_policy.html">Coding style policy</a></li><li class='Nav__item '><a href="../For_Developers/Pull_Request_policy.html">Pull Request policy</a></li><li class='Nav__item '><a href="../For_Developers/Folder_structure.html">Folder structure</a></li><li class='Nav__item '><a href="../For_Developers/Actions.html">Actions</a></li><li class='Nav__item '><a href="../For_Developers/Debug_mode.html">Debug mode</a></li></ul></li><li class='Nav__item has-children'><a href="../Bridge_API/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>Bridge API</a><ul class='Nav'><li class='Nav__item '><a href="../Bridge_API/How_to_create_a_new_bridge.html">How to create a new bridge</a></li><li class='Nav__item '><a href="../Bridge_API/BridgeAbstract.html">BridgeAbstract</a></li><li class='Nav__item '><a href="../Bridge_API/FeedExpander.html">FeedExpander</a></li><li class='Nav__item '><a href="../Bridge_API/XPathAbstract.html">XPathAbstract</a></li></ul></li><li class='Nav__item '><a href="../Helper_functions/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>Helper functions</a><ul class='Nav'></ul></li><li class='Nav__item has-children'><a href="../Cache_API/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>Cache API</a><ul class='Nav'><li class='Nav__item '><a href="../Cache_API/How_to_create_a_new_cache.html">How to create a new cache</a></li><li class='Nav__item '><a href="../Cache_API/CacheInterface.html">CacheInterface</a></li></ul></li><li class='Nav__item has-children'><a href="../Format_API/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>Format API</a><ul class='Nav'><li class='Nav__item '><a href="../Format_API/How_to_create_a_new_format.html">How to create a new format</a></li><li class='Nav__item '><a href="../Format_API/FormatInterface.html">FormatInterface</a></li><li class='Nav__item '><a href="../Format_API/FormatAbstract.html">FormatAbstract</a></li></ul></li><li class='Nav__item '><a href="../Technical_recommendations/index.html" class="Nav__item__link"><i class="Nav__arrow"> </i>Technical recommendations</a><ul class='Nav'></ul></li></ul>
|
||||
<div class="Links">
|
||||
<hr/>
|
||||
<a href="https://github.com/RSS-Bridge/rss-bridge" target="_blank" rel="noopener noreferrer">GitHub Repository</a>
|
||||
<br />
|
||||
<a href="https://github.com/RSS-Bridge/rss-bridge/issues" target="_blank" rel="noopener noreferrer">Help/Support/Bugs</a>
|
||||
<br />
|
||||
<a href="https://github.com/RSS-Bridge/rss-bridge/pkgs/container/rss-bridge" target="_blank" rel="noopener noreferrer">Docker Images</a>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<div class="CodeToggler">
|
||||
<hr/>
|
||||
<label class="Checkbox">Show Code Blocks <input type="checkbox" class="CodeToggler__button--main" checked="checked"/>
|
||||
<div class="Checkbox__indicator"></div>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="PoweredBy">
|
||||
<hr/>
|
||||
Powered by Daux.io </div>
|
||||
</div>
|
||||
</aside>
|
||||
<div class="Columns__right">
|
||||
<div class="Columns__right__content">
|
||||
<div class="doc_content">
|
||||
<article class="Page">
|
||||
|
||||
<div class="Page__header">
|
||||
<h1><a href="../For_Developers/index.html">For Developers</a></h1>
|
||||
<span class="ModifiedDate">
|
||||
March 22, 2022 at 1:33 PM </span>
|
||||
<span class="EditOn">
|
||||
<a href="https://github.com/RSS-Bridge/rss-bridge/tree/master/docs/04_For_Developers/index.md" target="_blank">
|
||||
Edit on GitHub </a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="s-content">
|
||||
<p>This area is intended for developers who decide to contribute to <strong>RSS-Bridge</strong> which is primarily written in <a href="http://www.php.net/" class="Link--external" rel="noopener noreferrer"><code>PHP</code></a> with some aspects of <a href="https://en.wikipedia.org/wiki/HTML" class="Link--external" rel="noopener noreferrer"><code>HTML</code></a> and <a href="https://en.wikipedia.org/wiki/Cascading_Style_Sheets" class="Link--external" rel="noopener noreferrer"><code>CSS</code></a>.</p>
|
||||
<p>If you are new to <strong>RSS-Bridge</strong> you should make yourself familiar with some general aspects:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="Coding_style_policy.html">Coding style policy</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="Folder_structure.html">Folder structure</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="Debug_mode.html">Debug mode</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../Bridge_API/index.html">Bridge API</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../Cache_API/index.html">Cache API</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../Format_API/index.html">Format API</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../Technical_recommendations/index.html">Technical recommendations</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<ul class="Pager">
|
||||
<li class=Pager--prev><a href="../For_Hosts/Custom_Configuration.html">Previous</a></li> <li class=Pager--next><a href="../For_Developers/Coding_style_policy.html">Next</a></li> </ul>
|
||||
</nav>
|
||||
</article>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- JS -->
|
||||
<script src="../themes/daux/js/daux.min.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
window.searchLanguage = "";
|
||||
window.searchTranslation = {"Search_one_result":"1 result","Search_results":"!count results","Search_no_results":"Nothing found","Search_common_words_ignored":"Common words are largely ignored","Search_too_short":"Search too short","Search_one_character_or_more":"Should be one character or more","Search_should_be_x_or_more":"Should be !min characters or more","Link_previous":"Previous","Link_next":"Next"};
|
||||
</script>
|
||||
|
||||
<!-- Search -->
|
||||
<script type="text/javascript" src="../daux_libraries/search.min.js"></script>
|
||||
|
||||
<script>
|
||||
window.search({'base_url': '../'})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user