<commit_before>#!/usr/bin/python
# coding: utf-8

import os, os.path
import subprocess

from backup.archive import Archive
from backup.database import DB, DBError
from backup.filesystem import FS, FSError
from backup.source.wordpress import WP, WPError
from backup.target.s3 import S3, S3Error
from backup.utils import timestamp

def sendReport(mailto, mailfrom, reporters):
  from email.mime.text import MIMEText

  mail = MIMEText("\n\n".join([reporter.report() for reporter in reporters]))

  mail['Subject'] = "[WPBACKUP] Archive %s of Wordpress Blog '%s'" % (archive.name, wordpress.title)
  mail['From'] = mailfrom
  mail['To'] = mailto

  p = subprocess.Popen(["/usr/sbin/sendmail", "-oi", "-t"], stdin=subprocess.PIPE)<commit_msg>added missing import<commit_after>#!/usr/bin/python
# coding: utf-8

import sys, os, os.path
import subprocess

from backup.archive import Archive
from backup.database import DB, DBError
from backup.filesystem import FS, FSError
from backup.source.wordpress import WP, WPError
from backup.target.s3 import S3, S3Error
from backup.utils import timestamp

def sendReport(mailto, mailfrom, reporters):
  from email.mime.text import MIMEText

  mail = MIMEText("\n\n".join([reporter.report() for reporter in reporters]))

  mail['Subject'] = "[WPBACKUP] Archive %s of Wordpress Blog '%s'" % (archive.name, wordpress.title)
  mail['From'] = mailfrom
  mail['To'] = mailto

  p = subprocess.Popen(["/usr/sbin/sendmail", "-oi", "-t"], stdin=subprocess.PIPE)
{'fraction_non_alphanumeric': 0.13239247311827956, 'fraction_numerical': 0.005376344086021506, 'mean_word_length': 5.0528455284552845, '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': '2426205', 'n_tokens_mistral': 493, 'n_tokens_neox': 475, 'n_words': 140}