wallabag plugin

Post plugins and custom CSS snippets here
xppppp
Bear Rating Trainee
Bear Rating Trainee
Posts: 1
Joined: 29 May 2014, 02:30

wallabag plugin

Postby xppppp » 29 May 2014, 05:02

Here's a basic plugin that posts to the wallabag installation of your choice. For those unfamiliar with wallabag (nee poche), see http://www.wallabag.org/

If you happen to be brave and install my crude api patch to wallabag, you can post links without the browser popup window. For the timid, it will fall back to a browser popup window if your wallabag installation does not have api.php.

You can get the plugin at github: https://github.com/xppppp/ttrss-wallabag-plugin.git
Current wallabag with crude API patch can be found at: https://github.com/xppppp/wallabag.git
Differences (two files) can be seen at: https://github.com/xppppp/wallabag/comp ... r...master

Enjoy!
Attachments
wallabag.zip
ttrss plugin for wallabag.
(12.73 KiB) Downloaded 280 times

User avatar
joshp
Bear Rating Disaster
Bear Rating Disaster
Posts: 50
Joined: 31 Mar 2011, 11:31

Re: wallabag plugin

Postby joshp » 28 Feb 2015, 13:20

so, this is a bit old, does this still work with the newer updates? A diff with the older versions would let us know, I suppose. I see the only thing you did was basically add an api.php...
is there any other setup than adding that file, and substituting the other?

MacDork
Bear Rating Trainee
Bear Rating Trainee
Posts: 30
Joined: 01 May 2013, 05:55

Re: wallabag plugin

Postby MacDork » 03 Jul 2015, 00:36

Have you considered committing your api to the Wallabag guys to have it included and officially supported? I'm sure they'd love to have it.

User avatar
HeikoAdams
Bear Rating Master
Bear Rating Master
Posts: 101
Joined: 19 Mar 2013, 00:17

Re: wallabag plugin

Postby HeikoAdams » 10 Jul 2015, 21:25

I got a working plugin that requires wallabag 1.9.1 (currently beta): https://gitlab.com/HeikoAdams/tt-rss-wallabag

User avatar
joshp
Bear Rating Disaster
Bear Rating Disaster
Posts: 50
Joined: 31 Mar 2011, 11:31

Re: wallabag plugin

Postby joshp » 18 Sep 2015, 21:44

Hey!

As you may know the Wallabag devs have recently released both a huge update to the 1.9.x version, and a shiny new 2.0 (currently in alpha) that includes a working API. This Wallabag plugin and patch both work well with 1.9, and without worrying about the patch to Wallabag, the plugin works just fine with 1.9.1, but for those of us updated to 1.9.1 the patched 1.9 is meaningless, as the whole of the 1.9 release is rolled up with the patch.

I've gone ahead and simplified this by extracting the api.php from the patched 1.6.1 that xppppp cooked up, and updated the patched /inc/pooch/Pooch.class.php to reflect the changes in the 1.9.1 update. I also cleaned up that code a bit.

The simple additions to the /inc/pooch/Pooch.class.php file (for those that like to know) are as follows, simply insert new lines...

In both 1.9 and 1.9.1 at line 41

Code: Select all

 public $actionOnly;

In both 1.9 and 1.9.1 at line line 68

Code: Select all

$this->actionOnly   = false;

At line 250 in 1.9.1 or line 243 in 1.9

