<commit_before>const fs = require('fs');
const os = require('os');
const {
  getIndex,
  iterator
} = require('./util');
const exec = require('child_process').exec;
const resetMTime = require('./reset_mtime.js');
const articleJson = './json/article.json';
let oldArticlJsonList;
if (fs.existsSync(articleJson)) {
  oldArticlJsonList = JSON.parse(fs.readFileSync(articleJson));
}


const pushGit = function (cmdList) {
  //const cmdList = ['git pull origin master', 'git add .', 'git commit -am "[update] article"', 'git push origin master'];
  return new Promise(function (resolve) {
    iterator(cmdList, function (item, next, list) {
      exec(item, (error, stdout, stderr) => {
        if (error && os.platform() === 'win32' && !/commit/.test(error)) { //git commit -am "[update] article"的异常可以忽略<commit_msg>[update] article<commit_after>const fs = require('fs');
const os = require('os');
const {
  getIndex,
  iterator
} = require('./util');
const exec = require('child_process').exec;
const resetMTime = require('./reset_mtime.js');
const articleJson = './json/article.json';
let oldArticlJsonList;
if (fs.existsSync(articleJson)) {
  oldArticlJsonList = JSON.parse(fs.readFileSync(articleJson));
  console.log('oldArticlJsonList', oldArticlJsonList)
}


const pushGit = function (cmdList) {
  //const cmdList = ['git pull origin master', 'git add .', 'git commit -am "[update] article"', 'git push origin master'];
  return new Promise(function (resolve) {
    iterator(cmdList, function (item, next, list) {
      exec(item, (error, stdout, stderr) => {
        if (error && os.platform() === 'win32' && !/commit/.test(error)) { //git commit -am "[update] article"的异常可以忽略
{'fraction_non_alphanumeric': 0.17272185824895772, 'fraction_numerical': 0.0023823704586063135, 'mean_word_length': 4.656565656565657, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '733793', 'n_tokens_mistral': 540, 'n_tokens_neox': 542, 'n_words': 140}