Clone of the diary shell script to ruby, with backward compatibility and additional functionality