Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
can i do this with the config?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
onl...@eleith.com  
View profile  
 More options Nov 2 2010, 6:06 pm
From: onl...@eleith.com
Date: Tue, 2 Nov 2010 15:06:17 -0700
Local: Tues, Nov 2 2010 6:06 pm
Subject: [canto-reader] can i do this with the config?
i'm having fun with canto. thanks for building it. i use finch and mutt and
this is a nice addition to screen tabs that will keep me out of my browser.

there are a couple of things i've tried to do, but can't seem to solve
on my own, i would be happy to hear of any other solutions to them

---------------------------------------
1) make a shortcut to open the 0th link.
---------------------------------------

i want to bind 'enter' when clicked, to open
link[0] in my browser.

i can do something like
key['\n'] = ['goto']
reader_key['\n'] = ['goto'],

but that will prompt me for a number. what i want instead is something like:

key['\n'] = ['goto(0)']

---------------------------------------
2) open up in collapse mode
---------------------------------------

i want all my tags to be opened in collapsed mode. i've tried using
hooks, but i don't see a collapse function i can assign to the first
opening hook

---------------------------------------
3) i've got all my feeds tagged using -> add(url, tags=[tag_name])
---------------------------------------

this means when i start canto, i see a folder list view of my stories
which is perfect. however, i lose the titles of the individual feeds. is
there a way for me to modify the titles of each story such that it
includes the default title of the feed? here is an example snippet

tag-local-news [3]

sfgate.com: giants win world series
paloaltodaily.com: caltrain running out of money
mercurynews.com: election is today

otherwise, i see just a list of story titles and i don't know what
source the title comes from. i don't want to use feed titles as tags
though, because i have too many feeds and would prefer grouping by tags
than by titles.

---------------------------------------
4) show_unread doesn't show my tag sections
---------------------------------------

i want to see a list of all my tag sections when i first start up. as
long as i have unread feeds in them, i'm happy, but if i have a tag that
doesn't have any unread stories, that does not appear.

is there a way to preserve the folder so that it appears even if there
are zero stories?

---------------------------------------
5) i start of canto with a script, so that i can kick of canto fetch,
and then leave canto running afterwards.
---------------------------------------

when i quick canto, i want to then kill canto fetch. is there a way i
can pass "killall canto-fetch" into the quit hook of the canto client?

-----------------

okay, that's a lot of questions, but i figured i would get it all out at
once. i'm happy to hack canto a bit to achieve these solutions and can
even commit the patches upstream if anyone thinks it is useful.

i think if i can get about half of these, i'll stick with canto.

thanks for the work, this project is great.

/leith

_______________________________________________
canto-reader mailing list
canto-rea...@codezen.org
http://codezen.org/cgi-bin/mailman/listinfo/canto-reader


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
eleith  
View profile  
 More options Nov 2 2010, 5:36 pm
From: eleith <em...@eleith.com>
Date: Tue, 2 Nov 2010 14:36:28 -0700
Local: Tues, Nov 2 2010 5:36 pm
Subject: [canto-reader] can i do this with the config?
i'm having fun with canto. thanks for building it. i use finch and mutt and
this is a nice addition to screen tabs that will keep me out of my browser.

there are a couple of things i've tried to do, but can't seem to solve
on my own, i would be happy to hear of any other solutions to them

---------------------------------------
1) make a shortcut to open the 0th link.
---------------------------------------

i want to bind 'enter' when clicked, to open
link[0] in my browser.

i can do something like
key['\n'] = ['goto']
reader_key['\n'] = ['goto'],

but that will prompt me for a number. what i want instead is something like:

key['\n'] = ['goto(0)']

---------------------------------------
2) open up in collapse mode
---------------------------------------

i want all my tags to be opened in collapsed mode. i've tried using
hooks, but i don't see a collapse function i can assign to the first
opening hook

---------------------------------------
3) i've got all my feeds tagged using -> add(url, tags=[tag_name])
---------------------------------------

this means when i start canto, i see a folder list view of my stories
which is perfect. however, i lose the titles of the individual feeds. is
there a way for me to modify the titles of each story such that it
includes the default title of the feed? here is an example snippet

tag-local-news [3]

sfgate.com: giants win world series
paloaltodaily.com: caltrain running out of money
mercurynews.com: election is today

otherwise, i see just a list of story titles and i don't know what
source the title comes from. i don't want to use feed titles as tags
though, because i have too many feeds and would prefer grouping by tags
than by titles.

---------------------------------------
4) show_unread doesn't show my tag sections
---------------------------------------

i want to see a list of all my tag sections when i first start up. as
long as i have unread feeds in them, i'm happy, but if i have a tag that
doesn't have any unread stories, that does not appear.

is there a way to preserve the folder so that it appears even if there
are zero stories?

---------------------------------------
5) i start of canto with a script, so that i can kick of canto fetch,
and then leave canto running afterwards.
---------------------------------------

when i quick canto, i want to then kill canto fetch. is there a way i
can pass "killall canto-fetch" into the quit hook of the canto client?

-----------------

okay, that's a lot of questions, but i figured i would get it all out at
once. i'm happy to hack canto a bit to achieve these solutions and can
even commit the patches upstream if anyone thinks it is useful.

