<commit_before><!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" type="text/css" href="css/reset.css"/>
<link rel="stylesheet" type="text/css" href="css/style.css"/>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.mustache.js"></script>
<script type="text/javascript" src="js/utils.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script type="text/javascript">

//var gui = require('nw.gui');
//var win = gui.Window.get();
//win.enterFullscreen();

var nodeTmpl;

var state = {
  cur: null
}

function init() {
  nodeTmpl = $("#nodeTmpl").html();
  loadTaskFile("file:///Users/vorg/Dropbox/Tasks/tasks.taskpaper");
  //loadTaskFile("/Users/vorg/Dropbox/Tasks/stuff.taskpaper");

  //Window.enterFullscreen();
}

function loadTaskFile(file) {
  $.get(file, function(data) {
    parseTaskFile(file, data);
  })
}

function createNode(text, classNames) {
  var node = $($.mustache(nodeTmpl, { text : text, className : classNames.join(" ") }));
  node.click(function() {
    selectNode(node);
  })
  //we have to add it to dom so we can measure it's size with CSS applied
  $(".columns").eq(0).append(node);
}

function addNodeAfter() {

}

function parseTaskFile(file, data) {
  var lines = data.split("\n");
  var title = file.substr(file.lastIndexOf("/")+1);
  var container = "";<commit_msg>Edit node on double click<commit_after><!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" type="text/css" href="css/reset.css"/>
<link rel="stylesheet" type="text/css" href="css/style.css"/>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.mustache.js"></script>
<script type="text/javascript" src="js/utils.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script type="text/javascript">

//var gui = require('nw.gui');
//var win = gui.Window.get();
//win.enterFullscreen();

var nodeTmpl;

var state = {
  cur: null
}

function init() {
  nodeTmpl = $("#nodeTmpl").html();
  loadTaskFile("file:///Users/vorg/Dropbox/Tasks/tasks.taskpaper");
  //loadTaskFile("/Users/vorg/Dropbox/Tasks/stuff.taskpaper");

  //Window.enterFullscreen();
}

function loadTaskFile(file) {
  $.get(file, function(data) {
    parseTaskFile(file, data);
  })
}

function createNode(text, classNames) {
  var node = $($.mustache(nodeTmpl, { text : text, className : classNames.join(" ") }));
  node.click(function() {
    selectNode(node);
  });
  node.dblclick(function() {
    editNode(node);
  });
  //we have to add it to dom so we can measure it's size with CSS applied
  $(".columns").eq(0).append(node);
  return node;
}

function addNewNodeAfter(node) {
  var newNode = createNode("", ["item"]);
  newNode.insertAfter(node);
  editNode(newNode);
}

function parseTaskFile(file, data) {
  var lines = data.split("\n");
  var title = file.substr(file.lastIndexOf("/")+1);
  var container = "";
{'fraction_non_alphanumeric': 0.19959745051995975, 'fraction_numerical': 0.0026836632002683663, 'mean_word_length': 4.7678916827853, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, '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': '1613832', 'n_tokens_mistral': 1043, 'n_tokens_neox': 1022, 'n_words': 206}