Introducing the DynarexTags gem

The idea is to collect the tag names froms blog posts into their own files with a reference to the blog post URL.

Given the blog Dynarex file http://www.jamesrobertson.eu/clf/dynarex.xml [jamesrobertson.eu] the DynarexTags gem is called as show in the following example:

require 'dynarex-tags'

DynarexTags.new tags_path='/home/james/clf/tags', category_url='http://www.jamesrobertson.eu/clf/dynarex.xml'

If t he clf/tags directory doesn't exist it is created. Here's the files I observed in the file directory:

address.xml    date.xml          generate.xml     mencoder.xml   perl.xml          scan.xml         tri.xml
adduser.xml    dd.xml            gentoo.xml       midori.xml     php.xml           screencast.xml   ubuntu.xml
add.xml        debian.xml        github.xml       minusy.xml     play.xml          screenshot.xml   update.xml
alsa.xml       debugger.xml      git.xml          mirror.xml     png.xml           screen.xml       usbaudio.xml
apache.xml     default.xml       globbing.xml     mode.xml       pnm.xml           scrot.xml        useradd.xml
aptget.xml     delay.xml         ifconfig.xml     mogrify.xml    presharedkey.xml  select.xml       user.xml
area.xml       dependencies.xml  imagemagick.xml  monitor.xml    psk.xml           server.xml       videotoimages.xml
asterisk.xml   desktop.xml       image.xml        mp3.xml        rackup.xml        session.xml      video.xml
audio.xml      device.xml        increase.xml     mp4.xml        ram.xml           setdate.xml      vim.xml
automate.xml   directory.xml     install.xml      mplayer.xml    raspberrypi.xml   set.xml          vncserver.xml
automatic.xml  download.xml      interactive.xml  multiple.xml   raspiconfig.xml   shutter.xml      vnc.xml
avi.xml        duration.xml      ipaddress.xml    mysqldump.xml  recent.xml        sleep.xml        volume.xml
backup.xml     dynarextags.xml   ipcalc.xml       mysql.xml      record.xml        sound.xml        wav.xml
beep.xml       editor.xml        iptables.xml     netmask.xml    redirect.xml      sox.xml          wc.xml
block.xml      ejabberdctl.xml   ipv4.xml         network.xml    remove.xml        speedup.xml      webcam.xml
builtin.xml    ejabberd.xml      ip.xml           nmap.xml       rename.xml        speed.xml        website.xml
capture.xml    eth0.xml          jabber.xml       nodedown.xml   resolution.xml    sql.xml          whitenoise.xml
check.xml      export.xml        jpg.xml          notes.xml      restart.xml       ssh.xml          wifi.xml
chromium.xml   extension.xml     kiosk.xml        ntpdate.xml    restore.xml       streamer.xml     window.xml
clean.xml      extract.xml       lame.xml         off.xml        rmagick.xml       subnet.xml       wpa_passphrase.xml
compile.xml    ffmpeg.xml        latest.xml       ogginfo.xml    route.xml         sudoers.xml      x11vnc.xml
config.xml     files.xml         links.xml        ogg.xml        rpi.xml           sudo.xml         xml.xml
console.xml    file.xml          linux.xml        oggzmerge.xml  rsync.xml         symbolic.xml     xmpp.xml
convert.xml    firewall.xml      list.xml         ogv.xml        ruby.xml          synchronise.xml  xset.xml
count.xml      force.xml         login.xml        options.xml    rvm.xml           synth.xml        xsltprocs.xml
create.xml     fullscreen.xml    logon.xml        outdated.xml   sane.xml          tempo.xml        xslt.xml
crontab.xml    gateway.xml       ls.xml           output.xml     save.xml          textfile.xml     youtubedl.xml
curl.xml       gcc.xml           lxde.xml         package.xml    scanimage.xml     theora.xml       youtube.xml
c.xml          gedit.xml         meminfo.xml      params.xml     scanner.xml       thumbnail.xml
database.xml   gem.xml           memory.xml       path.xml       scanning.xml      time.xml
 

Here's the file contents for dir ectory.xml:

<?xml version='1.0' encoding='UTF-8'?>
<items>
  <summary>
    <recordx_type>dynarex</recordx_type>
    <format_mask>[!title]  [!url]</format_mask>
    <schema>items/item(title,url)</schema>
  </summary>
  <records>
    <item id='1' created='2012-11-12 13:17:02 +0000' last_modified=''>
      <title>Listing the symbolic links in the current d ... #symbolic #links #ls #list #directory</title>
      <url>http://a0.jamesrobertson.eu/clf/2012/jun/12/listing-the-symbolic-links-in-the-current-d.html</url>
    </item>
    <item id='2' created='2012-11-12 13:17:30 +0000' last_modified=''>
      <title>Return the number of files in a directory  #count #files #ls #directory #wc</title>
      <url>http://jamesrobertson.eu/clf/2011/08/24/1518hrs.html</url>
    </item>
    <item id='3' created='2012-11-12 13:17:31 +0000' last_modified=''>
      <title>Retrieving the most recent file in a directo ... #ls #directory #latest #recent #file</title>
      <url>http://jamesrobertson.eu/clf/2011/08/24/1257hrs.html</url>
    </item>
  </records>
</items>

Tags:
Source:
1256hrs.txt
Published:
14-11-2012 12:56