You are not logged in.

#51 2011-04-03 00:59:27

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,965
Website

Re: Voracious: customizable web feed aggregator for your browser

Ok, I've got some good new, and some bad news...

The good news is that I've added support for the etag and last-modified attributes...

The bad news is that while doing that, I realized just how bad the code was and started to restructure it. It started well and I managed to centralize the feed retrieval quite nicely (imo at the time), but towards the end of restructuring the Aggregator class and modularizing the XHTML generation, it started to feel a bit hacky, but I was fairly tired by this point.

So, all in all, it should be better now, but the template parser has completely changed and the old templates won't work. I've probably introduced some bugs too. Back up your old files, then clear everything out from the config dir except the configuration file. Run it then take a look at the new template file.

The new default theme was obviously inspired by kinhodder's above. Feel free to clean it up or submit other themes.




rambling... need to sleep...



*edit: typo*

Last edited by Xyne (2011-04-04 04:04:52)


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#52 2011-04-04 02:19:45

tladuke
Member
Registered: 2009-07-23
Posts: 176

Re: Voracious: customizable web feed aggregator for your browser

heh, sorry!

Offline

#53 2011-04-04 04:06:35

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,965
Website

Re: Voracious: customizable web feed aggregator for your browser

tladuke wrote:

heh, sorry!

Don't be, it needed some denoobing. Just let me know if it works as expected. wink

Feedback on the new template file format would be appreciated, e.g. if it's easier to work with.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#54 2011-04-05 01:15:31

tladuke
Member
Registered: 2009-07-23
Posts: 176

Re: Voracious: customizable web feed aggregator for your browser

I get a

Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 530, in __bootstrap_inner
    self.run()
  File "/usr/bin/voracious", line 338, in run
    for url, rtime in self.rtimes.iteritems():
RuntimeError: dictionary changed size during iteration

when I refresh a group after not refreshing for a while.

----

also, where in the template can I stick javascript stuff

 <script type="text/javascript" src="http://code.jquery.com/jquery-1.5.2.min.js"></script>

        <script>
                $(document).ready(function(){
                alert("hello");
                });
        </script>

jquery gets loaded, but I don't see the second script in the page source. This is when I put the above script tags just before </content> in the template.

Offline

#55 2011-04-05 15:03:37

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,965
Website

Re: Voracious: customizable web feed aggregator for your browser

The first error should be fixed now. I've also modified the template format again to support additional head tags.

Here's a template that includes your Javascript:

<template>
  <head>
  </head>
  <body>
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.5.2.min.js"></script>
    <script type="text/javascript"><![CDATA[

      $(document).ready(function(){
      alert("hello");
      });

    ]]></script>
    <h1>Voracious</h1>
    <voracious_navbar />
    <voracious_entry type="entry" voracious_class="CLASS">
      <div>
        <div class="header">
          <a voracious_href="entry.link">
            <voracious_text value="entry.title" />
          </a>
        </div>
        <div class="meta">
          <a voracious_href="feed.link">
            <voracious_text value="feed.title" />
          </a>
          <voracious_text value="entry.date_parsed" />
        </div>
        <div class="summary">
          <voracious_text value="entry.summary; entry.content" />
        </div>
      </div>
    </voracious_entry>
  </body>
</template>

Note the use of the CDATA tags. This is slightly different than pure XHTML, which would require comments, because the Python XML parser is a bit tricky.  It will output validated XHTML though.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#56 2011-04-08 11:38:06

X-dark
Member
From: France
Registered: 2009-10-25
Posts: 142
Website

Re: Voracious: customizable web feed aggregator for your browser

Hi,
Just trying this. Seems the makedir done when the config directory is not present is not working:

Traceback (most recent call last):
  File "/usr/bin/voracious", line 1489, in <module>
    main()
  File "/usr/bin/voracious", line 1469, in main
    server.aggregator = Aggregator(request_queue, log_message, options)
  File "/usr/bin/voracious", line 1120, in __init__
    create_file_if_absent(config_path, DEFAULT_CONFIG)
  File "/usr/bin/voracious", line 204, in create_file_if_absent
    os.path.makedirs(dpath)
