Page 1 of 5 123 ... LastLast
Results 1 to 10 of 43

Thread: Conky Remember the Milk perl script

  1. #1
    Join Date
    Apr 2007
    Beans
    122
    Distro
    Ubuntu 8.04 Hardy Heron

    Conky Remember the Milk perl script

    I first saw TheAxeR's python script here and was playing around with that for awhile. I am not a great python programmer, so I wrote up a perl script to interact with RTM, and I include lots of options. If you are more comfortable with python, by all means use TheAxeR's script. This is just an alternative.

    Run the script with no arguments to see options.

    Code:
    NAME
            conkyRTM.pl
    
    SYNOPSIS
            conkyRTM.pl -u USER -p PASSWORD
    
    DESCRIPTION
            Perl script to output a user's RTM tasks to Conky
    
            To use this in Conky, put something like this in your .conkyrc:
                ${execpi 3600 perl /path/to/conkyRTM.pl -u USER -p PASS [options]}
    
    ARGUMENTS
            -u USER, --user=USER           Specifies the username to be used for RTM
            -p PASSWORD, --pass=PASSWORD   Specifies the password to be used for RTM
    
    OPTIONS
            -d N, --days=N          Specifies how many days (N) to grab tasks for
            -t, --time              Show time task is due in output
            -e, --estimate          Show task's time estimate in output.
            -y, --priority          Show task's priority in output.
            -l, --location          Show task's location in output.
            --tcolor=COLOR          Specify color for tasks. COLOR can be given as a word,
                                    i.e. blue, as hex, i.e. 0000ff, or as colorN as in Conky
            --hcolor=COLOR          Specify color for day headers. COLOR can be given as a word,
                                    i.e. blue, as hex, i.e. 0000ff, or as colorN as in Conky
            --tindent=N             Specify number of spaces to indent tasks.
            --hindent=N             Specify number of spaces to indent day headers.
            --eindent=N             Specify number of spaces to indent extra task information,
                                    i.e. location, estimate, or priority.
            -r, --alignr            Right-align output in Conky
            -c, --alignc            Center-align output in Conky
            -f FONT, --font=FONT    Specify font to be used for output. FONT should be in one of the
                                    following formats:
                                       --> font_name
                                       --> font_name:size=SIZE
                                       --> :size=SIZE
                                    NOTE: SIZE is an integer
            -n, --not-due           Include tasks without a due date in output
            -o, --overdue           Include overdue tasks
            --include-tags=TAGS     Include only tasks matching specified tags in output. TAGS is a
                                    comma separated list, i.e. tag1,tag2,tag3.
            --ignore-tags=TAGS      Exclude all tasks matching specified tags from output. TAGS is a
                                    comma separated list, i.e. tag1,tag2,tag3.
            --white-lists=LISTS     Include only tasks in specified lists in output. LISTS is a comma
                                    separated list, i.e. list1,list2,list3.
            --black-lists=LISTS     Exclude all tasks in specified lists from output. LISTS is a comma
                                    separated list, i.e. list1,list2,list3.
            --priorities=PRIORITIES Include only tasks matching specified priorities in output.
                                    PRIORITIES is a comma separated list. Valid priorities are
                                    pri1, pri2, pri3, none
            --no-headers            Don't show day headers.
            -l, --location          Show location of tasks in output
            --24-hour               Show due times in 24 hour format
            -h, --help              Print this text and exit
            -m, --man               Print full documentation
    
    AUTHOR
            Michael Stegeman
    
    LICENSE
            This program is free software: you can redistribute it and/or modify
            it under the terms of the GNU General Public License as published by
            the Free Software Foundation, either version 3 of the License, or
            (at your option) any later version.
    
            This program is distributed in the hope that it will be useful,
            but WITHOUT ANY WARRANTY; without even the implied warranty of
            MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
            GNU General Public License for more details.
    
            You should have received a copy of the GNU General Public License
            along with this program.  If not, see <http://www.gnu.org/licenses/>.
    You can always find the newest version of this script here:
    http://github.com/mrstegeman/conkyRTM
    Last edited by MusicMastaMike; October 28th, 2010 at 05:18 AM. Reason: Updated script options

  2. #2
    Join Date
    Nov 2007
    Location
    eastern CT
    Beans
    9
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: Conky Remember the Milk perl script

    I just tried out your script and like the flexibility over using RSS for RTM events. (I didn't want to install Python3 right now and Perl is already there).

    However anytime I try to invoke either black-list or white-list parameters I just get a 'No tasks due.', tags seem to work ok, but I'd rather segregate on the list and not worry about tagging all my entries to get them to show up in particular spots. Specifically I'm using separate lists for home and work related tasks.

    I don't see any obvious issues in the code, but I don't normally do any Perl scripting. Any ideas?

  3. #3
    Join Date
    Apr 2007
    Beans
    122
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Conky Remember the Milk perl script

    Good catch! There was an issue with when I was pushing hashes onto the array while parsing the XML data. It's fixed now. Let me know if you come across anything else.

    The script in the main post has been re-uploaded.

  4. #4
    Join Date
    Nov 2007
    Location
    eastern CT
    Beans
    9
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: Conky Remember the Milk perl script

    Quote Originally Posted by MusicMastaMike View Post
    The script in the main post has been re-uploaded.
    and works quite fine... thank you!!

  5. #5
    Join Date
    Nov 2007
    Location
    eastern CT
    Beans
    9
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: Conky Remember the Milk perl script

    Script working quite nicely, thanks.

    Not really a bug, but a suggestion for an enhancement/tweak. I have a separate section in my conky file for RTM tasks in my inbox - I have my database email tasks to my RTM and this provides me with an efficient heads up when a new task shows up.

    But by default, new tasks in inbox don't have a due date set, therefore when I elect to show tasks with no due date and white-lists=inbox, I get an empty result for tasks due today, then an 'Other Tasks' entry with tasks to file.

    It would just be cleaner if there were a way to elect to display ONLY tasks without a due date, rather than including today tasks by default. See my screenshot (bottom section) for clarification.
    Attached Images Attached Images

  6. #6
    Join Date
    Apr 2007
    Beans
    122
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Conky Remember the Milk perl script

    Quote Originally Posted by cmorse View Post
    Script working quite nicely, thanks.

    Not really a bug, but a suggestion for an enhancement/tweak. I have a separate section in my conky file for RTM tasks in my inbox - I have my database email tasks to my RTM and this provides me with an efficient heads up when a new task shows up.

    But by default, new tasks in inbox don't have a due date set, therefore when I elect to show tasks with no due date and white-lists=inbox, I get an empty result for tasks due today, then an 'Other Tasks' entry with tasks to file.

    It would just be cleaner if there were a way to elect to display ONLY tasks without a due date, rather than including today tasks by default. See my screenshot (bottom section) for clarification.
    Done. Keep the suggestions coming.

    Updated script is in first post.

  7. #7
    Join Date
    Jul 2008
    Location
    Helsinki, Finland
    Beans
    97

    Re: Conky Remember the Milk perl script

    I tried your script and it barfs on scandinavian characters in task names. Everything after the first "odd" character is cut off. For example "Lisää" (meaning "to add") gets shown "Lis".

    I'm not quite sure if this is a problem in your script, conky or RTM.

    Yes, I have "override_utf8_locale yes" and I'm using xft fonts in my .conkyrc.

    If you have any hints, please let me know.

  8. #8
    Join Date
    Apr 2007
    Beans
    122
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Conky Remember the Milk perl script

    Can you try running the script in a terminal (use the same command and options as in your .conkyrc)? Post the output here, please. That will let us see if it's the script or conky.

  9. #9
    Join Date
    Apr 2007
    Beans
    122
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Conky Remember the Milk perl script

    Quote Originally Posted by pauna View Post
    I tried your script and it barfs on scandinavian characters in task names. Everything after the first "odd" character is cut off. For example "Lisää" (meaning "to add") gets shown "Lis".

    I'm not quite sure if this is a problem in your script, conky or RTM.

    Yes, I have "override_utf8_locale yes" and I'm using xft fonts in my .conkyrc.

    If you have any hints, please let me know.
    Ah, forget the last post. I got this fixed, the XML parser wasn't keeping the UTF-8 encoding. New script in first post.

  10. #10
    Join Date
    Jul 2008
    Location
    Helsinki, Finland
    Beans
    97

    Re: Conky Remember the Milk perl script

    Thanks, it works fine now.

Page 1 of 5 123 ... 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
  •