i think if i can get about half of these, i'll stick with canto.

thanks for the work, this project is great.

/leith

_______________________________________________
canto-reader mailing list
canto-rea...@codezen.org
http://codezen.org/cgi-bin/mailman/listinfo/canto-reader


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mikko Varri  
View profile  
 More options Nov 4 2010, 6:04 am
From: Mikko Varri <v...@linuxbox.fi>
Date: Thu, 4 Nov 2010 12:04:28 +0200
Local: Thurs, Nov 4 2010 6:04 am
Subject: Re: [canto-reader] can i do this with the config?
I can help you with one :)

I've done this:

reader_keys['o'] = [lambda r: r.dogoto(0), 'destroy', 'just_read', 'prev_item', 'reader']

When I press 'o' in reader, link zero is opened, reader is closed,
item is marked read, previous item is selected and opened in the
reader.

-vmj

_______________________________________________
canto-reader mailing list
canto-rea...@codezen.org
http://codezen.org/cgi-bin/mailman/listinfo/canto-reader


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jack Miller  
View profile  
 More options Nov 5 2010, 4:25 pm
From: Jack Miller <j...@codezen.org>
Date: Fri, 5 Nov 2010 15:25:34 -0500
Local: Fri, Nov 5 2010 4:25 pm
Subject: Re: [canto-reader] can i do this with the config?

On Tue, Nov 02, 2010 at 03:06:17PM -0700, onl...@eleith.com wrote:
> i'm having fun with canto. thanks for building it. i use finch and mutt and
> this is a nice addition to screen tabs that will keep me out of my browser.

> there are a couple of things i've tried to do, but can't seem to solve
> on my own, i would be happy to hear of any other solutions to them

Hey, so, sorry it's taken me a bit, been sorta slammed at work.

> ---------------------------------------
> 1) make a shortcut to open the 0th link.
> ---------------------------------------

> i want to bind 'enter' when clicked, to open
> link[0] in my browser.

> i can do something like
> key['\n'] = ['goto']
> reader_key['\n'] = ['goto'],

> but that will prompt me for a number. what i want instead is something like:

> key['\n'] = ['goto(0)']

I think vmj covered this one pretty well.

> ---------------------------------------
> 2) open up in collapse mode
> ---------------------------------------

> i want all my tags to be opened in collapsed mode. i've tried using
> hooks, but i don't see a collapse function i can assign to the first
> opening hook

In the config:

def start_hook(gui):
    gui.set_collapse_all()

This one is a bit tougher. If a URL prefix is what you want (like you list
above), it could be done like this:

1. add "from canto.extra import *" (no quotes) to the top of your config.
2. anywhere else add:

----------------8<------------------------
def add_URL(d):
        from urlparse import urlparse

        prefix = ""
        for f in d["cfg"].feeds:
                if d["story"] in f:
                        prefix = urlparse(f.URL)[1]
                        break

        d["content"] = prefix + ": " + d["content"]

r = get_default_renderer()
add_hook_pre_story(r, add_URL)
----------------8<------------------------

However, if you want the actual feed title, something like this will work:

----------------8<------------------------
def add_feed_title(d):
        prefix = ""
        for f in d["cfg"].feeds:
                if d["story"] in f:
                        if "ftitle" not in dir(f):
                                u = f.get_ufp()
                                if "title" in u["feed"]:
                                        f.ftitle = u["feed"]["title"]
                                else:
                                        f.ftitle = ""
                        prefix = f.ftitle
                        break

        d["content"] = prefix + ": " + d["content"]

r = get_default_renderer()
add_hook_pre_story(r, add_feed_title)

----------------8<------------------------

But be warned that feed titles can be *really* long.

> 4) show_unread doesn't show my tag sections
> ---------------------------------------

> i want to see a list of all my tag sections when i first start up. as
> long as i have unread feeds in them, i'm happy, but if i have a tag that
> doesn't have any unread stories, that does not appear.

> is there a way to preserve the folder so that it appears even if there
> are zero stories?

Unfortunately this one I can't do. All drawing is tied to the story objects
in this version of Canto. Actually, I'm working on an alpha that already has
the option to show empty tags built in. In fact, the alpha will make all of
this much easier, but it's not quite ready for primetime =)

> ---------------------------------------
> 5) i start of canto with a script, so that i can kick of canto fetch,
> and then leave canto running afterwards.
> ---------------------------------------

> when i quick canto, i want to then kill canto fetch. is there a way i
> can pass "killall canto-fetch" into the quit hook of the canto client?

> -----------------

If you're starting canto from a script anyway, why don't you just do
something like:

-----------------------
#/bin/bash

canto-fetch -b
canto
killall -INT canto-fetch
------------------------

?

> okay, that's a lot of questions, but i figured i would get it all out at
> once. i'm happy to hack canto a bit to achieve these solutions and can
> even commit the patches upstream if anyone thinks it is useful.

> i think if i can get about half of these, i'll stick with canto.

How about 4/5 =). Unfortunately that last one would be a huge pain to
achieve.

> thanks for the work, this project is great.

Thanks!

- Jack

_______________________________________________
canto-reader mailing list
canto-rea...@codezen.org
http://codezen.org/cgi-bin/mailman/listinfo/canto-reader


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »