<commit_before>#! /usr/bin/env python2

def searchByTag():
  file = open("/Users/mb/.config/alot/search.txt", "r")
  s = file.read()
  file.close()
  ui.apply_commandline(s)
<commit_msg>added hook to fetch mails via offlineimap<commit_after>#! /usr/bin/env python2

import logging
import subprocess

def searchByTag():
  file = open("/Users/mb/.config/alot/search.txt", "r")
  s = file.read()
  file.close()
  ui.apply_commandline(s)

def pre_global_refresh(**kwargs):
  logging.info('Syncing mail with offlineimap')
  ui.notify("fetchinig email..")  
  subprocess.call("offlineimap -o".split(),stdout=subprocess.PIPE,stderr=subprocess.PIPE)

{'fraction_non_alphanumeric': 0.16199376947040497, 'fraction_numerical': 0.003115264797507788, 'mean_word_length': 4.741071428571429, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '655592', 'n_tokens_mistral': 237, 'n_tokens_neox': 233, 'n_words': 44}