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.
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.
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
> --------------------------------------- > 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.
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:
> 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.