<commit_before>import os

from __reader import Reader

class AdhocReader(Reader):
    def read(self):
        try:
            self.store(os.popen('acpi').read())   
        except Exception, e:
            print 'error reading'
            print e<commit_msg>adhoc test for sending message in syslog format<commit_after>import time
import os
import socket

from __reader import Reader

class AdhocReader(Reader):
    def read(self):
        try:
            date = time.strftime("%b %d %H:%M:%S")
            msg = "<14>%s %s pycollector: %s" % (date, socket.gethostname(), os.popen('acpi').read())
            self.store(msg)
            return True
        except Exception, e:
            print 'error reading'
            print e
            return False
{'fraction_non_alphanumeric': 0.10540184453227931, 'fraction_numerical': 0.002635046113306983, 'mean_word_length': 2.1147540983606556, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5616191', 'n_tokens_mistral': 221, 'n_tokens_neox': 216, 'n_words': 66}