From bf344cd30230edbb06fbdaa482a86d3592dc4aa0 Mon Sep 17 00:00:00 2001 From: ldv8434 <65482502+ldv8434@users.noreply.github.com> Date: Sun, 10 Jan 2021 14:50:54 -0500 Subject: Update and add to documentation (#3348) * remove outdated mailing list information * add information about normal view * add information about global and reader view * fix import section header * reorder documentation to reflect menu's order * clarify setting as default in normal view * add info about reading section for config * fix heading levels, add info about archive + profile sections * unfix heading levels * move section on feed-specific settings to the subscription management page * update information about adding feeds, add information about feed management * fix link to security page in installation * fix broken links * fix broken link to install page * add lighttpd from project readme * add php modules to step 4, add horizontal line to better separate steps from footnotes visually * fix broken link * add index page for easier access of other pages * move first steps document * make dedicated bug reporting page * make index page for linking to other pages * moved fever API to relevant location, linked to index * remove outdated mailing list information * add information about normal view * add information about global and reader view * fix import section header * reorder documentation to reflect menu's order * clarify setting as default in normal view * add info about reading section for config * fix heading levels, add info about archive + profile sections * unfix heading levels * move section on feed-specific settings to the subscription management page * update information about adding feeds, add information about feed management * fix link to security page in installation * fix broken links * fix broken link to install page * add lighttpd from project readme * add php modules to step 4, add horizontal line to better separate steps from footnotes visually * fix broken link * add index page for easier access of other pages * move first steps document * make dedicated bug reporting page * make index page for linking to other pages * moved fever API to relevant location, linked to index * re-fix link * remove mention of defunct mailing list * grammar fix * replace stream with feed * add optional items, replace stream with feed * replace stream with feed * fix word choice Co-authored-by: Frans de Jonge * fix word choice better reflect age of project Co-authored-by: Frans de Jonge * grammar fixes Co-authored-by: Frans de Jonge * remove double headings Co-authored-by: Frans de Jonge * change single quote to double quote for consistency * add subreddit link * change php module list to Dockerfile link * fix link to developer index, change html links to md for consistency * update css selector terms Co-authored-by: Frans de Jonge Co-authored-by: Frans de Jonge --- docs/en/admins/02_Prerequisites.md | 2 +- docs/en/admins/03_Installation.md | 4 +- docs/en/admins/05_Configuring_email_validation.md | 2 +- docs/en/contributing.md | 11 +- docs/en/developers/01_First_steps.md | 234 --------------------- docs/en/developers/01_Index.md | 29 +++ docs/en/developers/02_First_steps.md | 234 +++++++++++++++++++++ docs/en/developers/02_Github.md | 67 ------ .../en/developers/03_Backend/01_Database_schema.md | 1 + .../developers/03_Backend/03_External_libraries.md | 1 + docs/en/developers/06_Fever_API.md | 110 ++++++++++ docs/en/developers/06_Reporting_Bugs.md | 66 ++++++ docs/en/index.md | 6 +- docs/en/users/03_Main_view.md | 28 ++- docs/en/users/04_Subscriptions.md | 100 +++++++-- docs/en/users/05_Configuration.md | 89 +++----- docs/en/users/06_Fever_API.md | 110 ---------- docs/en/users/06_Mobile_access.md | 2 +- docs/en/users/07_Frequently_Asked_Questions.md | 4 +- 19 files changed, 593 insertions(+), 507 deletions(-) delete mode 100644 docs/en/developers/01_First_steps.md create mode 100644 docs/en/developers/01_Index.md create mode 100644 docs/en/developers/02_First_steps.md create mode 100644 docs/en/developers/06_Fever_API.md create mode 100644 docs/en/developers/06_Reporting_Bugs.md delete mode 100644 docs/en/users/06_Fever_API.md (limited to 'docs') diff --git a/docs/en/admins/02_Prerequisites.md b/docs/en/admins/02_Prerequisites.md index 196edad63..7828972dd 100644 --- a/docs/en/admins/02_Prerequisites.md +++ b/docs/en/admins/02_Prerequisites.md @@ -6,7 +6,7 @@ You need to verify that your server can run FreshRSS before installing it. If yo | Software | Recommended | Also Works With | | ------------- | ----------------------- | ----------------------- | -| Web server | **Apache 2** | Nginx | +| Web server | **Apache 2** | Nginx, lighttpd | | PHP | **PHP 7+** | PHP 5.6+ | | PHP modules | Required: libxml, cURL, JSON, PDO\_MySQL, PCRE and ctype.
Required (32-bit only): GMP
Recommanded: Zlib, mbstring, iconv, ZipArchive
*For the whole modules list see [Dockerfile](https://github.com/FreshRSS/FreshRSS/blob/master/Docker/Dockerfile-Alpine#L7-L9)* | | | Database | **MySQL 5.5.3+** | SQLite 3.7.4+, PostgreSQL 9.5+ | diff --git a/docs/en/admins/03_Installation.md b/docs/en/admins/03_Installation.md index 5efd0871f..6cbbae6ad 100644 --- a/docs/en/admins/03_Installation.md +++ b/docs/en/admins/03_Installation.md @@ -10,7 +10,7 @@ Before you begin, make sure that you've read the [prerequisites](02_Prerequisite 3. Give ownership of the FreshRSS folder to your web server user (often `www-data`). Give group read permissions to all files in `.`[^2], and group write permissions to `./data/`. -4. Install needed PHP modules. +4. Install needed PHP modules. A precise and up-to-date list can be found in [the Dockerfile](https://github.com/FreshRSS/FreshRSS/blob/master/Docker/Dockerfile#L11-L12). 5. Create a database for FreshRSS to use. Note the username and password for this database, as it will be needed during installation! @@ -18,6 +18,8 @@ Before you begin, make sure that you've read the [prerequisites](02_Prerequisite 7. You can then customize [the configuration of your instance](https://github.com/FreshRSS/FreshRSS/blob/master/config.default.php#L3-L4), [the default configuration for new users](https://github.com/FreshRSS/FreshRSS/blob/master/config-user.default.php#L3-L5) or [the default set of feeds for new users](https://github.com/FreshRSS/FreshRSS/blob/master/opml.default.xml#L2-L5). +--- + [^1]: Make sure to expose only the `./p/` folder to the Web, as the other directories contain personal and sensitive data. [^2]: If you wish to allow updates from the web interface, also give group write permissions to this folder. diff --git a/docs/en/admins/05_Configuring_email_validation.md b/docs/en/admins/05_Configuring_email_validation.md index fe073545c..0379e4c1a 100644 --- a/docs/en/admins/05_Configuring_email_validation.md +++ b/docs/en/admins/05_Configuring_email_validation.md @@ -27,7 +27,7 @@ To configure a SMTP server, you'll have to modify the `data/config.php` file. First, change the `mailer` item to `smtp` (instead of the default `mail`). Then, you should change the `smtp` options like you would do with a regular -email client. You can find the full list of options in the [`config.default.php` file](/config.default.php). +email client. You can find the full list of options in the [`config.default.php` file](https://github.com/FreshRSS/FreshRSS/blob/master/config.default.php). If you're not sure to what each item is corresponding, you may find useful [the PHPMailer documentation](http://phpmailer.github.io/PHPMailer/classes/PHPMailer.PHPMailer.PHPMailer.html#properties) (which is used by FreshRSS under the hood). diff --git a/docs/en/contributing.md b/docs/en/contributing.md index 3d4bde6a8..91fc49797 100644 --- a/docs/en/contributing.md +++ b/docs/en/contributing.md @@ -1,10 +1,3 @@ -## Join us on the mailing lists - -Do you want to ask us some questions? Do you want to discuss with us? Don't hesitate to subscribe to our mailing lists! - -* The first mailing is destined to generic information, it should be adapted to users. [Join mailing@freshrss.org](https://freshrss.org/mailman/listinfo/mailing). -* The second mailing is mainly for developers. [Join dev@freshrss.org](https://freshrss.org/mailman/listinfo/dev) - ## Report a bug Have you found a bug? Don't panic, here are some steps to report it with ease: @@ -25,6 +18,8 @@ We also need some information: * Your storage system (SQLite, MySQL, MariaDB, PostgreSQL) * If possible, the related logs (PHP logs and FreshRSS logs under `data/users/your_user/log.txt`) +For a more detailed guide on writing bug reports, please refer to [the in-depth guide on reporting bugs](developers/06_Reporting_Bugs). + ## Fix a bug Would you like to fix a bug? For optimum coordination between collaborators, you should follow these indications: @@ -34,7 +29,7 @@ Would you like to fix a bug? For optimum coordination between collaborators, you 3. [Create a new branch](https://help.github.com/articles/creating-and-deleting-branches-within-your-repository/). The name of the branch should be clear, and ideally prefixed by the related ticket id. For instance, `783-contributing-file` to fix [ticket #783](https://github.com/FreshRSS/FreshRSS/issues/783). 4. Make your changes to your fork and [send a pull request](https://help.github.com/articles/using-pull-requests/). -If you have to write code, please follow [our coding style recommendations](developers/01_First_steps.md). +If you have to write code, please follow [our coding style recommendations](developers/02_First_steps.md). **Tip:** if you're searching for easy-to-fix bugs, please have a look at the "[good first issue](https://github.com/FreshRSS/FreshRSS/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22)" ticket label. diff --git a/docs/en/developers/01_First_steps.md b/docs/en/developers/01_First_steps.md deleted file mode 100644 index 7b3a4c11f..000000000 --- a/docs/en/developers/01_First_steps.md +++ /dev/null @@ -1,234 +0,0 @@ -# Environment configuration (Docker) - -FreshRSS is built with PHP and uses a homemade framework, Minz. The dependencies are directly included in the source code, so you don't need Composer. - -There are various ways to configure your development environment. The easiest and most supported method is based on Docker, which is the solution documented below. If you already have a working PHP environment, you probably don't need it. - -We assume here that you use a GNU/Linux distribution, capable of running Docker. Otherwise, you'll have to adapt the commands accordingly. - -The commands that follow have to be executed in a console. They start by `$` when commands need to be executed as normal user, and by `#` when they need to be executed as root user. You don't have to type these characters. A path may be indicated before these characters to help you identify where they need to be executed. For instance, `app$ echo 'Hello World'` indicates that you have to execute `echo` command in the `app/` directory. - -First, you need to install [Docker](https://docs.docker.com/install/linux/docker-ce/ubuntu/). - -Once you're done, clone the repository with: - -```console -$ git clone https://github.com/FreshRSS/FreshRSS.git -$ cd FreshRSS -``` - -Note that, if you want to contribute, you have to fork the repository first and clone your fork instead of the "root" one. Adapt the commands in consequence. - -Then, the only command you need to know is the following: - -```console -$ make start -``` - -This might take some time while Docker downloads the image. If your user isn't in the `docker` group, you'll need to prepend the command with `sudo`. - -**You can now access FreshRSS at [http://localhost:8080](http://localhost:8080).** Just follow the install process and select the SQLite database. - -You can stop the containers by typing Control + c or with the following command, in another terminal: - -```console -$ make stop -``` - -If you're interested in the configuration, the `make` commands are defined in the [`Makefile`](/Makefile). - -If you need to use a different tag image (default is `alpine`), you can set the `TAG` environment variable: - -```console -$ TAG=arm make start -``` - -You can find the full list of available tags [on the Docker hub](https://hub.docker.com/r/freshrss/freshrss/tags). - -If you want to build the Docker image yourself, you can use the following command: - -```console -$ make build -$ # or -$ TAG=arm make build -``` - -The `TAG` variable can be anything (e.g. `local`). You can target a specific architecture by adding `-alpine` or `-arm` at the end of the tag (e.g. `local-arm`). - -# Project architecture - -- the PHP framework: [Minz](Minz/index.md) - -# Extensions - -If you want to create your own FreshRSS extension, take a look at the [extension documentation](03_Backend/05_Extensions.md). - -# Coding style - -If you want to contribute to the source code, it's important to follow the project's coding style. The actual code doesn't always follow it throughout the project, but we should fix it every time an opportunity presents itself. - -Contributions which don't follow the coding style will be rejected as long as the coding style is not fixed. - -## Spaces, tabs and other whitespace characters - -### Indentation -Code indentation must use tabs. - -### Alignment - -Once the code has been correctly indented, it might be useful to align it for ease of reading. In that case, please use spaces. - -```php -$result = a_function_with_a_really_long_name($param1, $param2, - $param3, $param4); -``` - -### End of line - -The newline character must be a line feed (LF), which is the default line ending on *NIX systems. This character must not follow other white space. - -You can verify if there is any unintended white space at the end of line with the following Git command: - -```bash -# command to check files before adding them in the Git index -git diff --check -# command to check files after adding them in the Git index -git diff --check --cached -``` - -### End of file - -Every file must end by an empty line. - -### Commas, dots and semi-columns - -There should no space before those characters, but there should be one after. - -### Operators - -There should be a space before and after every operator. - -```php -if ($a == 10) { - // do something -} - -echo $a ? 1 : 0; -``` - -### Parentheses - -There should be no spaces in between brackets. There should be no spaces before the opening bracket, except if it's after a keyword. There shouldn't be any spaces after the closing bracket, except if it's followed by a curly bracket. - -```php -if ($a == 10) { - // do something -} - -if ((int)$a == 10) { - // do something -} -``` - -### With chained functions - -It happens most of the time in Javascript files. When there are chained functions with closures and callback functions, it's hard to understand the code if not properly formatted. In those cases, we add a new indent level for the complete instruction and reset the indent for a new instruction on the same level. - -```javascript -// First instruction -shortcut.add(shortcuts.mark_read, function () { - //... - }, { - 'disable_in_input': true - }); -// Second instruction -shortcut.add("shift+" + shortcuts.mark_read, function () { - //... - }, { - 'disable_in_input': true - }); -``` - -## Line length - -Lines should strive to be shorter than 80 characters. However, this limit may be extended to 100 characters when strictly necessary. - -With functions, parameters can be declared on multiple lines. - -```php -function my_function($param_1, $param_2, - $param_3, $param_4) { - // do something -} -``` - -## Naming - -All code elements (functions, classes, methods and variables) must describe their usage succinctly. - -### Functions and variables - -Functions and variables must follow the "snake case" naming convention. - -```php -// a function -function function_name() { - // do something -} -// a variable -$variable_name; -``` - -### Methods - -Methods must follow the "lower camel case" naming convention. - -```php -private function methodName() { - // do something -} -``` - -### Classes - -Classes must follow the "upper camel case" naming convention. - -```php -abstract class ClassName {} -``` - -## Encoding - -Files must be encoded with the UTF-8 character set. - -## PHP compatibility - -Please ensure that your code works with the oldest PHP version officially supported by FreshRSS. - -## Miscellaneous - -### Operators -Operators must be at the end of the line if a condition is split over more than one line. - -```php -if ($a == 10 || - $a == 20) { - // do something -} -``` - -### End of file - -If the file contains only PHP code, the PHP closing tag must be omitted. - -### Arrays - -If an array declaration runs on more than one line, each element must be followed by a comma, including the last one. - -```php -$variable = [ - "value 1", - "value 2", - "value 3", -]; -``` diff --git a/docs/en/developers/01_Index.md b/docs/en/developers/01_Index.md new file mode 100644 index 000000000..fcd9204af --- /dev/null +++ b/docs/en/developers/01_Index.md @@ -0,0 +1,29 @@ +# FreshRSS Development + +## First Steps + +Start by creating your development environment. A guide to setting up FreshRSS's development environment can be found on [the appropriate page](02_First_steps.md). + +## After That + +* [Github Branching and Pushing](02_Github.md) +* [Running tests](03_Running_tests.md) +* [Creating a pull request](04_Pull_requests.md) +* [Releasing a new version](05_Release_new_version.md) +* [Reporting bugs](06_Reporting_Bugs.md) +* [Fever API](06_Fever_API.md) + +## Backend Development + +* [Making extensions for FreshRSS](03_Backend/05_Extensions.md) +* [Database Schema](03_Backend/01_Database_schema.md) +* [External libraries](03_Backend/03_External_libraries.md) +* [Changing source code](03_Backend/04_Changing_source_code.md) + +## Frontend Development + +* [View files](04_Frontend/01_View_files.md) +* [Design](04_Frontend/02_Design.md) + +## Minz +Minz is the homemade PHP framework used by FreshRSS. More information can be found [here](Minz/index.md). \ No newline at end of file diff --git a/docs/en/developers/02_First_steps.md b/docs/en/developers/02_First_steps.md new file mode 100644 index 000000000..7b3a4c11f --- /dev/null +++ b/docs/en/developers/02_First_steps.md @@ -0,0 +1,234 @@ +# Environment configuration (Docker) + +FreshRSS is built with PHP and uses a homemade framework, Minz. The dependencies are directly included in the source code, so you don't need Composer. + +There are various ways to configure your development environment. The easiest and most supported method is based on Docker, which is the solution documented below. If you already have a working PHP environment, you probably don't need it. + +We assume here that you use a GNU/Linux distribution, capable of running Docker. Otherwise, you'll have to adapt the commands accordingly. + +The commands that follow have to be executed in a console. They start by `$` when commands need to be executed as normal user, and by `#` when they need to be executed as root user. You don't have to type these characters. A path may be indicated before these characters to help you identify where they need to be executed. For instance, `app$ echo 'Hello World'` indicates that you have to execute `echo` command in the `app/` directory. + +First, you need to install [Docker](https://docs.docker.com/install/linux/docker-ce/ubuntu/). + +Once you're done, clone the repository with: + +```console +$ git clone https://github.com/FreshRSS/FreshRSS.git +$ cd FreshRSS +``` + +Note that, if you want to contribute, you have to fork the repository first and clone your fork instead of the "root" one. Adapt the commands in consequence. + +Then, the only command you need to know is the following: + +```console +$ make start +``` + +This might take some time while Docker downloads the image. If your user isn't in the `docker` group, you'll need to prepend the command with `sudo`. + +**You can now access FreshRSS at [http://localhost:8080](http://localhost:8080).** Just follow the install process and select the SQLite database. + +You can stop the containers by typing Control + c or with the following command, in another terminal: + +```console +$ make stop +``` + +If you're interested in the configuration, the `make` commands are defined in the [`Makefile`](/Makefile). + +If you need to use a different tag image (default is `alpine`), you can set the `TAG` environment variable: + +```console +$ TAG=arm make start +``` + +You can find the full list of available tags [on the Docker hub](https://hub.docker.com/r/freshrss/freshrss/tags). + +If you want to build the Docker image yourself, you can use the following command: + +```console +$ make build +$ # or +$ TAG=arm make build +``` + +The `TAG` variable can be anything (e.g. `local`). You can target a specific architecture by adding `-alpine` or `-arm` at the end of the tag (e.g. `local-arm`). + +# Project architecture + +- the PHP framework: [Minz](Minz/index.md) + +# Extensions + +If you want to create your own FreshRSS extension, take a look at the [extension documentation](03_Backend/05_Extensions.md). + +# Coding style + +If you want to contribute to the source code, it's important to follow the project's coding style. The actual code doesn't always follow it throughout the project, but we should fix it every time an opportunity presents itself. + +Contributions which don't follow the coding style will be rejected as long as the coding style is not fixed. + +## Spaces, tabs and other whitespace characters + +### Indentation +Code indentation must use tabs. + +### Alignment + +Once the code has been correctly indented, it might be useful to align it for ease of reading. In that case, please use spaces. + +```php +$result = a_function_with_a_really_long_name($param1, $param2, + $param3, $param4); +``` + +### End of line + +The newline character must be a line feed (LF), which is the default line ending on *NIX systems. This character must not follow other white space. + +You can verify if there is any unintended white space at the end of line with the following Git command: + +```bash +# command to check files before adding them in the Git index +git diff --check +# command to check files after adding them in the Git index +git diff --check --cached +``` + +### End of file + +Every file must end by an empty line. + +### Commas, dots and semi-columns + +There should no space before those characters, but there should be one after. + +### Operators + +There should be a space before and after every operator. + +```php +if ($a == 10) { + // do something +} + +echo $a ? 1 : 0; +``` + +### Parentheses + +There should be no spaces in between brackets. There should be no spaces before the opening bracket, except if it's after a keyword. There shouldn't be any spaces after the closing bracket, except if it's followed by a curly bracket. + +```php +if ($a == 10) { + // do something +} + +if ((int)$a == 10) { + // do something +} +``` + +### With chained functions + +It happens most of the time in Javascript files. When there are chained functions with closures and callback functions, it's hard to understand the code if not properly formatted. In those cases, we add a new indent level for the complete instruction and reset the indent for a new instruction on the same level. + +```javascript +// First instruction +shortcut.add(shortcuts.mark_read, function () { + //... + }, { + 'disable_in_input': true + }); +// Second instruction +shortcut.add("shift+" + shortcuts.mark_read, function () { + //... + }, { + 'disable_in_input': true + }); +``` + +## Line length + +Lines should strive to be shorter than 80 characters. However, this limit may be extended to 100 characters when strictly necessary. + +With functions, parameters can be declared on multiple lines. + +```php +function my_function($param_1, $param_2, + $param_3, $param_4) { + // do something +} +``` + +## Naming + +All code elements (functions, classes, methods and variables) must describe their usage succinctly. + +### Functions and variables + +Functions and variables must follow the "snake case" naming convention. + +```php +// a function +function function_name() { + // do something +} +// a variable +$variable_name; +``` + +### Methods + +Methods must follow the "lower camel case" naming convention. + +```php +private function methodName() { + // do something +} +``` + +### Classes + +Classes must follow the "upper camel case" naming convention. + +```php +abstract class ClassName {} +``` + +## Encoding + +Files must be encoded with the UTF-8 character set. + +## PHP compatibility + +Please ensure that your code works with the oldest PHP version officially supported by FreshRSS. + +## Miscellaneous + +### Operators +Operators must be at the end of the line if a condition is split over more than one line. + +```php +if ($a == 10 || + $a == 20) { + // do something +} +``` + +### End of file + +If the file contains only PHP code, the PHP closing tag must be omitted. + +### Arrays + +If an array declaration runs on more than one line, each element must be followed by a comma, including the last one. + +```php +$variable = [ + "value 1", + "value 2", + "value 3", +]; +``` diff --git a/docs/en/developers/02_Github.md b/docs/en/developers/02_Github.md index a898dc23e..953785d4f 100644 --- a/docs/en/developers/02_Github.md +++ b/docs/en/developers/02_Github.md @@ -1,70 +1,3 @@ -# Reporting a bug or a suggestion - -Despite the care given to FreshRSS, it's still possible that bugs occur. The project is young and development is dynamic, so it can be corrected quickly. You might also have a feature in mind that doesn't yet exist. Regardless whether your idea seems silly, far-fetched, useless or too specific, please don't hesitate to propose it to us! "Ideas in the air" often find an attentive ear. It's new external perspectives that make the project evolve the most. - -If you're convinced that you should be heard, here's how you can go about it. - -## On GitHub - -GitHub is the ideal platform to submit your requests. It allows us to discuss a problem or suggestion with others and it often generates new ideas. Let's not neglect this "social" aspect! - - 1. [Go to the bug ticket manager](https://github.com/FreshRSS/FreshRSS/issues) - 2. Start by checking if a similar request hasn't already been made. If so, please feel free to add your voice to the request. - 3. If your request is new, [open a new bug ticket](https://github.com/FreshRSS/FreshRSS/issues/new) - 4. Finally, write your request. If you're fluent in English, it's the preferred language because it allows for discussion with the largest number of people. - 5. Please follow the tips below to make it easier to let your ticket be heard. - -## Informal - -Not everyone likes or uses GitHub for a variety of legitimate reasons. That is why you can also contact us in a more informal way. - -* On [our Mattermost chat](https://framateam.org/signup_user_complete/?id=e2680d3e3128b9fac8fdb3003b0024ee) -* On [the mailing lists](https://freshrss.org/announce-of-the-mailing-lists.html) -* At events / meetings around Free Software -* Over a beer in a bar -* Etc. - -## Tips - -Here are some tips to help you present your bug report or suggestion: - - -* **Pay attention to spelling**. Even if it's not always easy, try your best! -* **Give an explicit title to your request**, even if it's a bit long. This not only helps us understand your request, but also to find your ticket later. -* **One request = one ticket.** You may have lots of ideas while being afraid to spam the bug manager: it doesn't matter. It's better to have a few too many tickets than too many requests in one. We'll close and consolidate requests when possible. -* If you report a bug, think about **providing us with the FreshRSS logs** (accessible in the FreshRSS `data/log/` folder) and the **PHP logs** (the location may vary by distribution, but consider searching in `/var/log/httpd` or `/var/log/apache`). -* If you can't find the log files, specify it in your ticket so we know you've already searched. -* Not all bugs require logs, but if you have any doubts, it is better to provide them to us. Logs are important and very useful for debugging! -* The logs may reveal confidential information, so **be careful not to disclose anything sensitive.** - -In addition, when facing a bug, you're encouraged to follow this message format (from the [Sam & Max website](http://sametmax.com/template-de-demande-daide-en-informatique/): - -### What's my goal? - -Give the general context of what you were trying to do. - -### What have I been trying to do? - -Explain step by step what you have done so that we can reproduce the bug. - -### What results have I achieved? - -The bug: what you see that shouldn't have happened. Here you can provide the logs. - -### What was the expected result? - -So that we understand what you consider to be the problem. - -### What are my circumstances? - -Remember to give the following information if you know it: - - 1. Which browser? Which version? - 2. Which server: Apache, Nginx? Which version? - 3. Which version of PHP? - 4. Which database: SQLite, MySQL, MariaDB, PostgreSQL? Which version? - 5. Which distribution runs on the server? And... which version? - # Branching ## Basic diff --git a/docs/en/developers/03_Backend/01_Database_schema.md b/docs/en/developers/03_Backend/01_Database_schema.md index e69de29bb..1978eabea 100644 --- a/docs/en/developers/03_Backend/01_Database_schema.md +++ b/docs/en/developers/03_Backend/01_Database_schema.md @@ -0,0 +1 @@ +# Database Schema \ No newline at end of file diff --git a/docs/en/developers/03_Backend/03_External_libraries.md b/docs/en/developers/03_Backend/03_External_libraries.md index e69de29bb..2f6ca8efb 100644 --- a/docs/en/developers/03_Backend/03_External_libraries.md +++ b/docs/en/developers/03_Backend/03_External_libraries.md @@ -0,0 +1 @@ +# External Libraries diff --git a/docs/en/developers/06_Fever_API.md b/docs/en/developers/06_Fever_API.md new file mode 100644 index 000000000..0a0da90a5 --- /dev/null +++ b/docs/en/developers/06_Fever_API.md @@ -0,0 +1,110 @@ +# FreshRSS - Fever API implementation + +See the [page about our Google Reader compatible API](06_Mobile_access.md) for another possibility +and general aspects of API access. + +## RSS clients + +There are many RSS clients that support the Fever API, but they seem to understand the Fever API a bit differently. +If your favourite client doesn't work properly with this API, please create an issue and we'll have a look. +But we can **only** do that for free clients. + +### Usage & Authentication + +Before you can start using this API, you have to enable and setup API access, which is [documented here](https://freshrss.github.io/FreshRSS/en/users/06_Mobile_access.html), +and then reset the user’s API password. + +Then point your mobile application to the `fever.php` address (e.g. `https://freshrss.example.net/api/fever.php`). + +## Compatible clients + +| App | Platform | License | +|:----------------------------------------------------------------------------------:|:-------------------:|:--------------------------------------------------------:| +|[Fluent Reader](https://hyliu.me/fluent-reader/) |Windows, Linux, macOS|[BSD-3-Clause](https://github.com/yang991178/fluent-reader/blob/master/LICENSE)| +|[Readably](https://play.google.com/store/apps/details?id=com.isaiasmatewos.readably)|Android |Closed Source | +|[Fiery Feeds](https://apps.apple.com/app/fiery-feeds-rss-reader/id1158763303) |iOS |Closed Source | +|[Unread](https://apps.apple.com/app/unread-rss-reader/id1252376153) |iOS |Closed Source | +|[Reeder](https://www.reederapp.com/) |iOS |Closed Source | +|[ReadKit](https://apps.apple.com/app/readkit/id588726889) |macOS |Closed Source | + +## Features + +The following features are implemented: + +* fetching categories +* fetching feeds +* fetching RSS items (new, favorites, unread, by_id, by_feed, by_category, since) +* fetching favicons +* setting read marker for item(s) +* setting starred marker for item(s) +* setting read marker for feed +* setting read marker for category +* supports FreshRSS extensions, which use the `entry_before_display` hook + +The following features are not supported: + +* **Hot Links** aka **hot** as there is nothing in FreshRSS yet that is similar or could be used to simulate it. + +## Testing and debugging + +If this API does not work as expected in your RSS reader, you can test it manually with a tool like [Postman](https://www.getpostman.com/). + +Configure a POST request to the URL https://freshrss.example.net/api/fever.php?api which should give you the result: +```json +{ + "api_version": 3, + "auth": 0 +} +``` +Great, the base setup seems to work! + +Now lets try an authenticated call. Fever uses an `api_key`, which is the MD5 hash of `"$username:$apiPassword"`. +Assuming the user is `kevin` and the password `freshrss`, here is a command-line example to compute the resulting `api_key` + +```sh +api_key=`echo -n "kevin:freshrss" | md5sum | cut -d' ' -f1` +``` + +Add a body to your POST request encoded as `form-data` and one key named `api_key` with the value `your-password-hash`: + +```sh +curl -s -F "api_key=$api_key" 'https://freshrss.example.net/api/fever.php?api' +``` + +This should give: +```json +{ + "api_version": 3, + "auth": 1, + "last_refreshed_on_time": "1520013061" +} +``` +Perfect, you're now authenticated and you can start testing the more advanced features. To do so, change the URL and append the possible API actions to your request parameters. Please refer to the [original Fever documentation](https://feedafever.com/api) for more information. + +Some basic calls are: + +* https://freshrss.example.net/api/fever.php?api&items +* https://freshrss.example.net/api/fever.php?api&feeds +* https://freshrss.example.net/api/fever.php?api&groups +* https://freshrss.example.net/api/fever.php?api&unread_item_ids +* https://freshrss.example.net/api/fever.php?api&saved_item_ids +* https://freshrss.example.net/api/fever.php?api&items&since_id=some_id +* https://freshrss.example.net/api/fever.php?api&items&max_id=some_id +* https://freshrss.example.net/api/fever.php?api&mark=item&as=read&id=some_id +* https://freshrss.example.net/api/fever.php?api&mark=item&as=unread&id=some_id + +Replace `some_id` with a real ID from your `freshrss_username_entry` database. + +### Debugging + +If nothing helps and your client is still misbehaving, you can add the following lines to the beginning of the `fever.api` file to determine the cause of the problems: + +```php +file_put_contents(__DIR__ . '/fever.log', $_SERVER['HTTP_USER_AGENT'] . ': ' . json_encode($_REQUEST) . PHP_EOL, FILE_APPEND); +``` + +Then use your RSS client to query the API and afterwards check the file `fever.log`. + +## Credits + +This plugin was inspired by the [tinytinyrss-fever-plugin](https://github.com/dasmurphy/tinytinyrss-fever-plugin). diff --git a/docs/en/developers/06_Reporting_Bugs.md b/docs/en/developers/06_Reporting_Bugs.md new file mode 100644 index 000000000..12d3259a6 --- /dev/null +++ b/docs/en/developers/06_Reporting_Bugs.md @@ -0,0 +1,66 @@ +# Reporting a bug or a suggestion + +Despite the care given to FreshRSS, it's still possible that bugs occur. Development is dynamic, so issues can be corrected quickly. You might also have a feature in mind that doesn't yet exist. Regardless whether your idea seems silly, far-fetched, useless or too specific, please don't hesitate to propose it to us! "Ideas in the air" often find an attentive ear. It's new external perspectives that make the project evolve the most. + +If you're convinced that you should be heard, here's how you can go about it. + +## On GitHub + +GitHub is the ideal platform to submit your requests. It allows us to discuss a problem or suggestion with others and it often generates new ideas. Let's not neglect this "social" aspect! + + 1. [Go to the bug ticket manager](https://github.com/FreshRSS/FreshRSS/issues) + 2. Start by checking if a similar request hasn't already been made. If so, please feel free to add your voice to the request. + 3. If your request is new, [open a new bug ticket](https://github.com/FreshRSS/FreshRSS/issues/new) + 4. Finally, write your request. If you're fluent in English, it's the preferred language because it allows for discussion with the largest number of people. + 5. Please follow the tips below to make it easier to let your ticket be heard. + +## Informal + +Not everyone likes or uses GitHub for a variety of legitimate reasons. That is why you can also contact us in a more informal way. + +* On [our Mattermost chat](https://framateam.org/signup_user_complete/?id=e2680d3e3128b9fac8fdb3003b0024ee) +* On [our subreddit](https://www.reddit.com/r/freshrss/) +* At events / meetings around Free Software +* Over a beer in a bar +* Etc. + +## Tips + +Here are some tips to help you present your bug report or suggestion: + + +* **Pay attention to spelling**. Even if it's not always easy, try your best! +* **Give an explicit title to your request**, even if it's a bit long. This not only helps us understand your request, but also to find your ticket later. +* **One request = one ticket.** You may have lots of ideas while being afraid to spam the bug manager: it doesn't matter. It's better to have a few too many tickets than too many requests in one. We'll close and consolidate requests when possible. +* If you report a bug, think about **providing us with the FreshRSS logs** (accessible in the FreshRSS `data/log/` folder) and the **PHP logs** (the location may vary by distribution, but consider searching in `/var/log/httpd` or `/var/log/apache`). +* If you can't find the log files, specify it in your ticket so we know you've already searched. +* Not all bugs require logs, but if you have any doubts, it is better to provide them to us. Logs are important and very useful for debugging! +* The logs may reveal confidential information, so **be careful not to disclose anything sensitive.** + +In addition, when facing a bug, you're encouraged to follow this message format (from the [Sam & Max website](http://sametmax.com/template-de-demande-daide-en-informatique/): + +### What's my goal? + +Give the general context of what you were trying to do. + +### What have I been trying to do? + +Explain step by step what you have done so that we can reproduce the bug. + +### What results have I achieved? + +The bug: what you see that shouldn't have happened. Here you can provide the logs. + +### What was the expected result? + +So that we understand what you consider to be the problem. + +### What are my circumstances? + +Remember to give the following information if you know it: + + 1. Which browser? Which version? + 2. Which server: Apache, Nginx? Which version? + 3. Which version of PHP? + 4. Which database: SQLite, MySQL, MariaDB, PostgreSQL? Which version? + 5. Which distribution runs on the server? And... which version? diff --git a/docs/en/index.md b/docs/en/index.md index 0534891b5..550cfb21d 100644 --- a/docs/en/index.md +++ b/docs/en/index.md @@ -18,7 +18,7 @@ FreshRSS has a lot of features including: This documentation is split into different sections: -* [User documentation](./users/02_First_steps.html), where you can discover all the possibilities offered by FreshRSS -* [Administrator documentation](./admins/01_Index.html) for detailed installation and maintenance related tasks -* [Developer documentation](./developers/01_First_steps.html) to guide you in the source code of FreshRSS and to help you if you want to contribute +* [User documentation](./users/02_First_steps.md), where you can discover all the possibilities offered by FreshRSS +* [Administrator documentation](./admins/01_Index.md) for detailed installation and maintenance related tasks +* [Developer documentation](./developers/01_Index.md) to guide you in the source code of FreshRSS and to help you if you want to contribute * [Contributor guidelines](./contributing.md) for those who want to help improve FreshRSS diff --git a/docs/en/users/03_Main_view.md b/docs/en/users/03_Main_view.md index c5800081c..3771a381a 100644 --- a/docs/en/users/03_Main_view.md +++ b/docs/en/users/03_Main_view.md @@ -1,14 +1,36 @@ +FreshRSS has three primary viewing modes: Normal, Global, and Reader view. + # Normal view -**TODO** +Normal view will allow you to view articles in a compressed view. They can be separated by category or individual feed, or viewed in the "main stream" containing all feeds. Clicking a feed in the sidebar (mobile users will need to click the folder icon to open it) will open that feed's view. + +## Article List + +By default, the normal view includes six items per article. From left to right: +* **Read status:** An envalope icon to show if the article has been read or not. Closed envalopes are unread, open envalopes are read. Clicking on the icon will toggle the read status. +* **Favourite status:** A star icon to show if the article has been favourited or not. Filled stars are favourited, empty stars are not. Clicking on the icon will toggle the favourite status. +* **Feed name:** The name of the feed that the article is from. Clicking the feed name will move to that feed's view in normal view. +* **Article title:** The title of the article. Clicking will open the article for viewing within FreshRSS. +* **Article date/time:** The time the article was posted. +* **Link to original article:** A globe icon that can be clicked to go to the article on the original website. + +## Normal View Sidebar + +Clicking the gear icon next to an individual feed will display additional options for that feed. +* **Filter:** Run the defined filter to mark articles as read +* **Statistics:** View statistics about the feed +* **See website:** Open the feed's website in another tab +* **Manage:** Configure the feed +* **Actualize:** Force-update the feed +* **Mark as read:** Mark all items in the feed as read # Global view -**TODO** +Global view allows quick views of feed's statuses at once. Feeds and categories are shown with the number of unread articles next to them. Clicking a feed's name will open it in a view similar to normal view. # Reader view -**TODO** +Reader view will display a feed will all articles already open for reading. Feeds can be switched by clicking the folder icon at the top to bring up the category/feed sidebar. # Refreshing feeds diff --git a/docs/en/users/04_Subscriptions.md b/docs/en/users/04_Subscriptions.md index b18272518..bfb3eabe4 100644 --- a/docs/en/users/04_Subscriptions.md +++ b/docs/en/users/04_Subscriptions.md @@ -1,11 +1,92 @@ # Adding a feed 1. To add a feed, copy the URL of its RSS or Atom file (for instance, the Framablog RSS URL is `https://framablog.org/feed/`). FreshRSS is able to automatically find the address of the feed for websites that are declaring it in a standard way. - 2. On FreshRSS, click “Subscriptions management”. - 3. Paste the URL in “Add an RSS feed” below the page title. + 2. In FreshRSS, click the "**+**" button next to “Subscriptions management”. + 3. Paste the URL in the “Feed URL” field. 4. (optional): You can select the category for your feed. By default, it will be in “Uncategorized”. + 5. (optional): If the subscription requires credentials, you can enter them in the "HTTP username" and "HTTP password" fields. + 6. (optional): You can set a timeout for the feed request if the feed requires it. + 7. (optional): You can choose to ignore SSL certificate errors (such as with self-signed certificates) by setting "Verify SSL security" to "No". This is not recommended, and it is better to either add the root certificate to the FreshRSS server or to fix the SSL certificate problems on the feed hosting server. -# Import and export +# Subscription management + +The "Subscription management" submenu allows categories and feeds to be configured. Feeds can be moved between categories by drag-and-drop, or in the individual feed's settings. Hovering over a feed/category will cause a gear icon to appear. Clicking the icon will bring up the settings for that item. + +## Category Settings + +### Information + +* **Title:** Name of category + * **Display position:** Defines the order of categories. Lower numbers get priority, non-numbered items come last, and equally numbered items will sort by alphabetical order. + +### Archiving + +If "Purge Policy" has "By default" selected, then the [default purge policy](./05_Configuration.md) is used and the other options are not displayed. Category options will override the default policy, but they will not override feed-specific options. + +## Feed Settings + + +These fields will be auto-filled when adding a feed, but they can be modified later. **Visibility** will define if the feed is displayed in the main feed, only in specific categories, or not at all. + +### Archival + +This section will let you override the default settings for feed archiving and update frequency. + +### Login + +Some feeds require a username/password submitted over HTTP. These usually aren't needed for feeds. + +### Advanced + +#### Retrieve a truncated feed from within FreshRSS + +This question comes up regularly, so we'll try to clarify how one can retrieve a truncated RSS feed with FreshRSS. Please note that the process is absolutely not user friendly, but it works. :) + +Please be aware that this way you'll generate much more traffic to the originating sites, and they might block you accordingly. FreshRSS performance is also negatively affected, because you'll have to fetch the full article content one by one. So it's a feature to use sparingly! + +The "Article CSS selector on original website" corresponds to the "path" consisting of IDs and classes (which in HTML, matches the id and class attributes) to retrieve only the interesting part that corresponds to the article. Ideally, this path starts with an id (which is unique to the page). The basics are explained [here](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Selectors). + +##### Example: Rue89 + +To find this path, you have to go to the address of one of the truncated articles (for example, http://www.rue89.com/2013/10/15/prof-maths-jai-atteint-lextase-dihn-pedagogie-inversee-246635). You look have to look for the "block" of HTML that corresponds to article content (in the source code!). + +Here we find that the block that encompasses nothing but the content of the article is ```
```. We'll only use the `.content` class here. Nevertheless, as said above, it's best to start the path with an id. If we go back to the parent block, we find ```
``` and that's perfect! The path will be ```#article .content```. + +##### Add the corresponding classes to the article CSS path on the feed configuration page. Examples: + +* Rue89: ```#article .content``` +* PCINpact: ```#actu_content``` +* Lesnumériques: ```article#body div.text.clearfix``` +* Phoronix: ```#main .content``` + +##### Combining CSS Classes +Let's say we have an article which contains ads, and we do not want to have those ads retrieved by FreshRSS. Example HTML: +``` +
+

wanted

+

wanted content

+

unwanted content

+

wanted

+

wanted content

+

wanted

+

unwanted content

+

wanted content

+
+``` +In this case it's possible to combine multiple CSS selectors with a comma: ```#article p.content, #article h2``` + +#### Retrieve a truncated feed with external tools + +Complementary tools can be used to retrieve full article content, such as: + +* [RSS-Bridge](https://github.com/RSS-Bridge/rss-bridge) +* [Full-Text RSS](https://bitbucket.org/fivefilters/full-text-rss) + +### Filter + +Articles can be automatically marked as read based on some search terms. See [filtering](./03_Main_view.md#filtering-articles) for more information on how to create these filters. + +# Import / export See [SQLite export/import]( https://github.com/FreshRSS/FreshRSS/tree/master/cli) as an alternative. ## Export @@ -19,7 +100,7 @@ See [SQLite export/import]( https://github.com/FreshRSS/FreshRSS/tree/master/cli 4. and finally, you can select feeds you want to export (by default, all feeds are selected) 4. Click on “export”. - ## Import +## Import 1. Go to the page “Import / export”. 2. Click on “Browse” and select your OPML or archive file on your computer. @@ -39,14 +120,3 @@ Bookmarklets are little scripts that you can execute to perform various tasks. F 1. Open “Subscriptions management”. 2. Click on “Subscription tools”. 3. Drag the “Subscribe” button to your bookmark toolbar or right click and choose your browser’s “Bookmark link” action. - -# Feed management - -You can manage your feeds within different categories. A feed cannot be in multiple categories. - - 1. Open “Subscriptions management”. - 2. You can add a category: - 1. Type the name of your category in “New category” - 2. Click on “Submit” - 3. You can move a feed on the category you want with drag & drop - 4. (optional): If you want the articles of a feed to be visible solely within its category and not in the main view, in the “Visibility” option, select “Show in its category”. diff --git a/docs/en/users/05_Configuration.md b/docs/en/users/05_Configuration.md index ba8c5006b..660a26bda 100644 --- a/docs/en/users/05_Configuration.md +++ b/docs/en/users/05_Configuration.md @@ -66,11 +66,27 @@ If you don't use those buttons because you never browse on mobile or because you # Reading -**TODO** +## Number of articles per page + +This setting defines the number of articles to display at once before needing to load more. In normal and reading view, more articles are loaded automatically. In global view, a button will appear at the bottom of the list. + +## Articles to display + +The status of articles to display when loading FreshRSS. "Adjust showing" will display only unread articles by default, but will display all articles when there are no unread articles to show. + +## Use "lazy load" mode to load images + +This will set images to load as they are viewed. This can save data, but will can cause images to load in later. # Archival -**TODO** +## Archiving + +These are the global options for fetching and retaining articles from feeds. They can be overwridden by individual feed's settings. + +## Maintenance + +This allows for purging/optimizing the current user's articles in the database. # Sharing @@ -93,6 +109,8 @@ To remove an item from the list, follow those simple steps: 1. Press the ```❌``` button next to the share method you want to remove. 1. Submit your changes. + + # Shortcuts To ease the use of the application, FreshRSS comes with a lot of predefined keyboard shortcuts. @@ -122,6 +140,14 @@ You can only change user query titles or drop them. At the moment, there is no helper to build a user query from here. +# Profile + +You can change your email address or password here. The authentication token is required for accessing the aggregated RSS feed for a user. A blank token will disable accessing the RSS feed without being logged in. + +# Extensions + +Extensions can be managed from this menu. Note that while extensions can be removed from the web interface, they cannot be added from it. + # Users **TODO** @@ -145,62 +171,3 @@ Require user marie More information can be found in the [Apache documentation](http://httpd.apache.org/docs/trunk/howto/auth.html#gettingitworking). -# Subscription management - -## Information - -**TODO** - -## Archival - -**TODO** - -## Login - -**TODO** - -## Advanced - -### Retrieve a truncated stream from within FreshRSS - -This question comes up regularly, so we'll try to clarify how one can retrieve a truncated RSS feed with FreshRSS. Please note that the process is absolutely not user friendly, but it works. :) - -Please be aware that this way you'll generate much more traffic to the originating sites, and they might block you accordingly. FreshRSS performance is also negatively affected, because you'll have to fetch the full article content one by one. So it's a feature to use sparingly! - -What's meant by "CSS path of articles on the original site" actually corresponds to the "path" consisting of IDs and classes (which in HTML, matches the id and class attributes) to retrieve only the interesting part that corresponds to the article. Ideally, this path starts with an id (which is unique to the page). - -#### Example: Rue89 - -To find this path, you have to go to the address of one of the truncated articles (for example, http://www.rue89.com/2013/10/15/prof-maths-jai-atteint-lextase-dihn-pedagogie-inversee-246635). You look have to look for the "block" of HTML that corresponds to article content (in the source code!). - -Here we find that the block that encompasses nothing but the content of the article is ```
```. We'll only use the `.content` class here. Nevertheless, as said above, it's best to start the path with an id. If we go back to the parent block, we find ```
``` and that's perfect! The path will be ```#article .content```. - -#### Add the corresponding classes to the article CSS path on the feed configuration page. Examples: - -* Rue89: ```#article .content``` -* PCINpact: ```#actu_content``` -* Lesnumériques: ```article#body div.text.clearfix``` -* Phoronix: ```#main .content``` - -#### Combining CSS Classes -Let's say we have an article which contains ads within its content, and we do not want to have those ads retrieved by FreshRSS. Example Source Code: -``` -
-

wanted

-

wanted content

-

unwanted content

-

wanted

-

wanted content

-

wanted

-

unwanted content

-

wanted content

-
-``` -In this case it's possible to combine multiple CSS selectors with a comma: ```#article p.content, #article h2``` - -### Retrieve a truncated stream with external tools - -Complimentary tools can be used to retrieve full article content, such as: - -* [RSS-Bridge](https://github.com/RSS-Bridge/rss-bridge) -* [Full-Text RSS](https://bitbucket.org/fivefilters/full-text-rss) diff --git a/docs/en/users/06_Fever_API.md b/docs/en/users/06_Fever_API.md deleted file mode 100644 index 0a0da90a5..000000000 --- a/docs/en/users/06_Fever_API.md +++ /dev/null @@ -1,110 +0,0 @@ -# FreshRSS - Fever API implementation - -See the [page about our Google Reader compatible API](06_Mobile_access.md) for another possibility -and general aspects of API access. - -## RSS clients - -There are many RSS clients that support the Fever API, but they seem to understand the Fever API a bit differently. -If your favourite client doesn't work properly with this API, please create an issue and we'll have a look. -But we can **only** do that for free clients. - -### Usage & Authentication - -Before you can start using this API, you have to enable and setup API access, which is [documented here](https://freshrss.github.io/FreshRSS/en/users/06_Mobile_access.html), -and then reset the user’s API password. - -Then point your mobile application to the `fever.php` address (e.g. `https://freshrss.example.net/api/fever.php`). - -## Compatible clients - -| App | Platform | License | -|:----------------------------------------------------------------------------------:|:-------------------:|:--------------------------------------------------------:| -|[Fluent Reader](https://hyliu.me/fluent-reader/) |Windows, Linux, macOS|[BSD-3-Clause](https://github.com/yang991178/fluent-reader/blob/master/LICENSE)| -|[Readably](https://play.google.com/store/apps/details?id=com.isaiasmatewos.readably)|Android |Closed Source | -|[Fiery Feeds](https://apps.apple.com/app/fiery-feeds-rss-reader/id1158763303) |iOS |Closed Source | -|[Unread](https://apps.apple.com/app/unread-rss-reader/id1252376153) |iOS |Closed Source | -|[Reeder](https://www.reederapp.com/) |iOS |Closed Source | -|[ReadKit](https://apps.apple.com/app/readkit/id588726889) |macOS |Closed Source | - -## Features - -The following features are implemented: - -* fetching categories -* fetching feeds -* fetching RSS items (new, favorites, unread, by_id, by_feed, by_category, since) -* fetching favicons -* setting read marker for item(s) -* setting starred marker for item(s) -* setting read marker for feed -* setting read marker for category -* supports FreshRSS extensions, which use the `entry_before_display` hook - -The following features are not supported: - -* **Hot Links** aka **hot** as there is nothing in FreshRSS yet that is similar or could be used to simulate it. - -## Testing and debugging - -If this API does not work as expected in your RSS reader, you can test it manually with a tool like [Postman](https://www.getpostman.com/). - -Configure a POST request to the URL https://freshrss.example.net/api/fever.php?api which should give you the result: -```json -{ - "api_version": 3, - "auth": 0 -} -``` -Great, the base setup seems to work! - -Now lets try an authenticated call. Fever uses an `api_key`, which is the MD5 hash of `"$username:$apiPassword"`. -Assuming the user is `kevin` and the password `freshrss`, here is a command-line example to compute the resulting `api_key` - -```sh -api_key=`echo -n "kevin:freshrss" | md5sum | cut -d' ' -f1` -``` - -Add a body to your POST request encoded as `form-data` and one key named `api_key` with the value `your-password-hash`: - -```sh -curl -s -F "api_key=$api_key" 'https://freshrss.example.net/api/fever.php?api' -``` - -This should give: -```json -{ - "api_version": 3, - "auth": 1, - "last_refreshed_on_time": "1520013061" -} -``` -Perfect, you're now authenticated and you can start testing the more advanced features. To do so, change the URL and append the possible API actions to your request parameters. Please refer to the [original Fever documentation](https://feedafever.com/api) for more information. - -Some basic calls are: - -* https://freshrss.example.net/api/fever.php?api&items -* https://freshrss.example.net/api/fever.php?api&feeds -* https://freshrss.example.net/api/fever.php?api&groups -* https://freshrss.example.net/api/fever.php?api&unread_item_ids -* https://freshrss.example.net/api/fever.php?api&saved_item_ids -* https://freshrss.example.net/api/fever.php?api&items&since_id=some_id -* https://freshrss.example.net/api/fever.php?api&items&max_id=some_id -* https://freshrss.example.net/api/fever.php?api&mark=item&as=read&id=some_id -* https://freshrss.example.net/api/fever.php?api&mark=item&as=unread&id=some_id - -Replace `some_id` with a real ID from your `freshrss_username_entry` database. - -### Debugging - -If nothing helps and your client is still misbehaving, you can add the following lines to the beginning of the `fever.api` file to determine the cause of the problems: - -```php -file_put_contents(__DIR__ . '/fever.log', $_SERVER['HTTP_USER_AGENT'] . ': ' . json_encode($_REQUEST) . PHP_EOL, FILE_APPEND); -``` - -Then use your RSS client to query the API and afterwards check the file `fever.log`. - -## Credits - -This plugin was inspired by the [tinytinyrss-fever-plugin](https://github.com/dasmurphy/tinytinyrss-fever-plugin). diff --git a/docs/en/users/06_Mobile_access.md b/docs/en/users/06_Mobile_access.md index 1becaf324..d635c5620 100644 --- a/docs/en/users/06_Mobile_access.md +++ b/docs/en/users/06_Mobile_access.md @@ -30,7 +30,7 @@ See the [page about the Fever compatible API](06_Fever_API.md) for another possi * With __Apache__: * If you get *FAIL getallheaders!*, the combination of your PHP version and your Web server does not provide access to [`getallheaders`](http://php.net/getallheaders) * Turn on Apache `mod_setenvif` (often enabled by default), or `mod_rewrite` with the following procedure: - * Allow [`FileInfo` in `.htaccess`](http://httpd.apache.org/docs/trunk/mod/core.html#allowoverride): see the [server setup](../admins/02_Installation.md) again. + * Allow [`FileInfo` in `.htaccess`](http://httpd.apache.org/docs/trunk/mod/core.html#allowoverride): see the [server setup](../admins/03_Installation.md) again. * Enable [`mod_rewrite`](http://httpd.apache.org/docs/trunk/mod/mod_rewrite.html): * With Debian / Ubuntu: `sudo a2enmod rewrite` * With __nginx__: diff --git a/docs/en/users/07_Frequently_Asked_Questions.md b/docs/en/users/07_Frequently_Asked_Questions.md index ff49226c9..c5f039f17 100644 --- a/docs/en/users/07_Frequently_Asked_Questions.md +++ b/docs/en/users/07_Frequently_Asked_Questions.md @@ -13,7 +13,7 @@ Of course, ```/i``` has a purpose! It's used for performance and usability: To increase security, FreshRSS is hosted in two sections. The first section is public (the `./p` folder) and the second section is private (everything else). Therefore the `robots.txt` file is located in the `./p` sub-folder. -As explained in the [security section](/en/User_documentation/Installation/Security), it's highly recommended to make only the public section available at the domain level. With that configuration, `./p` is the root folder for http://demo.freshrss.org/, thus making `robots.txt` available at the root of the application. +As explained in the [security section](../admins/09_AccessControl.html), it's highly recommended to make only the public section available at the domain level. With that configuration, `./p` is the root folder for http://demo.freshrss.org/, thus making `robots.txt` available at the root of the application. The same principle applies to `favicon.ico` and `.htaccess`. @@ -37,7 +37,7 @@ Since the [1.8.0](https://github.com/FreshRSS/FreshRSS/releases/tag/1.8.0) relea ```sh ./cli/update_user.php --user --password ``` -For more information on that matter, please refer to the [dedicated documentation](../../cli/README.md). +For more information on that matter, please refer to the [dedicated documentation](https://github.com/FreshRSS/FreshRSS/blob/master/cli/README.md). ## Permissions under SELinux -- cgit v1.2.3