Files in the top-level directory from the latest check-in
Haskerdeux - A Simple Command Line Client for Teuxdeux in Haskell
Written with the dual purpose of being a learning exercise for Haskell and also because I really wanted a command line tool for Teuxdeux. As it stands this is a bit rough and ready, but it does work.
It used to use Network.Curl, but I can't get that to work anymore so I'm doing straight system calls to curl which means it's not very Haskelly and ultimately a bit of a pointless use of Haskell, but it's for me, so there.
Alive! Official status is "Messy and works for me, unlikely to improve"; It was dead for years because I didn't think it was possible to get the new API to work.
You need the following Haskell packages installed:
I also suggest you compile it to use it - it's much faster to use that way.
ghc --make haskerdeux.hs. If you don't compile it then replace
./haskerdeux in the examples below with
Haskerdeux works in the following way:
haskerdeux <date> <number / command> <other args>
I.e. the date supplied is the date the commands act on. It understands "today", "tomorrow", "mon", "tues", etc and dates in "YYYY-MM-DD" format. All commands recognise and require a date.
<number / command> bit is because I did something because I could, not
necessarily because I should. It's best understood by reading through the
following commands (and makes more sense when you use it)
For listing todos only (as that is all I want to see)
haskerdeux today todos
haskerdeux tomorrow todos
haskerdeux wed todos
haskerdeux 2017-02-28 todos
This returns a numbered list, like so:
0 - Write README for Haskerdeux
1 - Write Blog post about Haskerdeux
2 - Split development work in different branch
3 - Perhaps do some actual work you are paid to do
You can use those numbers with the PutOff and CrossOff commands, etc.
For creating new tasks
haskerdeux today new "<A todo item for today>"
haskerdeux tomorrow new "<A todo item for tomorrow>"
For putting off a task until the next day. This is where the
command> bit comes in. Rather than have a consistent order of arguments of
command and then other stuff it takes the number of the todo it's
acting on before the command:
haskerdeux today <tasknumber from todos list> putoff
haskerdeux today 3 putoff
I.e. you pick the day you are looking at, then the todo and then what you want to do to it.
For moving a task to another date.
haskerdeux today <tasknumber from todos list> moveto <date in YYYY:MM:DD>
haskerdeux today 11 moveto 2012-09-01
For marking a task as complete
haskerdeux today <tasknumber from todos list> crossoff
For completely removing a task
haskerdeux today <tasknumber from todos list> delete
Using .netrc For Storing Username and Password
It's compulsory. It used to support passing username/password as command line
args, but no more. The
<password> are read from
Just add an entry to
.netrc as follows:
Or the single line format:
machine teuxdeux.com loging superprocrastinator password mysecretpassword
It should work ok with either format. It won't work if you have spaces in your password though.
Some resources that helped me figure this out: