Page 3 of 47 FirstFirst 1234513 ... LastLast
Results 21 to 30 of 467

Thread: Conky Google Calendar Python Script

  1. #21
    Join Date
    Jun 2007
    Beans
    97

    Re: Conky Google Calendar Python Script

    I managed to do one.... see attached


    ****** LOL********

    Not attached. That will teach me to rush.... see next post

  2. #22
    Join Date
    Jun 2007
    Beans
    97

    Re: Conky Google Calendar Python Script

    I managed to do one... see attached

    EDIT

    Further to this I ran the command in a terminal and am posting the output below in case it helps. Also, I believe the count should be unread 'Items' and not 'Feeds'.

    Thanks again for your hard work!

    Also... sorry, I don't seem to able to post this output in a 'box'

    Here it is:

    <object>
    <number name="max">1000</number>
    <list name="unreadcounts">
    <object>
    <string name="id">feed/http://www.impactwrestling.com/rss.aspx</string>
    <number name="count">1</number>
    <number name="newestItemTimestampUsec">1215685823786973</number>
    </object>
    <object>
    <string name="id">user/06078103049471248256/label/News</string>
    <number name="count">1</number>
    <number name="newestItemTimestampUsec">1215685823786973</number>
    </object>
    <object>
    <string name="id">user/06078103049471248256/label/Ubuntu</string>
    <number name="count">7</number>
    <number name="newestItemTimestampUsec">1215685798064474</number>
    </object>
    <object>
    <string name="id">feed/http://www.ubuntuhq.com/rss.xml</string>
    <number name="count">1</number>
    <number name="newestItemTimestampUsec">1215685798064474</number>
    </object>
    <object>
    <string name="id">user/06078103049471248256/state/com.google/reading-list</string>
    <number name="count">8</number>
    <number name="newestItemTimestampUsec">1215685823786973</number>
    </object>
    <object>
    <string name="id">feed/http://www.gnome-look.org/gnome-look-content.rdf</string>
    <number name="count">1</number>
    <number name="newestItemTimestampUsec">1215685409813364</number>
    </object>
    <object>
    <string name="id">feed/http://ubuntu.hamdi.web.id/feed</string>
    <number name="count">5</number>
    <number name="newestItemTimestampUsec">1215425742525315</number>
    </object>
    </list>
    </object>

    countlist: [<DOM Element: number at 0x8373dec>, <DOM Element: number at 0x837b1ac>, <DOM Element: number at 0x837b2cc>, <DOM Element: number at 0x837b54c>, <DOM Element: number at 0x8368a6c>, <DOM Element: number at 0x837b5cc>, <DOM Element: number at 0x837b6ec>, <DOM Element: number at 0x837b96c>, <DOM Element: number at 0x837ba8c>, <DOM Element: number at 0x837bd0c>, <DOM Element: number at 0x837be2c>, <DOM Element: number at 0x83810cc>, <DOM Element: number at 0x83811ec>, <DOM Element: number at 0x838146c>, <DOM Element: number at 0x838158c>]
    6 Unread Feeds
    Attached Images Attached Images
    Last edited by martynp; July 10th, 2008 at 11:40 AM. Reason: addition

  3. #23
    Join Date
    Feb 2008
    Location
    52°38'41.6"N/1°19'43.6"E
    Beans
    Hidden!

    Re: Conky Google Calendar Python Script

    Quote Originally Posted by martynp View Post
    I managed to do one... see attached

    EDIT

    Further to this I ran the command in a terminal and am posting the output below in case it helps. Also, I believe the count should be unread 'Items' and not 'Feeds'.

    Thanks again for your hard work!

    Also... sorry, I don't seem to able to post this output in a 'box'

    Here it is:

    <object>
    <number name="max">1000</number>
    <list name="unreadcounts">
    <object>
    <string name="id">feed/http://www.impactwrestling.com/rss.aspx</string>
    <number name="count">1</number>
    <number name="newestItemTimestampUsec">1215685823786973</number>
    </object>
    <object>
    <string name="id">user/06078103049471248256/label/News</string>
    <number name="count">1</number>
    <number name="newestItemTimestampUsec">1215685823786973</number>
    </object>
    <object>
    <string name="id">user/06078103049471248256/label/Ubuntu</string>
    <number name="count">7</number>
    <number name="newestItemTimestampUsec">1215685798064474</number>
    </object>
    <object>
    <string name="id">feed/http://www.ubuntuhq.com/rss.xml</string>
    <number name="count">1</number>
    <number name="newestItemTimestampUsec">1215685798064474</number>
    </object>
    <object>
    <string name="id">user/06078103049471248256/state/com.google/reading-list</string>
    <number name="count">8</number>
    <number name="newestItemTimestampUsec">1215685823786973</number>
    </object>
    <object>
    <string name="id">feed/http://www.gnome-look.org/gnome-look-content.rdf</string>
    <number name="count">1</number>
    <number name="newestItemTimestampUsec">1215685409813364</number>
    </object>
    <object>
    <string name="id">feed/http://ubuntu.hamdi.web.id/feed</string>
    <number name="count">5</number>
    <number name="newestItemTimestampUsec">1215425742525315</number>
    </object>
    </list>
    </object>

    countlist: [<DOM Element: number at 0x8373dec>, <DOM Element: number at 0x837b1ac>, <DOM Element: number at 0x837b2cc>, <DOM Element: number at 0x837b54c>, <DOM Element: number at 0x8368a6c>, <DOM Element: number at 0x837b5cc>, <DOM Element: number at 0x837b6ec>, <DOM Element: number at 0x837b96c>, <DOM Element: number at 0x837ba8c>, <DOM Element: number at 0x837bd0c>, <DOM Element: number at 0x837be2c>, <DOM Element: number at 0x83810cc>, <DOM Element: number at 0x83811ec>, <DOM Element: number at 0x838146c>, <DOM Element: number at 0x838158c>]
    6 Unread Feeds
    Apologies, I left in the print statements from my debugging!

    The last line is the only thing that should be output!
    Last edited by kaivalagi; July 11th, 2008 at 12:15 AM.

  4. #24
    Join Date
    Jun 2007
    Beans
    97

    Re: Conky Google Calendar Python Script

    Hi,

    That, of course, worked perfectly.

    Thanks SO much, however, (and there is always one!) is it possible to show the unread ITEMS instead of FEEDS?

    I would guess this is a fairly simply change to just count the number of unread items in each feed and output a grand total.

    Of course..... it could be taken even further but the above would be wonderful!!

    Thanks,

    Martyn

    EDIT

    Actually I am wondering if it IS in fact showing unread item and you have just called them feeds in the script?

    EDIT 2

    As I type google reader tells me I have 31 unread items and your script is saying 19
    Last edited by martynp; July 10th, 2008 at 02:59 PM. Reason: addition

  5. #25
    Join Date
    Feb 2008
    Location
    52°38'41.6"N/1°19'43.6"E
    Beans
    Hidden!

    Re: Conky Google Calendar Python Script

    Quote Originally Posted by martynp View Post
    As I type google reader tells me I have 31 unread items and your script is saying 19
    Should be 19 feeds with unread items...does that not sound right?

    I'll play some more with it at the weekend, a grand total of unread items should be possible with minimal effort

  6. #26
    Join Date
    Jun 2007
    Beans
    97

    Re: Conky Google Calendar Python Script

    Hi,

    Thanks for the reply.

    At 8pm I have 32 feeds with 153 unread items.

    The script is showing 40 unread feeds.

    Your time and effort is greatly appreciated.

    Thanks,

    Martyn

  7. #27
    Join Date
    Feb 2008
    Location
    52°38'41.6"N/1°19'43.6"E
    Beans
    Hidden!

    Re: Conky Google Calendar Python Script

    Quote Originally Posted by martynp View Post
    Hi,

    Thanks for the reply.

    At 8pm I have 32 feeds with 153 unread items.

    The script is showing 40 unread feeds.

    Your time and effort is greatly appreciated.

    Thanks,

    Martyn
    I've updated the script again, attached here this time...

    It now outputs unread feeds, unread items total and each feed with the unread amount of items.

    In the script you'll see the following section of code:
    Code:
            print "%s Unread Feeds" % unreadfeedscount
            print "%s Unread Items" % unreaditemtotalcount
            for (unreaditemcount, feedurl) in feeds:
                print "%s - %s Unread Items" % (feedurl, unreaditemcount)
    To only output what you want just comment out the print statements that aren't needed. e.g. if you only want unread items it would be like this:

    Code:
            #print "%s Unread Feeds" % unreadfeedscount
            print "%s Unread Items" % unreaditemtotalcount
            #for (unreaditemcount, feedurl) in feeds:
                #print "%s - %s Unread Items" % (feedurl, unreaditemcount)
    Have a play and let me know where things are not adding up

    We can sort out the options to pick what you want to output later on, if it works properly...

    EDIT: The counts are good for me now...not sure whether it will work for you now?

    New datatype option, help below:
    Code:
    Usage: conkyGoogleReader.py [options]
    
    Options:
      -h, --help            show this help message and exit
      -u USERNAME, --username=USERNAME
                            username to login with
      -p PASSWORD, --password=PASSWORD
                            Password to login with
      -v, --verbose         request verbose output, not a good idea when running
                            through conky!
      -d DATATYPE, --datatype=DATATYPE
                            (default: [UI] datatype to retreive, UF (unread
                            feeds), UI (unread items), UL (unread feeds list)
    Last edited by kaivalagi; July 11th, 2008 at 05:58 PM.

  8. #28
    Join Date
    Jun 2007
    Beans
    97

    Re: Conky Google Calendar Python Script

    Morning,

    Thanks for this. In essence it works.

    However, I think you have doubled the unread feeds somewhere as this morning I am showing 253 unread items and the script shows 506.

    There is still a discrepancy in the number of unread feeds. My 253 unread items are in 27 feeds and the script is showing 35 as the number of unread feeds.

    I can confirm that the printing of the url's and number of unread items appears to work fine.

    Definately getting there. If I anything about programming I would look in the script myself as I am sure the 'doubling up' is something simple but not sure about the discrepancy in the unread feeds count.

    Thanks again and I look forward to hearing back from you when you have the time.

    Martyn

  9. #29
    Join Date
    Feb 2008
    Location
    52°38'41.6"N/1°19'43.6"E
    Beans
    Hidden!

    Re: Conky Google Calendar Python Script

    Quote Originally Posted by martynp View Post
    Morning,

    Thanks for this. In essence it works.

    However, I think you have doubled the unread feeds somewhere as this morning I am showing 253 unread items and the script shows 506.

    There is still a discrepancy in the number of unread feeds. My 253 unread items are in 27 feeds and the script is showing 35 as the number of unread feeds.

    I can confirm that the printing of the url's and number of unread items appears to work fine.

    Definately getting there. If I anything about programming I would look in the script myself as I am sure the 'doubling up' is something simple but not sure about the discrepancy in the unread feeds count.

    Thanks again and I look forward to hearing back from you when you have the time.

    Martyn
    No problem, now we have a sort of working script, it's easy to tweak it...

    I've updated the attachment on the previous post, details there too

  10. #30
    Join Date
    Jun 2007
    Beans
    97

    Re: Conky Google Calendar Python Script

    Hi,

    Confirming the new script installed. Formatting (ie datatype) working fine but everything is still getting doubled up.

    As I am watching I have 6 unread items in 5 feeds.

    The script is showing 12 unread items in 10 feeds.

    I have it refreshing every 60 seconds and am refreshing google reader AND grNotify at the same time to ensure accuracy.

    See the attached screenshot and note the unread feed count in grNotify in the system tray. This is the correct number.

    Martyn
    Attached Images Attached Images

Page 3 of 47 FirstFirst 1234513 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •