<commit_before>var CONFIG       = require("./config"),
    request      = require('request'),
    Cheerio      = require('cheerio'),
    nodemailer   = require("nodemailer")
    parser       = require ("./parsers/" + process.argv[2] + ".js")

request(parser.url, function (error, response, body) {
  if (error) {
    return console.log (error)
  }

  if (!error && response.statusCode == 200) {
    if (parser.parse (Cheerio.load(body))) {
      console.log ("Error")
    } else {
      var transporter  = nodemailer.createTransport({
        service: CONFIG.EMAIL_PROVIDER,
        auth: {
          user: CONFIG.EMAIL_USER,
          pass: CONFIG.EMAIL_PASSWORD
        }
      }),
      mailOptions = {               // setup e-mail data with unicode symbols
        from: "Service Watch ✔ <<EMAIL>>", // sender address
        to: CONFIG.ToEmail,             // list of receivers
        subject: parser.name + " is back up",   // Subject line
        text: parser.name + " is back up",               // plaintext body
        html: parser.name + " is back up"                // html body
      };

      // send mail with defined transport object
      transporter.sendMail(mailOptions, function(error, info){
        if (error){
          console.log(error)
        } else {
          console.log("Message sent: " + info.response)
        }
      })<commit_msg>move subject, text and html to common string<commit_after>var CONFIG       = require("./config"),
    request      = require('request'),
    Cheerio      = require('cheerio'),
    nodemailer   = require("nodemailer")
    parser       = require ("./parsers/" + process.argv[2] + ".js")

request(parser.url, function (error, response, body) {
  if (error) {
    return console.log (error)
  }

  if (!error && response.statusCode == 200) {
    if (parser.parse (Cheerio.load(body))) {
      console.log ("Error")
    } else {
      var transporter  = nodemailer.createTransport({
        service: CONFIG.EMAIL_PROVIDER,
        auth: {
          user: CONFIG.EMAIL_USER,
          pass: CONFIG.EMAIL_PASSWORD
        }
      }),
      mail_subject = parser.name + " is back up",
      mailOptions = {               // setup e-mail data with unicode symbols
        from: "Service Watch ✔ <<EMAIL>>", // sender address
        to: CONFIG.ToEmail,             // list of receivers
        subject: mail_subject,   // Subject line
        text: mail_subject,               // plaintext body
        html: mail_subject                // html body
      };

      // send mail with defined transport object
      transporter.sendMail(mailOptions, function(error, info){
        if (error){
          console.log(error)
        } else {
          console.log("Message sent: " + info.response)
        }
      })
{'fraction_non_alphanumeric': 0.1252707581227437, 'fraction_numerical': 0.002888086642599278, 'mean_word_length': 1.8955067920585162, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '6133389', 'n_tokens_mistral': 790, 'n_tokens_neox': 773, 'n_words': 203}