Page 19 of 20 FirstFirst ... 917181920 LastLast
Results 181 to 190 of 195

Thread: Conky Pidgin Python Script

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

    Re: Conky Pidgin Python Script

    Don't worry, I decided to take a quick look and went on a lambda rampage

    e.g.:
    Code:
                # sort the list by option
                if self.options.sortby == "DEFAULT":
                    pidginAccountDataList.sort(key=lambda obj: (str(obj.status)+obj.protocol.lower()+obj.name.lower()))
                    pidginDataList.sort(key=lambda obj: (str(obj.status)+obj.group.lower()+alias.lower()))
                elif self.options.sortby == "NAME":
                    pidginAccountDataList.sort(key=lambda obj: (obj.name.lower()+str(obj.status)+obj.protocol.lower()))
                    pidginDataList.sort(key=lambda obj: (obj.name+obj.alias+obj.group+str(obj.status)))
                elif self.options.sortby == "ALIAS":
                    pidginAccountDataList.sort(key=lambda obj: (obj.name.lower()+str(obj.status)+obj.protocol.lower()))
                    pidginDataList.sort(key=lambda obj: (obj.alias+obj.name+obj.group+str(obj.status)))
                elif self.options.sortby == "GROUP":
                    pidginAccountDataList.sort(key=lambda obj: (obj.name.lower()+str(obj.status)+obj.protocol.lower()))
                    pidginDataList.sort(key=lambda obj: (obj.group+obj.name+obj.alias+str(obj.status)))
                elif self.options.sortby == "STATUS":
                    pidginAccountDataList.sort(key=lambda obj: (obj.name.lower()+str(obj.status)+obj.protocol.lower()))
                    pidginDataList.sort(key=lambda obj: str(obj.status)+obj.name+obj.alias+obj.group)
                elif self.options.sortby == "LOGACTIVITY":
                    pidginAccountDataList.sort(key=lambda obj: (str(obj.status)+obj.protocol.lower()+obj.name.lower()))
                    pidginDataList.sort(key=lambda obj: obj.activitydatetime,reverse=True)
                else:
                    raise Exception("Invalid sortby option provided")
    I won't have time to release the package today (launchpad is being reallllllly slowly i.e. 20 hours for a build) but find attached a marginally tested new version of the .py file....let me know if that works for you!

    Here's the help listing for the --sortby method:

    Code:
     -s METHOD, --sortby=METHOD
                            [default: DEFAULT] Sort options for both buddy and
                            account listings. These are DEFAULT, NAME, ALIAS,
                            GROUP, STATUS or LOGACTIVITY. ALIAS, GROUP and
                            LOGACTIVITY sort options are not applicable for
                            account listings so appropriate sorting methods are
                            used instead. LOGACTIVITY is useful when limiting the
                            list size with the limit option.
    Have fun
    Attached Files Attached Files
    Last edited by kaivalagi; April 29th, 2011 at 01:30 PM.

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

    Re: Conky Pidgin Python Script

    UPDATE

    Updates as follows:
    • Updated to have a --sortby option replacing the --sortbylogactivity option. It takes the following values of DEFAULT, NAME, ALIAS, GROUP, STATUS or LOGACTIVITY. ALIAS, GROUP and LOGACTIVITY sort options are not applicable for account listings so appropriate sorting methods are used instead.


    Package changes can be seen here: https://launchpad.net/~conky-compani...source.changes

    The apt packages should be available soon

    edit: Ubuntu/Debian/#! users may be waiting a while, estimated to be a tomorrow build completion date according to launchpad! Arch users will have the change already though

  3. #183
    Join Date
    Apr 2010
    Location
    Santo Andre - Brazil
    Beans
    18
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Conky Pidgin Python Script

    Wow, that was quick XDD

    Thank you very much. I just need to find my way to update it now (or wait for the ppa, which won't take that long anyway)

    But yeah, this plugin is great, saves me lots of space on screen and time.

    Thank you =D

    --------
    Edit:

    One more thing, this is more for discussion, I don't know if it is your plug in that could solve it.

    I have some merged contacts on Pidgin (same people different protocols kind of thing).
    ConkyPidgin shows them as different contacts, which I think it is expected... Would there be a way of hiding them or just showing one "meta contact"?

    See you o/
    Last edited by leomeloxp; April 29th, 2011 at 02:48 PM. Reason: Adding Information

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

    Re: Conky Pidgin Python Script

    if you sudo copy the attached .py file a couple of posts back over the top of /usr/share/conkypidgin/conky/pidgin.py that should do it...

    If I find time I'll look at an option to "thin out" same named buddies from varying IM networks....going on the aliases would be best right? So same aliases is ignored?

  5. #185
    Join Date
    Apr 2010
    Location
    Santo Andre - Brazil
    Beans
    18
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Conky Pidgin Python Script

    Did it now XD It took me a bit to find the .py file ^^'

    Anyway, I tried aliases already, they just show one right under another XD

    I don't really know how to do this, if Pidgin had a better support for Meta Contacts, like (I suppose) Kopete has. But that's not for us to work on, still depends on the developers.

    Anyway, the sorting works like a charm, thanks again =]

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

    Re: Conky Pidgin Python Script

    Quote Originally Posted by leomeloxp View Post
    Did it now XD It took me a bit to find the .py file ^^'

    Anyway, I tried aliases already, they just show one right under another XD

    I don't really know how to do this, if Pidgin had a better support for Meta Contacts, like (I suppose) Kopete has. But that's not for us to work on, still depends on the developers.

    Anyway, the sorting works like a charm, thanks again =]
    I hadn't added any alias removal yet....try the attached with the --distinctaliases option
    Attached Files Attached Files

  7. #187
    Join Date
    Apr 2010
    Location
    Santo Andre - Brazil
    Beans
    18
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Conky Pidgin Python Script

    Ha ha =D It worked!

    It is a pretty smart work around. Thanks once again XD

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

    Re: Conky Pidgin Python Script

    No worries, bear in mind the next (the one already posted and taking forever to publish) release will not include the alias stuff (still not built on launchpad!) so just be aware when you update you might want to overwrite with the tarball here again!
    Last edited by kaivalagi; May 1st, 2011 at 04:52 PM.

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

    Re: Conky Pidgin Python Script

    UPDATE

    Updates as follows:
    • Updated to have a --distinctaliases option which when requested will remove any duplicate aliases found before outputting


    Package changes can be seen here: https://launchpad.net/~conky-compani...source.changes

    The apt packages should be available soon

  10. #190
    Join Date
    Aug 2011
    Beans
    1

    Re: Conky Pidgin Python Script

    Hi all, my first post

    I was just wondering if there is a way to have the script return only the amount of contacts in total and how many of them are online? I just want a summary to be displayed in my Conky so I don't really have a need for a list of the actual buddies online.

    Thanks for the script btw, I've only been using Linux for about three weeks now but I'm already starting to build up a good understanding thanks to your posts!

Page 19 of 20 FirstFirst ... 917181920 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
  •