Code Monkey home page Code Monkey logo

tinytinyrss-fever-plugin's Introduction

Tiny Tiny RSS Fever API Plugin

Description

This is an open source plugin for Tiny Tiny RSS which simulates the Fever API. This allows Fever compatible RSS clients to use Tiny Tiny RSS.

See also: Fever API


Following Features are implemented:

  • getting new RSS items
  • getting starred RSS items
  • setting read marker for item(s)
  • setting starred marker for item(s)
  • hot links

Like Tiny Tiny RSS, the Fever API plugin is a rolling release model and there are no periodic updates. You should use git to clone the repository to install the plugin. If you must manually download a snapshot of the master branch, you can click the Download ZIP button.

These clients should work with Fever API emulation.

IMPORTANT You must enable the option Enable API access in your Tiny Tiny RSS preferences, for every user that wants to use the Fever plugin.

Clone this repository to your plugins.local folder of your Tiny Tiny RSS installation.

$ cd tt-rss/plugins.local
$ git clone https://github.com/DigitalDJ/tinytinyrss-fever-plugin fever

Enable the fever plugin in the Tiny Tiny RSS Preferences and reload.

A Fever Emulation accordion pane should appear in your Tiny Tiny RSS preferences that will allow you to set a password for the Fever API. This is the password you will use to login to your Fever client, and should be different to your Tiny Tiny RSS login password.

IMPORTANT The Fever API uses insecure unsalted MD5 hash. You should choose a disposable application-specific password and consider the use of HTTPS with your Tiny Tiny RSS installation. Let's Encrypt is an excellent resource to setup free SSL certificates for your HTTP server.

Once the password is saved, you may login to your Fever client using your Tiny Tiny RSS username, the password you set in the previous step and the following server / endpoint URL:

https://example.com/tt-rss/plugins.local/fever/

See the archived forum post for more detailed and outdated information.

Upgrading the Fever plugin follows the same steps as your Tiny Tiny RSS installation:

$ cd tt-rss/plugins.local
$ git pull origin master

In the file fever_api.php there are two flags for debugging at the beginning of the file.

  • DEBUG - set this to TRUE to produce extra debugging output. The location of the log is dependent on your PHP log_errors and error_log configuration directives.
  • DEBUG_USER - set this to the ID (from ttrss_users database table) of your user you would like to force authenticate with. The authentication process is then skipped and the API is always authenticated using this ID.

If you have problems with authentication after updating the plugin, try to re-enter the password in Tiny Tiny RSS Fever plugin and save it again.

If you encounter any defects please create an issue on GitHub.

Please include any debug logs and any output from the Tiny Tiny RSS Error Log (located in Preferences > System).

IMPORTANT Ensure logs are sanitized by removing any usernames, passwords and API keys.

Also specify versions and variants of the software you are using:

  • Tiny Tiny RSS commit
  • PHP (and integration with your HTTP server, e.g. php-fpm)
  • Operating System (e.g. FreeBSD, Debian)
  • HTTP Server (e.g. Apache, nginx)
  • Database Server (e.g. MySQL, PostgreSQL)

GPL-3.0

v1.0-v1.2 - 2013/05/27

  • see this thread in the Tiny Tiny RSS Forum

v1.3 - 2013/06/27

  • fixed several bugs in json output from the plugin
  • added a small fix for Mr.Reader 2.0 so it can complete loading of all items (see FAQ)
  • added first Mr.Reader compatiblity without marking items read/starred
  • changed the field date_entered to updated for better reading experience

v1.4 - 2013/06/28

  • fixed authentication with Mr.Reader 2.0
  • fixed debugging options

v1.4.1 - 2013/06/28

  • removed password from debug log file

v1.4.2 - 2013/06/28

  • changed the DEBUG_USER evaluation a little bit for disabling authentication without DEBUG = true

v1.4.3 - 2013/06/28

  • added DEBUG_FILE to debug configuration
  • changed authentication call from Mr.Reader so that the reply is also uppercase, since the API-KEY comes in uppercase from clients
  • fixed debug output while authentication in Mr.Reader with displaying the email adress

v1.4.4 - 2013/06/28

  • updated the documentation
  • changed some in saving the generated API-KEY - now its generated like in the Fever API documentation

v1.4.5 - 2013/06/29

  • fixed the cannot mark/star bug in Mr.Reader

v1.4.6 - 2014/01/15

  • merged bigger pull request to get more Fever API RSS Readers to work

v1.4.7 - 2014/01/15

  • added rewrite url function to module, since it was removed from Tiny Tiny RSS

v2.0 - 2017/05/16

  • Fix ccache exceptions
  • Sync previously copied snipets with latest tt-rss source
  • General clean up / refactor
  • Replace clunky sanitization with what is provided by tt-rss
  • Use new Article class for enclosures

v2.1 - 2017/12/25

  • Sync previously copied snipets with latest tt-rss source
  • Use PDO API for DB queries

v2.2 - 2018/01/22

  • Fix finding config.php for obscure tt-rss installations
  • Use PDO query for saving passwords
  • Fix PHP5 only having single unserialize argument

v2.3 - 2020/01/27

  • Fix error thrown when str_repeat() is passed negative length
  • Removes references to CCache class which has been scrapped and replaced

v2.4 - 2021/02/16

  • Includes fixes by froks to fix for the latest changes in tiny-tiny-rss
  • Includes updates to account for the "Undefined array key' error upgrade from notice to warning in PHP8

v3 - 2021/11/18

  • Updated to respect PHPStan Rule Level 6

v3.1 - 2023/10/27

  • Adding support for PSR-4 class autoloader

tinytinyrss-fever-plugin's People

Contributors

abeestrada avatar akrabat avatar chyiz avatar colindunn avatar dasmurphy avatar digitaldj avatar dimon222 avatar eric-pierce avatar henryqw avatar mestrode avatar objp4th avatar tobstone avatar wjchen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tinytinyrss-fever-plugin's Issues

Incompatibility with settings in new tt-rss version (19.02)

After copying the fever plugin into the "plugins.local" folder, the standard options vanish. Only the category headers are shown, but no options editable. See screenshot below. It doesn´t matter, if the plugin is activated or not.

Skizze

Can you please have a look at that? Thank you!
Best regards,
Joachim

Doesn't work with Press on Android

E_ERROR (1) | plugins.local/fever/fever_api.php:578 | Uncaught PDOException: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens in /volume2/web/tinyrss/plugins.local/fever/fever_api.php:578 Stack trace: #0 /volume2/web/tinyrss/plugins.local/fever/fever_api.php(578): PDOStatement->execute(Array) #1 /volume2/web/tinyrss/plugins.local/fever/fever_api.php(893): FeverAPI->getItems() #2 /volume2/web/tinyrss/plugins.local/fever/index.php(70): FeverAPI->index() #3 {main} thrown

E_WARNING (2) | include/functions.php:2543 | str_repeat(): Second argument has to be greater than or equal to 01. include/functions.php(2543): str_repeat(?,, -1)2. plugins.local/fever/fever_api.php(535): arr_qmarks(Array)3. plugins.local/fever/fever_api.php(893): getItems()4. plugins.local/fever/index.php(70): index()

Hot list not showing up in Reeder

Hi, there!

I had set up the tt-rss as well as this plugin. I can log in and it loads up the articles that I have subscripted to, but I don't see where the "hot links" are. Any ideas? (I am using Reeder, if it matters)

Screen Shot 2020-02-25 at 11 26 21 AM

Any ideas?

Unable to set API password

I installed and activated the plugin but the form to set the password in the accordion menu is not displayed.

Doesn't work with Reeder on iOS or macOS anymore

Hi, I just met this problem these days when I rebuilt my ttrss on my vps, Reeder just prompted that the email or password I entered was incorrect, I've re-input that password in fever plugin configuration many times but it still didn't work. What can I do to fix this?

Thanks.

xnip2018-08-25_02-19-35

img_6320

Add read percentage

I'm personally interested in this specifically to allow for a better experience using ttrss with podcasts.

Add a read_percentage option.
The percentage value can be of 0 to 100, and is zero by default.

Recent tt-rss update broke the plugin

I receive the following messages in the tt-rss error log since the 2021.11.18. updates:

E_COMPILE_ERROR (64)
plugins.local/fever/fever_api.php:113

Declaration of FeverAPI::before($method) must be compatible with Handler::before(string $method): bool
Real IP: <omitted>
Forwarded For: <omitted>
Forwarded Protocol: https
Remote IP: <omitted>
Request URI: /tt-rss/plugins.local/fever/?api&feeds
User agent: Reeder/5001.29.01 CFNetwork/1325.0.1 Darwin/21.1.0

I'm running tt-rss in docker and using Reeder 5 as client if that's relevant. Please let me know if you need more information to help solve the issue!

{"api_version":3,"auth":0,"error":"NOT_LOGGED_IN"} when I request fever URL

Hi

I have enabled fever plugin and set the password in Fever Emulation preference.

