<commit_before>var select;
var exec = require('child_process').execSync;

module.exports = {
    // Extend ebook resources and html
    book: {
        assets: "./book",
        js: [
            "plugin.js"
        ],
        css: [
            "test.css"
        ],
        html: {
            "html:start": function() {
                return "<!-- Start book "+this.options.title+" -->"
            },
            "html:end": function() {
                return "<!-- End of book "+this.options.title+" -->"
            },

            "head:start": "<!-- head:start -->",
            "head:end": "<!-- head:end -->",

            "body:start": "<!-- body:start -->",
            "body:end": "<!-- body:end -->"
        }
    },

    // Hook process during build
    hooks: {
        // For all the hooks, this represent the current generator

        // This is called before the book is generated
        "init": function() {
            console.log("gogo init!");
        },

        // This is called after the book generation
        "finish": function() {
            console.log("gogo finish!");
        },

        page: function (page) {
            return page;
        },

        "page:after": function (page) {
            /** system must be Unix-like and install git  **/

            //get current branch
            var current = exec("git branch | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'").toString();
            var invisible_div = '<div id="current-branch" style="display: none">' + current + '</div>';

            //get all branch from remote
            var command = "git ls-remote | awk '{print $2}' | awk 'BEGIN {FS=\"/\"} $2==\"heads\" {print $3}'"
            var result = exec(command).toString();
            var branches = result.split('\n');
            var buttons = '';
            for (var i in branches) {
                var branch = branches[i];
                if (branch.length > 0) {
                    branch = branch.replace('*', '').trim();
                    buttons += '<button class="button zk-branch-plugin ' + branch + '">' + branch + '</button>';
                }
            }
            var dropdown = '<div class="dropdown pull-left">' +
                '<a href="#" class="btn toggle-dropdown" aria-label="Toggle share dropdown"><i class="fa fa-file-text"></i> choose branch</a>' +
                '<div class="dropdown-menu font-settings dropdown-left">' +
                    '<div class="dropdown-caret">' +
                        '<span class="caret-outer"></span>' +
                        '<span class="caret-inner"></span>' +<commit_msg>fix typo<commit_after>var select;
var exec = require('child_process').execSync;

module.exports = {
    // Extend ebook resources and html
    book: {
        assets: "./book",
        js: [
            "plugin.js"
        ],
        html: {
            "html:start": function() {
                return "<!-- Start book "+this.options.title+" -->"
            },
            "html:end": function() {
                return "<!-- End of book "+this.options.title+" -->"
            },

            "head:start": "<!-- head:start -->",
            "head:end": "<!-- head:end -->",

            "body:start": "<!-- body:start -->",
            "body:end": "<!-- body:end -->"
        }
    },

    // Hook process during build
    hooks: {
        // For all the hooks, this represent the current generator

        // This is called before the book is generated
        "init": function() {
            console.log("gogo init!");
        },

        // This is called after the book generation
        "finish": function() {
            console.log("gogo finish!");
        },

        page: function (page) {
            return page;
        },

        "page:after": function (page) {
            /** system must be Unix-like and install git  **/

            //get current branch
            var current = exec("git branch | sed -e '/^[^*]/d' -e 's/* \\(.*\\)/\\1/'").toString();
            var invisible_div = '<div id="current-branch" style="display: none">' + current + '</div>';

            //get all branch from remote
            var command = "git ls-remote | awk '{print $2}' | awk 'BEGIN {FS=\"/\"} $2==\"heads\" {print $3}'"
            var result = exec(command).toString();
            var branches = result.split('\n');
            var buttons = '';
            for (var i in branches) {
                var branch = branches[i];
                if (branch.length > 0) {
                    branch = branch.replace('*', '').trim();
                    buttons += '<button class="button zk-branch-plugin ' + branch + '">' + branch + '</button>';
                }
            }
            var dropdown = '<div class="dropdown pull-left">' +
                '<a href="#" class="btn toggle-dropdown" aria-label="Toggle share dropdown"><i class="fa fa-file-text"></i> choose branch</a>' +
                '<div class="dropdown-menu font-settings dropdown-left">' +
                    '<div class="dropdown-caret">' +
                        '<span class="caret-outer"></span>' +
                        '<span class="caret-inner"></span>' +
{'fraction_non_alphanumeric': 0.175934896337919, 'fraction_numerical': 0.001937608990505716, 'mean_word_length': 1.5058252427184466, 'pattern_counts': {'":': 18, '<': 45, '<?xml version=': 0, '>': 47, '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': '2662556', 'n_tokens_mistral': 1401, 'n_tokens_neox': 1353, 'n_words': 371}