<commit_before>#include <hobbes/util/str.H>

#include "path.H"

namespace hog {

std::string instantiateDir(const std::string& groupName, const std::string& dir) {
  // instantiate group name
  std::string x = hobbes::str::replace<char>(dir, "$GROUP", groupName);

  // instantiate date
  time_t now = ::time(0);
  if (const tm* t = localtime(&now)) {
    std::ostringstream ss;
    ss << t->tm_year + 1900 << "." << (t->tm_mon < 10 ? "0" : "") << t->tm_mon + 1 << "." << (t->tm_mday < 10 ? "0" : "") << t->tm_mday;
    x = hobbes::str::replace<char>(x, "$DATE", ss.str());
  }

  // that's all we will substitute
  return x;
}

}
<commit_msg>fix formatting the month in slog file directory (#176)<commit_after>#include <hobbes/util/str.H>

#include "path.H"

namespace hog {

std::string instantiateDir(const std::string& groupName, const std::string& dir) {
  // instantiate group name
  std::string x = hobbes::str::replace<char>(dir, "$GROUP", groupName);

  // instantiate date
  time_t now = ::time(0);
  if (const tm* t = localtime(&now)) {
    std::ostringstream ss;
    ss << t->tm_year + 1900 << "." << (t->tm_mon < 9 ? "0" : "") << t->tm_mon + 1 << "." << (t->tm_mday < 10 ? "0" : "") << t->tm_mday;
    x = hobbes::str::replace<char>(x, "$DATE", ss.str());
  }

  // that's all we will substitute
  return x;
}

}

{'fraction_non_alphanumeric': 0.21342383107088989, 'fraction_numerical': 0.0196078431372549, 'mean_word_length': 3.5916955017301038, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 19, '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': '5580674', 'n_tokens_mistral': 535, 'n_tokens_neox': 491, 'n_words': 120}