[three]Bean

python ansi2html makes taskwarrior fantas(k)tic

Oct 28, 2011 | categories: python, gtd View Comments

Over a year ago, I wrote a python module called ansi2html that takes colored ansi as input and produces colored, formatted html.

With it you can do something like the following:

$ ls --color=always | ansi2html > directory.html
$ sudo tail /var/log/messages | ccze -A | ansi2html > logs.html

Much more recently I discovered taskwarrior, a command line todo list manager that rocks. It features the ability to produce burndown charts of your todos over time.

I use the following in a cronjob to produce an online version of my burndown chart.

$ task burndown | ansi2html | ssh me@web "cat > ~/static/burndown.html"

My regularly-updated chart is hosted on threebean.org.

If you come up with any neat uses for ansi2html, please let me know. I'd love to hear about them.

View Comments

``didit`` -- lightweight CLI task recording

May 05, 2011 | categories: python, gtd View Comments

I wrote and published didit this afternoon. I hope you find it useful for the same reasons I wrote it.

% didit-remember -c work -m 'Wrote `diddit`.  Thank god.'
% didit-remember --message 'Helped L. User parallelize his ``Mathematica`` code.'
% didit-remember -c personal       # <-- This launches `vim` for me!

% didit-report --categories=work,general,personal
Category 'work, general, personal' over timespan 'week'
-------------------------------------------------------

----

2011-05-05:

  - Wrote `diddit`.  Thank god.
  - Helped L. User parallelize his ``Mathematica`` code.
  - Drank a beer.

One of the upshots of using .rst:

% didit-report --category=work > thisweek.rst &amp;&amp; rst2pdf thisweek.rst
View Comments

fpaste to and from clipboard by hotkey in xmonad

Apr 07, 2011 | categories: gtd View Comments

I find that in irc, I'm often selecting some code from vim or some shell output with my mouse, jumping to a browser, loading fpaste.org, pasting the content, clicking submit, selecting the link/copying it, switching back to IRC and finally pasting the link.

Jeez. That's mouse->keyboard->keyboard->mouse->mouse->mouse->keyboard->mouse.

If you have the fpaste cli tool installed (on Fedora) you can do what I did and bind a handy keystroke right next to your bitlyclip binding in your ~/.xmonad/xmonad.hs (or whatever window manager config of your choice).

    ,("C-b", spawn "/usr/bin/bitlyclip")
    ,("C-M-z", spawn "notify-send 'fpasteclip' $(fpaste -i -o)")
    ,("C-M-a", spawn "notify-send 'fpasteclip with python syntax highlighting' $(fpaste -l python -i -o)")

Now with ctrl+alt+z, whatever was in your clipboard has been dumped into fpaste and your clipboard now contains the needed link in one go!

View Comments

bitlyclip - bitly-ify whatevers in your X clipboard

Mar 18, 2011 | categories: python, gtd View Comments

I just wrote and published blityclip. Install it and you can bitly-ify anything in your clipboard.

I have my xmonad config set to rock it:

    ,("C-b", spawn "bitlyclip")
View Comments