mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-17 11:38:32 +02:00
Updated docs from master
This commit is contained in:
parent
f4344c8793
commit
73f50a40cd
59 changed files with 720 additions and 840 deletions
BIN
.Makefile.swp
Normal file
BIN
.Makefile.swp
Normal file
Binary file not shown.
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* Sphinx stylesheet -- basic theme.
|
* Sphinx stylesheet -- basic theme.
|
||||||
*
|
*
|
||||||
* :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
|
* :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
|
||||||
* :license: BSD, see LICENSE for details.
|
* :license: BSD, see LICENSE for details.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -89,6 +89,7 @@ div.sphinxsidebar #searchbox input[type="submit"] {
|
||||||
|
|
||||||
img {
|
img {
|
||||||
border: 0;
|
border: 0;
|
||||||
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -- search page ----------------------------------------------------------- */
|
/* -- search page ----------------------------------------------------------- */
|
||||||
|
@ -401,10 +402,6 @@ dl.glossary dt {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.refcount {
|
|
||||||
color: #060;
|
|
||||||
}
|
|
||||||
|
|
||||||
.optional {
|
.optional {
|
||||||
font-size: 1.3em;
|
font-size: 1.3em;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* Sphinx JavaScript utilities for all documentation.
|
* Sphinx JavaScript utilities for all documentation.
|
||||||
*
|
*
|
||||||
* :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
|
* :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
|
||||||
* :license: BSD, see LICENSE for details.
|
* :license: BSD, see LICENSE for details.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -32,7 +32,7 @@ if (!window.console || !console.firebug) {
|
||||||
*/
|
*/
|
||||||
jQuery.urldecode = function(x) {
|
jQuery.urldecode = function(x) {
|
||||||
return decodeURIComponent(x).replace(/\+/g, ' ');
|
return decodeURIComponent(x).replace(/\+/g, ' ');
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* small helper function to urlencode strings
|
* small helper function to urlencode strings
|
||||||
|
@ -61,18 +61,6 @@ jQuery.getQueryParameters = function(s) {
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* small function to check if an array contains
|
|
||||||
* a given item.
|
|
||||||
*/
|
|
||||||
jQuery.contains = function(arr, item) {
|
|
||||||
for (var i = 0; i < arr.length; i++) {
|
|
||||||
if (arr[i] == item)
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* highlight a given string on a jquery object by wrapping it in
|
* highlight a given string on a jquery object by wrapping it in
|
||||||
* span elements with the given class name.
|
* span elements with the given class name.
|
||||||
|
@ -180,6 +168,9 @@ var Documentation = {
|
||||||
var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : [];
|
var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : [];
|
||||||
if (terms.length) {
|
if (terms.length) {
|
||||||
var body = $('div.body');
|
var body = $('div.body');
|
||||||
|
if (!body.length) {
|
||||||
|
body = $('body');
|
||||||
|
}
|
||||||
window.setTimeout(function() {
|
window.setTimeout(function() {
|
||||||
$.each(terms, function() {
|
$.each(terms, function() {
|
||||||
body.highlightText(this.toLowerCase(), 'highlighted');
|
body.highlightText(this.toLowerCase(), 'highlighted');
|
||||||
|
|
156
_static/jquery.js
vendored
156
_static/jquery.js
vendored
File diff suppressed because one or more lines are too long
|
@ -11,8 +11,6 @@ var phrases = [
|
||||||
var args = document.getElementById("args");
|
var args = document.getElementById("args");
|
||||||
var input = document.getElementById("input");
|
var input = document.getElementById("input");
|
||||||
var output = document.getElementById("output");
|
var output = document.getElementById("output");
|
||||||
var right = document.getElementById("right");
|
|
||||||
var left = document.getElementById("left");
|
|
||||||
var current = 0
|
var current = 0
|
||||||
var timer = null;
|
var timer = null;
|
||||||
var fadeInTimer = null;
|
var fadeInTimer = null;
|
||||||
|
@ -49,8 +47,6 @@ var reveal = function(idx) {
|
||||||
var s1 = function() {unletter(old_args_text, args, s2);}
|
var s1 = function() {unletter(old_args_text, args, s2);}
|
||||||
var s0 = function() {unletter(old_input_text, input, s1);}
|
var s0 = function() {unletter(old_input_text, input, s1);}
|
||||||
fadeOut(old_output_text, output, s0, 10);
|
fadeOut(old_output_text, output, s0, 10);
|
||||||
// letter(input_text, input);
|
|
||||||
// output.innerHTML = output_text;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var fadeIn = function(text, element, next, step) {
|
var fadeIn = function(text, element, next, step) {
|
||||||
|
|
|
@ -4,38 +4,11 @@
|
||||||
*
|
*
|
||||||
* Sphinx JavaScript utilties for the full-text search.
|
* Sphinx JavaScript utilties for the full-text search.
|
||||||
*
|
*
|
||||||
* :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
|
* :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
|
||||||
* :license: BSD, see LICENSE for details.
|
* :license: BSD, see LICENSE for details.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
|
||||||
* helper function to return a node containing the
|
|
||||||
* search summary for a given text. keywords is a list
|
|
||||||
* of stemmed words, hlwords is the list of normal, unstemmed
|
|
||||||
* words. the first one is used to find the occurance, the
|
|
||||||
* latter for highlighting it.
|
|
||||||
*/
|
|
||||||
|
|
||||||
jQuery.makeSearchSummary = function(text, keywords, hlwords) {
|
|
||||||
var textLower = text.toLowerCase();
|
|
||||||
var start = 0;
|
|
||||||
$.each(keywords, function() {
|
|
||||||
var i = textLower.indexOf(this.toLowerCase());
|
|
||||||
if (i > -1)
|
|
||||||
start = i;
|
|
||||||
});
|
|
||||||
start = Math.max(start - 120, 0);
|
|
||||||
var excerpt = ((start > 0) ? '...' : '') +
|
|
||||||
$.trim(text.substr(start, 240)) +
|
|
||||||
((start + 240 - text.length) ? '...' : '');
|
|
||||||
var rv = $('<div class="context"></div>').text(excerpt);
|
|
||||||
$.each(hlwords, function() {
|
|
||||||
rv = rv.highlightText(this, 'highlighted');
|
|
||||||
});
|
|
||||||
return rv;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Porter Stemmer
|
* Porter Stemmer
|
||||||
|
@ -220,6 +193,38 @@ var Stemmer = function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Simple result scoring code.
|
||||||
|
*/
|
||||||
|
var Scorer = {
|
||||||
|
// Implement the following function to further tweak the score for each result
|
||||||
|
// The function takes a result array [filename, title, anchor, descr, score]
|
||||||
|
// and returns the new score.
|
||||||
|
/*
|
||||||
|
score: function(result) {
|
||||||
|
return result[4];
|
||||||
|
},
|
||||||
|
*/
|
||||||
|
|
||||||
|
// query matches the full name of an object
|
||||||
|
objNameMatch: 11,
|
||||||
|
// or matches in the last dotted part of the object name
|
||||||
|
objPartialMatch: 6,
|
||||||
|
// Additive scores depending on the priority of the object
|
||||||
|
objPrio: {0: 15, // used to be importantResults
|
||||||
|
1: 5, // used to be objectResults
|
||||||
|
2: -5}, // used to be unimportantResults
|
||||||
|
// Used when the priority is not in the mapping.
|
||||||
|
objPrioDefault: 0,
|
||||||
|
|
||||||
|
// query found in title
|
||||||
|
title: 15,
|
||||||
|
// query found in terms
|
||||||
|
term: 5
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Search Module
|
* Search Module
|
||||||
*/
|
*/
|
||||||
|
@ -239,8 +244,13 @@ var Search = {
|
||||||
},
|
},
|
||||||
|
|
||||||
loadIndex : function(url) {
|
loadIndex : function(url) {
|
||||||
$.ajax({type: "GET", url: url, data: null, success: null,
|
$.ajax({type: "GET", url: url, data: null,
|
||||||
dataType: "script", cache: true});
|
dataType: "script", cache: true,
|
||||||
|
complete: function(jqxhr, textstatus) {
|
||||||
|
if (textstatus != "success") {
|
||||||
|
document.getElementById("searchindexloader").src = url;
|
||||||
|
}
|
||||||
|
}});
|
||||||
},
|
},
|
||||||
|
|
||||||
setIndex : function(index) {
|
setIndex : function(index) {
|
||||||
|
@ -268,19 +278,20 @@ var Search = {
|
||||||
if (this._pulse_status >= 0)
|
if (this._pulse_status >= 0)
|
||||||
return;
|
return;
|
||||||
function pulse() {
|
function pulse() {
|
||||||
|
var i;
|
||||||
Search._pulse_status = (Search._pulse_status + 1) % 4;
|
Search._pulse_status = (Search._pulse_status + 1) % 4;
|
||||||
var dotString = '';
|
var dotString = '';
|
||||||
for (var i = 0; i < Search._pulse_status; i++)
|
for (i = 0; i < Search._pulse_status; i++)
|
||||||
dotString += '.';
|
dotString += '.';
|
||||||
Search.dots.text(dotString);
|
Search.dots.text(dotString);
|
||||||
if (Search._pulse_status > -1)
|
if (Search._pulse_status > -1)
|
||||||
window.setTimeout(pulse, 500);
|
window.setTimeout(pulse, 500);
|
||||||
};
|
}
|
||||||
pulse();
|
pulse();
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* perform a search for something
|
* perform a search for something (or wait until index is loaded)
|
||||||
*/
|
*/
|
||||||
performSearch : function(query) {
|
performSearch : function(query) {
|
||||||
// create the required interface elements
|
// create the required interface elements
|
||||||
|
@ -300,41 +311,46 @@ var Search = {
|
||||||
this.deferQuery(query);
|
this.deferQuery(query);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* execute search (requires search index to be loaded)
|
||||||
|
*/
|
||||||
query : function(query) {
|
query : function(query) {
|
||||||
var stopwords = ["and","then","into","it","as","are","in","if","for","no","there","their","was","is","be","to","that","but","they","not","such","with","by","a","on","these","of","will","this","near","the","or","at"];
|
var i;
|
||||||
|
var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"];
|
||||||
|
|
||||||
// Stem the searchterms and add them to the correct list
|
// stem the searchterms and add them to the correct list
|
||||||
var stemmer = new Stemmer();
|
var stemmer = new Stemmer();
|
||||||
var searchterms = [];
|
var searchterms = [];
|
||||||
var excluded = [];
|
var excluded = [];
|
||||||
var hlterms = [];
|
var hlterms = [];
|
||||||
var tmp = query.split(/\s+/);
|
var tmp = query.split(/\s+/);
|
||||||
var objectterms = [];
|
var objectterms = [];
|
||||||
for (var i = 0; i < tmp.length; i++) {
|
for (i = 0; i < tmp.length; i++) {
|
||||||
if (tmp[i] != "") {
|
if (tmp[i] !== "") {
|
||||||
objectterms.push(tmp[i].toLowerCase());
|
objectterms.push(tmp[i].toLowerCase());
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($u.indexOf(stopwords, tmp[i]) != -1 || tmp[i].match(/^\d+$/) ||
|
if ($u.indexOf(stopwords, tmp[i].toLowerCase()) != -1 || tmp[i].match(/^\d+$/) ||
|
||||||
tmp[i] == "") {
|
tmp[i] === "") {
|
||||||
// skip this "word"
|
// skip this "word"
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// stem the word
|
// stem the word
|
||||||
var word = stemmer.stemWord(tmp[i]).toLowerCase();
|
var word = stemmer.stemWord(tmp[i].toLowerCase());
|
||||||
|
var toAppend;
|
||||||
// select the correct list
|
// select the correct list
|
||||||
if (word[0] == '-') {
|
if (word[0] == '-') {
|
||||||
var toAppend = excluded;
|
toAppend = excluded;
|
||||||
word = word.substr(1);
|
word = word.substr(1);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var toAppend = searchterms;
|
toAppend = searchterms;
|
||||||
hlterms.push(tmp[i].toLowerCase());
|
hlterms.push(tmp[i].toLowerCase());
|
||||||
}
|
}
|
||||||
// only add if not already in the list
|
// only add if not already in the list
|
||||||
if (!$.contains(toAppend, word))
|
if (!$u.contains(toAppend, word))
|
||||||
toAppend.push(word);
|
toAppend.push(word);
|
||||||
};
|
}
|
||||||
var highlightstring = '?highlight=' + $.urlencode(hlterms.join(" "));
|
var highlightstring = '?highlight=' + $.urlencode(hlterms.join(" "));
|
||||||
|
|
||||||
// console.debug('SEARCH: searching for:');
|
// console.debug('SEARCH: searching for:');
|
||||||
|
@ -342,89 +358,51 @@ var Search = {
|
||||||
// console.info('excluded: ', excluded);
|
// console.info('excluded: ', excluded);
|
||||||
|
|
||||||
// prepare search
|
// prepare search
|
||||||
var filenames = this._index.filenames;
|
|
||||||
var titles = this._index.titles;
|
|
||||||
var terms = this._index.terms;
|
var terms = this._index.terms;
|
||||||
var fileMap = {};
|
var titleterms = this._index.titleterms;
|
||||||
var files = null;
|
|
||||||
// different result priorities
|
// array of [filename, title, anchor, descr, score]
|
||||||
var importantResults = [];
|
var results = [];
|
||||||
var objectResults = [];
|
|
||||||
var regularResults = [];
|
|
||||||
var unimportantResults = [];
|
|
||||||
$('#search-progress').empty();
|
$('#search-progress').empty();
|
||||||
|
|
||||||
// lookup as object
|
// lookup as object
|
||||||
for (var i = 0; i < objectterms.length; i++) {
|
for (i = 0; i < objectterms.length; i++) {
|
||||||
var others = [].concat(objectterms.slice(0,i),
|
var others = [].concat(objectterms.slice(0, i),
|
||||||
objectterms.slice(i+1, objectterms.length))
|
objectterms.slice(i+1, objectterms.length));
|
||||||
var results = this.performObjectSearch(objectterms[i], others);
|
results = results.concat(this.performObjectSearch(objectterms[i], others));
|
||||||
// Assume first word is most likely to be the object,
|
|
||||||
// other words more likely to be in description.
|
|
||||||
// Therefore put matches for earlier words first.
|
|
||||||
// (Results are eventually used in reverse order).
|
|
||||||
objectResults = results[0].concat(objectResults);
|
|
||||||
importantResults = results[1].concat(importantResults);
|
|
||||||
unimportantResults = results[2].concat(unimportantResults);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// perform the search on the required terms
|
// lookup as search terms in fulltext
|
||||||
for (var i = 0; i < searchterms.length; i++) {
|
results = results.concat(this.performTermsSearch(searchterms, excluded, terms, Scorer.term))
|
||||||
var word = searchterms[i];
|
.concat(this.performTermsSearch(searchterms, excluded, titleterms, Scorer.title));
|
||||||
// no match but word was a required one
|
|
||||||
if ((files = terms[word]) == null)
|
// let the scorer override scores with a custom scoring function
|
||||||
break;
|
if (Scorer.score) {
|
||||||
if (files.length == undefined) {
|
for (i = 0; i < results.length; i++)
|
||||||
files = [files];
|
results[i][4] = Scorer.score(results[i]);
|
||||||
}
|
|
||||||
// create the mapping
|
|
||||||
for (var j = 0; j < files.length; j++) {
|
|
||||||
var file = files[j];
|
|
||||||
if (file in fileMap)
|
|
||||||
fileMap[file].push(word);
|
|
||||||
else
|
|
||||||
fileMap[file] = [word];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// now check if the files don't contain excluded terms
|
// now sort the results by score (in opposite order of appearance, since the
|
||||||
for (var file in fileMap) {
|
// display function below uses pop() to retrieve items) and then
|
||||||
var valid = true;
|
// alphabetically
|
||||||
|
results.sort(function(a, b) {
|
||||||
// check if all requirements are matched
|
var left = a[4];
|
||||||
if (fileMap[file].length != searchterms.length)
|
var right = b[4];
|
||||||
continue;
|
if (left > right) {
|
||||||
|
return 1;
|
||||||
// ensure that none of the excluded terms is in the
|
} else if (left < right) {
|
||||||
// search result.
|
return -1;
|
||||||
for (var i = 0; i < excluded.length; i++) {
|
} else {
|
||||||
if (terms[excluded[i]] == file ||
|
// same score: sort alphabetically
|
||||||
$.contains(terms[excluded[i]] || [], file)) {
|
left = a[1].toLowerCase();
|
||||||
valid = false;
|
right = b[1].toLowerCase();
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// if we have still a valid result we can add it
|
|
||||||
// to the result list
|
|
||||||
if (valid)
|
|
||||||
regularResults.push([filenames[file], titles[file], '', null]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// delete unused variables in order to not waste
|
|
||||||
// memory until list is retrieved completely
|
|
||||||
delete filenames, titles, terms;
|
|
||||||
|
|
||||||
// now sort the regular results descending by title
|
|
||||||
regularResults.sort(function(a, b) {
|
|
||||||
var left = a[1].toLowerCase();
|
|
||||||
var right = b[1].toLowerCase();
|
|
||||||
return (left > right) ? -1 : ((left < right) ? 1 : 0);
|
return (left > right) ? -1 : ((left < right) ? 1 : 0);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// combine all results
|
// for debugging
|
||||||
var results = unimportantResults.concat(regularResults)
|
//Search.lastresults = results.slice(); // a copy
|
||||||
.concat(objectResults).concat(importantResults);
|
//console.info('search results:', Search.lastresults);
|
||||||
|
|
||||||
// print the results
|
// print the results
|
||||||
var resultCount = results.length;
|
var resultCount = results.length;
|
||||||
|
@ -433,7 +411,7 @@ var Search = {
|
||||||
if (results.length) {
|
if (results.length) {
|
||||||
var item = results.pop();
|
var item = results.pop();
|
||||||
var listItem = $('<li style="display:none"></li>');
|
var listItem = $('<li style="display:none"></li>');
|
||||||
if (DOCUMENTATION_OPTIONS.FILE_SUFFIX == '') {
|
if (DOCUMENTATION_OPTIONS.FILE_SUFFIX === '') {
|
||||||
// dirhtml builder
|
// dirhtml builder
|
||||||
var dirname = item[0] + '/';
|
var dirname = item[0] + '/';
|
||||||
if (dirname.match(/\/index\/$/)) {
|
if (dirname.match(/\/index\/$/)) {
|
||||||
|
@ -457,16 +435,18 @@ var Search = {
|
||||||
displayNextItem();
|
displayNextItem();
|
||||||
});
|
});
|
||||||
} else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
|
} else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
|
||||||
$.get(DOCUMENTATION_OPTIONS.URL_ROOT + '_sources/' +
|
$.ajax({url: DOCUMENTATION_OPTIONS.URL_ROOT + '_sources/' + item[0] + '.txt',
|
||||||
item[0] + '.txt', function(data) {
|
dataType: "text",
|
||||||
if (data != '') {
|
complete: function(jqxhr, textstatus) {
|
||||||
listItem.append($.makeSearchSummary(data, searchterms, hlterms));
|
var data = jqxhr.responseText;
|
||||||
Search.output.append(listItem);
|
if (data !== '') {
|
||||||
|
listItem.append(Search.makeSearchSummary(data, searchterms, hlterms));
|
||||||
}
|
}
|
||||||
|
Search.output.append(listItem);
|
||||||
listItem.slideDown(5, function() {
|
listItem.slideDown(5, function() {
|
||||||
displayNextItem();
|
displayNextItem();
|
||||||
});
|
});
|
||||||
}, "text");
|
}});
|
||||||
} else {
|
} else {
|
||||||
// no source available, just display title
|
// no source available, just display title
|
||||||
Search.output.append(listItem);
|
Search.output.append(listItem);
|
||||||
|
@ -489,20 +469,32 @@ var Search = {
|
||||||
displayNextItem();
|
displayNextItem();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* search for object names
|
||||||
|
*/
|
||||||
performObjectSearch : function(object, otherterms) {
|
performObjectSearch : function(object, otherterms) {
|
||||||
var filenames = this._index.filenames;
|
var filenames = this._index.filenames;
|
||||||
var objects = this._index.objects;
|
var objects = this._index.objects;
|
||||||
var objnames = this._index.objnames;
|
var objnames = this._index.objnames;
|
||||||
var titles = this._index.titles;
|
var titles = this._index.titles;
|
||||||
|
|
||||||
var importantResults = [];
|
var i;
|
||||||
var objectResults = [];
|
var results = [];
|
||||||
var unimportantResults = [];
|
|
||||||
|
|
||||||
for (var prefix in objects) {
|
for (var prefix in objects) {
|
||||||
for (var name in objects[prefix]) {
|
for (var name in objects[prefix]) {
|
||||||
var fullname = (prefix ? prefix + '.' : '') + name;
|
var fullname = (prefix ? prefix + '.' : '') + name;
|
||||||
if (fullname.toLowerCase().indexOf(object) > -1) {
|
if (fullname.toLowerCase().indexOf(object) > -1) {
|
||||||
|
var score = 0;
|
||||||
|
var parts = fullname.split('.');
|
||||||
|
// check for different match types: exact matches of full name or
|
||||||
|
// "last name" (i.e. last dotted part)
|
||||||
|
if (fullname == object || parts[parts.length - 1] == object) {
|
||||||
|
score += Scorer.objNameMatch;
|
||||||
|
// matches in last name
|
||||||
|
} else if (parts[parts.length - 1].indexOf(object) > -1) {
|
||||||
|
score += Scorer.objPartialMatch;
|
||||||
|
}
|
||||||
var match = objects[prefix][name];
|
var match = objects[prefix][name];
|
||||||
var objname = objnames[match[1]][2];
|
var objname = objnames[match[1]][2];
|
||||||
var title = titles[match[0]];
|
var title = titles[match[0]];
|
||||||
|
@ -512,7 +504,7 @@ var Search = {
|
||||||
var haystack = (prefix + ' ' + name + ' ' +
|
var haystack = (prefix + ' ' + name + ' ' +
|
||||||
objname + ' ' + title).toLowerCase();
|
objname + ' ' + title).toLowerCase();
|
||||||
var allfound = true;
|
var allfound = true;
|
||||||
for (var i = 0; i < otherterms.length; i++) {
|
for (i = 0; i < otherterms.length; i++) {
|
||||||
if (haystack.indexOf(otherterms[i]) == -1) {
|
if (haystack.indexOf(otherterms[i]) == -1) {
|
||||||
allfound = false;
|
allfound = false;
|
||||||
break;
|
break;
|
||||||
|
@ -523,37 +515,107 @@ var Search = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var descr = objname + _(', in ') + title;
|
var descr = objname + _(', in ') + title;
|
||||||
anchor = match[3];
|
|
||||||
if (anchor == '')
|
var anchor = match[3];
|
||||||
|
if (anchor === '')
|
||||||
anchor = fullname;
|
anchor = fullname;
|
||||||
else if (anchor == '-')
|
else if (anchor == '-')
|
||||||
anchor = objnames[match[1]][1] + '-' + fullname;
|
anchor = objnames[match[1]][1] + '-' + fullname;
|
||||||
result = [filenames[match[0]], fullname, '#'+anchor, descr];
|
// add custom score for some objects according to scorer
|
||||||
switch (match[2]) {
|
if (Scorer.objPrio.hasOwnProperty(match[2])) {
|
||||||
case 1: objectResults.push(result); break;
|
score += Scorer.objPrio[match[2]];
|
||||||
case 0: importantResults.push(result); break;
|
} else {
|
||||||
case 2: unimportantResults.push(result); break;
|
score += Scorer.objPrioDefault;
|
||||||
}
|
}
|
||||||
|
results.push([filenames[match[0]], fullname, '#'+anchor, descr, score]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// sort results descending
|
return results;
|
||||||
objectResults.sort(function(a, b) {
|
},
|
||||||
return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
|
|
||||||
|
/**
|
||||||
|
* search for full-text terms in the index
|
||||||
|
*/
|
||||||
|
performTermsSearch : function(searchterms, excluded, terms, score) {
|
||||||
|
var filenames = this._index.filenames;
|
||||||
|
var titles = this._index.titles;
|
||||||
|
|
||||||
|
var i, j, file, files;
|
||||||
|
var fileMap = {};
|
||||||
|
var results = [];
|
||||||
|
|
||||||
|
// perform the search on the required terms
|
||||||
|
for (i = 0; i < searchterms.length; i++) {
|
||||||
|
var word = searchterms[i];
|
||||||
|
// no match but word was a required one
|
||||||
|
if ((files = terms[word]) === undefined)
|
||||||
|
break;
|
||||||
|
if (files.length === undefined) {
|
||||||
|
files = [files];
|
||||||
|
}
|
||||||
|
// create the mapping
|
||||||
|
for (j = 0; j < files.length; j++) {
|
||||||
|
file = files[j];
|
||||||
|
if (file in fileMap)
|
||||||
|
fileMap[file].push(word);
|
||||||
|
else
|
||||||
|
fileMap[file] = [word];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// now check if the files don't contain excluded terms
|
||||||
|
for (file in fileMap) {
|
||||||
|
var valid = true;
|
||||||
|
|
||||||
|
// check if all requirements are matched
|
||||||
|
if (fileMap[file].length != searchterms.length)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
// ensure that none of the excluded terms is in the search result
|
||||||
|
for (i = 0; i < excluded.length; i++) {
|
||||||
|
if (terms[excluded[i]] == file ||
|
||||||
|
$u.contains(terms[excluded[i]] || [], file)) {
|
||||||
|
valid = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// if we have still a valid result we can add it to the result list
|
||||||
|
if (valid) {
|
||||||
|
results.push([filenames[file], titles[file], '', null, score]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return results;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* helper function to return a node containing the
|
||||||
|
* search summary for a given text. keywords is a list
|
||||||
|
* of stemmed words, hlwords is the list of normal, unstemmed
|
||||||
|
* words. the first one is used to find the occurance, the
|
||||||
|
* latter for highlighting it.
|
||||||
|
*/
|
||||||
|
makeSearchSummary : function(text, keywords, hlwords) {
|
||||||
|
var textLower = text.toLowerCase();
|
||||||
|
var start = 0;
|
||||||
|
$.each(keywords, function() {
|
||||||
|
var i = textLower.indexOf(this.toLowerCase());
|
||||||
|
if (i > -1)
|
||||||
|
start = i;
|
||||||
});
|
});
|
||||||
|
start = Math.max(start - 120, 0);
|
||||||
importantResults.sort(function(a, b) {
|
var excerpt = ((start > 0) ? '...' : '') +
|
||||||
return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
|
$.trim(text.substr(start, 240)) +
|
||||||
|
((start + 240 - text.length) ? '...' : '');
|
||||||
|
var rv = $('<div class="context"></div>').text(excerpt);
|
||||||
|
$.each(hlwords, function() {
|
||||||
|
rv = rv.highlightText(this, 'highlighted');
|
||||||
});
|
});
|
||||||
|
return rv;
|
||||||
unimportantResults.sort(function(a, b) {
|
|
||||||
return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
|
|
||||||
});
|
|
||||||
|
|
||||||
return [importantResults, objectResults, unimportantResults]
|
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
Search.init();
|
Search.init();
|
||||||
|
|
|
@ -1,23 +1,31 @@
|
||||||
// Underscore.js 0.5.5
|
// Underscore.js 1.3.1
|
||||||
// (c) 2009 Jeremy Ashkenas, DocumentCloud Inc.
|
// (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
|
||||||
// Underscore is freely distributable under the terms of the MIT license.
|
// Underscore is freely distributable under the MIT license.
|
||||||
// Portions of Underscore are inspired by or borrowed from Prototype.js,
|
// Portions of Underscore are inspired or borrowed from Prototype,
|
||||||
// Oliver Steele's Functional, and John Resig's Micro-Templating.
|
// Oliver Steele's Functional, and John Resig's Micro-Templating.
|
||||||
// For all details and documentation:
|
// For all details and documentation:
|
||||||
// http://documentcloud.github.com/underscore/
|
// http://documentcloud.github.com/underscore
|
||||||
(function(){var j=this,n=j._,i=function(a){this._wrapped=a},m=typeof StopIteration!=="undefined"?StopIteration:"__break__",b=j._=function(a){return new i(a)};if(typeof exports!=="undefined")exports._=b;var k=Array.prototype.slice,o=Array.prototype.unshift,p=Object.prototype.toString,q=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;b.VERSION="0.5.5";b.each=function(a,c,d){try{if(a.forEach)a.forEach(c,d);else if(b.isArray(a)||b.isArguments(a))for(var e=0,f=a.length;e<f;e++)c.call(d,
|
(function(){function q(a,c,d){if(a===c)return a!==0||1/a==1/c;if(a==null||c==null)return a===c;if(a._chain)a=a._wrapped;if(c._chain)c=c._wrapped;if(a.isEqual&&b.isFunction(a.isEqual))return a.isEqual(c);if(c.isEqual&&b.isFunction(c.isEqual))return c.isEqual(a);var e=l.call(a);if(e!=l.call(c))return false;switch(e){case "[object String]":return a==String(c);case "[object Number]":return a!=+a?c!=+c:a==0?1/a==1/c:a==+c;case "[object Date]":case "[object Boolean]":return+a==+c;case "[object RegExp]":return a.source==
|
||||||
a[e],e,a);else{var g=b.keys(a);f=g.length;for(e=0;e<f;e++)c.call(d,a[g[e]],g[e],a)}}catch(h){if(h!=m)throw h;}return a};b.map=function(a,c,d){if(a&&b.isFunction(a.map))return a.map(c,d);var e=[];b.each(a,function(f,g,h){e.push(c.call(d,f,g,h))});return e};b.reduce=function(a,c,d,e){if(a&&b.isFunction(a.reduce))return a.reduce(b.bind(d,e),c);b.each(a,function(f,g,h){c=d.call(e,c,f,g,h)});return c};b.reduceRight=function(a,c,d,e){if(a&&b.isFunction(a.reduceRight))return a.reduceRight(b.bind(d,e),c);
|
c.source&&a.global==c.global&&a.multiline==c.multiline&&a.ignoreCase==c.ignoreCase}if(typeof a!="object"||typeof c!="object")return false;for(var f=d.length;f--;)if(d[f]==a)return true;d.push(a);var f=0,g=true;if(e=="[object Array]"){if(f=a.length,g=f==c.length)for(;f--;)if(!(g=f in a==f in c&&q(a[f],c[f],d)))break}else{if("constructor"in a!="constructor"in c||a.constructor!=c.constructor)return false;for(var h in a)if(b.has(a,h)&&(f++,!(g=b.has(c,h)&&q(a[h],c[h],d))))break;if(g){for(h in c)if(b.has(c,
|
||||||
var f=b.clone(b.toArray(a)).reverse();b.each(f,function(g,h){c=d.call(e,c,g,h,a)});return c};b.detect=function(a,c,d){var e;b.each(a,function(f,g,h){if(c.call(d,f,g,h)){e=f;b.breakLoop()}});return e};b.select=function(a,c,d){if(a&&b.isFunction(a.filter))return a.filter(c,d);var e=[];b.each(a,function(f,g,h){c.call(d,f,g,h)&&e.push(f)});return e};b.reject=function(a,c,d){var e=[];b.each(a,function(f,g,h){!c.call(d,f,g,h)&&e.push(f)});return e};b.all=function(a,c,d){c=c||b.identity;if(a&&b.isFunction(a.every))return a.every(c,
|
h)&&!f--)break;g=!f}}d.pop();return g}var r=this,G=r._,n={},k=Array.prototype,o=Object.prototype,i=k.slice,H=k.unshift,l=o.toString,I=o.hasOwnProperty,w=k.forEach,x=k.map,y=k.reduce,z=k.reduceRight,A=k.filter,B=k.every,C=k.some,p=k.indexOf,D=k.lastIndexOf,o=Array.isArray,J=Object.keys,s=Function.prototype.bind,b=function(a){return new m(a)};if(typeof exports!=="undefined"){if(typeof module!=="undefined"&&module.exports)exports=module.exports=b;exports._=b}else r._=b;b.VERSION="1.3.1";var j=b.each=
|
||||||
d);var e=true;b.each(a,function(f,g,h){(e=e&&c.call(d,f,g,h))||b.breakLoop()});return e};b.any=function(a,c,d){c=c||b.identity;if(a&&b.isFunction(a.some))return a.some(c,d);var e=false;b.each(a,function(f,g,h){if(e=c.call(d,f,g,h))b.breakLoop()});return e};b.include=function(a,c){if(b.isArray(a))return b.indexOf(a,c)!=-1;var d=false;b.each(a,function(e){if(d=e===c)b.breakLoop()});return d};b.invoke=function(a,c){var d=b.rest(arguments,2);return b.map(a,function(e){return(c?e[c]:e).apply(e,d)})};b.pluck=
|
b.forEach=function(a,c,d){if(a!=null)if(w&&a.forEach===w)a.forEach(c,d);else if(a.length===+a.length)for(var e=0,f=a.length;e<f;e++){if(e in a&&c.call(d,a[e],e,a)===n)break}else for(e in a)if(b.has(a,e)&&c.call(d,a[e],e,a)===n)break};b.map=b.collect=function(a,c,b){var e=[];if(a==null)return e;if(x&&a.map===x)return a.map(c,b);j(a,function(a,g,h){e[e.length]=c.call(b,a,g,h)});if(a.length===+a.length)e.length=a.length;return e};b.reduce=b.foldl=b.inject=function(a,c,d,e){var f=arguments.length>2;a==
|
||||||
function(a,c){return b.map(a,function(d){return d[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a))return Math.max.apply(Math,a);var e={computed:-Infinity};b.each(a,function(f,g,h){g=c?c.call(d,f,g,h):f;g>=e.computed&&(e={value:f,computed:g})});return e.value};b.min=function(a,c,d){if(!c&&b.isArray(a))return Math.min.apply(Math,a);var e={computed:Infinity};b.each(a,function(f,g,h){g=c?c.call(d,f,g,h):f;g<e.computed&&(e={value:f,computed:g})});return e.value};b.sortBy=function(a,c,d){return b.pluck(b.map(a,
|
null&&(a=[]);if(y&&a.reduce===y)return e&&(c=b.bind(c,e)),f?a.reduce(c,d):a.reduce(c);j(a,function(a,b,i){f?d=c.call(e,d,a,b,i):(d=a,f=true)});if(!f)throw new TypeError("Reduce of empty array with no initial value");return d};b.reduceRight=b.foldr=function(a,c,d,e){var f=arguments.length>2;a==null&&(a=[]);if(z&&a.reduceRight===z)return e&&(c=b.bind(c,e)),f?a.reduceRight(c,d):a.reduceRight(c);var g=b.toArray(a).reverse();e&&!f&&(c=b.bind(c,e));return f?b.reduce(g,c,d,e):b.reduce(g,c)};b.find=b.detect=
|
||||||
function(e,f,g){return{value:e,criteria:c.call(d,e,f,g)}}).sort(function(e,f){e=e.criteria;f=f.criteria;return e<f?-1:e>f?1:0}),"value")};b.sortedIndex=function(a,c,d){d=d||b.identity;for(var e=0,f=a.length;e<f;){var g=e+f>>1;d(a[g])<d(c)?(e=g+1):(f=g)}return e};b.toArray=function(a){if(!a)return[];if(a.toArray)return a.toArray();if(b.isArray(a))return a;if(b.isArguments(a))return k.call(a);return b.values(a)};b.size=function(a){return b.toArray(a).length};b.first=function(a,c,d){return c&&!d?k.call(a,
|
function(a,c,b){var e;E(a,function(a,g,h){if(c.call(b,a,g,h))return e=a,true});return e};b.filter=b.select=function(a,c,b){var e=[];if(a==null)return e;if(A&&a.filter===A)return a.filter(c,b);j(a,function(a,g,h){c.call(b,a,g,h)&&(e[e.length]=a)});return e};b.reject=function(a,c,b){var e=[];if(a==null)return e;j(a,function(a,g,h){c.call(b,a,g,h)||(e[e.length]=a)});return e};b.every=b.all=function(a,c,b){var e=true;if(a==null)return e;if(B&&a.every===B)return a.every(c,b);j(a,function(a,g,h){if(!(e=
|
||||||
0,c):a[0]};b.rest=function(a,c,d){return k.call(a,b.isUndefined(c)||d?1:c)};b.last=function(a){return a[a.length-1]};b.compact=function(a){return b.select(a,function(c){return!!c})};b.flatten=function(a){return b.reduce(a,[],function(c,d){if(b.isArray(d))return c.concat(b.flatten(d));c.push(d);return c})};b.without=function(a){var c=b.rest(arguments);return b.select(a,function(d){return!b.include(c,d)})};b.uniq=function(a,c){return b.reduce(a,[],function(d,e,f){if(0==f||(c===true?b.last(d)!=e:!b.include(d,
|
e&&c.call(b,a,g,h)))return n});return e};var E=b.some=b.any=function(a,c,d){c||(c=b.identity);var e=false;if(a==null)return e;if(C&&a.some===C)return a.some(c,d);j(a,function(a,b,h){if(e||(e=c.call(d,a,b,h)))return n});return!!e};b.include=b.contains=function(a,c){var b=false;if(a==null)return b;return p&&a.indexOf===p?a.indexOf(c)!=-1:b=E(a,function(a){return a===c})};b.invoke=function(a,c){var d=i.call(arguments,2);return b.map(a,function(a){return(b.isFunction(c)?c||a:a[c]).apply(a,d)})};b.pluck=
|
||||||
e)))d.push(e);return d})};b.intersect=function(a){var c=b.rest(arguments);return b.select(b.uniq(a),function(d){return b.all(c,function(e){return b.indexOf(e,d)>=0})})};b.zip=function(){for(var a=b.toArray(arguments),c=b.max(b.pluck(a,"length")),d=new Array(c),e=0;e<c;e++)d[e]=b.pluck(a,String(e));return d};b.indexOf=function(a,c){if(a.indexOf)return a.indexOf(c);for(var d=0,e=a.length;d<e;d++)if(a[d]===c)return d;return-1};b.lastIndexOf=function(a,c){if(a.lastIndexOf)return a.lastIndexOf(c);for(var d=
|
function(a,c){return b.map(a,function(a){return a[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a))return Math.max.apply(Math,a);if(!c&&b.isEmpty(a))return-Infinity;var e={computed:-Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b>=e.computed&&(e={value:a,computed:b})});return e.value};b.min=function(a,c,d){if(!c&&b.isArray(a))return Math.min.apply(Math,a);if(!c&&b.isEmpty(a))return Infinity;var e={computed:Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b<e.computed&&(e={value:a,computed:b})});
|
||||||
a.length;d--;)if(a[d]===c)return d;return-1};b.range=function(a,c,d){var e=b.toArray(arguments),f=e.length<=1;a=f?0:e[0];c=f?e[0]:e[1];d=e[2]||1;e=Math.ceil((c-a)/d);if(e<=0)return[];e=new Array(e);f=a;for(var g=0;1;f+=d){if((d>0?f-c:c-f)>=0)return e;e[g++]=f}};b.bind=function(a,c){var d=b.rest(arguments,2);return function(){return a.apply(c||j,d.concat(b.toArray(arguments)))}};b.bindAll=function(a){var c=b.rest(arguments);if(c.length==0)c=b.functions(a);b.each(c,function(d){a[d]=b.bind(a[d],a)});
|
return e.value};b.shuffle=function(a){var b=[],d;j(a,function(a,f){f==0?b[0]=a:(d=Math.floor(Math.random()*(f+1)),b[f]=b[d],b[d]=a)});return b};b.sortBy=function(a,c,d){return b.pluck(b.map(a,function(a,b,g){return{value:a,criteria:c.call(d,a,b,g)}}).sort(function(a,b){var c=a.criteria,d=b.criteria;return c<d?-1:c>d?1:0}),"value")};b.groupBy=function(a,c){var d={},e=b.isFunction(c)?c:function(a){return a[c]};j(a,function(a,b){var c=e(a,b);(d[c]||(d[c]=[])).push(a)});return d};b.sortedIndex=function(a,
|
||||||
return a};b.delay=function(a,c){var d=b.rest(arguments,2);return setTimeout(function(){return a.apply(a,d)},c)};b.defer=function(a){return b.delay.apply(b,[a,1].concat(b.rest(arguments)))};b.wrap=function(a,c){return function(){var d=[a].concat(b.toArray(arguments));return c.apply(c,d)}};b.compose=function(){var a=b.toArray(arguments);return function(){for(var c=b.toArray(arguments),d=a.length-1;d>=0;d--)c=[a[d].apply(this,c)];return c[0]}};b.keys=function(a){if(b.isArray(a))return b.range(0,a.length);
|
c,d){d||(d=b.identity);for(var e=0,f=a.length;e<f;){var g=e+f>>1;d(a[g])<d(c)?e=g+1:f=g}return e};b.toArray=function(a){return!a?[]:a.toArray?a.toArray():b.isArray(a)?i.call(a):b.isArguments(a)?i.call(a):b.values(a)};b.size=function(a){return b.toArray(a).length};b.first=b.head=function(a,b,d){return b!=null&&!d?i.call(a,0,b):a[0]};b.initial=function(a,b,d){return i.call(a,0,a.length-(b==null||d?1:b))};b.last=function(a,b,d){return b!=null&&!d?i.call(a,Math.max(a.length-b,0)):a[a.length-1]};b.rest=
|
||||||
var c=[];for(var d in a)q.call(a,d)&&c.push(d);return c};b.values=function(a){return b.map(a,b.identity)};b.functions=function(a){return b.select(b.keys(a),function(c){return b.isFunction(a[c])}).sort()};b.extend=function(a,c){for(var d in c)a[d]=c[d];return a};b.clone=function(a){if(b.isArray(a))return a.slice(0);return b.extend({},a)};b.tap=function(a,c){c(a);return a};b.isEqual=function(a,c){if(a===c)return true;var d=typeof a;if(d!=typeof c)return false;if(a==c)return true;if(!a&&c||a&&!c)return false;
|
b.tail=function(a,b,d){return i.call(a,b==null||d?1:b)};b.compact=function(a){return b.filter(a,function(a){return!!a})};b.flatten=function(a,c){return b.reduce(a,function(a,e){if(b.isArray(e))return a.concat(c?e:b.flatten(e));a[a.length]=e;return a},[])};b.without=function(a){return b.difference(a,i.call(arguments,1))};b.uniq=b.unique=function(a,c,d){var d=d?b.map(a,d):a,e=[];b.reduce(d,function(d,g,h){if(0==h||(c===true?b.last(d)!=g:!b.include(d,g)))d[d.length]=g,e[e.length]=a[h];return d},[]);
|
||||||
if(a.isEqual)return a.isEqual(c);if(b.isDate(a)&&b.isDate(c))return a.getTime()===c.getTime();if(b.isNaN(a)&&b.isNaN(c))return true;if(b.isRegExp(a)&&b.isRegExp(c))return a.source===c.source&&a.global===c.global&&a.ignoreCase===c.ignoreCase&&a.multiline===c.multiline;if(d!=="object")return false;if(a.length&&a.length!==c.length)return false;d=b.keys(a);var e=b.keys(c);if(d.length!=e.length)return false;for(var f in a)if(!b.isEqual(a[f],c[f]))return false;return true};b.isEmpty=function(a){return b.keys(a).length==
|
return e};b.union=function(){return b.uniq(b.flatten(arguments,true))};b.intersection=b.intersect=function(a){var c=i.call(arguments,1);return b.filter(b.uniq(a),function(a){return b.every(c,function(c){return b.indexOf(c,a)>=0})})};b.difference=function(a){var c=b.flatten(i.call(arguments,1));return b.filter(a,function(a){return!b.include(c,a)})};b.zip=function(){for(var a=i.call(arguments),c=b.max(b.pluck(a,"length")),d=Array(c),e=0;e<c;e++)d[e]=b.pluck(a,""+e);return d};b.indexOf=function(a,c,
|
||||||
0};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=function(a){return!!(a&&a.concat&&a.unshift)};b.isArguments=function(a){return a&&b.isNumber(a.length)&&!b.isArray(a)&&!r.call(a,"length")};b.isFunction=function(a){return!!(a&&a.constructor&&a.call&&a.apply)};b.isString=function(a){return!!(a===""||a&&a.charCodeAt&&a.substr)};b.isNumber=function(a){return p.call(a)==="[object Number]"};b.isDate=function(a){return!!(a&&a.getTimezoneOffset&&a.setUTCFullYear)};b.isRegExp=function(a){return!!(a&&
|
d){if(a==null)return-1;var e;if(d)return d=b.sortedIndex(a,c),a[d]===c?d:-1;if(p&&a.indexOf===p)return a.indexOf(c);for(d=0,e=a.length;d<e;d++)if(d in a&&a[d]===c)return d;return-1};b.lastIndexOf=function(a,b){if(a==null)return-1;if(D&&a.lastIndexOf===D)return a.lastIndexOf(b);for(var d=a.length;d--;)if(d in a&&a[d]===b)return d;return-1};b.range=function(a,b,d){arguments.length<=1&&(b=a||0,a=0);for(var d=arguments[2]||1,e=Math.max(Math.ceil((b-a)/d),0),f=0,g=Array(e);f<e;)g[f++]=a,a+=d;return g};
|
||||||
a.test&&a.exec&&(a.ignoreCase||a.ignoreCase===false))};b.isNaN=function(a){return b.isNumber(a)&&isNaN(a)};b.isNull=function(a){return a===null};b.isUndefined=function(a){return typeof a=="undefined"};b.noConflict=function(){j._=n;return this};b.identity=function(a){return a};b.breakLoop=function(){throw m;};var s=0;b.uniqueId=function(a){var c=s++;return a?a+c:c};b.template=function(a,c){a=new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+a.replace(/[\r\t\n]/g,
|
var F=function(){};b.bind=function(a,c){var d,e;if(a.bind===s&&s)return s.apply(a,i.call(arguments,1));if(!b.isFunction(a))throw new TypeError;e=i.call(arguments,2);return d=function(){if(!(this instanceof d))return a.apply(c,e.concat(i.call(arguments)));F.prototype=a.prototype;var b=new F,g=a.apply(b,e.concat(i.call(arguments)));return Object(g)===g?g:b}};b.bindAll=function(a){var c=i.call(arguments,1);c.length==0&&(c=b.functions(a));j(c,function(c){a[c]=b.bind(a[c],a)});return a};b.memoize=function(a,
|
||||||
" ").replace(/'(?=[^%]*%>)/g,"\t").split("'").join("\\'").split("\t").join("'").replace(/<%=(.+?)%>/g,"',$1,'").split("<%").join("');").split("%>").join("p.push('")+"');}return p.join('');");return c?a(c):a};b.forEach=b.each;b.foldl=b.inject=b.reduce;b.foldr=b.reduceRight;b.filter=b.select;b.every=b.all;b.some=b.any;b.head=b.first;b.tail=b.rest;b.methods=b.functions;var l=function(a,c){return c?b(a).chain():a};b.each(b.functions(b),function(a){var c=b[a];i.prototype[a]=function(){var d=b.toArray(arguments);
|
c){var d={};c||(c=b.identity);return function(){var e=c.apply(this,arguments);return b.has(d,e)?d[e]:d[e]=a.apply(this,arguments)}};b.delay=function(a,b){var d=i.call(arguments,2);return setTimeout(function(){return a.apply(a,d)},b)};b.defer=function(a){return b.delay.apply(b,[a,1].concat(i.call(arguments,1)))};b.throttle=function(a,c){var d,e,f,g,h,i=b.debounce(function(){h=g=false},c);return function(){d=this;e=arguments;var b;f||(f=setTimeout(function(){f=null;h&&a.apply(d,e);i()},c));g?h=true:
|
||||||
o.call(d,this._wrapped);return l(c.apply(b,d),this._chain)}});b.each(["pop","push","reverse","shift","sort","splice","unshift"],function(a){var c=Array.prototype[a];i.prototype[a]=function(){c.apply(this._wrapped,arguments);return l(this._wrapped,this._chain)}});b.each(["concat","join","slice"],function(a){var c=Array.prototype[a];i.prototype[a]=function(){return l(c.apply(this._wrapped,arguments),this._chain)}});i.prototype.chain=function(){this._chain=true;return this};i.prototype.value=function(){return this._wrapped}})();
|
a.apply(d,e);i();g=true}};b.debounce=function(a,b){var d;return function(){var e=this,f=arguments;clearTimeout(d);d=setTimeout(function(){d=null;a.apply(e,f)},b)}};b.once=function(a){var b=false,d;return function(){if(b)return d;b=true;return d=a.apply(this,arguments)}};b.wrap=function(a,b){return function(){var d=[a].concat(i.call(arguments,0));return b.apply(this,d)}};b.compose=function(){var a=arguments;return function(){for(var b=arguments,d=a.length-1;d>=0;d--)b=[a[d].apply(this,b)];return b[0]}};
|
||||||
|
b.after=function(a,b){return a<=0?b():function(){if(--a<1)return b.apply(this,arguments)}};b.keys=J||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var c=[],d;for(d in a)b.has(a,d)&&(c[c.length]=d);return c};b.values=function(a){return b.map(a,b.identity)};b.functions=b.methods=function(a){var c=[],d;for(d in a)b.isFunction(a[d])&&c.push(d);return c.sort()};b.extend=function(a){j(i.call(arguments,1),function(b){for(var d in b)a[d]=b[d]});return a};b.defaults=function(a){j(i.call(arguments,
|
||||||
|
1),function(b){for(var d in b)a[d]==null&&(a[d]=b[d])});return a};b.clone=function(a){return!b.isObject(a)?a:b.isArray(a)?a.slice():b.extend({},a)};b.tap=function(a,b){b(a);return a};b.isEqual=function(a,b){return q(a,b,[])};b.isEmpty=function(a){if(b.isArray(a)||b.isString(a))return a.length===0;for(var c in a)if(b.has(a,c))return false;return true};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=o||function(a){return l.call(a)=="[object Array]"};b.isObject=function(a){return a===Object(a)};
|
||||||
|
b.isArguments=function(a){return l.call(a)=="[object Arguments]"};if(!b.isArguments(arguments))b.isArguments=function(a){return!(!a||!b.has(a,"callee"))};b.isFunction=function(a){return l.call(a)=="[object Function]"};b.isString=function(a){return l.call(a)=="[object String]"};b.isNumber=function(a){return l.call(a)=="[object Number]"};b.isNaN=function(a){return a!==a};b.isBoolean=function(a){return a===true||a===false||l.call(a)=="[object Boolean]"};b.isDate=function(a){return l.call(a)=="[object Date]"};
|
||||||
|
b.isRegExp=function(a){return l.call(a)=="[object RegExp]"};b.isNull=function(a){return a===null};b.isUndefined=function(a){return a===void 0};b.has=function(a,b){return I.call(a,b)};b.noConflict=function(){r._=G;return this};b.identity=function(a){return a};b.times=function(a,b,d){for(var e=0;e<a;e++)b.call(d,e)};b.escape=function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")};b.mixin=function(a){j(b.functions(a),
|
||||||
|
function(c){K(c,b[c]=a[c])})};var L=0;b.uniqueId=function(a){var b=L++;return a?a+b:b};b.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var t=/.^/,u=function(a){return a.replace(/\\\\/g,"\\").replace(/\\'/g,"'")};b.template=function(a,c){var d=b.templateSettings,d="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(d.escape||t,function(a,b){return"',_.escape("+
|
||||||
|
u(b)+"),'"}).replace(d.interpolate||t,function(a,b){return"',"+u(b)+",'"}).replace(d.evaluate||t,function(a,b){return"');"+u(b).replace(/[\r\n\t]/g," ")+";__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');",e=new Function("obj","_",d);return c?e(c,b):function(a){return e.call(this,a,b)}};b.chain=function(a){return b(a).chain()};var m=function(a){this._wrapped=a};b.prototype=m.prototype;var v=function(a,c){return c?b(a).chain():a},K=function(a,c){m.prototype[a]=
|
||||||
|
function(){var a=i.call(arguments);H.call(a,this._wrapped);return v(c.apply(b,a),this._chain)}};b.mixin(b);j("pop,push,reverse,shift,sort,splice,unshift".split(","),function(a){var b=k[a];m.prototype[a]=function(){var d=this._wrapped;b.apply(d,arguments);var e=d.length;(a=="shift"||a=="splice")&&e===0&&delete d[0];return v(d,this._chain)}});j(["concat","join","slice"],function(a){var b=k[a];m.prototype[a]=function(){return v(b.apply(this._wrapped,arguments),this._chain)}});m.prototype.chain=function(){this._chain=
|
||||||
|
true;return this};m.prototype.value=function(){return this._wrapped}}).call(this);
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* sphinx.websupport utilties for all documentation.
|
* sphinx.websupport utilties for all documentation.
|
||||||
*
|
*
|
||||||
* :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
|
* :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
|
||||||
* :license: BSD, see LICENSE for details.
|
* :license: BSD, see LICENSE for details.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
|
||||||
|
@ -14,7 +13,7 @@
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT: '',
|
URL_ROOT: './',
|
||||||
VERSION: '1.8.1',
|
VERSION: '1.8.1',
|
||||||
COLLAPSE_INDEX: false,
|
COLLAPSE_INDEX: false,
|
||||||
FILE_SUFFIX: '.html',
|
FILE_SUFFIX: '.html',
|
||||||
|
@ -103,10 +102,12 @@
|
||||||
<div class="admonition note">
|
<div class="admonition note">
|
||||||
<p class="first admonition-title">Note</p>
|
<p class="first admonition-title">Note</p>
|
||||||
<p>Although it seems intuitive to use the <cite>#</cite> character for tags, there’s a drawback: on most shells, this is interpreted as a meta-character starting a comment. This means that if you type</p>
|
<p>Although it seems intuitive to use the <cite>#</cite> character for tags, there’s a drawback: on most shells, this is interpreted as a meta-character starting a comment. This means that if you type</p>
|
||||||
<div class="highlight-note"><pre>jrnl Implemented endless scrolling on the #frontend of our website.</pre>
|
<div class="highlight-note"><div class="highlight"><pre>jrnl Implemented endless scrolling on the #frontend of our website.
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>your bash will chop off everything after the <tt class="docutils literal"><span class="pre">#</span></tt> before passing it to _jrnl_). To avoid this, wrap your input into quotation marks like this:</p>
|
<p>your bash will chop off everything after the <tt class="docutils literal"><span class="pre">#</span></tt> before passing it to _jrnl_). To avoid this, wrap your input into quotation marks like this:</p>
|
||||||
<div class="highlight-note"><pre>jrnl "Implemented endless scrolling on the #frontend of our website."</pre>
|
<div class="highlight-note"><div class="highlight"><pre>jrnl "Implemented endless scrolling on the #frontend of our website."
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p class="last">Or use the built-in prompt or an external editor to compose your entries.</p>
|
<p class="last">Or use the built-in prompt or an external editor to compose your entries.</p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -142,9 +143,11 @@
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>The <tt class="docutils literal"><span class="pre">default</span></tt> journal gets created the first time you start _jrnl_. Now you can access the <tt class="docutils literal"><span class="pre">work</span></tt> journal by using <tt class="docutils literal"><span class="pre">jrnl</span> <span class="pre">work</span></tt> instead of <tt class="docutils literal"><span class="pre">jrnl</span></tt>, eg.</p>
|
<p>The <tt class="docutils literal"><span class="pre">default</span></tt> journal gets created the first time you start _jrnl_. Now you can access the <tt class="docutils literal"><span class="pre">work</span></tt> journal by using <tt class="docutils literal"><span class="pre">jrnl</span> <span class="pre">work</span></tt> instead of <tt class="docutils literal"><span class="pre">jrnl</span></tt>, eg.</p>
|
||||||
<div class="highlight-python"><pre>jrnl work at 10am: Meeting with @Steve</pre>
|
<div class="highlight-python"><div class="highlight"><pre>jrnl work at 10am: Meeting with @Steve
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="highlight-python"><pre>jrnl work -n 3</pre>
|
<div class="highlight-python"><div class="highlight"><pre>jrnl work -n 3
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>will both use <tt class="docutils literal"><span class="pre">~/work.txt</span></tt>, while <tt class="docutils literal"><span class="pre">jrnl</span> <span class="pre">-n</span> <span class="pre">3</span></tt> will display the last three entries from <tt class="docutils literal"><span class="pre">~/journal.txt</span></tt> (and so does <tt class="docutils literal"><span class="pre">jrnl</span> <span class="pre">default</span> <span class="pre">-n</span> <span class="pre">3</span></tt>).</p>
|
<p>will both use <tt class="docutils literal"><span class="pre">~/work.txt</span></tt>, while <tt class="docutils literal"><span class="pre">jrnl</span> <span class="pre">-n</span> <span class="pre">3</span></tt> will display the last three entries from <tt class="docutils literal"><span class="pre">~/journal.txt</span></tt> (and so does <tt class="docutils literal"><span class="pre">jrnl</span> <span class="pre">default</span> <span class="pre">-n</span> <span class="pre">3</span></tt>).</p>
|
||||||
<p>You can also override the default options for each individual journal. If you <tt class="docutils literal"><span class="pre">.jrnl_config</span></tt> looks like this:</p>
|
<p>You can also override the default options for each individual journal. If you <tt class="docutils literal"><span class="pre">.jrnl_config</span></tt> looks like this:</p>
|
||||||
|
|
BIN
docs/_build/doctrees/advanced.doctree
vendored
BIN
docs/_build/doctrees/advanced.doctree
vendored
Binary file not shown.
BIN
docs/_build/doctrees/encryption.doctree
vendored
BIN
docs/_build/doctrees/encryption.doctree
vendored
Binary file not shown.
BIN
docs/_build/doctrees/environment.pickle
vendored
BIN
docs/_build/doctrees/environment.pickle
vendored
Binary file not shown.
BIN
docs/_build/doctrees/export.doctree
vendored
BIN
docs/_build/doctrees/export.doctree
vendored
Binary file not shown.
BIN
docs/_build/doctrees/index.doctree
vendored
BIN
docs/_build/doctrees/index.doctree
vendored
Binary file not shown.
BIN
docs/_build/doctrees/installation.doctree
vendored
BIN
docs/_build/doctrees/installation.doctree
vendored
Binary file not shown.
BIN
docs/_build/doctrees/overview.doctree
vendored
BIN
docs/_build/doctrees/overview.doctree
vendored
Binary file not shown.
BIN
docs/_build/doctrees/recipes.doctree
vendored
BIN
docs/_build/doctrees/recipes.doctree
vendored
Binary file not shown.
BIN
docs/_build/doctrees/usage.doctree
vendored
BIN
docs/_build/doctrees/usage.doctree
vendored
Binary file not shown.
4
docs/_build/html/.buildinfo
vendored
4
docs/_build/html/.buildinfo
vendored
|
@ -1,4 +1,4 @@
|
||||||
# Sphinx build info version 1
|
# Sphinx build info version 1
|
||||||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
|
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
|
||||||
config: 67f1006755874d6ba971ca09db45ac63
|
config: b804926a80f27bdaeb757872d47cb482
|
||||||
tags: fbb0d17656682115ca4d033fb2f83ba1
|
tags: 645f666f9bcd5a90fca523b33c5a78b7
|
||||||
|
|
7
docs/_build/html/_static/basic.css
vendored
7
docs/_build/html/_static/basic.css
vendored
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* Sphinx stylesheet -- basic theme.
|
* Sphinx stylesheet -- basic theme.
|
||||||
*
|
*
|
||||||
* :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
|
* :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
|
||||||
* :license: BSD, see LICENSE for details.
|
* :license: BSD, see LICENSE for details.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -89,6 +89,7 @@ div.sphinxsidebar #searchbox input[type="submit"] {
|
||||||
|
|
||||||
img {
|
img {
|
||||||
border: 0;
|
border: 0;
|
||||||
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -- search page ----------------------------------------------------------- */
|
/* -- search page ----------------------------------------------------------- */
|
||||||
|
@ -401,10 +402,6 @@ dl.glossary dt {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.refcount {
|
|
||||||
color: #060;
|
|
||||||
}
|
|
||||||
|
|
||||||
.optional {
|
.optional {
|
||||||
font-size: 1.3em;
|
font-size: 1.3em;
|
||||||
}
|
}
|
||||||
|
|
19
docs/_build/html/_static/doctools.js
vendored
19
docs/_build/html/_static/doctools.js
vendored
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* Sphinx JavaScript utilities for all documentation.
|
* Sphinx JavaScript utilities for all documentation.
|
||||||
*
|
*
|
||||||
* :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
|
* :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
|
||||||
* :license: BSD, see LICENSE for details.
|
* :license: BSD, see LICENSE for details.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -32,7 +32,7 @@ if (!window.console || !console.firebug) {
|
||||||
*/
|
*/
|
||||||
jQuery.urldecode = function(x) {
|
jQuery.urldecode = function(x) {
|
||||||
return decodeURIComponent(x).replace(/\+/g, ' ');
|
return decodeURIComponent(x).replace(/\+/g, ' ');
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* small helper function to urlencode strings
|
* small helper function to urlencode strings
|
||||||
|
@ -61,18 +61,6 @@ jQuery.getQueryParameters = function(s) {
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* small function to check if an array contains
|
|
||||||
* a given item.
|
|
||||||
*/
|
|
||||||
jQuery.contains = function(arr, item) {
|
|
||||||
for (var i = 0; i < arr.length; i++) {
|
|
||||||
if (arr[i] == item)
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* highlight a given string on a jquery object by wrapping it in
|
* highlight a given string on a jquery object by wrapping it in
|
||||||
* span elements with the given class name.
|
* span elements with the given class name.
|
||||||
|
@ -180,6 +168,9 @@ var Documentation = {
|
||||||
var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : [];
|
var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : [];
|
||||||
if (terms.length) {
|
if (terms.length) {
|
||||||
var body = $('div.body');
|
var body = $('div.body');
|
||||||
|
if (!body.length) {
|
||||||
|
body = $('body');
|
||||||
|
}
|
||||||
window.setTimeout(function() {
|
window.setTimeout(function() {
|
||||||
$.each(terms, function() {
|
$.each(terms, function() {
|
||||||
body.highlightText(this.toLowerCase(), 'highlighted');
|
body.highlightText(this.toLowerCase(), 'highlighted');
|
||||||
|
|
156
docs/_build/html/_static/jquery.js
vendored
156
docs/_build/html/_static/jquery.js
vendored
File diff suppressed because one or more lines are too long
51
docs/_build/html/_static/js/landing.js
vendored
51
docs/_build/html/_static/js/landing.js
vendored
|
@ -11,18 +11,23 @@ var phrases = [
|
||||||
var args = document.getElementById("args");
|
var args = document.getElementById("args");
|
||||||
var input = document.getElementById("input");
|
var input = document.getElementById("input");
|
||||||
var output = document.getElementById("output");
|
var output = document.getElementById("output");
|
||||||
var right = document.getElementById("right");
|
|
||||||
var left = document.getElementById("left");
|
|
||||||
var current = 0
|
var current = 0
|
||||||
var timer = null;
|
var timer = null;
|
||||||
|
var fadeInTimer = null;
|
||||||
|
var fadeOutTimer = null;
|
||||||
|
var letterTimer = null;
|
||||||
|
var unletterTimer = null;
|
||||||
|
|
||||||
var next = function() {
|
var next = function() {
|
||||||
clearTimeout(timer);
|
current = (current + 1) % phrases.length;
|
||||||
reveal(++current % phrases.length);
|
reveal(current);
|
||||||
setTimeout(next, 5000);
|
timer = setTimeout(next, 5000);
|
||||||
}
|
}
|
||||||
|
|
||||||
var prev = function() {
|
var prev = function() {
|
||||||
reveal(--current % phrases.length);
|
current = (current === 0) ? phrases.length - 1 : current - 1;
|
||||||
|
reveal(current);
|
||||||
|
timer = setTimeout(next, 5000);
|
||||||
}
|
}
|
||||||
|
|
||||||
var reveal = function(idx) {
|
var reveal = function(idx) {
|
||||||
|
@ -31,9 +36,9 @@ var reveal = function(idx) {
|
||||||
var output_text = phrases[idx][2];
|
var output_text = phrases[idx][2];
|
||||||
var old_dix = idx == 0 ? phrases.length - 1 : idx - 1;
|
var old_dix = idx == 0 ? phrases.length - 1 : idx - 1;
|
||||||
console.log(idx, old_dix, "++++++++++++")
|
console.log(idx, old_dix, "++++++++++++")
|
||||||
var old_args_text = phrases[old_dix][0]
|
var old_args_text = args.innerHTML;
|
||||||
var old_input_text = phrases[old_dix][1]
|
var old_input_text = input.innerHTML;
|
||||||
var old_output_text =phrases[old_dix][2]
|
var old_output_text = output.innerHTML;
|
||||||
console.log(args_text, input_text, output_text)
|
console.log(args_text, input_text, output_text)
|
||||||
console.log(old_args_text, old_input_text, old_output_text)
|
console.log(old_args_text, old_input_text, old_output_text)
|
||||||
var s4 = function() {fadeIn(output_text, output);}
|
var s4 = function() {fadeIn(output_text, output);}
|
||||||
|
@ -42,23 +47,23 @@ var reveal = function(idx) {
|
||||||
var s1 = function() {unletter(old_args_text, args, s2);}
|
var s1 = function() {unletter(old_args_text, args, s2);}
|
||||||
var s0 = function() {unletter(old_input_text, input, s1);}
|
var s0 = function() {unletter(old_input_text, input, s1);}
|
||||||
fadeOut(old_output_text, output, s0, 10);
|
fadeOut(old_output_text, output, s0, 10);
|
||||||
// letter(input_text, input);
|
|
||||||
// output.innerHTML = output_text;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var fadeIn = function(text, element, next, step) {
|
var fadeIn = function(text, element, next, step) {
|
||||||
step = step || 0
|
step = step || 0
|
||||||
var nx = function() { fadeIn(text, element, next, ++step); }
|
var nx = function() { fadeIn(text, element, next, ++step); }
|
||||||
if (step==0) {
|
if (step==0) {
|
||||||
element.innerHTML = "";
|
element.innerHTML = "";
|
||||||
setTimeout(nx, 550);
|
fadeInTimer = setTimeout(nx, 550);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (step==1) {element.innerHTML = text;}
|
if (step==1) {element.innerHTML = text;}
|
||||||
if (step>10 || !text) { if (next) {next(); return;} else return;}
|
if (step>10 || !text) { if (next) {next(); return;} else return;}
|
||||||
element.style.opacity = (step-1)/10;
|
element.style.opacity = (step-1)/10;
|
||||||
element.style.filter = 'alpha(opacity=' + (step-1)*10 + ')';
|
element.style.filter = 'alpha(opacity=' + (step-1)*10 + ')';
|
||||||
setTimeout(nx, 50);
|
fadeInTimer = setTimeout(nx, 50);
|
||||||
}
|
}
|
||||||
|
|
||||||
var fadeOut = function(text, element, next, step) {
|
var fadeOut = function(text, element, next, step) {
|
||||||
if (step===10) element.innerHTML = text;
|
if (step===10) element.innerHTML = text;
|
||||||
if (step<0 || !text) {
|
if (step<0 || !text) {
|
||||||
|
@ -69,7 +74,7 @@ var fadeOut = function(text, element, next, step) {
|
||||||
element.style.opacity = step/10;
|
element.style.opacity = step/10;
|
||||||
element.style.filter = 'alpha(opacity=' + step*10 + ')';
|
element.style.filter = 'alpha(opacity=' + step*10 + ')';
|
||||||
var nx = function() { fadeOut(text, element, next, --step); }
|
var nx = function() { fadeOut(text, element, next, --step); }
|
||||||
setTimeout(nx, 50);
|
fadeOutTimer = setTimeout(nx, 50);
|
||||||
}
|
}
|
||||||
|
|
||||||
var unletter = function(text, element, next, timeout, index) {
|
var unletter = function(text, element, next, timeout, index) {
|
||||||
|
@ -78,7 +83,7 @@ var unletter = function(text, element, next, timeout, index) {
|
||||||
if (index==-1 || !text.length) { if (next) {next(); return;} else return;}
|
if (index==-1 || !text.length) { if (next) {next(); return;} else return;}
|
||||||
element.innerHTML = text.substring(0, index);
|
element.innerHTML = text.substring(0, index);
|
||||||
var nx = function() { unletter(text, element, next, timeout, --index); }
|
var nx = function() { unletter(text, element, next, timeout, --index); }
|
||||||
setTimeout(nx, timeout);
|
unletterTimer = setTimeout(nx, timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
var letter = function(text, element, next, timeout, index) {
|
var letter = function(text, element, next, timeout, index) {
|
||||||
|
@ -87,6 +92,18 @@ var letter = function(text, element, next, timeout, index) {
|
||||||
if (index > text.length || !text.length) { if (next) {next(); return;} else return;}
|
if (index > text.length || !text.length) { if (next) {next(); return;} else return;}
|
||||||
element.innerHTML = text.substring(0, index);
|
element.innerHTML = text.substring(0, index);
|
||||||
var nx = function() { letter(text, element, next, timeout, ++index); }
|
var nx = function() { letter(text, element, next, timeout, ++index); }
|
||||||
setTimeout(nx, timeout);
|
letterTimer = setTimeout(nx, timeout);
|
||||||
}
|
}
|
||||||
setTimeout(next, 3000);
|
|
||||||
|
var reset = function() {
|
||||||
|
var timers = [timer, fadeInTimer, fadeOutTimer, letterTimer, unletterTimer];
|
||||||
|
timers.forEach(function (t) {
|
||||||
|
clearTimeout(t);
|
||||||
|
});
|
||||||
|
|
||||||
|
args.innerHTML = "";
|
||||||
|
input.innerHTML = "";
|
||||||
|
output.innerHTML = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
timer = setTimeout(next, 3000);
|
||||||
|
|
356
docs/_build/html/_static/searchtools.js
vendored
356
docs/_build/html/_static/searchtools.js
vendored
|
@ -4,38 +4,11 @@
|
||||||
*
|
*
|
||||||
* Sphinx JavaScript utilties for the full-text search.
|
* Sphinx JavaScript utilties for the full-text search.
|
||||||
*
|
*
|
||||||
* :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
|
* :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
|
||||||
* :license: BSD, see LICENSE for details.
|
* :license: BSD, see LICENSE for details.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
|
||||||
* helper function to return a node containing the
|
|
||||||
* search summary for a given text. keywords is a list
|
|
||||||
* of stemmed words, hlwords is the list of normal, unstemmed
|
|
||||||
* words. the first one is used to find the occurance, the
|
|
||||||
* latter for highlighting it.
|
|
||||||
*/
|
|
||||||
|
|
||||||
jQuery.makeSearchSummary = function(text, keywords, hlwords) {
|
|
||||||
var textLower = text.toLowerCase();
|
|
||||||
var start = 0;
|
|
||||||
$.each(keywords, function() {
|
|
||||||
var i = textLower.indexOf(this.toLowerCase());
|
|
||||||
if (i > -1)
|
|
||||||
start = i;
|
|
||||||
});
|
|
||||||
start = Math.max(start - 120, 0);
|
|
||||||
var excerpt = ((start > 0) ? '...' : '') +
|
|
||||||
$.trim(text.substr(start, 240)) +
|
|
||||||
((start + 240 - text.length) ? '...' : '');
|
|
||||||
var rv = $('<div class="context"></div>').text(excerpt);
|
|
||||||
$.each(hlwords, function() {
|
|
||||||
rv = rv.highlightText(this, 'highlighted');
|
|
||||||
});
|
|
||||||
return rv;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Porter Stemmer
|
* Porter Stemmer
|
||||||
|
@ -220,6 +193,38 @@ var Stemmer = function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Simple result scoring code.
|
||||||
|
*/
|
||||||
|
var Scorer = {
|
||||||
|
// Implement the following function to further tweak the score for each result
|
||||||
|
// The function takes a result array [filename, title, anchor, descr, score]
|
||||||
|
// and returns the new score.
|
||||||
|
/*
|
||||||
|
score: function(result) {
|
||||||
|
return result[4];
|
||||||
|
},
|
||||||
|
*/
|
||||||
|
|
||||||
|
// query matches the full name of an object
|
||||||
|
objNameMatch: 11,
|
||||||
|
// or matches in the last dotted part of the object name
|
||||||
|
objPartialMatch: 6,
|
||||||
|
// Additive scores depending on the priority of the object
|
||||||
|
objPrio: {0: 15, // used to be importantResults
|
||||||
|
1: 5, // used to be objectResults
|
||||||
|
2: -5}, // used to be unimportantResults
|
||||||
|
// Used when the priority is not in the mapping.
|
||||||
|
objPrioDefault: 0,
|
||||||
|
|
||||||
|
// query found in title
|
||||||
|
title: 15,
|
||||||
|
// query found in terms
|
||||||
|
term: 5
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Search Module
|
* Search Module
|
||||||
*/
|
*/
|
||||||
|
@ -239,8 +244,13 @@ var Search = {
|
||||||
},
|
},
|
||||||
|
|
||||||
loadIndex : function(url) {
|
loadIndex : function(url) {
|
||||||
$.ajax({type: "GET", url: url, data: null, success: null,
|
$.ajax({type: "GET", url: url, data: null,
|
||||||
dataType: "script", cache: true});
|
dataType: "script", cache: true,
|
||||||
|
complete: function(jqxhr, textstatus) {
|
||||||
|
if (textstatus != "success") {
|
||||||
|
document.getElementById("searchindexloader").src = url;
|
||||||
|
}
|
||||||
|
}});
|
||||||
},
|
},
|
||||||
|
|
||||||
setIndex : function(index) {
|
setIndex : function(index) {
|
||||||
|
@ -268,19 +278,20 @@ var Search = {
|
||||||
if (this._pulse_status >= 0)
|
if (this._pulse_status >= 0)
|
||||||
return;
|
return;
|
||||||
function pulse() {
|
function pulse() {
|
||||||
|
var i;
|
||||||
Search._pulse_status = (Search._pulse_status + 1) % 4;
|
Search._pulse_status = (Search._pulse_status + 1) % 4;
|
||||||
var dotString = '';
|
var dotString = '';
|
||||||
for (var i = 0; i < Search._pulse_status; i++)
|
for (i = 0; i < Search._pulse_status; i++)
|
||||||
dotString += '.';
|
dotString += '.';
|
||||||
Search.dots.text(dotString);
|
Search.dots.text(dotString);
|
||||||
if (Search._pulse_status > -1)
|
if (Search._pulse_status > -1)
|
||||||
window.setTimeout(pulse, 500);
|
window.setTimeout(pulse, 500);
|
||||||
};
|
}
|
||||||
pulse();
|
pulse();
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* perform a search for something
|
* perform a search for something (or wait until index is loaded)
|
||||||
*/
|
*/
|
||||||
performSearch : function(query) {
|
performSearch : function(query) {
|
||||||
// create the required interface elements
|
// create the required interface elements
|
||||||
|
@ -300,41 +311,46 @@ var Search = {
|
||||||
this.deferQuery(query);
|
this.deferQuery(query);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* execute search (requires search index to be loaded)
|
||||||
|
*/
|
||||||
query : function(query) {
|
query : function(query) {
|
||||||
var stopwords = ["and","then","into","it","as","are","in","if","for","no","there","their","was","is","be","to","that","but","they","not","such","with","by","a","on","these","of","will","this","near","the","or","at"];
|
var i;
|
||||||
|
var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"];
|
||||||
|
|
||||||
// Stem the searchterms and add them to the correct list
|
// stem the searchterms and add them to the correct list
|
||||||
var stemmer = new Stemmer();
|
var stemmer = new Stemmer();
|
||||||
var searchterms = [];
|
var searchterms = [];
|
||||||
var excluded = [];
|
var excluded = [];
|
||||||
var hlterms = [];
|
var hlterms = [];
|
||||||
var tmp = query.split(/\s+/);
|
var tmp = query.split(/\s+/);
|
||||||
var objectterms = [];
|
var objectterms = [];
|
||||||
for (var i = 0; i < tmp.length; i++) {
|
for (i = 0; i < tmp.length; i++) {
|
||||||
if (tmp[i] != "") {
|
if (tmp[i] !== "") {
|
||||||
objectterms.push(tmp[i].toLowerCase());
|
objectterms.push(tmp[i].toLowerCase());
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($u.indexOf(stopwords, tmp[i]) != -1 || tmp[i].match(/^\d+$/) ||
|
if ($u.indexOf(stopwords, tmp[i].toLowerCase()) != -1 || tmp[i].match(/^\d+$/) ||
|
||||||
tmp[i] == "") {
|
tmp[i] === "") {
|
||||||
// skip this "word"
|
// skip this "word"
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// stem the word
|
// stem the word
|
||||||
var word = stemmer.stemWord(tmp[i]).toLowerCase();
|
var word = stemmer.stemWord(tmp[i].toLowerCase());
|
||||||
|
var toAppend;
|
||||||
// select the correct list
|
// select the correct list
|
||||||
if (word[0] == '-') {
|
if (word[0] == '-') {
|
||||||
var toAppend = excluded;
|
toAppend = excluded;
|
||||||
word = word.substr(1);
|
word = word.substr(1);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var toAppend = searchterms;
|
toAppend = searchterms;
|
||||||
hlterms.push(tmp[i].toLowerCase());
|
hlterms.push(tmp[i].toLowerCase());
|
||||||
}
|
}
|
||||||
// only add if not already in the list
|
// only add if not already in the list
|
||||||
if (!$.contains(toAppend, word))
|
if (!$u.contains(toAppend, word))
|
||||||
toAppend.push(word);
|
toAppend.push(word);
|
||||||
};
|
}
|
||||||
var highlightstring = '?highlight=' + $.urlencode(hlterms.join(" "));
|
var highlightstring = '?highlight=' + $.urlencode(hlterms.join(" "));
|
||||||
|
|
||||||
// console.debug('SEARCH: searching for:');
|
// console.debug('SEARCH: searching for:');
|
||||||
|
@ -342,89 +358,51 @@ var Search = {
|
||||||
// console.info('excluded: ', excluded);
|
// console.info('excluded: ', excluded);
|
||||||
|
|
||||||
// prepare search
|
// prepare search
|
||||||
var filenames = this._index.filenames;
|
|
||||||
var titles = this._index.titles;
|
|
||||||
var terms = this._index.terms;
|
var terms = this._index.terms;
|
||||||
var fileMap = {};
|
var titleterms = this._index.titleterms;
|
||||||
var files = null;
|
|
||||||
// different result priorities
|
// array of [filename, title, anchor, descr, score]
|
||||||
var importantResults = [];
|
var results = [];
|
||||||
var objectResults = [];
|
|
||||||
var regularResults = [];
|
|
||||||
var unimportantResults = [];
|
|
||||||
$('#search-progress').empty();
|
$('#search-progress').empty();
|
||||||
|
|
||||||
// lookup as object
|
// lookup as object
|
||||||
for (var i = 0; i < objectterms.length; i++) {
|
for (i = 0; i < objectterms.length; i++) {
|
||||||
var others = [].concat(objectterms.slice(0,i),
|
var others = [].concat(objectterms.slice(0, i),
|
||||||
objectterms.slice(i+1, objectterms.length))
|
objectterms.slice(i+1, objectterms.length));
|
||||||
var results = this.performObjectSearch(objectterms[i], others);
|
results = results.concat(this.performObjectSearch(objectterms[i], others));
|
||||||
// Assume first word is most likely to be the object,
|
|
||||||
// other words more likely to be in description.
|
|
||||||
// Therefore put matches for earlier words first.
|
|
||||||
// (Results are eventually used in reverse order).
|
|
||||||
objectResults = results[0].concat(objectResults);
|
|
||||||
importantResults = results[1].concat(importantResults);
|
|
||||||
unimportantResults = results[2].concat(unimportantResults);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// perform the search on the required terms
|
// lookup as search terms in fulltext
|
||||||
for (var i = 0; i < searchterms.length; i++) {
|
results = results.concat(this.performTermsSearch(searchterms, excluded, terms, Scorer.term))
|
||||||
var word = searchterms[i];
|
.concat(this.performTermsSearch(searchterms, excluded, titleterms, Scorer.title));
|
||||||
// no match but word was a required one
|
|
||||||
if ((files = terms[word]) == null)
|
// let the scorer override scores with a custom scoring function
|
||||||
break;
|
if (Scorer.score) {
|
||||||
if (files.length == undefined) {
|
for (i = 0; i < results.length; i++)
|
||||||
files = [files];
|
results[i][4] = Scorer.score(results[i]);
|
||||||
}
|
|
||||||
// create the mapping
|
|
||||||
for (var j = 0; j < files.length; j++) {
|
|
||||||
var file = files[j];
|
|
||||||
if (file in fileMap)
|
|
||||||
fileMap[file].push(word);
|
|
||||||
else
|
|
||||||
fileMap[file] = [word];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// now check if the files don't contain excluded terms
|
// now sort the results by score (in opposite order of appearance, since the
|
||||||
for (var file in fileMap) {
|
// display function below uses pop() to retrieve items) and then
|
||||||
var valid = true;
|
// alphabetically
|
||||||
|
results.sort(function(a, b) {
|
||||||
// check if all requirements are matched
|
var left = a[4];
|
||||||
if (fileMap[file].length != searchterms.length)
|
var right = b[4];
|
||||||
continue;
|
if (left > right) {
|
||||||
|
return 1;
|
||||||
// ensure that none of the excluded terms is in the
|
} else if (left < right) {
|
||||||
// search result.
|
return -1;
|
||||||
for (var i = 0; i < excluded.length; i++) {
|
} else {
|
||||||
if (terms[excluded[i]] == file ||
|
// same score: sort alphabetically
|
||||||
$.contains(terms[excluded[i]] || [], file)) {
|
left = a[1].toLowerCase();
|
||||||
valid = false;
|
right = b[1].toLowerCase();
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// if we have still a valid result we can add it
|
|
||||||
// to the result list
|
|
||||||
if (valid)
|
|
||||||
regularResults.push([filenames[file], titles[file], '', null]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// delete unused variables in order to not waste
|
|
||||||
// memory until list is retrieved completely
|
|
||||||
delete filenames, titles, terms;
|
|
||||||
|
|
||||||
// now sort the regular results descending by title
|
|
||||||
regularResults.sort(function(a, b) {
|
|
||||||
var left = a[1].toLowerCase();
|
|
||||||
var right = b[1].toLowerCase();
|
|
||||||
return (left > right) ? -1 : ((left < right) ? 1 : 0);
|
return (left > right) ? -1 : ((left < right) ? 1 : 0);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// combine all results
|
// for debugging
|
||||||
var results = unimportantResults.concat(regularResults)
|
//Search.lastresults = results.slice(); // a copy
|
||||||
.concat(objectResults).concat(importantResults);
|
//console.info('search results:', Search.lastresults);
|
||||||
|
|
||||||
// print the results
|
// print the results
|
||||||
var resultCount = results.length;
|
var resultCount = results.length;
|
||||||
|
@ -433,7 +411,7 @@ var Search = {
|
||||||
if (results.length) {
|
if (results.length) {
|
||||||
var item = results.pop();
|
var item = results.pop();
|
||||||
var listItem = $('<li style="display:none"></li>');
|
var listItem = $('<li style="display:none"></li>');
|
||||||
if (DOCUMENTATION_OPTIONS.FILE_SUFFIX == '') {
|
if (DOCUMENTATION_OPTIONS.FILE_SUFFIX === '') {
|
||||||
// dirhtml builder
|
// dirhtml builder
|
||||||
var dirname = item[0] + '/';
|
var dirname = item[0] + '/';
|
||||||
if (dirname.match(/\/index\/$/)) {
|
if (dirname.match(/\/index\/$/)) {
|
||||||
|
@ -457,16 +435,18 @@ var Search = {
|
||||||
displayNextItem();
|
displayNextItem();
|
||||||
});
|
});
|
||||||
} else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
|
} else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
|
||||||
$.get(DOCUMENTATION_OPTIONS.URL_ROOT + '_sources/' +
|
$.ajax({url: DOCUMENTATION_OPTIONS.URL_ROOT + '_sources/' + item[0] + '.txt',
|
||||||
item[0] + '.txt', function(data) {
|
dataType: "text",
|
||||||
if (data != '') {
|
complete: function(jqxhr, textstatus) {
|
||||||
listItem.append($.makeSearchSummary(data, searchterms, hlterms));
|
var data = jqxhr.responseText;
|
||||||
Search.output.append(listItem);
|
if (data !== '') {
|
||||||
|
listItem.append(Search.makeSearchSummary(data, searchterms, hlterms));
|
||||||
}
|
}
|
||||||
|
Search.output.append(listItem);
|
||||||
listItem.slideDown(5, function() {
|
listItem.slideDown(5, function() {
|
||||||
displayNextItem();
|
displayNextItem();
|
||||||
});
|
});
|
||||||
}, "text");
|
}});
|
||||||
} else {
|
} else {
|
||||||
// no source available, just display title
|
// no source available, just display title
|
||||||
Search.output.append(listItem);
|
Search.output.append(listItem);
|
||||||
|
@ -489,20 +469,32 @@ var Search = {
|
||||||
displayNextItem();
|
displayNextItem();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* search for object names
|
||||||
|
*/
|
||||||
performObjectSearch : function(object, otherterms) {
|
performObjectSearch : function(object, otherterms) {
|
||||||
var filenames = this._index.filenames;
|
var filenames = this._index.filenames;
|
||||||
var objects = this._index.objects;
|
var objects = this._index.objects;
|
||||||
var objnames = this._index.objnames;
|
var objnames = this._index.objnames;
|
||||||
var titles = this._index.titles;
|
var titles = this._index.titles;
|
||||||
|
|
||||||
var importantResults = [];
|
var i;
|
||||||
var objectResults = [];
|
var results = [];
|
||||||
var unimportantResults = [];
|
|
||||||
|
|
||||||
for (var prefix in objects) {
|
for (var prefix in objects) {
|
||||||
for (var name in objects[prefix]) {
|
for (var name in objects[prefix]) {
|
||||||
var fullname = (prefix ? prefix + '.' : '') + name;
|
var fullname = (prefix ? prefix + '.' : '') + name;
|
||||||
if (fullname.toLowerCase().indexOf(object) > -1) {
|
if (fullname.toLowerCase().indexOf(object) > -1) {
|
||||||
|
var score = 0;
|
||||||
|
var parts = fullname.split('.');
|
||||||
|
// check for different match types: exact matches of full name or
|
||||||
|
// "last name" (i.e. last dotted part)
|
||||||
|
if (fullname == object || parts[parts.length - 1] == object) {
|
||||||
|
score += Scorer.objNameMatch;
|
||||||
|
// matches in last name
|
||||||
|
} else if (parts[parts.length - 1].indexOf(object) > -1) {
|
||||||
|
score += Scorer.objPartialMatch;
|
||||||
|
}
|
||||||
var match = objects[prefix][name];
|
var match = objects[prefix][name];
|
||||||
var objname = objnames[match[1]][2];
|
var objname = objnames[match[1]][2];
|
||||||
var title = titles[match[0]];
|
var title = titles[match[0]];
|
||||||
|
@ -512,7 +504,7 @@ var Search = {
|
||||||
var haystack = (prefix + ' ' + name + ' ' +
|
var haystack = (prefix + ' ' + name + ' ' +
|
||||||
objname + ' ' + title).toLowerCase();
|
objname + ' ' + title).toLowerCase();
|
||||||
var allfound = true;
|
var allfound = true;
|
||||||
for (var i = 0; i < otherterms.length; i++) {
|
for (i = 0; i < otherterms.length; i++) {
|
||||||
if (haystack.indexOf(otherterms[i]) == -1) {
|
if (haystack.indexOf(otherterms[i]) == -1) {
|
||||||
allfound = false;
|
allfound = false;
|
||||||
break;
|
break;
|
||||||
|
@ -523,37 +515,107 @@ var Search = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var descr = objname + _(', in ') + title;
|
var descr = objname + _(', in ') + title;
|
||||||
anchor = match[3];
|
|
||||||
if (anchor == '')
|
var anchor = match[3];
|
||||||
|
if (anchor === '')
|
||||||
anchor = fullname;
|
anchor = fullname;
|
||||||
else if (anchor == '-')
|
else if (anchor == '-')
|
||||||
anchor = objnames[match[1]][1] + '-' + fullname;
|
anchor = objnames[match[1]][1] + '-' + fullname;
|
||||||
result = [filenames[match[0]], fullname, '#'+anchor, descr];
|
// add custom score for some objects according to scorer
|
||||||
switch (match[2]) {
|
if (Scorer.objPrio.hasOwnProperty(match[2])) {
|
||||||
case 1: objectResults.push(result); break;
|
score += Scorer.objPrio[match[2]];
|
||||||
case 0: importantResults.push(result); break;
|
} else {
|
||||||
case 2: unimportantResults.push(result); break;
|
score += Scorer.objPrioDefault;
|
||||||
}
|
}
|
||||||
|
results.push([filenames[match[0]], fullname, '#'+anchor, descr, score]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// sort results descending
|
return results;
|
||||||
objectResults.sort(function(a, b) {
|
},
|
||||||
return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
|
|
||||||
|
/**
|
||||||
|
* search for full-text terms in the index
|
||||||
|
*/
|
||||||
|
performTermsSearch : function(searchterms, excluded, terms, score) {
|
||||||
|
var filenames = this._index.filenames;
|
||||||
|
var titles = this._index.titles;
|
||||||
|
|
||||||
|
var i, j, file, files;
|
||||||
|
var fileMap = {};
|
||||||
|
var results = [];
|
||||||
|
|
||||||
|
// perform the search on the required terms
|
||||||
|
for (i = 0; i < searchterms.length; i++) {
|
||||||
|
var word = searchterms[i];
|
||||||
|
// no match but word was a required one
|
||||||
|
if ((files = terms[word]) === undefined)
|
||||||
|
break;
|
||||||
|
if (files.length === undefined) {
|
||||||
|
files = [files];
|
||||||
|
}
|
||||||
|
// create the mapping
|
||||||
|
for (j = 0; j < files.length; j++) {
|
||||||
|
file = files[j];
|
||||||
|
if (file in fileMap)
|
||||||
|
fileMap[file].push(word);
|
||||||
|
else
|
||||||
|
fileMap[file] = [word];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// now check if the files don't contain excluded terms
|
||||||
|
for (file in fileMap) {
|
||||||
|
var valid = true;
|
||||||
|
|
||||||
|
// check if all requirements are matched
|
||||||
|
if (fileMap[file].length != searchterms.length)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
// ensure that none of the excluded terms is in the search result
|
||||||
|
for (i = 0; i < excluded.length; i++) {
|
||||||
|
if (terms[excluded[i]] == file ||
|
||||||
|
$u.contains(terms[excluded[i]] || [], file)) {
|
||||||
|
valid = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// if we have still a valid result we can add it to the result list
|
||||||
|
if (valid) {
|
||||||
|
results.push([filenames[file], titles[file], '', null, score]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return results;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* helper function to return a node containing the
|
||||||
|
* search summary for a given text. keywords is a list
|
||||||
|
* of stemmed words, hlwords is the list of normal, unstemmed
|
||||||
|
* words. the first one is used to find the occurance, the
|
||||||
|
* latter for highlighting it.
|
||||||
|
*/
|
||||||
|
makeSearchSummary : function(text, keywords, hlwords) {
|
||||||
|
var textLower = text.toLowerCase();
|
||||||
|
var start = 0;
|
||||||
|
$.each(keywords, function() {
|
||||||
|
var i = textLower.indexOf(this.toLowerCase());
|
||||||
|
if (i > -1)
|
||||||
|
start = i;
|
||||||
});
|
});
|
||||||
|
start = Math.max(start - 120, 0);
|
||||||
importantResults.sort(function(a, b) {
|
var excerpt = ((start > 0) ? '...' : '') +
|
||||||
return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
|
$.trim(text.substr(start, 240)) +
|
||||||
|
((start + 240 - text.length) ? '...' : '');
|
||||||
|
var rv = $('<div class="context"></div>').text(excerpt);
|
||||||
|
$.each(hlwords, function() {
|
||||||
|
rv = rv.highlightText(this, 'highlighted');
|
||||||
});
|
});
|
||||||
|
return rv;
|
||||||
unimportantResults.sort(function(a, b) {
|
|
||||||
return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
|
|
||||||
});
|
|
||||||
|
|
||||||
return [importantResults, objectResults, unimportantResults]
|
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
Search.init();
|
Search.init();
|
||||||
|
|
50
docs/_build/html/_static/underscore.js
vendored
50
docs/_build/html/_static/underscore.js
vendored
|
@ -1,23 +1,31 @@
|
||||||
// Underscore.js 0.5.5
|
// Underscore.js 1.3.1
|
||||||
// (c) 2009 Jeremy Ashkenas, DocumentCloud Inc.
|
// (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
|
||||||
// Underscore is freely distributable under the terms of the MIT license.
|
// Underscore is freely distributable under the MIT license.
|
||||||
// Portions of Underscore are inspired by or borrowed from Prototype.js,
|
// Portions of Underscore are inspired or borrowed from Prototype,
|
||||||
// Oliver Steele's Functional, and John Resig's Micro-Templating.
|
// Oliver Steele's Functional, and John Resig's Micro-Templating.
|
||||||
// For all details and documentation:
|
// For all details and documentation:
|
||||||
// http://documentcloud.github.com/underscore/
|
// http://documentcloud.github.com/underscore
|
||||||
(function(){var j=this,n=j._,i=function(a){this._wrapped=a},m=typeof StopIteration!=="undefined"?StopIteration:"__break__",b=j._=function(a){return new i(a)};if(typeof exports!=="undefined")exports._=b;var k=Array.prototype.slice,o=Array.prototype.unshift,p=Object.prototype.toString,q=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;b.VERSION="0.5.5";b.each=function(a,c,d){try{if(a.forEach)a.forEach(c,d);else if(b.isArray(a)||b.isArguments(a))for(var e=0,f=a.length;e<f;e++)c.call(d,
|
(function(){function q(a,c,d){if(a===c)return a!==0||1/a==1/c;if(a==null||c==null)return a===c;if(a._chain)a=a._wrapped;if(c._chain)c=c._wrapped;if(a.isEqual&&b.isFunction(a.isEqual))return a.isEqual(c);if(c.isEqual&&b.isFunction(c.isEqual))return c.isEqual(a);var e=l.call(a);if(e!=l.call(c))return false;switch(e){case "[object String]":return a==String(c);case "[object Number]":return a!=+a?c!=+c:a==0?1/a==1/c:a==+c;case "[object Date]":case "[object Boolean]":return+a==+c;case "[object RegExp]":return a.source==
|
||||||
a[e],e,a);else{var g=b.keys(a);f=g.length;for(e=0;e<f;e++)c.call(d,a[g[e]],g[e],a)}}catch(h){if(h!=m)throw h;}return a};b.map=function(a,c,d){if(a&&b.isFunction(a.map))return a.map(c,d);var e=[];b.each(a,function(f,g,h){e.push(c.call(d,f,g,h))});return e};b.reduce=function(a,c,d,e){if(a&&b.isFunction(a.reduce))return a.reduce(b.bind(d,e),c);b.each(a,function(f,g,h){c=d.call(e,c,f,g,h)});return c};b.reduceRight=function(a,c,d,e){if(a&&b.isFunction(a.reduceRight))return a.reduceRight(b.bind(d,e),c);
|
c.source&&a.global==c.global&&a.multiline==c.multiline&&a.ignoreCase==c.ignoreCase}if(typeof a!="object"||typeof c!="object")return false;for(var f=d.length;f--;)if(d[f]==a)return true;d.push(a);var f=0,g=true;if(e=="[object Array]"){if(f=a.length,g=f==c.length)for(;f--;)if(!(g=f in a==f in c&&q(a[f],c[f],d)))break}else{if("constructor"in a!="constructor"in c||a.constructor!=c.constructor)return false;for(var h in a)if(b.has(a,h)&&(f++,!(g=b.has(c,h)&&q(a[h],c[h],d))))break;if(g){for(h in c)if(b.has(c,
|
||||||
var f=b.clone(b.toArray(a)).reverse();b.each(f,function(g,h){c=d.call(e,c,g,h,a)});return c};b.detect=function(a,c,d){var e;b.each(a,function(f,g,h){if(c.call(d,f,g,h)){e=f;b.breakLoop()}});return e};b.select=function(a,c,d){if(a&&b.isFunction(a.filter))return a.filter(c,d);var e=[];b.each(a,function(f,g,h){c.call(d,f,g,h)&&e.push(f)});return e};b.reject=function(a,c,d){var e=[];b.each(a,function(f,g,h){!c.call(d,f,g,h)&&e.push(f)});return e};b.all=function(a,c,d){c=c||b.identity;if(a&&b.isFunction(a.every))return a.every(c,
|
h)&&!f--)break;g=!f}}d.pop();return g}var r=this,G=r._,n={},k=Array.prototype,o=Object.prototype,i=k.slice,H=k.unshift,l=o.toString,I=o.hasOwnProperty,w=k.forEach,x=k.map,y=k.reduce,z=k.reduceRight,A=k.filter,B=k.every,C=k.some,p=k.indexOf,D=k.lastIndexOf,o=Array.isArray,J=Object.keys,s=Function.prototype.bind,b=function(a){return new m(a)};if(typeof exports!=="undefined"){if(typeof module!=="undefined"&&module.exports)exports=module.exports=b;exports._=b}else r._=b;b.VERSION="1.3.1";var j=b.each=
|
||||||
d);var e=true;b.each(a,function(f,g,h){(e=e&&c.call(d,f,g,h))||b.breakLoop()});return e};b.any=function(a,c,d){c=c||b.identity;if(a&&b.isFunction(a.some))return a.some(c,d);var e=false;b.each(a,function(f,g,h){if(e=c.call(d,f,g,h))b.breakLoop()});return e};b.include=function(a,c){if(b.isArray(a))return b.indexOf(a,c)!=-1;var d=false;b.each(a,function(e){if(d=e===c)b.breakLoop()});return d};b.invoke=function(a,c){var d=b.rest(arguments,2);return b.map(a,function(e){return(c?e[c]:e).apply(e,d)})};b.pluck=
|
b.forEach=function(a,c,d){if(a!=null)if(w&&a.forEach===w)a.forEach(c,d);else if(a.length===+a.length)for(var e=0,f=a.length;e<f;e++){if(e in a&&c.call(d,a[e],e,a)===n)break}else for(e in a)if(b.has(a,e)&&c.call(d,a[e],e,a)===n)break};b.map=b.collect=function(a,c,b){var e=[];if(a==null)return e;if(x&&a.map===x)return a.map(c,b);j(a,function(a,g,h){e[e.length]=c.call(b,a,g,h)});if(a.length===+a.length)e.length=a.length;return e};b.reduce=b.foldl=b.inject=function(a,c,d,e){var f=arguments.length>2;a==
|
||||||
function(a,c){return b.map(a,function(d){return d[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a))return Math.max.apply(Math,a);var e={computed:-Infinity};b.each(a,function(f,g,h){g=c?c.call(d,f,g,h):f;g>=e.computed&&(e={value:f,computed:g})});return e.value};b.min=function(a,c,d){if(!c&&b.isArray(a))return Math.min.apply(Math,a);var e={computed:Infinity};b.each(a,function(f,g,h){g=c?c.call(d,f,g,h):f;g<e.computed&&(e={value:f,computed:g})});return e.value};b.sortBy=function(a,c,d){return b.pluck(b.map(a,
|
null&&(a=[]);if(y&&a.reduce===y)return e&&(c=b.bind(c,e)),f?a.reduce(c,d):a.reduce(c);j(a,function(a,b,i){f?d=c.call(e,d,a,b,i):(d=a,f=true)});if(!f)throw new TypeError("Reduce of empty array with no initial value");return d};b.reduceRight=b.foldr=function(a,c,d,e){var f=arguments.length>2;a==null&&(a=[]);if(z&&a.reduceRight===z)return e&&(c=b.bind(c,e)),f?a.reduceRight(c,d):a.reduceRight(c);var g=b.toArray(a).reverse();e&&!f&&(c=b.bind(c,e));return f?b.reduce(g,c,d,e):b.reduce(g,c)};b.find=b.detect=
|
||||||
function(e,f,g){return{value:e,criteria:c.call(d,e,f,g)}}).sort(function(e,f){e=e.criteria;f=f.criteria;return e<f?-1:e>f?1:0}),"value")};b.sortedIndex=function(a,c,d){d=d||b.identity;for(var e=0,f=a.length;e<f;){var g=e+f>>1;d(a[g])<d(c)?(e=g+1):(f=g)}return e};b.toArray=function(a){if(!a)return[];if(a.toArray)return a.toArray();if(b.isArray(a))return a;if(b.isArguments(a))return k.call(a);return b.values(a)};b.size=function(a){return b.toArray(a).length};b.first=function(a,c,d){return c&&!d?k.call(a,
|
function(a,c,b){var e;E(a,function(a,g,h){if(c.call(b,a,g,h))return e=a,true});return e};b.filter=b.select=function(a,c,b){var e=[];if(a==null)return e;if(A&&a.filter===A)return a.filter(c,b);j(a,function(a,g,h){c.call(b,a,g,h)&&(e[e.length]=a)});return e};b.reject=function(a,c,b){var e=[];if(a==null)return e;j(a,function(a,g,h){c.call(b,a,g,h)||(e[e.length]=a)});return e};b.every=b.all=function(a,c,b){var e=true;if(a==null)return e;if(B&&a.every===B)return a.every(c,b);j(a,function(a,g,h){if(!(e=
|
||||||
0,c):a[0]};b.rest=function(a,c,d){return k.call(a,b.isUndefined(c)||d?1:c)};b.last=function(a){return a[a.length-1]};b.compact=function(a){return b.select(a,function(c){return!!c})};b.flatten=function(a){return b.reduce(a,[],function(c,d){if(b.isArray(d))return c.concat(b.flatten(d));c.push(d);return c})};b.without=function(a){var c=b.rest(arguments);return b.select(a,function(d){return!b.include(c,d)})};b.uniq=function(a,c){return b.reduce(a,[],function(d,e,f){if(0==f||(c===true?b.last(d)!=e:!b.include(d,
|
e&&c.call(b,a,g,h)))return n});return e};var E=b.some=b.any=function(a,c,d){c||(c=b.identity);var e=false;if(a==null)return e;if(C&&a.some===C)return a.some(c,d);j(a,function(a,b,h){if(e||(e=c.call(d,a,b,h)))return n});return!!e};b.include=b.contains=function(a,c){var b=false;if(a==null)return b;return p&&a.indexOf===p?a.indexOf(c)!=-1:b=E(a,function(a){return a===c})};b.invoke=function(a,c){var d=i.call(arguments,2);return b.map(a,function(a){return(b.isFunction(c)?c||a:a[c]).apply(a,d)})};b.pluck=
|
||||||
e)))d.push(e);return d})};b.intersect=function(a){var c=b.rest(arguments);return b.select(b.uniq(a),function(d){return b.all(c,function(e){return b.indexOf(e,d)>=0})})};b.zip=function(){for(var a=b.toArray(arguments),c=b.max(b.pluck(a,"length")),d=new Array(c),e=0;e<c;e++)d[e]=b.pluck(a,String(e));return d};b.indexOf=function(a,c){if(a.indexOf)return a.indexOf(c);for(var d=0,e=a.length;d<e;d++)if(a[d]===c)return d;return-1};b.lastIndexOf=function(a,c){if(a.lastIndexOf)return a.lastIndexOf(c);for(var d=
|
function(a,c){return b.map(a,function(a){return a[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a))return Math.max.apply(Math,a);if(!c&&b.isEmpty(a))return-Infinity;var e={computed:-Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b>=e.computed&&(e={value:a,computed:b})});return e.value};b.min=function(a,c,d){if(!c&&b.isArray(a))return Math.min.apply(Math,a);if(!c&&b.isEmpty(a))return Infinity;var e={computed:Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b<e.computed&&(e={value:a,computed:b})});
|
||||||
a.length;d--;)if(a[d]===c)return d;return-1};b.range=function(a,c,d){var e=b.toArray(arguments),f=e.length<=1;a=f?0:e[0];c=f?e[0]:e[1];d=e[2]||1;e=Math.ceil((c-a)/d);if(e<=0)return[];e=new Array(e);f=a;for(var g=0;1;f+=d){if((d>0?f-c:c-f)>=0)return e;e[g++]=f}};b.bind=function(a,c){var d=b.rest(arguments,2);return function(){return a.apply(c||j,d.concat(b.toArray(arguments)))}};b.bindAll=function(a){var c=b.rest(arguments);if(c.length==0)c=b.functions(a);b.each(c,function(d){a[d]=b.bind(a[d],a)});
|
return e.value};b.shuffle=function(a){var b=[],d;j(a,function(a,f){f==0?b[0]=a:(d=Math.floor(Math.random()*(f+1)),b[f]=b[d],b[d]=a)});return b};b.sortBy=function(a,c,d){return b.pluck(b.map(a,function(a,b,g){return{value:a,criteria:c.call(d,a,b,g)}}).sort(function(a,b){var c=a.criteria,d=b.criteria;return c<d?-1:c>d?1:0}),"value")};b.groupBy=function(a,c){var d={},e=b.isFunction(c)?c:function(a){return a[c]};j(a,function(a,b){var c=e(a,b);(d[c]||(d[c]=[])).push(a)});return d};b.sortedIndex=function(a,
|
||||||
return a};b.delay=function(a,c){var d=b.rest(arguments,2);return setTimeout(function(){return a.apply(a,d)},c)};b.defer=function(a){return b.delay.apply(b,[a,1].concat(b.rest(arguments)))};b.wrap=function(a,c){return function(){var d=[a].concat(b.toArray(arguments));return c.apply(c,d)}};b.compose=function(){var a=b.toArray(arguments);return function(){for(var c=b.toArray(arguments),d=a.length-1;d>=0;d--)c=[a[d].apply(this,c)];return c[0]}};b.keys=function(a){if(b.isArray(a))return b.range(0,a.length);
|
c,d){d||(d=b.identity);for(var e=0,f=a.length;e<f;){var g=e+f>>1;d(a[g])<d(c)?e=g+1:f=g}return e};b.toArray=function(a){return!a?[]:a.toArray?a.toArray():b.isArray(a)?i.call(a):b.isArguments(a)?i.call(a):b.values(a)};b.size=function(a){return b.toArray(a).length};b.first=b.head=function(a,b,d){return b!=null&&!d?i.call(a,0,b):a[0]};b.initial=function(a,b,d){return i.call(a,0,a.length-(b==null||d?1:b))};b.last=function(a,b,d){return b!=null&&!d?i.call(a,Math.max(a.length-b,0)):a[a.length-1]};b.rest=
|
||||||
var c=[];for(var d in a)q.call(a,d)&&c.push(d);return c};b.values=function(a){return b.map(a,b.identity)};b.functions=function(a){return b.select(b.keys(a),function(c){return b.isFunction(a[c])}).sort()};b.extend=function(a,c){for(var d in c)a[d]=c[d];return a};b.clone=function(a){if(b.isArray(a))return a.slice(0);return b.extend({},a)};b.tap=function(a,c){c(a);return a};b.isEqual=function(a,c){if(a===c)return true;var d=typeof a;if(d!=typeof c)return false;if(a==c)return true;if(!a&&c||a&&!c)return false;
|
b.tail=function(a,b,d){return i.call(a,b==null||d?1:b)};b.compact=function(a){return b.filter(a,function(a){return!!a})};b.flatten=function(a,c){return b.reduce(a,function(a,e){if(b.isArray(e))return a.concat(c?e:b.flatten(e));a[a.length]=e;return a},[])};b.without=function(a){return b.difference(a,i.call(arguments,1))};b.uniq=b.unique=function(a,c,d){var d=d?b.map(a,d):a,e=[];b.reduce(d,function(d,g,h){if(0==h||(c===true?b.last(d)!=g:!b.include(d,g)))d[d.length]=g,e[e.length]=a[h];return d},[]);
|
||||||
if(a.isEqual)return a.isEqual(c);if(b.isDate(a)&&b.isDate(c))return a.getTime()===c.getTime();if(b.isNaN(a)&&b.isNaN(c))return true;if(b.isRegExp(a)&&b.isRegExp(c))return a.source===c.source&&a.global===c.global&&a.ignoreCase===c.ignoreCase&&a.multiline===c.multiline;if(d!=="object")return false;if(a.length&&a.length!==c.length)return false;d=b.keys(a);var e=b.keys(c);if(d.length!=e.length)return false;for(var f in a)if(!b.isEqual(a[f],c[f]))return false;return true};b.isEmpty=function(a){return b.keys(a).length==
|
return e};b.union=function(){return b.uniq(b.flatten(arguments,true))};b.intersection=b.intersect=function(a){var c=i.call(arguments,1);return b.filter(b.uniq(a),function(a){return b.every(c,function(c){return b.indexOf(c,a)>=0})})};b.difference=function(a){var c=b.flatten(i.call(arguments,1));return b.filter(a,function(a){return!b.include(c,a)})};b.zip=function(){for(var a=i.call(arguments),c=b.max(b.pluck(a,"length")),d=Array(c),e=0;e<c;e++)d[e]=b.pluck(a,""+e);return d};b.indexOf=function(a,c,
|
||||||
0};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=function(a){return!!(a&&a.concat&&a.unshift)};b.isArguments=function(a){return a&&b.isNumber(a.length)&&!b.isArray(a)&&!r.call(a,"length")};b.isFunction=function(a){return!!(a&&a.constructor&&a.call&&a.apply)};b.isString=function(a){return!!(a===""||a&&a.charCodeAt&&a.substr)};b.isNumber=function(a){return p.call(a)==="[object Number]"};b.isDate=function(a){return!!(a&&a.getTimezoneOffset&&a.setUTCFullYear)};b.isRegExp=function(a){return!!(a&&
|
d){if(a==null)return-1;var e;if(d)return d=b.sortedIndex(a,c),a[d]===c?d:-1;if(p&&a.indexOf===p)return a.indexOf(c);for(d=0,e=a.length;d<e;d++)if(d in a&&a[d]===c)return d;return-1};b.lastIndexOf=function(a,b){if(a==null)return-1;if(D&&a.lastIndexOf===D)return a.lastIndexOf(b);for(var d=a.length;d--;)if(d in a&&a[d]===b)return d;return-1};b.range=function(a,b,d){arguments.length<=1&&(b=a||0,a=0);for(var d=arguments[2]||1,e=Math.max(Math.ceil((b-a)/d),0),f=0,g=Array(e);f<e;)g[f++]=a,a+=d;return g};
|
||||||
a.test&&a.exec&&(a.ignoreCase||a.ignoreCase===false))};b.isNaN=function(a){return b.isNumber(a)&&isNaN(a)};b.isNull=function(a){return a===null};b.isUndefined=function(a){return typeof a=="undefined"};b.noConflict=function(){j._=n;return this};b.identity=function(a){return a};b.breakLoop=function(){throw m;};var s=0;b.uniqueId=function(a){var c=s++;return a?a+c:c};b.template=function(a,c){a=new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+a.replace(/[\r\t\n]/g,
|
var F=function(){};b.bind=function(a,c){var d,e;if(a.bind===s&&s)return s.apply(a,i.call(arguments,1));if(!b.isFunction(a))throw new TypeError;e=i.call(arguments,2);return d=function(){if(!(this instanceof d))return a.apply(c,e.concat(i.call(arguments)));F.prototype=a.prototype;var b=new F,g=a.apply(b,e.concat(i.call(arguments)));return Object(g)===g?g:b}};b.bindAll=function(a){var c=i.call(arguments,1);c.length==0&&(c=b.functions(a));j(c,function(c){a[c]=b.bind(a[c],a)});return a};b.memoize=function(a,
|
||||||
" ").replace(/'(?=[^%]*%>)/g,"\t").split("'").join("\\'").split("\t").join("'").replace(/<%=(.+?)%>/g,"',$1,'").split("<%").join("');").split("%>").join("p.push('")+"');}return p.join('');");return c?a(c):a};b.forEach=b.each;b.foldl=b.inject=b.reduce;b.foldr=b.reduceRight;b.filter=b.select;b.every=b.all;b.some=b.any;b.head=b.first;b.tail=b.rest;b.methods=b.functions;var l=function(a,c){return c?b(a).chain():a};b.each(b.functions(b),function(a){var c=b[a];i.prototype[a]=function(){var d=b.toArray(arguments);
|
c){var d={};c||(c=b.identity);return function(){var e=c.apply(this,arguments);return b.has(d,e)?d[e]:d[e]=a.apply(this,arguments)}};b.delay=function(a,b){var d=i.call(arguments,2);return setTimeout(function(){return a.apply(a,d)},b)};b.defer=function(a){return b.delay.apply(b,[a,1].concat(i.call(arguments,1)))};b.throttle=function(a,c){var d,e,f,g,h,i=b.debounce(function(){h=g=false},c);return function(){d=this;e=arguments;var b;f||(f=setTimeout(function(){f=null;h&&a.apply(d,e);i()},c));g?h=true:
|
||||||
o.call(d,this._wrapped);return l(c.apply(b,d),this._chain)}});b.each(["pop","push","reverse","shift","sort","splice","unshift"],function(a){var c=Array.prototype[a];i.prototype[a]=function(){c.apply(this._wrapped,arguments);return l(this._wrapped,this._chain)}});b.each(["concat","join","slice"],function(a){var c=Array.prototype[a];i.prototype[a]=function(){return l(c.apply(this._wrapped,arguments),this._chain)}});i.prototype.chain=function(){this._chain=true;return this};i.prototype.value=function(){return this._wrapped}})();
|
a.apply(d,e);i();g=true}};b.debounce=function(a,b){var d;return function(){var e=this,f=arguments;clearTimeout(d);d=setTimeout(function(){d=null;a.apply(e,f)},b)}};b.once=function(a){var b=false,d;return function(){if(b)return d;b=true;return d=a.apply(this,arguments)}};b.wrap=function(a,b){return function(){var d=[a].concat(i.call(arguments,0));return b.apply(this,d)}};b.compose=function(){var a=arguments;return function(){for(var b=arguments,d=a.length-1;d>=0;d--)b=[a[d].apply(this,b)];return b[0]}};
|
||||||
|
b.after=function(a,b){return a<=0?b():function(){if(--a<1)return b.apply(this,arguments)}};b.keys=J||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var c=[],d;for(d in a)b.has(a,d)&&(c[c.length]=d);return c};b.values=function(a){return b.map(a,b.identity)};b.functions=b.methods=function(a){var c=[],d;for(d in a)b.isFunction(a[d])&&c.push(d);return c.sort()};b.extend=function(a){j(i.call(arguments,1),function(b){for(var d in b)a[d]=b[d]});return a};b.defaults=function(a){j(i.call(arguments,
|
||||||
|
1),function(b){for(var d in b)a[d]==null&&(a[d]=b[d])});return a};b.clone=function(a){return!b.isObject(a)?a:b.isArray(a)?a.slice():b.extend({},a)};b.tap=function(a,b){b(a);return a};b.isEqual=function(a,b){return q(a,b,[])};b.isEmpty=function(a){if(b.isArray(a)||b.isString(a))return a.length===0;for(var c in a)if(b.has(a,c))return false;return true};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=o||function(a){return l.call(a)=="[object Array]"};b.isObject=function(a){return a===Object(a)};
|
||||||
|
b.isArguments=function(a){return l.call(a)=="[object Arguments]"};if(!b.isArguments(arguments))b.isArguments=function(a){return!(!a||!b.has(a,"callee"))};b.isFunction=function(a){return l.call(a)=="[object Function]"};b.isString=function(a){return l.call(a)=="[object String]"};b.isNumber=function(a){return l.call(a)=="[object Number]"};b.isNaN=function(a){return a!==a};b.isBoolean=function(a){return a===true||a===false||l.call(a)=="[object Boolean]"};b.isDate=function(a){return l.call(a)=="[object Date]"};
|
||||||
|
b.isRegExp=function(a){return l.call(a)=="[object RegExp]"};b.isNull=function(a){return a===null};b.isUndefined=function(a){return a===void 0};b.has=function(a,b){return I.call(a,b)};b.noConflict=function(){r._=G;return this};b.identity=function(a){return a};b.times=function(a,b,d){for(var e=0;e<a;e++)b.call(d,e)};b.escape=function(a){return(""+a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")};b.mixin=function(a){j(b.functions(a),
|
||||||
|
function(c){K(c,b[c]=a[c])})};var L=0;b.uniqueId=function(a){var b=L++;return a?a+b:b};b.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var t=/.^/,u=function(a){return a.replace(/\\\\/g,"\\").replace(/\\'/g,"'")};b.template=function(a,c){var d=b.templateSettings,d="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(d.escape||t,function(a,b){return"',_.escape("+
|
||||||
|
u(b)+"),'"}).replace(d.interpolate||t,function(a,b){return"',"+u(b)+",'"}).replace(d.evaluate||t,function(a,b){return"');"+u(b).replace(/[\r\n\t]/g," ")+";__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');",e=new Function("obj","_",d);return c?e(c,b):function(a){return e.call(this,a,b)}};b.chain=function(a){return b(a).chain()};var m=function(a){this._wrapped=a};b.prototype=m.prototype;var v=function(a,c){return c?b(a).chain():a},K=function(a,c){m.prototype[a]=
|
||||||
|
function(){var a=i.call(arguments);H.call(a,this._wrapped);return v(c.apply(b,a),this._chain)}};b.mixin(b);j("pop,push,reverse,shift,sort,splice,unshift".split(","),function(a){var b=k[a];m.prototype[a]=function(){var d=this._wrapped;b.apply(d,arguments);var e=d.length;(a=="shift"||a=="splice")&&e===0&&delete d[0];return v(d,this._chain)}});j(["concat","join","slice"],function(a){var b=k[a];m.prototype[a]=function(){return v(b.apply(this._wrapped,arguments),this._chain)}});m.prototype.chain=function(){this._chain=
|
||||||
|
true;return this};m.prototype.value=function(){return this._wrapped}}).call(this);
|
||||||
|
|
2
docs/_build/html/_static/websupport.js
vendored
2
docs/_build/html/_static/websupport.js
vendored
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* sphinx.websupport utilties for all documentation.
|
* sphinx.websupport utilties for all documentation.
|
||||||
*
|
*
|
||||||
* :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
|
* :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
|
||||||
* :license: BSD, see LICENSE for details.
|
* :license: BSD, see LICENSE for details.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
15
docs/_build/html/advanced.html
vendored
15
docs/_build/html/advanced.html
vendored
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
|
||||||
|
@ -14,7 +13,7 @@
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT: '',
|
URL_ROOT: './',
|
||||||
VERSION: '1.8.1',
|
VERSION: '1.8.1',
|
||||||
COLLAPSE_INDEX: false,
|
COLLAPSE_INDEX: false,
|
||||||
FILE_SUFFIX: '.html',
|
FILE_SUFFIX: '.html',
|
||||||
|
@ -103,10 +102,12 @@
|
||||||
<div class="admonition note">
|
<div class="admonition note">
|
||||||
<p class="first admonition-title">Note</p>
|
<p class="first admonition-title">Note</p>
|
||||||
<p>Although it seems intuitive to use the <cite>#</cite> character for tags, there’s a drawback: on most shells, this is interpreted as a meta-character starting a comment. This means that if you type</p>
|
<p>Although it seems intuitive to use the <cite>#</cite> character for tags, there’s a drawback: on most shells, this is interpreted as a meta-character starting a comment. This means that if you type</p>
|
||||||
<div class="highlight-note"><pre>jrnl Implemented endless scrolling on the #frontend of our website.</pre>
|
<div class="highlight-note"><div class="highlight"><pre>jrnl Implemented endless scrolling on the #frontend of our website.
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>your bash will chop off everything after the <tt class="docutils literal"><span class="pre">#</span></tt> before passing it to _jrnl_). To avoid this, wrap your input into quotation marks like this:</p>
|
<p>your bash will chop off everything after the <tt class="docutils literal"><span class="pre">#</span></tt> before passing it to _jrnl_). To avoid this, wrap your input into quotation marks like this:</p>
|
||||||
<div class="highlight-note"><pre>jrnl "Implemented endless scrolling on the #frontend of our website."</pre>
|
<div class="highlight-note"><div class="highlight"><pre>jrnl "Implemented endless scrolling on the #frontend of our website."
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p class="last">Or use the built-in prompt or an external editor to compose your entries.</p>
|
<p class="last">Or use the built-in prompt or an external editor to compose your entries.</p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -142,9 +143,11 @@
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>The <tt class="docutils literal"><span class="pre">default</span></tt> journal gets created the first time you start _jrnl_. Now you can access the <tt class="docutils literal"><span class="pre">work</span></tt> journal by using <tt class="docutils literal"><span class="pre">jrnl</span> <span class="pre">work</span></tt> instead of <tt class="docutils literal"><span class="pre">jrnl</span></tt>, eg.</p>
|
<p>The <tt class="docutils literal"><span class="pre">default</span></tt> journal gets created the first time you start _jrnl_. Now you can access the <tt class="docutils literal"><span class="pre">work</span></tt> journal by using <tt class="docutils literal"><span class="pre">jrnl</span> <span class="pre">work</span></tt> instead of <tt class="docutils literal"><span class="pre">jrnl</span></tt>, eg.</p>
|
||||||
<div class="highlight-python"><pre>jrnl work at 10am: Meeting with @Steve</pre>
|
<div class="highlight-python"><div class="highlight"><pre>jrnl work at 10am: Meeting with @Steve
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="highlight-python"><pre>jrnl work -n 3</pre>
|
<div class="highlight-python"><div class="highlight"><pre>jrnl work -n 3
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>will both use <tt class="docutils literal"><span class="pre">~/work.txt</span></tt>, while <tt class="docutils literal"><span class="pre">jrnl</span> <span class="pre">-n</span> <span class="pre">3</span></tt> will display the last three entries from <tt class="docutils literal"><span class="pre">~/journal.txt</span></tt> (and so does <tt class="docutils literal"><span class="pre">jrnl</span> <span class="pre">default</span> <span class="pre">-n</span> <span class="pre">3</span></tt>).</p>
|
<p>will both use <tt class="docutils literal"><span class="pre">~/work.txt</span></tt>, while <tt class="docutils literal"><span class="pre">jrnl</span> <span class="pre">-n</span> <span class="pre">3</span></tt> will display the last three entries from <tt class="docutils literal"><span class="pre">~/journal.txt</span></tt> (and so does <tt class="docutils literal"><span class="pre">jrnl</span> <span class="pre">default</span> <span class="pre">-n</span> <span class="pre">3</span></tt>).</p>
|
||||||
<p>You can also override the default options for each individual journal. If you <tt class="docutils literal"><span class="pre">.jrnl_config</span></tt> looks like this:</p>
|
<p>You can also override the default options for each individual journal. If you <tt class="docutils literal"><span class="pre">.jrnl_config</span></tt> looks like this:</p>
|
||||||
|
|
3
docs/_build/html/encryption.html
vendored
3
docs/_build/html/encryption.html
vendored
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
|
||||||
|
@ -14,7 +13,7 @@
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT: '',
|
URL_ROOT: './',
|
||||||
VERSION: '1.8.1',
|
VERSION: '1.8.1',
|
||||||
COLLAPSE_INDEX: false,
|
COLLAPSE_INDEX: false,
|
||||||
FILE_SUFFIX: '.html',
|
FILE_SUFFIX: '.html',
|
||||||
|
|
23
docs/_build/html/export.html
vendored
23
docs/_build/html/export.html
vendored
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
|
||||||
|
@ -14,7 +13,7 @@
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT: '',
|
URL_ROOT: './',
|
||||||
VERSION: '1.8.1',
|
VERSION: '1.8.1',
|
||||||
COLLAPSE_INDEX: false,
|
COLLAPSE_INDEX: false,
|
||||||
FILE_SUFFIX: '.html',
|
FILE_SUFFIX: '.html',
|
||||||
|
@ -60,36 +59,42 @@
|
||||||
<div class="section" id="json-export">
|
<div class="section" id="json-export">
|
||||||
<h2>JSON export<a class="headerlink" href="#json-export" title="Permalink to this headline">¶</a></h2>
|
<h2>JSON export<a class="headerlink" href="#json-export" title="Permalink to this headline">¶</a></h2>
|
||||||
<p>Can do:</p>
|
<p>Can do:</p>
|
||||||
<div class="highlight-python"><pre>jrnl --export json</pre>
|
<div class="highlight-python"><div class="highlight"><pre>jrnl --export json
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>Why not create a <a class="reference external" href="http://timeline.verite.co/">beautiful timeline</a> of your journal?</p>
|
<p>Why not create a <a class="reference external" href="http://timeline.verite.co/">beautiful timeline</a> of your journal?</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="markdown-export">
|
<div class="section" id="markdown-export">
|
||||||
<h2>Markdown export<a class="headerlink" href="#markdown-export" title="Permalink to this headline">¶</a></h2>
|
<h2>Markdown export<a class="headerlink" href="#markdown-export" title="Permalink to this headline">¶</a></h2>
|
||||||
<p>Use:</p>
|
<p>Use:</p>
|
||||||
<div class="highlight-python"><pre>jrnl --export markdown</pre>
|
<div class="highlight-python"><div class="highlight"><pre>jrnl --export markdown
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>Markdown is a simple markup language that is human readable and can be used to be rendered to other formats (html, pdf). This README for example is formatted in markdown and github makes it look nice.</p>
|
<p>Markdown is a simple markup language that is human readable and can be used to be rendered to other formats (html, pdf). This README for example is formatted in markdown and github makes it look nice.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="text-export">
|
<div class="section" id="text-export">
|
||||||
<h2>Text export<a class="headerlink" href="#text-export" title="Permalink to this headline">¶</a></h2>
|
<h2>Text export<a class="headerlink" href="#text-export" title="Permalink to this headline">¶</a></h2>
|
||||||
<div class="highlight-python"><pre>jrnl --export text</pre>
|
<div class="highlight-python"><div class="highlight"><pre>jrnl --export text
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>Pretty-prints your entire journal.</p>
|
<p>Pretty-prints your entire journal.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="export-to-files">
|
<div class="section" id="export-to-files">
|
||||||
<h2>Export to files<a class="headerlink" href="#export-to-files" title="Permalink to this headline">¶</a></h2>
|
<h2>Export to files<a class="headerlink" href="#export-to-files" title="Permalink to this headline">¶</a></h2>
|
||||||
<p>You can specify the output file of your exported journal using the <cite>-o</cite> argument:</p>
|
<p>You can specify the output file of your exported journal using the <cite>-o</cite> argument:</p>
|
||||||
<div class="highlight-python"><pre>jrnl --export md -o journal.md</pre>
|
<div class="highlight-python"><div class="highlight"><pre>jrnl --export md -o journal.md
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>The above command will generate a file named <cite>journal.md</cite>. If the <cite>-o</cite> argument is a directory, jrnl will export each entry into an individual file:</p>
|
<p>The above command will generate a file named <cite>journal.md</cite>. If the <cite>-o</cite> argument is a directory, jrnl will export each entry into an individual file:</p>
|
||||||
<div class="highlight-python"><pre>jrnl --export json -o my_entries/</pre>
|
<div class="highlight-python"><div class="highlight"><pre>jrnl --export json -o my_entries/
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>The contents of <cite>my_entries/</cite> will then look like this:</p>
|
<p>The contents of <cite>my_entries/</cite> will then look like this:</p>
|
||||||
<div class="highlight-output"><pre>my_entries/
|
<div class="highlight-output"><div class="highlight"><pre>my_entries/
|
||||||
|- 2013_06_03_a-beautiful-day.json
|
|- 2013_06_03_a-beautiful-day.json
|
||||||
|- 2013_06_07_dinner-with-gabriel.json
|
|- 2013_06_07_dinner-with-gabriel.json
|
||||||
|- ...</pre>
|
|- ...
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
4
docs/_build/html/genindex.html
vendored
4
docs/_build/html/genindex.html
vendored
|
@ -1,6 +1,4 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
|
||||||
|
@ -16,7 +14,7 @@
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT: '',
|
URL_ROOT: './',
|
||||||
VERSION: '1.8.1',
|
VERSION: '1.8.1',
|
||||||
COLLAPSE_INDEX: false,
|
COLLAPSE_INDEX: false,
|
||||||
FILE_SUFFIX: '.html',
|
FILE_SUFFIX: '.html',
|
||||||
|
|
5
docs/_build/html/index.html
vendored
5
docs/_build/html/index.html
vendored
|
@ -1,5 +1,4 @@
|
||||||
|
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
|
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
|
||||||
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
|
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
|
||||||
|
@ -26,9 +25,9 @@
|
||||||
<h1>Collect your thoughts and notes <br />without leaving the command line</h1>
|
<h1>Collect your thoughts and notes <br />without leaving the command line</h1>
|
||||||
</div>
|
</div>
|
||||||
<div id="prompt">
|
<div id="prompt">
|
||||||
<div class="pleft" onlick="next(); return false;"><i class="icon left"></i></div>
|
<div class="pleft" onclick="reset(); prev(); return false;"><i class="icon left"></i></div>
|
||||||
<div class="terminal">$ jrnl <span id="args"></span><span id="input">today: Started writing my memoirs. On the command line. Like a boss.</span><div id="output"></div></div>
|
<div class="terminal">$ jrnl <span id="args"></span><span id="input">today: Started writing my memoirs. On the command line. Like a boss.</span><div id="output"></div></div>
|
||||||
<div class="pright" onclick="next(); return false;"><i class="icon right"></i></div>
|
<div class="pright" onclick="reset(); next(); return false;"><i class="icon right"></i></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="nav">
|
<div id="nav">
|
||||||
|
|
17
docs/_build/html/installation.html
vendored
17
docs/_build/html/installation.html
vendored
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
|
||||||
|
@ -14,7 +13,7 @@
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT: '',
|
URL_ROOT: './',
|
||||||
VERSION: '1.8.1',
|
VERSION: '1.8.1',
|
||||||
COLLAPSE_INDEX: false,
|
COLLAPSE_INDEX: false,
|
||||||
FILE_SUFFIX: '.html',
|
FILE_SUFFIX: '.html',
|
||||||
|
@ -45,10 +44,12 @@
|
||||||
<div class="section" id="installation">
|
<div class="section" id="installation">
|
||||||
<h2>Installation<a class="headerlink" href="#installation" title="Permalink to this headline">¶</a></h2>
|
<h2>Installation<a class="headerlink" href="#installation" title="Permalink to this headline">¶</a></h2>
|
||||||
<p>Install <em>jrnl</em> using pip</p>
|
<p>Install <em>jrnl</em> using pip</p>
|
||||||
<div class="highlight-python"><pre>pip install jrnl</pre>
|
<div class="highlight-python"><div class="highlight"><pre>pip install jrnl
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>Or, if you want the option to encrypt your journal,</p>
|
<p>Or, if you want the option to encrypt your journal,</p>
|
||||||
<div class="highlight-python"><pre>pip install jrnl[encrypted]</pre>
|
<div class="highlight-python"><div class="highlight"><pre>pip install jrnl[encrypted]
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>to install the dependencies for encrypting journals as well.</p>
|
<p>to install the dependencies for encrypting journals as well.</p>
|
||||||
<div class="admonition note">
|
<div class="admonition note">
|
||||||
|
@ -60,11 +61,13 @@
|
||||||
<div class="section" id="quickstart">
|
<div class="section" id="quickstart">
|
||||||
<h2>Quickstart<a class="headerlink" href="#quickstart" title="Permalink to this headline">¶</a></h2>
|
<h2>Quickstart<a class="headerlink" href="#quickstart" title="Permalink to this headline">¶</a></h2>
|
||||||
<p>to make a new entry, just type:</p>
|
<p>to make a new entry, just type:</p>
|
||||||
<div class="highlight-python"><pre>jrnl yesterday: Called in sick. Used the time to clean the house and spent 4h on writing my book.</pre>
|
<div class="highlight-python"><div class="highlight"><pre>jrnl yesterday: Called in sick. Used the time to clean the house and spent 4h on writing my book.
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>and hit return. <tt class="docutils literal"><span class="pre">yesterday:</span></tt> will be interpreted as a time stamp. Everything until the first sentence mark (<tt class="docutils literal"><span class="pre">.?!:</span></tt>) will be interpreted as the title, the rest as the body. In your journal file, the result will look like this:</p>
|
<p>and hit return. <tt class="docutils literal"><span class="pre">yesterday:</span></tt> will be interpreted as a time stamp. Everything until the first sentence mark (<tt class="docutils literal"><span class="pre">.?!:</span></tt>) will be interpreted as the title, the rest as the body. In your journal file, the result will look like this:</p>
|
||||||
<div class="highlight-output"><pre>2012-03-29 09:00 Called in sick.
|
<div class="highlight-output"><div class="highlight"><pre>2012-03-29 09:00 Called in sick.
|
||||||
Used the time to clean the house and spent 4h on writing my book.</pre>
|
Used the time to clean the house and spent 4h on writing my book.
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>If you just call <tt class="docutils literal"><span class="pre">jrnl</span></tt>, you will be prompted to compose your entry - but you can also configure <em>jrnl</em> to use your external editor.</p>
|
<p>If you just call <tt class="docutils literal"><span class="pre">jrnl</span></tt>, you will be prompted to compose your entry - but you can also configure <em>jrnl</em> to use your external editor.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
BIN
docs/_build/html/objects.inv
vendored
BIN
docs/_build/html/objects.inv
vendored
Binary file not shown.
3
docs/_build/html/overview.html
vendored
3
docs/_build/html/overview.html
vendored
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
|
||||||
|
@ -14,7 +13,7 @@
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT: '',
|
URL_ROOT: './',
|
||||||
VERSION: '1.8.1',
|
VERSION: '1.8.1',
|
||||||
COLLAPSE_INDEX: false,
|
COLLAPSE_INDEX: false,
|
||||||
FILE_SUFFIX: '.html',
|
FILE_SUFFIX: '.html',
|
||||||
|
|
15
docs/_build/html/recipes.html
vendored
15
docs/_build/html/recipes.html
vendored
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
|
||||||
|
@ -14,7 +13,7 @@
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT: '',
|
URL_ROOT: './',
|
||||||
VERSION: '1.8.1',
|
VERSION: '1.8.1',
|
||||||
COLLAPSE_INDEX: false,
|
COLLAPSE_INDEX: false,
|
||||||
FILE_SUFFIX: '.html',
|
FILE_SUFFIX: '.html',
|
||||||
|
@ -46,24 +45,28 @@
|
||||||
<div class="section" id="co-occurrence-of-tags">
|
<div class="section" id="co-occurrence-of-tags">
|
||||||
<h3>Co-occurrence of tags<a class="headerlink" href="#co-occurrence-of-tags" title="Permalink to this headline">¶</a></h3>
|
<h3>Co-occurrence of tags<a class="headerlink" href="#co-occurrence-of-tags" title="Permalink to this headline">¶</a></h3>
|
||||||
<p>If I want to find out how often I mentioned my flatmates Alberto and Melo in the same entry, I run</p>
|
<p>If I want to find out how often I mentioned my flatmates Alberto and Melo in the same entry, I run</p>
|
||||||
<div class="highlight-python"><pre>jrnl @alberto --tags | grep @melo</pre>
|
<div class="highlight-python"><div class="highlight"><pre>jrnl @alberto --tags | grep @melo
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>And will get something like <tt class="docutils literal"><span class="pre">@melo:</span> <span class="pre">9</span></tt>, meaning there are 9 entries where both <tt class="docutils literal"><span class="pre">@alberto</span></tt> and <tt class="docutils literal"><span class="pre">@melo</span></tt> are tagged. How does this work? First, <tt class="docutils literal"><span class="pre">jrnl</span> <span class="pre">@alberto</span></tt> will filter the journal to only entries containing the tag <tt class="docutils literal"><span class="pre">@alberto</span></tt>, and then the <tt class="docutils literal"><span class="pre">--tags</span></tt> option will print out how often each tag occurred in this <cite>filtered</cite> journal. Finally, we pipe this to <tt class="docutils literal"><span class="pre">grep</span></tt> which will only display the line containing <tt class="docutils literal"><span class="pre">@melo</span></tt>.</p>
|
<p>And will get something like <tt class="docutils literal"><span class="pre">@melo:</span> <span class="pre">9</span></tt>, meaning there are 9 entries where both <tt class="docutils literal"><span class="pre">@alberto</span></tt> and <tt class="docutils literal"><span class="pre">@melo</span></tt> are tagged. How does this work? First, <tt class="docutils literal"><span class="pre">jrnl</span> <span class="pre">@alberto</span></tt> will filter the journal to only entries containing the tag <tt class="docutils literal"><span class="pre">@alberto</span></tt>, and then the <tt class="docutils literal"><span class="pre">--tags</span></tt> option will print out how often each tag occurred in this <cite>filtered</cite> journal. Finally, we pipe this to <tt class="docutils literal"><span class="pre">grep</span></tt> which will only display the line containing <tt class="docutils literal"><span class="pre">@melo</span></tt>.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="combining-filters">
|
<div class="section" id="combining-filters">
|
||||||
<h3>Combining filters<a class="headerlink" href="#combining-filters" title="Permalink to this headline">¶</a></h3>
|
<h3>Combining filters<a class="headerlink" href="#combining-filters" title="Permalink to this headline">¶</a></h3>
|
||||||
<p>You can do things like</p>
|
<p>You can do things like</p>
|
||||||
<div class="highlight-python"><pre>jrnl @fixed -starred -n 10 -until "jan 2013" --short</pre>
|
<div class="highlight-python"><div class="highlight"><pre>jrnl @fixed -starred -n 10 -until "jan 2013" --short
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>To get a short summary of the 10 most recent, favourited entries before January 1, 2013 that are tagged with <tt class="docutils literal"><span class="pre">@fixed</span></tt>.</p>
|
<p>To get a short summary of the 10 most recent, favourited entries before January 1, 2013 that are tagged with <tt class="docutils literal"><span class="pre">@fixed</span></tt>.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="statistics">
|
<div class="section" id="statistics">
|
||||||
<h3>Statistics<a class="headerlink" href="#statistics" title="Permalink to this headline">¶</a></h3>
|
<h3>Statistics<a class="headerlink" href="#statistics" title="Permalink to this headline">¶</a></h3>
|
||||||
<p>How much did I write last year?</p>
|
<p>How much did I write last year?</p>
|
||||||
<div class="highlight-python"><pre>jrnl -from "jan 1 2013" -until "dec 31 2013" | wc -w</pre>
|
<div class="highlight-python"><div class="highlight"><pre>jrnl -from "jan 1 2013" -until "dec 31 2013" | wc -w
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>Will give you the number of words you wrote in 2013. How long is my average entry?</p>
|
<p>Will give you the number of words you wrote in 2013. How long is my average entry?</p>
|
||||||
<div class="highlight-python"><pre>expr $(jrnl --export text | wc -w) / $(jrnl --short | wc -l)</pre>
|
<div class="highlight-python"><div class="highlight"><pre>expr $(jrnl --export text | wc -w) / $(jrnl --short | wc -l)
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>This will first get the total number of words in the journal and divide it by the number of entries (this works because <tt class="docutils literal"><span class="pre">jrnl</span> <span class="pre">--short</span></tt> will print exactly one line per entry).</p>
|
<p>This will first get the total number of words in the journal and divide it by the number of entries (this works because <tt class="docutils literal"><span class="pre">jrnl</span> <span class="pre">--short</span></tt> will print exactly one line per entry).</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
5
docs/_build/html/search.html
vendored
5
docs/_build/html/search.html
vendored
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
|
||||||
|
@ -14,7 +13,7 @@
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT: '',
|
URL_ROOT: './',
|
||||||
VERSION: '1.8.1',
|
VERSION: '1.8.1',
|
||||||
COLLAPSE_INDEX: false,
|
COLLAPSE_INDEX: false,
|
||||||
FILE_SUFFIX: '.html',
|
FILE_SUFFIX: '.html',
|
||||||
|
@ -30,6 +29,8 @@
|
||||||
jQuery(function() { Search.loadIndex("searchindex.js"); });
|
jQuery(function() { Search.loadIndex("searchindex.js"); });
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<script type="text/javascript" id="searchindexloader"></script>
|
||||||
|
|
||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
|
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
|
||||||
<link rel="apple-touch-icon-precomposed" href="_static/img/favicon-152.png">
|
<link rel="apple-touch-icon-precomposed" href="_static/img/favicon-152.png">
|
||||||
|
|
2
docs/_build/html/searchindex.js
vendored
2
docs/_build/html/searchindex.js
vendored
File diff suppressed because one or more lines are too long
37
docs/_build/html/usage.html
vendored
37
docs/_build/html/usage.html
vendored
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
|
||||||
|
@ -14,7 +13,7 @@
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT: '',
|
URL_ROOT: './',
|
||||||
VERSION: '1.8.1',
|
VERSION: '1.8.1',
|
||||||
COLLAPSE_INDEX: false,
|
COLLAPSE_INDEX: false,
|
||||||
FILE_SUFFIX: '.html',
|
FILE_SUFFIX: '.html',
|
||||||
|
@ -55,7 +54,8 @@
|
||||||
<div class="section" id="composing-entries">
|
<div class="section" id="composing-entries">
|
||||||
<h2>Composing Entries<a class="headerlink" href="#composing-entries" title="Permalink to this headline">¶</a></h2>
|
<h2>Composing Entries<a class="headerlink" href="#composing-entries" title="Permalink to this headline">¶</a></h2>
|
||||||
<p>Composing mode is entered by either starting <tt class="docutils literal"><span class="pre">jrnl</span></tt> without any arguments – which will prompt you to write an entry or launch your editor – or by just writing an entry on the prompt, such as:</p>
|
<p>Composing mode is entered by either starting <tt class="docutils literal"><span class="pre">jrnl</span></tt> without any arguments – which will prompt you to write an entry or launch your editor – or by just writing an entry on the prompt, such as:</p>
|
||||||
<div class="highlight-python"><pre>jrnl today at 3am: I just met Steve Buscemi in a bar! He looked funny.</pre>
|
<div class="highlight-python"><div class="highlight"><pre>jrnl today at 3am: I just met Steve Buscemi in a bar! He looked funny.
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>You can also import an entry directly from a file:</p>
|
<p>You can also import an entry directly from a file:</p>
|
||||||
<div class="highlight-python"><div class="highlight"><pre><span class="n">jrnl</span> <span class="o"><</span> <span class="n">my_entry</span><span class="o">.</span><span class="n">txt</span>
|
<div class="highlight-python"><div class="highlight"><pre><span class="n">jrnl</span> <span class="o"><</span> <span class="n">my_entry</span><span class="o">.</span><span class="n">txt</span>
|
||||||
|
@ -77,7 +77,8 @@
|
||||||
<div class="section" id="starring-entries">
|
<div class="section" id="starring-entries">
|
||||||
<h3>Starring entries<a class="headerlink" href="#starring-entries" title="Permalink to this headline">¶</a></h3>
|
<h3>Starring entries<a class="headerlink" href="#starring-entries" title="Permalink to this headline">¶</a></h3>
|
||||||
<p>To mark an entry as a favourite, simply “star” it:</p>
|
<p>To mark an entry as a favourite, simply “star” it:</p>
|
||||||
<div class="highlight-python"><pre>jrnl last sunday *: Best day of my life.</pre>
|
<div class="highlight-python"><div class="highlight"><pre>jrnl last sunday *: Best day of my life.
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>If you don’t want to add a date (ie. your entry will be dated as now), The following options are equivalent:</p>
|
<p>If you don’t want to add a date (ie. your entry will be dated as now), The following options are equivalent:</p>
|
||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
|
@ -93,10 +94,12 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="viewing">
|
<div class="section" id="viewing">
|
||||||
<h2>Viewing<a class="headerlink" href="#viewing" title="Permalink to this headline">¶</a></h2>
|
<h2>Viewing<a class="headerlink" href="#viewing" title="Permalink to this headline">¶</a></h2>
|
||||||
<div class="highlight-python"><pre>jrnl -n 10</pre>
|
<div class="highlight-python"><div class="highlight"><pre>jrnl -n 10
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>will list you the ten latest entries (if you’re lazy, <tt class="docutils literal"><span class="pre">jrnl</span> <span class="pre">-10</span></tt> will do the same),</p>
|
<p>will list you the ten latest entries (if you’re lazy, <tt class="docutils literal"><span class="pre">jrnl</span> <span class="pre">-10</span></tt> will do the same),</p>
|
||||||
<div class="highlight-python"><pre>jrnl -from "last year" -until march</pre>
|
<div class="highlight-python"><div class="highlight"><pre>jrnl -from "last year" -until march
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>everything that happened from the start of last year to the start of last march. To only see your favourite entries, use</p>
|
<p>everything that happened from the start of last year to the start of last march. To only see your favourite entries, use</p>
|
||||||
<div class="highlight-python"><div class="highlight"><pre><span class="n">jrnl</span> <span class="o">-</span><span class="n">starred</span>
|
<div class="highlight-python"><div class="highlight"><pre><span class="n">jrnl</span> <span class="o">-</span><span class="n">starred</span>
|
||||||
|
@ -106,13 +109,16 @@
|
||||||
<div class="section" id="using-tags">
|
<div class="section" id="using-tags">
|
||||||
<h2>Using Tags<a class="headerlink" href="#using-tags" title="Permalink to this headline">¶</a></h2>
|
<h2>Using Tags<a class="headerlink" href="#using-tags" title="Permalink to this headline">¶</a></h2>
|
||||||
<p>Keep track of people, projects or locations, by tagging them with an <tt class="docutils literal"><span class="pre">@</span></tt> in your entries</p>
|
<p>Keep track of people, projects or locations, by tagging them with an <tt class="docutils literal"><span class="pre">@</span></tt> in your entries</p>
|
||||||
<div class="highlight-python"><pre>jrnl Had a wonderful day on the @beach with @Tom and @Anna.</pre>
|
<div class="highlight-python"><div class="highlight"><pre>jrnl Had a wonderful day on the @beach with @Tom and @Anna.
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>You can filter your journal entries just like this:</p>
|
<p>You can filter your journal entries just like this:</p>
|
||||||
<div class="highlight-python"><pre>jrnl @pinkie @WorldDomination</pre>
|
<div class="highlight-python"><div class="highlight"><pre>jrnl @pinkie @WorldDomination
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>Will print all entries in which either <tt class="docutils literal"><span class="pre">@pinkie</span></tt> or <tt class="docutils literal"><span class="pre">@WorldDomination</span></tt> occurred.</p>
|
<p>Will print all entries in which either <tt class="docutils literal"><span class="pre">@pinkie</span></tt> or <tt class="docutils literal"><span class="pre">@WorldDomination</span></tt> occurred.</p>
|
||||||
<div class="highlight-python"><pre>jrnl -n 5 -and @pineapple @lubricant</pre>
|
<div class="highlight-python"><div class="highlight"><pre>jrnl -n 5 -and @pineapple @lubricant
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>the last five entries containing both <tt class="docutils literal"><span class="pre">@pineapple</span></tt> <strong>and</strong> <tt class="docutils literal"><span class="pre">@lubricant</span></tt>. You can change which symbols you’d like to use for tagging in the configuration.</p>
|
<p>the last five entries containing both <tt class="docutils literal"><span class="pre">@pineapple</span></tt> <strong>and</strong> <tt class="docutils literal"><span class="pre">@lubricant</span></tt>. You can change which symbols you’d like to use for tagging in the configuration.</p>
|
||||||
<div class="admonition note">
|
<div class="admonition note">
|
||||||
|
@ -123,24 +129,27 @@
|
||||||
<div class="section" id="editing-older-entries">
|
<div class="section" id="editing-older-entries">
|
||||||
<h2>Editing older entries<a class="headerlink" href="#editing-older-entries" title="Permalink to this headline">¶</a></h2>
|
<h2>Editing older entries<a class="headerlink" href="#editing-older-entries" title="Permalink to this headline">¶</a></h2>
|
||||||
<p>You can edit selected entries after you wrote them. This is particularly useful when your journal file is encrypted or if you’re using a DayOne journal. To use this feature, you need to have an editor configured in your journal configuration file (see <a class="reference internal" href="advanced.html"><em>advanced usage</em></a>):</p>
|
<p>You can edit selected entries after you wrote them. This is particularly useful when your journal file is encrypted or if you’re using a DayOne journal. To use this feature, you need to have an editor configured in your journal configuration file (see <a class="reference internal" href="advanced.html"><em>advanced usage</em></a>):</p>
|
||||||
<div class="highlight-python"><pre>jrnl -until 1950 @texas -and @history --edit</pre>
|
<div class="highlight-python"><div class="highlight"><pre>jrnl -until 1950 @texas -and @history --edit
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>Will open your editor with all entries tagged with <tt class="docutils literal"><span class="pre">@texas</span></tt> and <tt class="docutils literal"><span class="pre">@history</span></tt> before 1950. You can make any changes to them you want; after you save the file and close the editor, your journal will be updated.</p>
|
<p>Will open your editor with all entries tagged with <tt class="docutils literal"><span class="pre">@texas</span></tt> and <tt class="docutils literal"><span class="pre">@history</span></tt> before 1950. You can make any changes to them you want; after you save the file and close the editor, your journal will be updated.</p>
|
||||||
<p>Of course, if you are using multiple journals, you can also edit e.g. the latest entry of your work journal with <tt class="docutils literal"><span class="pre">jrnl</span> <span class="pre">work</span> <span class="pre">-n</span> <span class="pre">1</span> <span class="pre">--edit</span></tt>. In any case, this will bring up your editor and save (and, if applicable, encrypt) your edited journal after you save and exit the editor.</p>
|
<p>Of course, if you are using multiple journals, you can also edit e.g. the latest entry of your work journal with <tt class="docutils literal"><span class="pre">jrnl</span> <span class="pre">work</span> <span class="pre">-n</span> <span class="pre">1</span> <span class="pre">--edit</span></tt>. In any case, this will bring up your editor and save (and, if applicable, encrypt) your edited journal after you save and exit the editor.</p>
|
||||||
<p>You can also use this feature for deleting entries from your journal:</p>
|
<p>You can also use this feature for deleting entries from your journal:</p>
|
||||||
<div class="highlight-python"><pre>jrnl @girlfriend -until 'june 2012' --edit</pre>
|
<div class="highlight-python"><div class="highlight"><pre>jrnl @girlfriend -until 'june 2012' --edit
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>Just select all text, press delete, and everything is gone...</p>
|
<p>Just select all text, press delete, and everything is gone...</p>
|
||||||
<div class="section" id="editing-dayone-journals">
|
<div class="section" id="editing-dayone-journals">
|
||||||
<h3>Editing DayOne Journals<a class="headerlink" href="#editing-dayone-journals" title="Permalink to this headline">¶</a></h3>
|
<h3>Editing DayOne Journals<a class="headerlink" href="#editing-dayone-journals" title="Permalink to this headline">¶</a></h3>
|
||||||
<p>DayOne journals can be edited exactly the same way, however the output looks a little bit different because of the way DayOne stores its entries:</p>
|
<p>DayOne journals can be edited exactly the same way, however the output looks a little bit different because of the way DayOne stores its entries:</p>
|
||||||
<div class="highlight-output"><pre># af8dbd0d43fb55458f11aad586ea2abf
|
<div class="highlight-output"><div class="highlight"><pre># af8dbd0d43fb55458f11aad586ea2abf
|
||||||
2013-05-02 15:30 I told everyone I built my @robot wife for sex.
|
2013-05-02 15:30 I told everyone I built my @robot wife for sex.
|
||||||
But late at night when we're alone we mostly play Battleship.
|
But late at night when we're alone we mostly play Battleship.
|
||||||
|
|
||||||
# 2391048fe24111e1983ed49a20be6f9e
|
# 2391048fe24111e1983ed49a20be6f9e
|
||||||
2013-08-10 03:22 I had all kinds of plans in case of a @zombie attack.
|
2013-08-10 03:22 I had all kinds of plans in case of a @zombie attack.
|
||||||
I just figured I'd be on the other side.</pre>
|
I just figured I'd be on the other side.
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>The long strings starting with hash symbol are the so-called UUIDs, unique identifiers for each entry. Don’t touch them. If you do, then the old entry would get deleted and a new one written, which means that you could DayOne loose data that jrnl can’t handle (such as as the entry’s geolocation).</p>
|
<p>The long strings starting with hash symbol are the so-called UUIDs, unique identifiers for each entry. Don’t touch them. If you do, then the old entry would get deleted and a new one written, which means that you could DayOne loose data that jrnl can’t handle (such as as the entry’s geolocation).</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
4
docs/_themes/jrnl/index.html
vendored
4
docs/_themes/jrnl/index.html
vendored
|
@ -24,9 +24,9 @@
|
||||||
<h1>Collect your thoughts and notes <br />without leaving the command line</h1>
|
<h1>Collect your thoughts and notes <br />without leaving the command line</h1>
|
||||||
</div>
|
</div>
|
||||||
<div id="prompt">
|
<div id="prompt">
|
||||||
<div class="pleft" onlick="next(); return false;"><i class="icon left"></i></div>
|
<div class="pleft" onclick="reset(); prev(); return false;"><i class="icon left"></i></div>
|
||||||
<div class="terminal">$ jrnl <span id="args"></span><span id="input">today: Started writing my memoirs. On the command line. Like a boss.</span><div id="output"></div></div>
|
<div class="terminal">$ jrnl <span id="args"></span><span id="input">today: Started writing my memoirs. On the command line. Like a boss.</span><div id="output"></div></div>
|
||||||
<div class="pright" onclick="next(); return false;"><i class="icon right"></i></div>
|
<div class="pright" onclick="reset(); next(); return false;"><i class="icon right"></i></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="nav">
|
<div id="nav">
|
||||||
|
|
51
docs/_themes/jrnl/static/js/landing.js
vendored
51
docs/_themes/jrnl/static/js/landing.js
vendored
|
@ -11,18 +11,23 @@ var phrases = [
|
||||||
var args = document.getElementById("args");
|
var args = document.getElementById("args");
|
||||||
var input = document.getElementById("input");
|
var input = document.getElementById("input");
|
||||||
var output = document.getElementById("output");
|
var output = document.getElementById("output");
|
||||||
var right = document.getElementById("right");
|
|
||||||
var left = document.getElementById("left");
|
|
||||||
var current = 0
|
var current = 0
|
||||||
var timer = null;
|
var timer = null;
|
||||||
|
var fadeInTimer = null;
|
||||||
|
var fadeOutTimer = null;
|
||||||
|
var letterTimer = null;
|
||||||
|
var unletterTimer = null;
|
||||||
|
|
||||||
var next = function() {
|
var next = function() {
|
||||||
clearTimeout(timer);
|
current = (current + 1) % phrases.length;
|
||||||
reveal(++current % phrases.length);
|
reveal(current);
|
||||||
setTimeout(next, 5000);
|
timer = setTimeout(next, 5000);
|
||||||
}
|
}
|
||||||
|
|
||||||
var prev = function() {
|
var prev = function() {
|
||||||
reveal(--current % phrases.length);
|
current = (current === 0) ? phrases.length - 1 : current - 1;
|
||||||
|
reveal(current);
|
||||||
|
timer = setTimeout(next, 5000);
|
||||||
}
|
}
|
||||||
|
|
||||||
var reveal = function(idx) {
|
var reveal = function(idx) {
|
||||||
|
@ -31,9 +36,9 @@ var reveal = function(idx) {
|
||||||
var output_text = phrases[idx][2];
|
var output_text = phrases[idx][2];
|
||||||
var old_dix = idx == 0 ? phrases.length - 1 : idx - 1;
|
var old_dix = idx == 0 ? phrases.length - 1 : idx - 1;
|
||||||
console.log(idx, old_dix, "++++++++++++")
|
console.log(idx, old_dix, "++++++++++++")
|
||||||
var old_args_text = phrases[old_dix][0]
|
var old_args_text = args.innerHTML;
|
||||||
var old_input_text = phrases[old_dix][1]
|
var old_input_text = input.innerHTML;
|
||||||
var old_output_text =phrases[old_dix][2]
|
var old_output_text = output.innerHTML;
|
||||||
console.log(args_text, input_text, output_text)
|
console.log(args_text, input_text, output_text)
|
||||||
console.log(old_args_text, old_input_text, old_output_text)
|
console.log(old_args_text, old_input_text, old_output_text)
|
||||||
var s4 = function() {fadeIn(output_text, output);}
|
var s4 = function() {fadeIn(output_text, output);}
|
||||||
|
@ -42,23 +47,23 @@ var reveal = function(idx) {
|
||||||
var s1 = function() {unletter(old_args_text, args, s2);}
|
var s1 = function() {unletter(old_args_text, args, s2);}
|
||||||
var s0 = function() {unletter(old_input_text, input, s1);}
|
var s0 = function() {unletter(old_input_text, input, s1);}
|
||||||
fadeOut(old_output_text, output, s0, 10);
|
fadeOut(old_output_text, output, s0, 10);
|
||||||
// letter(input_text, input);
|
|
||||||
// output.innerHTML = output_text;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var fadeIn = function(text, element, next, step) {
|
var fadeIn = function(text, element, next, step) {
|
||||||
step = step || 0
|
step = step || 0
|
||||||
var nx = function() { fadeIn(text, element, next, ++step); }
|
var nx = function() { fadeIn(text, element, next, ++step); }
|
||||||
if (step==0) {
|
if (step==0) {
|
||||||
element.innerHTML = "";
|
element.innerHTML = "";
|
||||||
setTimeout(nx, 550);
|
fadeInTimer = setTimeout(nx, 550);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (step==1) {element.innerHTML = text;}
|
if (step==1) {element.innerHTML = text;}
|
||||||
if (step>10 || !text) { if (next) {next(); return;} else return;}
|
if (step>10 || !text) { if (next) {next(); return;} else return;}
|
||||||
element.style.opacity = (step-1)/10;
|
element.style.opacity = (step-1)/10;
|
||||||
element.style.filter = 'alpha(opacity=' + (step-1)*10 + ')';
|
element.style.filter = 'alpha(opacity=' + (step-1)*10 + ')';
|
||||||
setTimeout(nx, 50);
|
fadeInTimer = setTimeout(nx, 50);
|
||||||
}
|
}
|
||||||
|
|
||||||
var fadeOut = function(text, element, next, step) {
|
var fadeOut = function(text, element, next, step) {
|
||||||
if (step===10) element.innerHTML = text;
|
if (step===10) element.innerHTML = text;
|
||||||
if (step<0 || !text) {
|
if (step<0 || !text) {
|
||||||
|
@ -69,7 +74,7 @@ var fadeOut = function(text, element, next, step) {
|
||||||
element.style.opacity = step/10;
|
element.style.opacity = step/10;
|
||||||
element.style.filter = 'alpha(opacity=' + step*10 + ')';
|
element.style.filter = 'alpha(opacity=' + step*10 + ')';
|
||||||
var nx = function() { fadeOut(text, element, next, --step); }
|
var nx = function() { fadeOut(text, element, next, --step); }
|
||||||
setTimeout(nx, 50);
|
fadeOutTimer = setTimeout(nx, 50);
|
||||||
}
|
}
|
||||||
|
|
||||||
var unletter = function(text, element, next, timeout, index) {
|
var unletter = function(text, element, next, timeout, index) {
|
||||||
|
@ -78,7 +83,7 @@ var unletter = function(text, element, next, timeout, index) {
|
||||||
if (index==-1 || !text.length) { if (next) {next(); return;} else return;}
|
if (index==-1 || !text.length) { if (next) {next(); return;} else return;}
|
||||||
element.innerHTML = text.substring(0, index);
|
element.innerHTML = text.substring(0, index);
|
||||||
var nx = function() { unletter(text, element, next, timeout, --index); }
|
var nx = function() { unletter(text, element, next, timeout, --index); }
|
||||||
setTimeout(nx, timeout);
|
unletterTimer = setTimeout(nx, timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
var letter = function(text, element, next, timeout, index) {
|
var letter = function(text, element, next, timeout, index) {
|
||||||
|
@ -87,6 +92,18 @@ var letter = function(text, element, next, timeout, index) {
|
||||||
if (index > text.length || !text.length) { if (next) {next(); return;} else return;}
|
if (index > text.length || !text.length) { if (next) {next(); return;} else return;}
|
||||||
element.innerHTML = text.substring(0, index);
|
element.innerHTML = text.substring(0, index);
|
||||||
var nx = function() { letter(text, element, next, timeout, ++index); }
|
var nx = function() { letter(text, element, next, timeout, ++index); }
|
||||||
setTimeout(nx, timeout);
|
letterTimer = setTimeout(nx, timeout);
|
||||||
}
|
}
|
||||||
setTimeout(next, 3000);
|
|
||||||
|
var reset = function() {
|
||||||
|
var timers = [timer, fadeInTimer, fadeOutTimer, letterTimer, unletterTimer];
|
||||||
|
timers.forEach(function (t) {
|
||||||
|
clearTimeout(t);
|
||||||
|
});
|
||||||
|
|
||||||
|
args.innerHTML = "";
|
||||||
|
input.innerHTML = "";
|
||||||
|
output.innerHTML = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
timer = setTimeout(next, 3000);
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
|
||||||
|
@ -14,7 +13,7 @@
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT: '',
|
URL_ROOT: './',
|
||||||
VERSION: '1.8.1',
|
VERSION: '1.8.1',
|
||||||
COLLAPSE_INDEX: false,
|
COLLAPSE_INDEX: false,
|
||||||
FILE_SUFFIX: '.html',
|
FILE_SUFFIX: '.html',
|
||||||
|
|
23
export.html
23
export.html
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
|
||||||
|
@ -14,7 +13,7 @@
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT: '',
|
URL_ROOT: './',
|
||||||
VERSION: '1.8.1',
|
VERSION: '1.8.1',
|
||||||
COLLAPSE_INDEX: false,
|
COLLAPSE_INDEX: false,
|
||||||
FILE_SUFFIX: '.html',
|
FILE_SUFFIX: '.html',
|
||||||
|
@ -60,36 +59,42 @@
|
||||||
<div class="section" id="json-export">
|
<div class="section" id="json-export">
|
||||||
<h2>JSON export<a class="headerlink" href="#json-export" title="Permalink to this headline">¶</a></h2>
|
<h2>JSON export<a class="headerlink" href="#json-export" title="Permalink to this headline">¶</a></h2>
|
||||||
<p>Can do:</p>
|
<p>Can do:</p>
|
||||||
<div class="highlight-python"><pre>jrnl --export json</pre>
|
<div class="highlight-python"><div class="highlight"><pre>jrnl --export json
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>Why not create a <a class="reference external" href="http://timeline.verite.co/">beautiful timeline</a> of your journal?</p>
|
<p>Why not create a <a class="reference external" href="http://timeline.verite.co/">beautiful timeline</a> of your journal?</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="markdown-export">
|
<div class="section" id="markdown-export">
|
||||||
<h2>Markdown export<a class="headerlink" href="#markdown-export" title="Permalink to this headline">¶</a></h2>
|
<h2>Markdown export<a class="headerlink" href="#markdown-export" title="Permalink to this headline">¶</a></h2>
|
||||||
<p>Use:</p>
|
<p>Use:</p>
|
||||||
<div class="highlight-python"><pre>jrnl --export markdown</pre>
|
<div class="highlight-python"><div class="highlight"><pre>jrnl --export markdown
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>Markdown is a simple markup language that is human readable and can be used to be rendered to other formats (html, pdf). This README for example is formatted in markdown and github makes it look nice.</p>
|
<p>Markdown is a simple markup language that is human readable and can be used to be rendered to other formats (html, pdf). This README for example is formatted in markdown and github makes it look nice.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="text-export">
|
<div class="section" id="text-export">
|
||||||
<h2>Text export<a class="headerlink" href="#text-export" title="Permalink to this headline">¶</a></h2>
|
<h2>Text export<a class="headerlink" href="#text-export" title="Permalink to this headline">¶</a></h2>
|
||||||
<div class="highlight-python"><pre>jrnl --export text</pre>
|
<div class="highlight-python"><div class="highlight"><pre>jrnl --export text
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>Pretty-prints your entire journal.</p>
|
<p>Pretty-prints your entire journal.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="export-to-files">
|
<div class="section" id="export-to-files">
|
||||||
<h2>Export to files<a class="headerlink" href="#export-to-files" title="Permalink to this headline">¶</a></h2>
|
<h2>Export to files<a class="headerlink" href="#export-to-files" title="Permalink to this headline">¶</a></h2>
|
||||||
<p>You can specify the output file of your exported journal using the <cite>-o</cite> argument:</p>
|
<p>You can specify the output file of your exported journal using the <cite>-o</cite> argument:</p>
|
||||||
<div class="highlight-python"><pre>jrnl --export md -o journal.md</pre>
|
<div class="highlight-python"><div class="highlight"><pre>jrnl --export md -o journal.md
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>The above command will generate a file named <cite>journal.md</cite>. If the <cite>-o</cite> argument is a directory, jrnl will export each entry into an individual file:</p>
|
<p>The above command will generate a file named <cite>journal.md</cite>. If the <cite>-o</cite> argument is a directory, jrnl will export each entry into an individual file:</p>
|
||||||
<div class="highlight-python"><pre>jrnl --export json -o my_entries/</pre>
|
<div class="highlight-python"><div class="highlight"><pre>jrnl --export json -o my_entries/
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>The contents of <cite>my_entries/</cite> will then look like this:</p>
|
<p>The contents of <cite>my_entries/</cite> will then look like this:</p>
|
||||||
<div class="highlight-output"><pre>my_entries/
|
<div class="highlight-output"><div class="highlight"><pre>my_entries/
|
||||||
|- 2013_06_03_a-beautiful-day.json
|
|- 2013_06_03_a-beautiful-day.json
|
||||||
|- 2013_06_07_dinner-with-gabriel.json
|
|- 2013_06_07_dinner-with-gabriel.json
|
||||||
|- ...</pre>
|
|- ...
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
|
||||||
|
@ -16,7 +14,7 @@
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT: '',
|
URL_ROOT: './',
|
||||||
VERSION: '1.8.1',
|
VERSION: '1.8.1',
|
||||||
COLLAPSE_INDEX: false,
|
COLLAPSE_INDEX: false,
|
||||||
FILE_SUFFIX: '.html',
|
FILE_SUFFIX: '.html',
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
|
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
|
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
|
||||||
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
|
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
|
||||||
|
@ -14,7 +13,7 @@
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT: '',
|
URL_ROOT: './',
|
||||||
VERSION: '1.8.1',
|
VERSION: '1.8.1',
|
||||||
COLLAPSE_INDEX: false,
|
COLLAPSE_INDEX: false,
|
||||||
FILE_SUFFIX: '.html',
|
FILE_SUFFIX: '.html',
|
||||||
|
@ -45,10 +44,12 @@
|
||||||
<div class="section" id="installation">
|
<div class="section" id="installation">
|
||||||
<h2>Installation<a class="headerlink" href="#installation" title="Permalink to this headline">¶</a></h2>
|
<h2>Installation<a class="headerlink" href="#installation" title="Permalink to this headline">¶</a></h2>
|
||||||
<p>Install <em>jrnl</em> using pip</p>
|
<p>Install <em>jrnl</em> using pip</p>
|
||||||
<div class="highlight-python"><pre>pip install jrnl</pre>
|
<div class="highlight-python"><div class="highlight"><pre>pip install jrnl
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>Or, if you want the option to encrypt your journal,</p>
|
<p>Or, if you want the option to encrypt your journal,</p>
|
||||||
<div class="highlight-python"><pre>pip install jrnl[encrypted]</pre>
|
<div class="highlight-python"><div class="highlight"><pre>pip install jrnl[encrypted]
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>to install the dependencies for encrypting journals as well.</p>
|
<p>to install the dependencies for encrypting journals as well.</p>
|
||||||
<div class="admonition note">
|
<div class="admonition note">
|
||||||
|
@ -60,11 +61,13 @@
|
||||||
<div class="section" id="quickstart">
|
<div class="section" id="quickstart">
|
||||||
<h2>Quickstart<a class="headerlink" href="#quickstart" title="Permalink to this headline">¶</a></h2>
|
<h2>Quickstart<a class="headerlink" href="#quickstart" title="Permalink to this headline">¶</a></h2>
|
||||||
<p>to make a new entry, just type:</p>
|
<p>to make a new entry, just type:</p>
|
||||||
<div class="highlight-python"><pre>jrnl yesterday: Called in sick. Used the time to clean the house and spent 4h on writing my book.</pre>
|
<div class="highlight-python"><div class="highlight"><pre>jrnl yesterday: Called in sick. Used the time to clean the house and spent 4h on writing my book.
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>and hit return. <tt class="docutils literal"><span class="pre">yesterday:</span></tt> will be interpreted as a time stamp. Everything until the first sentence mark (<tt class="docutils literal"><span class="pre">.?!:</span></tt>) will be interpreted as the title, the rest as the body. In your journal file, the result will look like this:</p>
|
<p>and hit return. <tt class="docutils literal"><span class="pre">yesterday:</span></tt> will be interpreted as a time stamp. Everything until the first sentence mark (<tt class="docutils literal"><span class="pre">.?!:</span></tt>) will be interpreted as the title, the rest as the body. In your journal file, the result will look like this:</p>
|
||||||
<div class="highlight-output"><pre>2012-03-29 09:00 Called in sick.
|
<div class="highlight-output"><div class="highlight"><pre>2012-03-29 09:00 Called in sick.
|
||||||
Used the time to clean the house and spent 4h on writing my book.</pre>
|
Used the time to clean the house and spent 4h on writing my book.
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>If you just call <tt class="docutils literal"><span class="pre">jrnl</span></tt>, you will be prompted to compose your entry - but you can also configure <em>jrnl</em> to use your external editor.</p>
|
<p>If you just call <tt class="docutils literal"><span class="pre">jrnl</span></tt>, you will be prompted to compose your entry - but you can also configure <em>jrnl</em> to use your external editor.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
Binary file not shown.
BIN
jrnl/Entry.pyc
BIN
jrnl/Entry.pyc
Binary file not shown.
BIN
jrnl/Journal.pyc
BIN
jrnl/Journal.pyc
Binary file not shown.
Binary file not shown.
BIN
jrnl/cli.pyc
BIN
jrnl/cli.pyc
Binary file not shown.
Binary file not shown.
BIN
jrnl/install.pyc
BIN
jrnl/install.pyc
Binary file not shown.
BIN
jrnl/util.pyc
BIN
jrnl/util.pyc
Binary file not shown.
BIN
objects.inv
BIN
objects.inv
Binary file not shown.
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
|
||||||
|
@ -14,7 +13,7 @@
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT: '',
|
URL_ROOT: './',
|
||||||
VERSION: '1.8.1',
|
VERSION: '1.8.1',
|
||||||
COLLAPSE_INDEX: false,
|
COLLAPSE_INDEX: false,
|
||||||
FILE_SUFFIX: '.html',
|
FILE_SUFFIX: '.html',
|
||||||
|
|
15
recipes.html
15
recipes.html
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
|
||||||
|
@ -14,7 +13,7 @@
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT: '',
|
URL_ROOT: './',
|
||||||
VERSION: '1.8.1',
|
VERSION: '1.8.1',
|
||||||
COLLAPSE_INDEX: false,
|
COLLAPSE_INDEX: false,
|
||||||
FILE_SUFFIX: '.html',
|
FILE_SUFFIX: '.html',
|
||||||
|
@ -46,24 +45,28 @@
|
||||||
<div class="section" id="co-occurrence-of-tags">
|
<div class="section" id="co-occurrence-of-tags">
|
||||||
<h3>Co-occurrence of tags<a class="headerlink" href="#co-occurrence-of-tags" title="Permalink to this headline">¶</a></h3>
|
<h3>Co-occurrence of tags<a class="headerlink" href="#co-occurrence-of-tags" title="Permalink to this headline">¶</a></h3>
|
||||||
<p>If I want to find out how often I mentioned my flatmates Alberto and Melo in the same entry, I run</p>
|
<p>If I want to find out how often I mentioned my flatmates Alberto and Melo in the same entry, I run</p>
|
||||||
<div class="highlight-python"><pre>jrnl @alberto --tags | grep @melo</pre>
|
<div class="highlight-python"><div class="highlight"><pre>jrnl @alberto --tags | grep @melo
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>And will get something like <tt class="docutils literal"><span class="pre">@melo:</span> <span class="pre">9</span></tt>, meaning there are 9 entries where both <tt class="docutils literal"><span class="pre">@alberto</span></tt> and <tt class="docutils literal"><span class="pre">@melo</span></tt> are tagged. How does this work? First, <tt class="docutils literal"><span class="pre">jrnl</span> <span class="pre">@alberto</span></tt> will filter the journal to only entries containing the tag <tt class="docutils literal"><span class="pre">@alberto</span></tt>, and then the <tt class="docutils literal"><span class="pre">--tags</span></tt> option will print out how often each tag occurred in this <cite>filtered</cite> journal. Finally, we pipe this to <tt class="docutils literal"><span class="pre">grep</span></tt> which will only display the line containing <tt class="docutils literal"><span class="pre">@melo</span></tt>.</p>
|
<p>And will get something like <tt class="docutils literal"><span class="pre">@melo:</span> <span class="pre">9</span></tt>, meaning there are 9 entries where both <tt class="docutils literal"><span class="pre">@alberto</span></tt> and <tt class="docutils literal"><span class="pre">@melo</span></tt> are tagged. How does this work? First, <tt class="docutils literal"><span class="pre">jrnl</span> <span class="pre">@alberto</span></tt> will filter the journal to only entries containing the tag <tt class="docutils literal"><span class="pre">@alberto</span></tt>, and then the <tt class="docutils literal"><span class="pre">--tags</span></tt> option will print out how often each tag occurred in this <cite>filtered</cite> journal. Finally, we pipe this to <tt class="docutils literal"><span class="pre">grep</span></tt> which will only display the line containing <tt class="docutils literal"><span class="pre">@melo</span></tt>.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="combining-filters">
|
<div class="section" id="combining-filters">
|
||||||
<h3>Combining filters<a class="headerlink" href="#combining-filters" title="Permalink to this headline">¶</a></h3>
|
<h3>Combining filters<a class="headerlink" href="#combining-filters" title="Permalink to this headline">¶</a></h3>
|
||||||
<p>You can do things like</p>
|
<p>You can do things like</p>
|
||||||
<div class="highlight-python"><pre>jrnl @fixed -starred -n 10 -until "jan 2013" --short</pre>
|
<div class="highlight-python"><div class="highlight"><pre>jrnl @fixed -starred -n 10 -until "jan 2013" --short
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>To get a short summary of the 10 most recent, favourited entries before January 1, 2013 that are tagged with <tt class="docutils literal"><span class="pre">@fixed</span></tt>.</p>
|
<p>To get a short summary of the 10 most recent, favourited entries before January 1, 2013 that are tagged with <tt class="docutils literal"><span class="pre">@fixed</span></tt>.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="statistics">
|
<div class="section" id="statistics">
|
||||||
<h3>Statistics<a class="headerlink" href="#statistics" title="Permalink to this headline">¶</a></h3>
|
<h3>Statistics<a class="headerlink" href="#statistics" title="Permalink to this headline">¶</a></h3>
|
||||||
<p>How much did I write last year?</p>
|
<p>How much did I write last year?</p>
|
||||||
<div class="highlight-python"><pre>jrnl -from "jan 1 2013" -until "dec 31 2013" | wc -w</pre>
|
<div class="highlight-python"><div class="highlight"><pre>jrnl -from "jan 1 2013" -until "dec 31 2013" | wc -w
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>Will give you the number of words you wrote in 2013. How long is my average entry?</p>
|
<p>Will give you the number of words you wrote in 2013. How long is my average entry?</p>
|
||||||
<div class="highlight-python"><pre>expr $(jrnl --export text | wc -w) / $(jrnl --short | wc -l)</pre>
|
<div class="highlight-python"><div class="highlight"><pre>expr $(jrnl --export text | wc -w) / $(jrnl --short | wc -l)
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>This will first get the total number of words in the journal and divide it by the number of entries (this works because <tt class="docutils literal"><span class="pre">jrnl</span> <span class="pre">--short</span></tt> will print exactly one line per entry).</p>
|
<p>This will first get the total number of words in the journal and divide it by the number of entries (this works because <tt class="docutils literal"><span class="pre">jrnl</span> <span class="pre">--short</span></tt> will print exactly one line per entry).</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
|
||||||
|
@ -14,7 +13,7 @@
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT: '',
|
URL_ROOT: './',
|
||||||
VERSION: '1.8.1',
|
VERSION: '1.8.1',
|
||||||
COLLAPSE_INDEX: false,
|
COLLAPSE_INDEX: false,
|
||||||
FILE_SUFFIX: '.html',
|
FILE_SUFFIX: '.html',
|
||||||
|
@ -30,6 +29,8 @@
|
||||||
jQuery(function() { Search.loadIndex("searchindex.js"); });
|
jQuery(function() { Search.loadIndex("searchindex.js"); });
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<script type="text/javascript" id="searchindexloader"></script>
|
||||||
|
|
||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
|
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
|
||||||
<link rel="apple-touch-icon-precomposed" href="_static/img/favicon-152.png">
|
<link rel="apple-touch-icon-precomposed" href="_static/img/favicon-152.png">
|
||||||
|
|
File diff suppressed because one or more lines are too long
37
usage.html
37
usage.html
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
|
||||||
|
@ -14,7 +13,7 @@
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT: '',
|
URL_ROOT: './',
|
||||||
VERSION: '1.8.1',
|
VERSION: '1.8.1',
|
||||||
COLLAPSE_INDEX: false,
|
COLLAPSE_INDEX: false,
|
||||||
FILE_SUFFIX: '.html',
|
FILE_SUFFIX: '.html',
|
||||||
|
@ -55,7 +54,8 @@
|
||||||
<div class="section" id="composing-entries">
|
<div class="section" id="composing-entries">
|
||||||
<h2>Composing Entries<a class="headerlink" href="#composing-entries" title="Permalink to this headline">¶</a></h2>
|
<h2>Composing Entries<a class="headerlink" href="#composing-entries" title="Permalink to this headline">¶</a></h2>
|
||||||
<p>Composing mode is entered by either starting <tt class="docutils literal"><span class="pre">jrnl</span></tt> without any arguments – which will prompt you to write an entry or launch your editor – or by just writing an entry on the prompt, such as:</p>
|
<p>Composing mode is entered by either starting <tt class="docutils literal"><span class="pre">jrnl</span></tt> without any arguments – which will prompt you to write an entry or launch your editor – or by just writing an entry on the prompt, such as:</p>
|
||||||
<div class="highlight-python"><pre>jrnl today at 3am: I just met Steve Buscemi in a bar! He looked funny.</pre>
|
<div class="highlight-python"><div class="highlight"><pre>jrnl today at 3am: I just met Steve Buscemi in a bar! He looked funny.
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>You can also import an entry directly from a file:</p>
|
<p>You can also import an entry directly from a file:</p>
|
||||||
<div class="highlight-python"><div class="highlight"><pre><span class="n">jrnl</span> <span class="o"><</span> <span class="n">my_entry</span><span class="o">.</span><span class="n">txt</span>
|
<div class="highlight-python"><div class="highlight"><pre><span class="n">jrnl</span> <span class="o"><</span> <span class="n">my_entry</span><span class="o">.</span><span class="n">txt</span>
|
||||||
|
@ -77,7 +77,8 @@
|
||||||
<div class="section" id="starring-entries">
|
<div class="section" id="starring-entries">
|
||||||
<h3>Starring entries<a class="headerlink" href="#starring-entries" title="Permalink to this headline">¶</a></h3>
|
<h3>Starring entries<a class="headerlink" href="#starring-entries" title="Permalink to this headline">¶</a></h3>
|
||||||
<p>To mark an entry as a favourite, simply “star” it:</p>
|
<p>To mark an entry as a favourite, simply “star” it:</p>
|
||||||
<div class="highlight-python"><pre>jrnl last sunday *: Best day of my life.</pre>
|
<div class="highlight-python"><div class="highlight"><pre>jrnl last sunday *: Best day of my life.
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>If you don’t want to add a date (ie. your entry will be dated as now), The following options are equivalent:</p>
|
<p>If you don’t want to add a date (ie. your entry will be dated as now), The following options are equivalent:</p>
|
||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
|
@ -93,10 +94,12 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="viewing">
|
<div class="section" id="viewing">
|
||||||
<h2>Viewing<a class="headerlink" href="#viewing" title="Permalink to this headline">¶</a></h2>
|
<h2>Viewing<a class="headerlink" href="#viewing" title="Permalink to this headline">¶</a></h2>
|
||||||
<div class="highlight-python"><pre>jrnl -n 10</pre>
|
<div class="highlight-python"><div class="highlight"><pre>jrnl -n 10
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>will list you the ten latest entries (if you’re lazy, <tt class="docutils literal"><span class="pre">jrnl</span> <span class="pre">-10</span></tt> will do the same),</p>
|
<p>will list you the ten latest entries (if you’re lazy, <tt class="docutils literal"><span class="pre">jrnl</span> <span class="pre">-10</span></tt> will do the same),</p>
|
||||||
<div class="highlight-python"><pre>jrnl -from "last year" -until march</pre>
|
<div class="highlight-python"><div class="highlight"><pre>jrnl -from "last year" -until march
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>everything that happened from the start of last year to the start of last march. To only see your favourite entries, use</p>
|
<p>everything that happened from the start of last year to the start of last march. To only see your favourite entries, use</p>
|
||||||
<div class="highlight-python"><div class="highlight"><pre><span class="n">jrnl</span> <span class="o">-</span><span class="n">starred</span>
|
<div class="highlight-python"><div class="highlight"><pre><span class="n">jrnl</span> <span class="o">-</span><span class="n">starred</span>
|
||||||
|
@ -106,13 +109,16 @@
|
||||||
<div class="section" id="using-tags">
|
<div class="section" id="using-tags">
|
||||||
<h2>Using Tags<a class="headerlink" href="#using-tags" title="Permalink to this headline">¶</a></h2>
|
<h2>Using Tags<a class="headerlink" href="#using-tags" title="Permalink to this headline">¶</a></h2>
|
||||||
<p>Keep track of people, projects or locations, by tagging them with an <tt class="docutils literal"><span class="pre">@</span></tt> in your entries</p>
|
<p>Keep track of people, projects or locations, by tagging them with an <tt class="docutils literal"><span class="pre">@</span></tt> in your entries</p>
|
||||||
<div class="highlight-python"><pre>jrnl Had a wonderful day on the @beach with @Tom and @Anna.</pre>
|
<div class="highlight-python"><div class="highlight"><pre>jrnl Had a wonderful day on the @beach with @Tom and @Anna.
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>You can filter your journal entries just like this:</p>
|
<p>You can filter your journal entries just like this:</p>
|
||||||
<div class="highlight-python"><pre>jrnl @pinkie @WorldDomination</pre>
|
<div class="highlight-python"><div class="highlight"><pre>jrnl @pinkie @WorldDomination
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>Will print all entries in which either <tt class="docutils literal"><span class="pre">@pinkie</span></tt> or <tt class="docutils literal"><span class="pre">@WorldDomination</span></tt> occurred.</p>
|
<p>Will print all entries in which either <tt class="docutils literal"><span class="pre">@pinkie</span></tt> or <tt class="docutils literal"><span class="pre">@WorldDomination</span></tt> occurred.</p>
|
||||||
<div class="highlight-python"><pre>jrnl -n 5 -and @pineapple @lubricant</pre>
|
<div class="highlight-python"><div class="highlight"><pre>jrnl -n 5 -and @pineapple @lubricant
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>the last five entries containing both <tt class="docutils literal"><span class="pre">@pineapple</span></tt> <strong>and</strong> <tt class="docutils literal"><span class="pre">@lubricant</span></tt>. You can change which symbols you’d like to use for tagging in the configuration.</p>
|
<p>the last five entries containing both <tt class="docutils literal"><span class="pre">@pineapple</span></tt> <strong>and</strong> <tt class="docutils literal"><span class="pre">@lubricant</span></tt>. You can change which symbols you’d like to use for tagging in the configuration.</p>
|
||||||
<div class="admonition note">
|
<div class="admonition note">
|
||||||
|
@ -123,24 +129,27 @@
|
||||||
<div class="section" id="editing-older-entries">
|
<div class="section" id="editing-older-entries">
|
||||||
<h2>Editing older entries<a class="headerlink" href="#editing-older-entries" title="Permalink to this headline">¶</a></h2>
|
<h2>Editing older entries<a class="headerlink" href="#editing-older-entries" title="Permalink to this headline">¶</a></h2>
|
||||||
<p>You can edit selected entries after you wrote them. This is particularly useful when your journal file is encrypted or if you’re using a DayOne journal. To use this feature, you need to have an editor configured in your journal configuration file (see <a class="reference internal" href="advanced.html"><em>advanced usage</em></a>):</p>
|
<p>You can edit selected entries after you wrote them. This is particularly useful when your journal file is encrypted or if you’re using a DayOne journal. To use this feature, you need to have an editor configured in your journal configuration file (see <a class="reference internal" href="advanced.html"><em>advanced usage</em></a>):</p>
|
||||||
<div class="highlight-python"><pre>jrnl -until 1950 @texas -and @history --edit</pre>
|
<div class="highlight-python"><div class="highlight"><pre>jrnl -until 1950 @texas -and @history --edit
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>Will open your editor with all entries tagged with <tt class="docutils literal"><span class="pre">@texas</span></tt> and <tt class="docutils literal"><span class="pre">@history</span></tt> before 1950. You can make any changes to them you want; after you save the file and close the editor, your journal will be updated.</p>
|
<p>Will open your editor with all entries tagged with <tt class="docutils literal"><span class="pre">@texas</span></tt> and <tt class="docutils literal"><span class="pre">@history</span></tt> before 1950. You can make any changes to them you want; after you save the file and close the editor, your journal will be updated.</p>
|
||||||
<p>Of course, if you are using multiple journals, you can also edit e.g. the latest entry of your work journal with <tt class="docutils literal"><span class="pre">jrnl</span> <span class="pre">work</span> <span class="pre">-n</span> <span class="pre">1</span> <span class="pre">--edit</span></tt>. In any case, this will bring up your editor and save (and, if applicable, encrypt) your edited journal after you save and exit the editor.</p>
|
<p>Of course, if you are using multiple journals, you can also edit e.g. the latest entry of your work journal with <tt class="docutils literal"><span class="pre">jrnl</span> <span class="pre">work</span> <span class="pre">-n</span> <span class="pre">1</span> <span class="pre">--edit</span></tt>. In any case, this will bring up your editor and save (and, if applicable, encrypt) your edited journal after you save and exit the editor.</p>
|
||||||
<p>You can also use this feature for deleting entries from your journal:</p>
|
<p>You can also use this feature for deleting entries from your journal:</p>
|
||||||
<div class="highlight-python"><pre>jrnl @girlfriend -until 'june 2012' --edit</pre>
|
<div class="highlight-python"><div class="highlight"><pre>jrnl @girlfriend -until 'june 2012' --edit
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>Just select all text, press delete, and everything is gone...</p>
|
<p>Just select all text, press delete, and everything is gone...</p>
|
||||||
<div class="section" id="editing-dayone-journals">
|
<div class="section" id="editing-dayone-journals">
|
||||||
<h3>Editing DayOne Journals<a class="headerlink" href="#editing-dayone-journals" title="Permalink to this headline">¶</a></h3>
|
<h3>Editing DayOne Journals<a class="headerlink" href="#editing-dayone-journals" title="Permalink to this headline">¶</a></h3>
|
||||||
<p>DayOne journals can be edited exactly the same way, however the output looks a little bit different because of the way DayOne stores its entries:</p>
|
<p>DayOne journals can be edited exactly the same way, however the output looks a little bit different because of the way DayOne stores its entries:</p>
|
||||||
<div class="highlight-output"><pre># af8dbd0d43fb55458f11aad586ea2abf
|
<div class="highlight-output"><div class="highlight"><pre># af8dbd0d43fb55458f11aad586ea2abf
|
||||||
2013-05-02 15:30 I told everyone I built my @robot wife for sex.
|
2013-05-02 15:30 I told everyone I built my @robot wife for sex.
|
||||||
But late at night when we're alone we mostly play Battleship.
|
But late at night when we're alone we mostly play Battleship.
|
||||||
|
|
||||||
# 2391048fe24111e1983ed49a20be6f9e
|
# 2391048fe24111e1983ed49a20be6f9e
|
||||||
2013-08-10 03:22 I had all kinds of plans in case of a @zombie attack.
|
2013-08-10 03:22 I had all kinds of plans in case of a @zombie attack.
|
||||||
I just figured I'd be on the other side.</pre>
|
I just figured I'd be on the other side.
|
||||||
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>The long strings starting with hash symbol are the so-called UUIDs, unique identifiers for each entry. Don’t touch them. If you do, then the old entry would get deleted and a new one written, which means that you could DayOne loose data that jrnl can’t handle (such as as the entry’s geolocation).</p>
|
<p>The long strings starting with hash symbol are the so-called UUIDs, unique identifiers for each entry. Don’t touch them. If you do, then the old entry would get deleted and a new one written, which means that you could DayOne loose data that jrnl can’t handle (such as as the entry’s geolocation).</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Reference in a new issue