<commit_before>var Table = require("le-table")
  , Couleurs = require("couleurs")
  , Overlap = require("overlap")
  , Stream = require("../api/stream")
  , Utils = require(CONFIG.root + "/lib/utils")
  ;

// Set default marks
Table.defaults.marks = {
    nw: "┌"
  , n:  "─"
  , ne: "┐"
  , e:  "│"
  , se: "┘"
  , s:  "─"
  , sw: "└"
  , w:  "│"
  , b: " "
  , mt: "┬"
  , ml: "├"
  , mr: "┤"
  , mb: "┴"
  , mm: "┼"
};

module.exports = function (callback) {
    Stream(function (err, data) {
        if (err) { return callback(err); }

        var timeline = new Table();
        timeline.addRow(["#", {
            text: "Type"
          , data: {
                width: 8
              , hAlign: "center"
            }
        }, "Description", {
            text: "Time"
          , data: {
                width: 18
            }
        }]);

        var offsetTop = 10
          , show =  Math.floor((CONFIG.cli.h - offsetTop - 3) / 2) - 1
          ;

        if (show > data.length) {
            show = data.length;
        }

        for (var i = 0; i < show; ++i) {
            var cEv = data[i];

            timeline.addRow([{
                text: i + 1
              , data: {
                    vAlign: "middle"
                  , width: 6
                }
            }, {
                text: cEv.icon
              , data: {
                    hAlign: "center"
                  , vAlign: "middle"
                }
            }, {
                text: cEv.description
              , data: {
                    vAlign: "middle"
                }
            }, {
                text: cEv.time
              , data: {
                    vAlign: "middle"
                  , width: 18
                }
            }]);
        }

        var cTimeline = timeline.toString()
          , output = Overlap({
                who: CONFIG.background.toString()
              , with: cTimeline
              , where: {
                    x: CONFIG.cli.w / 2 - cTimeline.split("\n")[0].length / 2
                  , y: 10
                }
            })
          ;

        output = Utils.overlapCenter(output, [
            "GitHub client for Command Line Interface"
          , " - - - "
          , "</> with <3 by @IonicaBizau"
        ], 2);
        console.log(output.trim());
    });
};<commit_msg>Added top menu<commit_after>var Table = require("le-table")
  , Couleurs = require("couleurs")
  , Overlap = require("overlap")
  , Stream = require("../api/stream")
  , Utils = require(CONFIG.root + "/lib/utils")
  ;

// Set default marks
Table.defaults.marks = {
    nw: "┌"
  , n:  "─"
  , ne: "┐"
  , e:  "│"
  , se: "┘"
  , s:  "─"
  , sw: "└"
  , w:  "│"
  , b: " "
  , mt: "┬"
  , ml: "├"
  , mr: "┤"
  , mb: "┴"
  , mm: "┼"
};

module.exports = function (callback) {
    Stream(function (err, data) {
        if (err) { return callback(err); }

        var timeline = new Table();
        timeline.addRow(["#", {
            text: "Type"
          , data: {
                width: 8
              , hAlign: "center"
            }
        }, "Description", {
            text: "Time"
          , data: {
                width: 18
            }
        }]);

        var offsetTop = 10
          , show =  Math.floor((CONFIG.cli.h - offsetTop - 3) / 2) - 1
          ;

        if (show > data.length) {
            show = data.length;
        }

        for (var i = 0; i < show; ++i) {
            var cEv = data[i];

            timeline.addRow([{
                text: i + 1
              , data: {
                    vAlign: "middle"
                  , width: 6
                }
            }, {
                text: cEv.icon
              , data: {
                    hAlign: "center"
                  , vAlign: "middle"
                }
            }, {
                text: cEv.description
              , data: {
                    vAlign: "middle"
                }
            }, {
                text: cEv.time
              , data: {
                    vAlign: "middle"
                  , width: 18
                }
            }]);
        }

        var cTimeline = timeline.toString()
          , output = Overlap({
                who: CONFIG.background.toString()
              , with: cTimeline
              , where: {
                    x: CONFIG.cli.w / 2 - cTimeline.split("\n")[0].length / 2
                  , y: 10
                }
            })
          ;

        output = Utils.overlapCenter(output, [
            "GitHub client for Command Line Interface"
          , " - - - "
          , "</> with <3 by @IonicaBizau"
          , ""
          , "-----------------------------------------------------------------"
          , "(C)reate new repository | (P)rofile | (I)ssues | Pull (R)equests"
          , "-----------------------------------------------------------------"
        ], 2);
        console.log(output.trim());
    });
};
{'fraction_non_alphanumeric': 0.17408084501320334, 'fraction_numerical': 0.008125126955108674, 'mean_word_length': 0.9264475743348983, 'pattern_counts': {'":': 0, '<': 9, '<?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': '3899623', 'n_tokens_mistral': 1572, 'n_tokens_neox': 1481, 'n_words': 317}