Joe Rosato on 7 Jan 2016 10:36:29 -0800

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PLUG] Programming help

I really liked the talk last night that Mark gave, very informative well presented. Though not a programmer I do get excited when I can write something in as few lines of code as possible, be it scripting, python, perl, or cobol. (OK.. forget cobol).

So in light of last night I figured I would try this with python/hashes.. I tried this a while back and was too busy at work to think straight and pissed at myself that it was turning into a tortured bash script where you opt for speed over elegance just to get the job done. I plan to take my time to do it RIGHT, not kludgy.

Small background on the topic. I have been using Hamster to track my time at work, it is simple and clean. Has a gui, command line (hamster-cli) and a tiny database. Exports to a interactive web page to analyze your time usage. I use google tasks on my phone and wanted to find a way to add those tasks to Hamster without typing them in again. GOAL= I add some tasks on my phone the night before, and in the morning they are already inside Hamster for me to track my time.

I found which allows me to puke out my google task lists to a file. The output format is well structured and I just need to write something to parse it and get it into Hamster via hamster-cli. (incidentally the documentation is poor - I just use ' -l --nocolor' to create my output file - nothing more.) I attached the file and changed some personal info but not the format.

1. Hamster does not accept 'future' dates since it is not a task manager but a time tracker. I figured I would have it add my tasks to the day before at odd hours like 1am, 2am, 3am, etc.. (as if already started/completed) and then and I can redo the times in the morning.
2. Indents matter in the attached file, there are sub-tasks

What do I want to parse and where do I want it to go?
Google Tasks   -->   Hamster
  List                -->    tag
  Task             -->    activity (with the above tag)
  Notes           -->   Notes
  Due Date      ---->   ehh, I'll figure that out later

Give me your thoughts! For those part of the Triangle discussion last night - I figured it out! Only sent it to Walt so as to not spill the beans for others.

Joe Rosato

NB: Am I shamelessly using the PLUG list to forward my own agenda? Yes.

Philadelphia Linux Users Group         --
Announcements -
General Discussion  --