Page 1 of 1

Read it Later / Pocket like feature

Posted: 08 Jan 2016, 05:33
by mrwhale
Did a bit of google-fu'ing but couldn't find exactly what I wanted. Wondering if there is something out there, or if something could be added to make tt-rss a Read it later service too. Say I've found and article that I'd like to read later (that isn't in my tt-rss feed, just on a random site), I would like to add it to a "read it later" list in tt-rss so it gets added to a once-off unread list so it can be synced to tt-rss clients or viewed in the web portal later

Hope that makes sense!

Cheers

Re: Read it Later / Pocket like feature

Posted: 08 Jan 2016, 10:22
by fox
https://tt-rss.org/gitlab/fox/tt-rss/wi ... reAnything ?

in all honesty i never understood the allure of "readitlater" services as opposed to just using bookmarks which get synced everywhere anyway and don't require doing anything special, the aforementioned feature is more about sharing stuff with friends via rss feeds

Re: Read it Later / Pocket like feature

Posted: 08 Jan 2016, 15:10
by nameless
share anything is what you want to look into.
i tried to plug readability into share anything which would make ttrss essentially a replacement for pocket.
i couldn't get i to work though. maybe you could take a look fox.

Re: Read it Later / Pocket like feature

Posted: 08 Jan 2016, 15:35
by fox
share anything is sadly not pluggable I think

I'll take a look, maybe as an option of af_readability

Re: Read it Later / Pocket like feature

Posted: 08 Jan 2016, 17:56
by JustAMacUser
It's not pluggable but you can copy/paste the code from the core into a plugin and override the call. Then just add whatever features you want. That's what I did to get shared articles into TT-RSS without automatically being marked as published.

Though having this feature be pluggable would be nice.

Re: Read it Later / Pocket like feature

Posted: 10 Jan 2016, 10:05
by mrwhale
Thanks for the suggestions peeps!

I just like the functionality so if I'm out and about and start reading an interesting article but can't finish it (and its not on my feed) I can save it for later. That's the main thing for now since getting tt-rss up and running! I used to use pocket a lot as I was manually trolling my favourite sites

Anyway, I'll faff about with the code of readability and share anything as suggested and see if I can get it to do what I need

Re: Read it Later / Pocket like feature

Posted: 10 Jan 2016, 17:33
by pcause
Why not just use the tt-rss published article functionality? You can create a browser toolbar button to do this easily and it also works with the android client. alternative is to star articles.

Re: Read it Later / Pocket like feature

Posted: 10 Jan 2016, 18:20
by fox
well it doesn't do readability

e: vvvv maybe adding a core option i.e. "[x] inline content with readability when sharing external links" here is the best way since we already have readability bundled anyway, i'm not sure if stuff like splitting shareanything into a plugin or adding a subset of it into readability is worth it

Re: Read it Later / Pocket like feature

Posted: 10 Jan 2016, 22:24
by JustAMacUser
When I copied/pasted the sharepopup code from the core, I just passed the content through a function like:

Code: Select all

   private function get_readability_content( $url, $content = '' ) {
      if ( '' != $content )
         return $content;

      $body = fetch_file_contents( $url, 'text/html' );

      if ( $body ) {
         require_once 'lib/readability/Readability.php';

         $readability = new Readability( $body, $url );

         if ( $readability->init() ) {
            $xpath = new DOMXPath( $readability->dom );

            $nodelist = $xpath->query( '//a[@href]|//img[@src]' );

            foreach ( $nodelist as $e ) {
               if ( $e->hasAttribute( 'href' ) )
                  $e->setAttribute( 'href', rewrite_relative_url( $url, $e->getAttribute( 'href' ) ) );

               if ( $e->hasAttribute( 'src' ) )
                  $e->setAttribute( 'src', rewrite_relative_url( $url, $e->getAttribute( 'src' ) ) );
            }

            $content = $readability->articleContent->innerHTML;

            if ("mysql" == DB_TYPE) {
               $content = preg_replace( '/[\x{10000}-\x{10FFFF}]/u', "\xEF\xBF\xBD", $content );
         }
      }

      return $content;
   }


It's pretty straightforward.

Re: Read it Later / Pocket like feature

Posted: 29 Jan 2016, 15:38
by fox
666cd33 should add support for readability in shareanything, if the following is met:

1. af_readability plugin is enabled
2. appropriate checkbox is set in plugin settings
3. content field in the sharepopup dialog is not manually set to something

as always report bugs