Introducing the OMAH Plugin Taxonomy Gem


require 'dummy_omah'
require 'omah-plugin-taxonomy'

a = [
      ['001', '', '',\
      'test 200','2015-may-26 08:55','just a quick test',\
      '<p>just a quick test</p>',[]]

plugins = {
  Taxonomy: {lookupfile: '/tmp/filter-list.txt'}

dummy = filepath: '/tmp', plugins: plugins
dummy.fetch_email a

In the above example the omah-plugin-taxonomy gem is tested with the dummy_omah gem to tag a message as priority by matching the recipient email address with the from address found in the filter-list.txt file.

lookupfile: (filter-list.txt):

<?dynarex schema="filter[title, description]/item(from, subject, tags)"?>
title: Email taxonomy filter list
description: Pattern matches for associating email message with tags

tags: priority

tags: jobs