Record daily activity using the Activity logger gem

The Activity Logger gem is used to store short descriptions to a Dynarex file on a daily basis. The previous days are stored in a subdirectory called 'archive'.

require 'activity-logger'

al = ActivityLogger.new
al.create "I'm #testing the activity logger"
al.create "I'm having a salad for #lunch"
al.create "playing darts #recreation"

$ more dynarexdaily.xml
<?xml version='1.0' encoding='UTF-8'?>
<entries>
  <summary>
<date>2013-05-24 13:29:12 +0100</date>
<recordx_type>dynarex</recordx_type>
<format_mask>[!time] [!desc]</format_mask>
<schema>entries[date]/entry(time, desc)</schema>
</summary> <records>
<entry id='1' created='2013-05-24 13:29:12 +0100' last_modified=''>
  <time>2013-05-24 13:29:11 +0100</time>
  <desc>I'm #testing the activity logger</desc>
</entry>
<entry id='2' created='2013-05-24 13:29:13 +0100' last_modified=''>
  <time>2013-05-24 13:29:12 +0100</time>
  <desc>I'm having a salad for #lunch</desc>
</entry>
<entry id='3' created='2013-05-24 13:29:14 +0100' last_modified=''>
  <time>2013-05-24 13:29:13 +0100</time>
  <desc>playing darts #recreation</desc>
</entry>
</records> </entries>
Tags:
Source:
0623hrs.md
Published:
27-03-2014 06:23