When I requested https://tt-rss.url/plugins.local/fever/ page.

It returned this error message :

{"api_version":3,"auth":0,"error":"NOT_LOGGED_IN"}

My tt-rss version was :

# docker image inspect -f {{.Config.Labels.build_version}} linuxserver/tt-rss
Linuxserver.io version:- 19.2-ls22 Build-date:- 2019-06-30T21:45:14+01:00

Undefined index: since_id

  1. plugins.local/fever/fever_api.php(549): ttrss_error_handler(8, Undefined index: since_id, plugins.local/fever/fever_api.php, 549, [{"items":[],"item_limit":50,"where":" owner_uid = ? AND ref_id = id ","where_items":["1"]})
  2. plugins.local/fever/fever_api.php(899): getItems()
  3. plugins.local/fever/index.php(70): index()

Forwarded For:
Forwarded Protocol: https
Remote IP:
Request URI: /tt-rss/plugins.local/fever/?api&items
User agent: Reeder/5000.69.01 CFNetwork/1220.1 Darwin/20.3.0

Minor inconsistency in instructions

The installation instructions recommend cloning to plugins.local/fever, but the Fever Emulation tab gives plugins/fever as the API endpoint URL (i.e. "plugins", not "plugins.local").

Cannot access Fever API via Mac (Reeder/ReadKit) or iOS (Unread)

Uncaught Error: Call to undefined function clean() in /var/www/html/ttrss/plugins.local/fever/fever_api.php:27 Stack trace: #0 /var/www/html/ttrss/plugins.local/fever/fever_api.php(119): FeverAPI->setUser() #1 /var/www/html/ttrss/plugins.local/fever/index.php(68): FeverAPI->before('') #2 {main} thrown

Uncaught Error: Call to a member function prepare() on null in /var/www/html/ttrss/plugins.local/fever/init.php:67 Stack trace: #0 /var/www/html/ttrss/classes/pluginhandler.php(12): Fever->save() #1 /var/www/html/ttrss/backend.php(126): PluginHandler->catchall('save') #2 {main} thrown

I am running tt-rss on Docker using https://github.com/uvatbc/docker-ttrss

Bug: TotalItems various int/str depending on the database

If I use Mysql (mariadb) as ttrss back-end database ?items returns json value TotalItems as string
If I use Postgres as ttrss back-end database ?items returns json value TotalItems as int

postrges

{
  "api_version": 3,
  "auth": 1,
  "total_items": 33725,
  "items": [],
  "last_refreshed_on_time": "1565084077"
}

mysql

{
  "api_version": 3,
  "auth": 1,
  "total_items": "33725",
  "items": [],
  "last_refreshed_on_time": "1565084077"
}

[Feature] TTRSS Media Cache cannot be used

In order to deal with the problem of image loading, I turned on the media caching feature of TTRSS subscription links.
However, I found that the TTRSS Fever API plug-in cannot use media caching.
After repeated verification, TTRSS itself has cached the images, but the reader linked through the plug-in still needs to be downloaded again.
I think this should be a different consideration in the production of plug-ins, and I hope to solve this problem.

(Connection refused) while connecting to upstream, client

Cheers,

recently, the fever plugin does not work anymore:

Env:

ttrs as armv7 docker container (image: nventiveux/ttrss-arm32v6:master)
macvlan network with class c address
traefik as reverse proxy

Worked all since years but a recent update broke this.

Got an error 500 error in the nginx access log

10.10.200.4 - - [22/Apr/2024:11:04:21 +0000] "POST /plugins.local/fever/?api HTTP/1.1" 500 5 "-" "Reeder/4020.89.01 CFNetwork/1494.0.7 Darwin/23.4.0" "192.168.1.150"

end on the error.log

024/04/22 11:09:10 [error] 17#17: *14 connect() failed (111: Connection refused) while connecting to upstream, client: 10.10.200.4, server: , request: "POST /backend.php HTTP/1.1", upstream: "fastcgi://[::1]:9000", host: "$my_fqdn" 2024/04/22 11:09:10 [warn] 17#17: *14 upstream server temporarily disabled while connecting to upstream, client: 10.10.200.4, server: , request: "POST /backend.php HTTP/1.1", upstream: "fastcgi://[::1]:9000", host: "$my_fqdn" 2024/04/22 11:09:41 [error] 17#17: *45 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Failed opening required 'classes/Db.php' (include_path='/srv/ttrss/plugins.local/fever:/srv/ttrss:/srv/ttrss/include:.:/usr/share/php8') in /srv/ttrss/plugins.local/fever/index.php:36 Stack trace: #0 {main} thrown in /srv/ttrss/plugins.local/fever/index.php on line 36" while reading response header from upstream, client: 10.10.200.4, server: , request: "POST /plugins.local/fever/?api HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "$my_fqdn"

any idea?

'Undefined array key "uid"' on login attempt

Hello,

I just installed the fever plugin on a new TTRSS installation and when I tried to log-in on the fever api endpoint I had this error:

Undefined array key "uid"
1. plugins.local/fever/fever_api.php(137): ttrss_error_handler(Undefined array key "uid", plugins.local/fever/fever_api.php)
2. plugins.local/fever/index.php(68): before()

Do you have any idea about this issue?

Thank you and have a great day!

TTRSS version: v22.07-7c45b3f

PHP Fatal error with latest update to tt-rss, again :(

Hi,

with the latest tt-rss build fever stoped working again :(

web-nginx_1  | 2021/03/07 09:37:22 [error] 20#20: *81 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Failed opening required 'db-prefs.php' (include_path='/var/www/html/tt-rss/plugins.local/fever:/var/www/html/tt-rss:/var/www/html/tt-rss/include:.:/usr/share/php8') in /var/www/html/tt-rss/plugins.local/fever/index.php:38
web-nginx_1  | Stack trace:
web-nginx_1  | #0 {main}
web-nginx_1  |   thrown in /var/www/html/tt-rss/plugins.local/fever/index.php on line 38" while reading response header from upstream, client: 172.26.0.1, server: , request: "POST /tt-rss/plugins.local/fever/?api&feeds HTTP/1.0", upstream: "fastcgi://172.26.0.3:9000", host: "my.domain"
web-nginx_1  | 172.26.0.1 - - [07/Mar/2021:09:37:22 +0000] "POST /tt-rss/plugins.local/fever/?api&feeds HTTP/1.0" 500 0 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0"
web-nginx_1  | 2021/03/07 09:37:32 [error] 20#20: *83 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Failed opening required 'db-prefs.php' (include_path='/var/www/html/tt-rss/plugins.local/fever:/var/www/html/tt-rss:/var/www/html/tt-rss/include:.:/usr/share/php8') in /var/www/html/tt-rss/plugins.local/fever/index.php:38

Thank's for your help!

Fever Pluggin not working with Reeder v4, but does in V3

Using fever plugin 2.2.0 - Using Reeder v3, works with Fever plugin. Using Reeder v4, does not login with fever plugin, (no error, just immediate return to login settings). Updated to the latest ubuntu/tinyrss as of this day (and updated fever pluggin). Not sure what logs etc will help. ttrss log says only this:

Legacy connect requested to mysql

  1. classes/db.php(22): user_error(Legacy connect requested to mysql, 1024)
  2. classes/db.php(100): legacy_connect()
  3. classes/pluginhost.php(99): get()
  4. plugins/api_newsplus/init.php(36): get_dbh()
  5. classes/pluginhost.php(240): init([PluginHost])
  6. include/functions.php(1978): load(auth_remote, auth_internal, note, updater, api_newsplus, 1)
  7. backend.php(51): init_plugins()

Tiny Tiny RSS v19.2 (270b39a) © 2005-2019 Andrew Dolgov

PHP Version 7.0.33-0ubuntu0.16.04.5
Apache/2.4.18 (Ubuntu)

Updating Plugin using Awesome-TTRSS Docker-Compose Image

Hi,

I'm currently having trouble connecting via the Fever API plugin that's included in the docker-compose image of Awesome-TTRSS. The plugin in that docker-compose image is at 2.3, where the most recent one released is at 3.0. Is there a way to update the plugin within docker-compose image? Thanks for the consideration!

Password field under the "Fever Emulation" section is missing

I have a stock tt-rss install, version 15.7. No plugins (besides this one) and no themes. The previously present field to enter the fever password is now missing, as well as all of the text that followed the password field.

This text used to follow the password field:

WARNING: The Fever API uses an UNSECURE unsalted MD5 hash. Consider the use of a disposable application-specific password and use HTTPS.

To login with the Fever API, set your server details in your favourite RSS application to: http://www.solidhal.net/tt-rss/plugins/fever/

Additional details can be found at https://feedafever.com/api

Note: Due to the limitations of the API and some RSS clients (for example, Reeder on iOS), some features are unavailable: "Special" Feeds (Published / Tags / Labels / Fresh / Recent), Nested Categories (hierarchy is flattened)

I see the text is still present in init.php however.

This has been tested in Safari, Firefox, and Google Chrome.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.