AttributeError: 'module' object has no attribute 'makedirs'

I've been able to workaround this by doing a simple:

mkdir $XDG_CONFIG_HOME/voracious

Edit:
And a quick question? Would there be a way to display the web page content (ie web page located at entry.link) instead of the feed entry? This would be especially useful when the feed only embed a link to the corresponding article.

Last edited by X-dark (2011-04-08 12:29:41)


Cedric Girard

Offline

#57 2011-04-08 19:20:57

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: Voracious: customizable web feed aggregator for your browser

My javascript is ummm....well, anyway, I hacked on the old template and voracious code to add 'Next' 'Prev' and 'Home' buttons to each entry (makes scanning headlines much more painless on my phone!). Anyone worked out a javascript solution to this that can be part of the template if desired, as opposed to hacking the source code?

Thanks!
Scott

Offline

#58 2011-04-08 19:29:15

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,965
Website

Re: Voracious: customizable web feed aggregator for your browser

X-dark wrote:

Hi,
Just trying this. Seems the makedir done when the config directory is not present is not working:

Traceback (most recent call last):
  File "/usr/bin/voracious", line 1489, in <module>
    main()
  File "/usr/bin/voracious", line 1469, in main
    server.aggregator = Aggregator(request_queue, log_message, options)
  File "/usr/bin/voracious", line 1120, in __init__
    create_file_if_absent(config_path, DEFAULT_CONFIG)
  File "/usr/bin/voracious", line 204, in create_file_if_absent
    os.path.makedirs(dpath)
AttributeError: 'module' object has no attribute 'makedirs'

That should be fixed now. Thanks for reporting it.


X-dark wrote:

And a quick question? Would there be a way to display the web page content (ie web page located at entry.link) instead of the feed entry? This would be especially useful when the feed only embed a link to the corresponding article.

When I first read the question, I thought "hmmm, interesting idea, I should implement that".... but then when I looked at the code, I realized that it was already possible. big_smile

I've posted a template on the project page that replaces the summary with the entry.link page: http://xyne.archlinux.ca/projects/vorac … dded-pages

You'll probably want to modify the template to change the size of the embedded page, but it should be easy to do.

*edit*
Screenshot:
voracious_04_small.png

Last edited by Xyne (2011-04-08 19:35:12)


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#59 2011-04-09 01:06:50

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,965
Website

Re: Voracious: customizable web feed aggregator for your browser

firecat53 wrote:

My javascript is ummm....well, anyway, I hacked on the old template and voracious code to add 'Next' 'Prev' and 'Home' buttons to each entry (makes scanning headlines much more painless on my phone!). Anyone worked out a javascript solution to this that can be part of the template if desired, as opposed to hacking the source code?

Thanks!
Scott

I missed your post when I replied earlier.

I've added a new interpolation value named "ENTRY_ID". That should eliminate the need to hack the source code. The new default template uses it to create a unique, sequential id for each entry in the list. You could also use it to create local anchors with the "a" tag.

The rest should be possible with template XHTML and some Javascript.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#60 2011-04-09 01:25:17

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: Voracious: customizable web feed aggregator for your browser

Beautiful, thanks Xyne!

Scott

Offline

#61 2011-04-18 12:52:33

X-dark
Member
From: France
Registered: 2009-10-25
Posts: 142
Website

Re: Voracious: customizable web feed aggregator for your browser

Xyne wrote:

That should be fixed now. Thanks for reporting it.

Thanks.

Xyne wrote:

When I first read the question, I thought "hmmm, interesting idea, I should implement that".... but then when I looked at the code, I realized that it was already possible. big_smile

I've posted a template on the project page that replaces the summary with the entry.link page: http://xyne.archlinux.ca/projects/vorac … dded-pages

You'll probably want to modify the template to change the size of the embedded page, but it should be easy to do.

Perfect. I'll look to improve the appearance a bit but this is the behavior I wanted (I'm using Thunderbird for RSS reading for a long time and it's the default behavior).


Cedric Girard

Offline

Board footer

Powered by FluxBB