<commit_before>const jsdom = require('jsdom');
const req = require('request');
const _ = require('lodash');
const jquery = require('../dongnelibrary_util.js').getJqueryString();
const getLibraryNames = require('../dongnelibrary_util.js').getLibraryNames;
const global = {};

const libraryList = [
  {code: 'CK', name: '중원어린이도서관'},
  {code: 'MA', name: '성남시중앙도서관'},
  {code: 'MB', name: '분당도서관'},
  {code: 'MG', name: '구미도서관'},
  {code: 'MH', name: '해오름도서관'},
  {code: 'MJ', name: '중원도서관'},
  {code: 'MM', name: '무지개도서관'},
  {code: 'MP', name: '판교도서관'},
  {code: 'MS', name: '수정도서관'},
  {code: 'MU', name: '운중도서관'},
  {code: 'MV', name: '서현도서관'},
  {code: 'PK', name: '판교어린이도서관'}
];

function getLibraryCode(libraryName) {
  const found = _.find(libraryList, function (lib) {
    return lib.name === libraryName;
  });

  if (found) {
    return found.code;
  }
  return '';
}

function isRented(str) {
  return !!str.indexOf('대출가능');
}

function makeJsdomCallback(libraryName, getBook) {
  return function(errors, window) {
    const booklist = [];
    const $ = window.$;
    const totalBookCount = parseInt($('#searchForm > p > strong.themeFC').text().trim(), 10);
    const $a = $('#searchForm > ul > li');
    console.log($a.length);
    _.each($a, function (value) {
      const $value = $(value);
      console.log($value.text());
      booklist.push({
        libraryName: libraryName,
        title: $value.find('dl > dt > a').text().trim(),
        exist: !isRented($value.find('.bookStateBar .emp8').text().trim())
      });
    });

    if (getBook) {
      getBook(null, {
        totalBookCount: totalBookCount || booklist.length,
        booklist: booklist
      });
    }
    window.close();
  }
}
<commit_msg>remove log message of snlib<commit_after>const jsdom = require('jsdom');
const req = require('request');
const _ = require('lodash');
const jquery = require('../dongnelibrary_util.js').getJqueryString();
const getLibraryNames = require('../dongnelibrary_util.js').getLibraryNames;
const global = {};

const libraryList = [
  {code: 'CK', name: '중원어린이도서관'},
  {code: 'MA', name: '성남시중앙도서관'},
  {code: 'MB', name: '분당도서관'},
  {code: 'MG', name: '구미도서관'},
  {code: 'MH', name: '해오름도서관'},
  {code: 'MJ', name: '중원도서관'},
  {code: 'MM', name: '무지개도서관'},
  {code: 'MP', name: '판교도서관'},
  {code: 'MS', name: '수정도서관'},
  {code: 'MU', name: '운중도서관'},
  {code: 'MV', name: '서현도서관'},
  {code: 'PK', name: '판교어린이도서관'}
];

function getLibraryCode(libraryName) {
  const found = _.find(libraryList, function (lib) {
    return lib.name === libraryName;
  });

  if (found) {
    return found.code;
  }
  return '';
}

function isRented(str) {
  return !!str.indexOf('대출가능');
}

function makeJsdomCallback(libraryName, getBook) {
  return function(errors, window) {
    const booklist = [];
    const $ = window.$;
    const totalBookCount = parseInt($('#searchForm > p > strong.themeFC').text().trim(), 10);
    const $a = $('#searchForm > ul > li');
    _.each($a, function (value) {
      const $value = $(value);
      booklist.push({
        libraryName: libraryName,
        title: $value.find('dl > dt > a').text().trim(),
        exist: !isRented($value.find('.bookStateBar .emp8').text().trim())
      });
    });

    if (getBook) {
      getBook(null, {
        totalBookCount: totalBookCount || booklist.length,
        booklist: booklist
      });
    }
    window.close();
  }
}

{'fraction_non_alphanumeric': 0.2039976484420929, 'fraction_numerical': 0.001763668430335097, 'mean_word_length': 3.4953764861294583, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '3178100', 'n_tokens_mistral': 1288, 'n_tokens_neox': 1401, 'n_words': 268}