Posts Tagged ‘remind’

My Software Stack 2011 edition

Saturday, December 31st, 2011

I realize that I haven’t written my customary “software stack” post for this year yet. But hey, from where I’m sitting, I still have … 36 minutes to spare ;)

I’ll be using the same categories as last year; system, communications, web, development, office suite, server, organization, and entertainment.

System

The OS of choice is still Archlinux, my window manager is still wmii, my terminal emulator is rxvt-unicode, upgraded by also installing urxvt-tabbedex.

My shell is still bash, my cron daemon is still fcron, and my network manager is wicd.

To this configuration I’ve added the terminal multiplexer tmux, and have lately found out just how useful mc can be. Oh, and qmv from the renameutils package is now a given part of the stack.

Communications

Not much change here, Thunderbird for email, Pidgin for instant messaging, irssi for IRC.

Heybuddy has been replaced by identicurse as my micro-blogging (identi.ca) client. Heybuddy is very nice, but I can use identicurse from the commandline, and it has vim-like bindings.

For Pidgin I use OTR to encrypt conversations. For Thunderbird I use the enigmail addon along with GnuPG.

This means that Thunderbird still hasn’t been replaced by the “mutt-stack” (mutt, msmtp, offlineimap and mairix) and this is mostly due to me not having the energy to learn how to configure mutt.

I also considered trying to replace Pidgin with irssi and bitlbee but Pidgin + OTR works so well, and I have no idea about how well OTR works with bitlbee/irssi (well, actually, I’ve found irssi + OTR to be flaky at best.

Web

Not much changed here either, Firefox dominates, and I haven’t looked further into uzbl although that is still on the TODO list, for some day.

I do some times also use w3m, elinks, wget, curl and perl-libwww.

My Firefox is customized with NoScript, RequestPolicy, some other stuff, and Pentadactyl.

Privoxy is nowadays also part of the loadout, to filter out ads and other undesirable web “resources”.

Development

In this category there has actually been some changes:

  • gvim has been completely dropped
  • eclipse has been dropped, using vim instead
  • mercurial has been replaced by git

Thanks in no small part to my job, I have gotten more intimate knowledge of awk and expect, as well as beginning to learn Perl.

I still do some Python hacking, a whole lot of shell scripting, and for many of these hacks, SQLite is a faithful companion.

Doh! I completely forgot that I’ve been dabbling around with Erlang as well, and that mscgen has been immensely helpful in helping me visualize communication paths between various modules.

“Office suite”

I still use LaTeX for PDF creation (sorry hook, still haven’t gotten around to checking out ConTeXt), I haven’t really used sc at all, it was just too hard to learn the controls, and I had too few spreadsheets in need of creating. I use qalculate almost on a weekly basis, but for shell scripts I’ve started using bc instead.

A potential replacement for sc could be teapot, but again, I usually don’t create spreadsheets…

Server

Since I’ve dropped mercurial, and since the mercurial-server package suddenly stopped working after a system update, I couldn’t be bothered to fix it, and it is now dropped.

screen and irssi is of course always a winning combination.

nginx and uwsgi has not been used to any extent, I haven’t tried setting up a VPN service, but I have a couple of ideas for the coming year (mumble, some VPN service, some nginx + Python/Perl thingies, bitlbee) and maybe replace the Ubuntu installation with Debian.

Organization

I still use both vimwiki and vim outliner, and my Important Dates Notifier script.

Still no TaskJuggler, and I haven’t gotten much use out of abook.

remind has completely replaced when, while I haven’t gotten any use what so ever out of wyrd.

Entertainment

For consuming stuff I use evince (PDF), mplayer (video), while for music, moc has had to step down from the throne, to leave place for mpd and ncmpcpp.

eog along with gthumb (replacing geeqie) handles viewing images.

For manipulation/creation needs I use LaTeX, or possibly Scribus, ffmpeg, audacity, imagemagick, inkscape, and gimp.

Bonus: Security

I thought I’d add another category, security, since I finally have something worthwhile to report here.

I’ve begun encrypting selected parts of my hard drive (mostly my email directory) using EncFS, and I use my passtore script for password management.

And sometimes (this was mostly relevant for when debugging passtore after having begun actively using it) when I have a sensitive file which I for a session need to store on the hard drive, in clear text, I use quixand to create an encrypted directory with a session key only stored in RAM. So once the session has ended, there is little chance of retrieving the key and decrypting the encrypted directory.

Ending notes

That’s about it. Some new stuff, mostly old stuff, only a few things getting kicked off the list. My stack is pretty stable for now. I wonder what cool stuff I will find in 2012 :D

:wq

when versus remind

Sunday, January 30th, 2011

Right off the bat I want to say that both when and remind are excellent pieces of software.

Common to both are that they are CLI applications, light on resources, and store data in plaintext formats.

They differ in syntax and through that they differ somewhat in complexity, and, although unconfirmed, this may also affect their individual capabilities (i.e. the more complex the syntax, the more time to learn it, but the more powerful the expressions).

Of the two I found out about when first, but I can’t for the life of me recall when or where I first read about it. It may very well have been through StumbleUpon.

remind, on the other hand, was recommended to me some time ago by my very good friend bumby.

Comparing their different syntaxes might be the best way of showing off their differences:

We’ll start with something simple, like a notice to remember the fifth of
November:

when syntax:

* 11 5. Remember, remember, the fifth of November

remind syntax:

REM Nov 5 MSG Remember, remember, the fifth of November

Or, let’s say you want to be reminded to celebrate the birth of the Epoch, and know how “old” the Epoch is now.

In when syntax, that would be expressed as:

1970* 1 1, The Epoch is now \a years old

the same expression would, in remind be:

REM Jan 1 MSG The Epoch is now [year(trigdate())-1970] years old

Now, truth be told, I have created an expression in when which I am not sure I could (or as I probably can, how I would do it) in remind:

y=2010 & m>=4 & ((m=11 & d<6) | (m<11)) & (d=1 | d=11 | d=21), #FSCONS2010, #fscons@freenode, 14:00

During the planning of FSCONS 2010, we had meetings at 14:00 hours the 1st, 11th and 21st of every month between April and November. This expression kept me on track.

I guess I can rest assured that bumby will spend all night coming up with the equivalent expression for remind ;)

Since I while back I decided that remind was the right choice for me. What was the killer feature which had me leave when for remind? Well, truth be told, the feature isn’t in remind at all.

The one thing I lacked in when was some sort of graphical “calendaric” view. Sure, in a pinch cal will do the job, but I wanted something more flexible, something more interactive, something more like… calcurse.

The only problem? calcurse stores appointments in a file of its own, in a different format, and even if I had acted on my initial urge to write a converter between the two formats, I would still have been in violation of the DRY-principle.

This problem doesn’t exist with remind, as there exist a software almost identical to calcurse named wyrd, with the one crucial difference: where calcurse store appointments in a format of its own, wyrd operates solely on the files used by remind.

So was it worth it? Switching from a syntax I fully comprehend, to a more complex one which will take me a while to learn? A switch which also meant having to rewrite the Important Dates Notifier-script? In the long term? Yes, it will be worth it. In the long term, complexity will turn into power, as I begin to better understand the syntax, and become able to fully utilize it.

But for anyone with a brain wired like mine (thinking the FSCONS-meeting example above made perfect sense), who can live without any additional power/complexity, I still warmly recommend when. And if you need that power, have a look at remind. It might be just what you need.

:wq

Important Dates Notifier

Saturday, January 29th, 2011

I have never been especially good at remembering dates or appointments. My memory just doesn’t seem constructed to handle things like “on YYYY-MM-DD do X” (peculiarly enough, “on Friday next week, have X done” works much better).

I guess things relative to “now” works better for me (at least in the short term) than some abstract date some time into the future.

Luckily enough, I don’t seem to be the only one suffering from having an “appointment-impaired memory” so others have created calendar applications and what not.

These work great, the one I presently use, remind is awesome. But sometimes it isn’t “intrusive” enough.

There are some appointments/dates that are important enough that I would like for remind to hunt me down an alley and smack me over the head with the notification, as opposed to presenting it to me when I query it for today’s appointments.

So I put together a little shell script which push notifications (the ones I feel are the most important) to me via jabber.

The solution involves cron, remind, grep and a nifty little program called sendxmpp.

This script I have placed on my “laptop-made-server” which coincidentally also happens to be the central mercurial server, through which I synchronize the repositories on my desktop and netbook.

Which means that if I just take care to clone the specific repository containing my remind files to some place local on the server, I could have a cronjob pull and update that repository and it would thus always (as long as I have pushed changes made from the desktop/netbook) have the most up to date files available.

If setting up a repository server seems to big of a hassle, one could of course (at least with remind) have a master ~/.reminders file, which then invokes an INCLUDE expression.

This makes remind look in the specified directory for other files, and in that directory have one file for each computer (along the lines of .rem) and have each individual machine scp (and overwrite) their individual file every now and then.

In any case, once the server have fresh and updated sources of data, all it need do is execute the idn.sh script once every day (preferably early, this will work pretty well as the jabber-server I use caches all messages sent to me while I was offline, so once I log in again, I’ll get the notifications then).

As sendxmpp takes the message from STDIN, recipient-addresses as parameters, and parses a configuration file to divine what account should be used to send the message (I set up a “bot” account to send from, and then just authorized that bot in my primary jabber-account), I see no reason why someone couldn’t modify the script to instead (or in addition) use something like msmtp to send out and email instead.

The script itself, in its current form, is rather straightforward, although I’m sure there are still room for optimizations.

#!/bin/sh
TAGS="#Birthday #ATTENTION"

for t in `echo "$TAGS"`;
do
    rem | grep -i "$t" | while read line;
    do
        echo "$line" | sendxmpp recipient@jabber.example.org
    done
done
exit 0

Relevant parts of my crontab:

0   7   *   *   *       cd /home/patrik/remind-repo; /usr/bin/hg pull -u 2>&1
5   7   *   *   *       cd /home/patrik/idn-repo; /usr/bin/hg pull -u 2>&1
10  7   *   *   *       /bin/bash /home/patrik/bin/idn.sh 2>&1

In /home/patrik I have created symlinks /home/patrik/.remind -> /home/patrik/remind-repo/.remind and /home/patrik/.reminders -> /home/patrik/remind-repo/.reminders

And in /home/patrik/bin/ I have a symlink (idn.sh) to /home/patrik/idn-repo/idn.sh. So in case I change the script, like add a tag to look for or something (ok, that should be moved out to a configuration file, that will be part of the next version) that will be picked up as well, before the notifications goes out.

And that’s about it. Risk of forgetting something important: mitigated.

:wq

My software stack revisited – Organizing

Monday, December 27th, 2010

Back in the original post, I don’t think I actually had this category at all. In fact, I do believe all the applications I am about to list in this post are additions to my stack.

Knowledge management

Knowledge is power. But only if you have that knowledge accessible and stored in a fashion which makes the retrieval of the relevant parts of it both simple and timely.

This is more true the more knowledge you accumulate.

For storing growing amounts of knowledge, I have come to find a wiki the best alternative. It does require some initial thinking, about how to structure the information being saved within it, but in my experience the benefits outweigh the work. Simply think of it as an investment.

Some of the knowledge I collect is pure information which no one but me should have access to, so I didn’t especially like the idea of putting the stuff into a web-based wiki. And that’s where desktop wikis comes into relevancy.

I tried out Zim, a GUI-centric desktop wiki. It works great, and I do recommend it. And it is as lightweight as they come. But… that was before I realized there is a Vim plugin: VimWiki.

Outlining

For some reason I find it much easier to break down problems into smaller pieces if I use software (or hardware, pen and paper FTW), than if I do it in my head.

Whatever the reason for this is, I have found a friend in another Vim plugin: VimOutliner. One of the tasks that VimOutliner helped me split into smaller pieces, and organize? This series of posts.

Calendar

Like with the knowledge management (and Zim), I have already managed to iterate through a solution, which consisted of the CLI-based cal, which just prints out a simple three month view (previous, current, next) and should be included by default in most if not all GNU/Linux distributions, when which is a script that parse a file filled with rule-based constraints, all detailing dates, or ranges of dates, when things happen.

when is an excellent piece of software, and if you can take the syntax (me, being a programmer, found it quite straightforward) but I began feeling a lack of putting it all in context easily when adding new dates (specifically if I already had appointments on a specific date, and what dates would possibly be better).

Which made me try out calcurse. Not to replace when, but to complement it. Sadly neither when, nor calcurse, saves date/appointment data in a format which the other recognize. In fact, both save in a format only they themselves understand. This made synchronizing between the two inefficient.

I said that when is excellent. I also said that I’d iterated through a solution, which means I am no longer using when. And I wouldn’t replace an excellent piece of software with a mediocre one, so whatever I replaced when with, would need to be at least as good as when, but without the drawbacks.

Enter bumby who came along and urged me to try remind which does the exact same thing as when, but with a different syntax. But remind has one big advantage. There is another program, wyrd, which is to remind what calcurse was to when, with one difference: wyrd doesn’t save appointments in a format of its own. It is just a wrapper around reminds appointment files.

All these files, whether from when, calcurse or remind, are of course all plaintext.

Contacts

Finally, comes an address book, simply named abook. It is an ncurses-based lightweight little application for storing and viewing contact information about people.

Thunderbird provides the same thing, so some duplication of effort / breaking of DRY is occurring here, but I feel it justified as I could fetch relevant information from abook, and be on my way contacting the person, before Thunderbird has loaded and come into a usable state.

The next post will be focusing on the largest single change to have been implemented since the original post: the addition of a server.

:wq