Code: Select all

 if (!$this->actionOnly) {

At line 256 in 1.9.1 or line 249 in 1.9 (this closing bracket was left out of xppppp's patch, and breaks 1.9.1 if left out, but 1.9 works without it)

Code: Select all

}


Included below are the api.php, the 1.9.1 updated and corrected /inc/pooch/Pooch.class.php, and a new icon because the one included in the plugin download didn't work for me for some reason. These do not break anything. To test the patch, simply add the api.php to the root of your Wallabag, in other words just place it like this, "/path/to/www/wallabag/api.php", and update the "/path/to/www/wallabag/inc/pooch/Pooch.class.php" by hand as instructed above, or if you are on 1.9.1 you can just replace it with the file included below.

Finally, perhaps someone can focus on a 2.0 plugin now. The Wallabag devs have said that they are done with 1.x updates, and are focused solely on 2.0 development at this point. EDIT: maybe I will, but I am going to keep focusing on this until 2.0 comes out, or until this works with auth in 1.9.1.

I hope this helps.

EDIT: While the instructions above seem to work, that is they don't break anything, the auth pop-up is still there. I will mess around some more, but if anyone can figure out why that is so... yeah, that would be great.

tt-rss wallabag-plugin updated 1.9.1 files.zip
The 1.9.1 updated files
(13.71 KiB) Downloaded 170 times

User avatar
joshp
Bear Rating Disaster
Bear Rating Disaster
Posts: 50
Joined: 31 Mar 2011, 11:31

Wallabag 1.9.1 plugin total fix, fully functional

Postby joshp » 19 Sep 2015, 22:25

Made contact with both the Wallabag devs and xppppp over on github. All issues are now resolved and this is a fully functioning plugin/patch combo. Now, to achieve this functionality you can either:

1. install Wallabag 1.9.1 fresh from xppppp's git repo above
2. update your Wallabag installation from xppppp's git repo above, or
3. use the files attached to this post that were pulled right out of the 1.9.1 updated repo and add them to your existing Wallabag 1.9.1 installation. They are functionally identical to what is above, but just pulled directly from the updated repo, and not hand edited after the fact by me.

I like option three, as it exercises the most control over what is going on with your Wallabag installation, but to each their own. After you apply the Poche.class.php patch and place the api.php file in the root of your Wallabag installation, you also have to apply a session fix to Wallabag.

As root:

Code: Select all

$ mkdir /var/lib/wallabag-sessions
$ chown www-data:www-data /var/lib/wallabag-sessions

Then add this line to your apache v-host (wallabag.conf, or wherever you put it):

Code: Select all

php_admin_value session.save_path /var/lib/wallabag-sessions

Then restart apache as root:

Code: Select all

 /etc/init.d/apache2 restart

Finally, you may want to go into Wallabag and clear it's cache, and then go into TT-Rss and enter in some bogus user and url info into the plugin preferences, save, exit preferences, return to the plugin preferences in TT-Rss, and enter in your info again.

That worked for me.

TL;DR? Git repo for the patch is updated and working fine with 1.9.1, the relevant files are attached right to this comment. Apply the session fix, re-enter in your user info, and you should be good to go.

As an added bonus I also updated and re-wrapped the plugin itself for folks who want to place it in the /plugins.local/ folder, and included the fixed icon here as well.

The Wallabag devs have also pointed me to the API documentation for Wallabag 2.0: http://v2.wallabag.org/api/doc#post--api-entries.%7B_format%7D
in the hopes that we can start working on a functional plugin for when 2.0 comes out. Cheers.


wallabag-master.zip
Relevant patch files for Wallabag (and nothing else)
(11.03 KiB) Downloaded 191 times

ttrss-wallabag-plugin-1.1.zip
Corrected Plugin v 1.1
(13.2 KiB) Downloaded 208 times

giovi
Bear Rating Trainee
Bear Rating Trainee
Posts: 15
Joined: 20 Nov 2013, 17:35

Re: wallabag plugin

Postby giovi » 19 Apr 2016, 15:08

Any news for the compatibility with wallabag v2? :)

User avatar
joshp
Bear Rating Disaster
Bear Rating Disaster
Posts: 50
Joined: 31 Mar 2011, 11:31

Re: wallabag plugin

Postby joshp » 04 May 2016, 18:56

Working on it, not having fun trying to get it working with oauth 2.0, however.

The Wallabag 2.0 api is very straightforward, but the oauth stuff has my head hurting, to be honest.

User avatar
joshp
Bear Rating Disaster
Bear Rating Disaster
Posts: 50
Joined: 31 Mar 2011, 11:31

Re: wallabag plugin

Postby joshp » 05 May 2016, 19:29

Well, it's ugly, and doesn't want to work... so it's in alpha. But I have been working on trying to get a plugin working for Wallabag v2.

It's up on github, https://github.com/joshp23/ttrss_plugin_post_to_wallabag_v2.

It's based on xppppp's work, and I'm really just hacking away at it and running into some weird errors. My notes and issues are posted on github, this is a call for help and testers :)

User avatar
joshp
Bear Rating Disaster
Bear Rating Disaster
Posts: 50
Joined: 31 Mar 2011, 11:31

Re: wallabag plugin

Postby joshp » 08 May 2016, 03:13

V2= it's finished and working.


Return to “Themes and plugins”

Who is online

Users browsing this forum: No registered users and 1 guest