Commit abf8c0c4 authored by ransome1's avatar ransome1
Browse files

Finalize v1.0.7

parent d2c0c132
......@@ -76,6 +76,7 @@ A prioritized backlog of new features and known issues can be found <a href="htt
- start dates
- <a href="https://github.com/ransome1/sleek/wiki/Recurring-todos">recurrences</a>
* Todo-List can be grouped and sorted by priorities, due dates, contexts or projects
* The sorting order can be defined on all 4 levels
* Todos can be filtered by contexts, projects and priorities
* Todos can be looked up by full-text search
* Autocomplete function suggests available contexts and projects
......@@ -101,6 +102,7 @@ A prioritized backlog of new features and known issues can be found <a href="htt
- French
- Simplified Chinese
- Brazilian Portugese
- Japanese
* sleek can be minimized to tray
* Existing todos can be used as templates for new ones
......
{
"name": "sleek",
"productName": "sleek",
"version": "1.0.8",
"version": "1.0.7",
"description": "Todo app based on todo.txt for Linux, Windows and MacOS, free and open-source",
"synopsis": "Todo app based on todo.txt for Linux, Windows and MacOS, free and open-source",
"category": "ProjectManagement",
......@@ -92,9 +92,9 @@
"artifactName": "${productName}-${version}-${arch}.${ext}"
},
"scripts": {
"build:windows": "yarn build:css && yarn build:pegjs && electron-builder -w --publish never",
"build:macos": "yarn build:css && yarn build:pegjs && electron-builder -m --publish never",
"build:linux": "yarn build:css && yarn build:pegjs && electron-builder -l --publish never",
"build:windows": "yarn build:css && electron-builder -w --publish never",
"build:macos": "yarn build:css && electron-builder -m --publish never",
"build:linux": "yarn build:css && electron-builder -l --publish never",
"build:appx": "electron-builder -w appx --publish never",
"build:pacman": "electron-builder -l pacman --publish never",
"build:appimage": "yarn build:css && yarn build:pegjs && electron-builder -l AppImage --publish never",
......@@ -103,7 +103,6 @@
"test": "mocha --timeout 10000",
"test1": "mocha ./test/onboarding.js --timeout 10000",
"build:css": "sass src/scss/style.scss:src/css/style.css",
"build:pegjs": "peggy --format es --output src/js/filterlang.mjs src/js/filterlang.pegjs",
"sass": "sass -w src/scss/style.scss:src/css/style.css",
"start": "yarn sass & electron ."
},
......@@ -122,10 +121,9 @@
},
"devDependencies": {
"electron": "12.0.10",
"electron-builder": "22.10.5",
"electron-builder": "^22.11.7",
"eslint": "^7.25.0",
"mocha": "^9.0.0",
"peggy": "^1.2.0",
"sass": "^1.34.1",
"spectron": "14.0.0"
}
......
name: sleek
base: core18
version: '1.0.6-2'
version: '1.0.7'
summary: Todo app based on the todo.txt format for Linux, free and open-source
description: |
sleek is an open-source todo app that makes use of the todo.txt format. sleeks GUI is modern and simple but still offers a decent set of functions which help users getting things done. sleek is available as a client for Windows, MacOS and Linux.
......
// Generated by Peggy 1.2.0.
//
// https://peggyjs.org/
import { addIntervalToDate } from "./recurrences.mjs";
function peg$subclass(child, parent) {
function C() { this.constructor = child; }
C.prototype = parent.prototype;
child.prototype = new C();
}
function peg$SyntaxError(message, expected, found, location) {
var self = Error.call(this, message);
if (Object.setPrototypeOf) {
Object.setPrototypeOf(self, peg$SyntaxError.prototype);
}
self.expected = expected;
self.found = found;
self.location = location;
self.name = "SyntaxError";
return self;
}
peg$subclass(peg$SyntaxError, Error);
function peg$padEnd(str, targetLength, padString) {
padString = padString || " ";
if (str.length > targetLength) { return str; }
targetLength -= str.length;
padString += padString.repeat(targetLength);
return str + padString.slice(0, targetLength);
}
peg$SyntaxError.prototype.format = function(sources) {
var str = "Error: " + this.message;
if (this.location) {
var src = null;
var k;
for (k = 0; k < sources.length; k++) {
if (sources[k].source === this.location.source) {
src = sources[k].text.split(/\r\n|\n|\r/g);
break;
}
}
var s = this.location.start;
var loc = this.location.source + ":" + s.line + ":" + s.column;
if (src) {
var e = this.location.end;
var filler = peg$padEnd("", s.line.toString().length);
var line = src[s.line - 1];
var last = s.line === e.line ? e.column : line.length + 1;
str += "\n --> " + loc + "\n"
+ filler + " |\n"
+ s.line + " | " + line + "\n"
+ filler + " | " + peg$padEnd("", s.column - 1)
+ peg$padEnd("", last - s.column, "^");
} else {
str += "\n at " + loc;
}
}
return str;
};
peg$SyntaxError.buildMessage = function(expected, found) {
var DESCRIBE_EXPECTATION_FNS = {
literal: function(expectation) {
return "\"" + literalEscape(expectation.text) + "\"";
},
class: function(expectation) {
var escapedParts = expectation.parts.map(function(part) {
return Array.isArray(part)
? classEscape(part[0]) + "-" + classEscape(part[1])
: classEscape(part);
});
return "[" + (expectation.inverted ? "^" : "") + escapedParts + "]";
},
any: function() {
return "any character";
},
end: function() {
return "end of input";
},
other: function(expectation) {
return expectation.description;
}
};
function hex(ch) {
return ch.charCodeAt(0).toString(16).toUpperCase();
}
function literalEscape(s) {
return s
.replace(/\\/g, "\\\\")
.replace(/"/g, "\\\"")
.replace(/\0/g, "\\0")
.replace(/\t/g, "\\t")
.replace(/\n/g, "\\n")
.replace(/\r/g, "\\r")
.replace(/[\x00-\x0F]/g, function(ch) { return "\\x0" + hex(ch); })
.replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { return "\\x" + hex(ch); });
}
function classEscape(s) {
return s
.replace(/\\/g, "\\\\")
.replace(/\]/g, "\\]")
.replace(/\^/g, "\\^")
.replace(/-/g, "\\-")
.replace(/\0/g, "\\0")
.replace(/\t/g, "\\t")
.replace(/\n/g, "\\n")
.replace(/\r/g, "\\r")
.replace(/[\x00-\x0F]/g, function(ch) { return "\\x0" + hex(ch); })
.replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { return "\\x" + hex(ch); });
}
function describeExpectation(expectation) {
return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);
}
function describeExpected(expected) {
var descriptions = expected.map(describeExpectation);
var i, j;
descriptions.sort();
if (descriptions.length > 0) {
for (i = 1, j = 1; i < descriptions.length; i++) {
if (descriptions[i - 1] !== descriptions[i]) {
descriptions[j] = descriptions[i];
j++;
}
}
descriptions.length = j;
}
switch (descriptions.length) {
case 1:
return descriptions[0];
case 2:
return descriptions[0] + " or " + descriptions[1];
default:
return descriptions.slice(0, -1).join(", ")
+ ", or "
+ descriptions[descriptions.length - 1];
}
}
function describeFound(found) {
return found ? "\"" + literalEscape(found) + "\"" : "end of input";
}
return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found.";
};
function peg$parse(input, options) {
options = options !== undefined ? options : {};
var peg$FAILED = {};
var peg$source = options.grammarSource;
var peg$startRuleFunctions = { filterQuery: peg$parsefilterQuery };
var peg$startRuleFunction = peg$parsefilterQuery;
var peg$c0 = "(";
var peg$c1 = ")";
var peg$c2 = "complete";
var peg$c3 = "+";
var peg$c4 = "@";
var peg$c5 = "||";
var peg$c6 = "or";
var peg$c7 = "&&";
var peg$c8 = "and";
var peg$c9 = "!";
var peg$c10 = "not";
var peg$c11 = "priority";
var peg$c12 = "due";
var peg$c13 = "-";
var peg$c14 = "==";
var peg$c15 = "!=";
var peg$c16 = ">=";
var peg$c17 = "<=";
var peg$c18 = ">";
var peg$c19 = "<";
var peg$c20 = "today";
var peg$c21 = "tomorrow";
var peg$c22 = "\"";
var peg$c23 = "'";
var peg$c24 = "\\";
var peg$c25 = "/";
var peg$c26 = "i";
var peg$r0 = /^[A-Z]/;
var peg$r1 = /^[dbwmy]/;
var peg$r2 = /^[0-9]/;
var peg$r3 = /^[a-zA-Z_]/;
var peg$r4 = /^[a-zA-Z_0-9]/;
var peg$r5 = /^[ \t\n\r]/;
var peg$e0 = peg$literalExpectation("(", false);
var peg$e1 = peg$literalExpectation(")", false);
var peg$e2 = peg$literalExpectation("complete", false);
var peg$e3 = peg$literalExpectation("+", false);
var peg$e4 = peg$literalExpectation("@", false);
var peg$e5 = peg$literalExpectation("||", false);
var peg$e6 = peg$literalExpectation("or", true);
var peg$e7 = peg$literalExpectation("&&", false);
var peg$e8 = peg$literalExpectation("and", true);
var peg$e9 = peg$literalExpectation("!", false);
var peg$e10 = peg$literalExpectation("not", true);
var peg$e11 = peg$literalExpectation("priority", false);
var peg$e12 = peg$classExpectation([["A", "Z"]], false, false);
var peg$e13 = peg$literalExpectation("due", false);
var peg$e14 = peg$classExpectation(["d", "b", "w", "m", "y"], false, false);
var peg$e15 = peg$literalExpectation("-", false);
var peg$e16 = peg$literalExpectation("==", false);
var peg$e17 = peg$literalExpectation("!=", false);
var peg$e18 = peg$literalExpectation(">=", false);
var peg$e19 = peg$literalExpectation("<=", false);
var peg$e20 = peg$literalExpectation(">", false);
var peg$e21 = peg$literalExpectation("<", false);
var peg$e22 = peg$literalExpectation("today", false);
var peg$e23 = peg$literalExpectation("tomorrow", false);
var peg$e24 = peg$classExpectation([["0", "9"]], false, false);
var peg$e25 = peg$otherExpectation("string");
var peg$e26 = peg$literalExpectation("\"", false);
var peg$e27 = peg$literalExpectation("'", false);
var peg$e28 = peg$literalExpectation("\\", false);
var peg$e29 = peg$otherExpectation("regex");
var peg$e30 = peg$literalExpectation("/", false);
var peg$e31 = peg$literalExpectation("i", false);
var peg$e32 = peg$anyExpectation();
var peg$e33 = peg$classExpectation([["a", "z"], ["A", "Z"], "_"], false, false);
var peg$e34 = peg$classExpectation([["a", "z"], ["A", "Z"], "_", ["0", "9"]], false, false);
var peg$e35 = peg$otherExpectation("whitespace");
var peg$e36 = peg$classExpectation([" ", "\t", "\n", "\r"], false, false);
var peg$f0 = function(left) { return left; };
var peg$f1 = function() { return []; };
var peg$f2 = function(left, right) { return left.concat(right, ["||"]); };
var peg$f3 = function(left, right) { return left.concat(right, ["&&"]); };
var peg$f4 = function(left) { return left.concat(["!!"]); };
var peg$f5 = function() { return ["complete"]; };
var peg$f6 = function(left) { return ["string", left]; };
var peg$f7 = function(left) { return ["regex", left]; };
var peg$f8 = function(left) { return ["++", left]; };
var peg$f9 = function() { return ["++", "*"]; };
var peg$f10 = function(left) { return ["@@", left]; };
var peg$f11 = function() { return ["@@", "*"]; };
var peg$f12 = function(op, right) { return ["priority", right, op]; };
var peg$f13 = function() { return ["priority"]; };
var peg$f14 = function() { return text(); };
var peg$f15 = function(op, right) { return ["due"].concat(right, [op]); };
var peg$f16 = function() { return ["due"]; };
var peg$f17 = function(left, op, count, unit) {
if (op == "-") {
count = count * -1;
}
// we do our date math with the same code as we use for
// recurrence calculations. All dates are returned from
// the parser as millisec since epoch (getTime()) to
// simplify comparisons in the filter lang execution engine.
let d = addIntervalToDate(new Date(left), count, unit);
return d.getTime();
};
var peg$f18 = function(year, month, day) {
let d = new Date(year, month-1, day);
return d.getTime();
};
var peg$f19 = function() {
let d = new Date(); // now, w current time of day
d = new Date(d.getFullYear(), d.getMonth(), d.getDate());
return d.getTime();
};
var peg$f20 = function() {
let d = new Date(); // now, w current time of day
d = new Date(d.getFullYear(), d.getMonth(), d.getDate());
return d.getTime() + 24*60*60*1000;
};
var peg$f21 = function(chars) {
return chars.join("");
};
var peg$f22 = function() { return '"'; };
var peg$f23 = function() { return "'"; };
var peg$f24 = function(chars) {
return new RegExp(chars.join(""), "i");
};
var peg$f25 = function(chars) {
return new RegExp(chars.join(""));
};
var peg$f26 = function() { return "/"; };
var peg$f27 = function() { return '"' + text(); };
var peg$currPos = 0;
var peg$savedPos = 0;
var peg$posDetailsCache = [{ line: 1, column: 1 }];
var peg$maxFailPos = 0;
var peg$maxFailExpected = [];
var peg$silentFails = 0;
var peg$result;
if ("startRule" in options) {
if (!(options.startRule in peg$startRuleFunctions)) {
throw new Error("Can't start parsing from rule \"" + options.startRule + "\".");
}
peg$startRuleFunction = peg$startRuleFunctions[options.startRule];
}
function text() {
return input.substring(peg$savedPos, peg$currPos);
}
function offset() {
return peg$savedPos;
}
function range() {
return {
source: peg$source,
start: peg$savedPos,
end: peg$currPos
};
}
function location() {
return peg$computeLocation(peg$savedPos, peg$currPos);
}
function expected(description, location) {
location = location !== undefined
? location
: peg$computeLocation(peg$savedPos, peg$currPos);
throw peg$buildStructuredError(
[peg$otherExpectation(description)],
input.substring(peg$savedPos, peg$currPos),
location
);
}
function error(message, location) {
location = location !== undefined
? location
: peg$computeLocation(peg$savedPos, peg$currPos);
throw peg$buildSimpleError(message, location);
}
function peg$literalExpectation(text, ignoreCase) {
return { type: "literal", text: text, ignoreCase: ignoreCase };
}
function peg$classExpectation(parts, inverted, ignoreCase) {
return { type: "class", parts: parts, inverted: inverted, ignoreCase: ignoreCase };
}
function peg$anyExpectation() {
return { type: "any" };
}
function peg$endExpectation() {
return { type: "end" };
}
function peg$otherExpectation(description) {
return { type: "other", description: description };
}
function peg$computePosDetails(pos) {
var details = peg$posDetailsCache[pos];
var p;
if (details) {
return details;
} else {
p = pos - 1;
while (!peg$posDetailsCache[p]) {
p--;
}
details = peg$posDetailsCache[p];
details = {
line: details.line,
column: details.column
};
while (p < pos) {
if (input.charCodeAt(p) === 10) {
details.line++;
details.column = 1;
} else {
details.column++;
}
p++;
}
peg$posDetailsCache[pos] = details;
return details;
}
}
function peg$computeLocation(startPos, endPos) {
var startPosDetails = peg$computePosDetails(startPos);
var endPosDetails = peg$computePosDetails(endPos);
return {
source: peg$source,
start: {
offset: startPos,
line: startPosDetails.line,
column: startPosDetails.column
},
end: {
offset: endPos,
line: endPosDetails.line,
column: endPosDetails.column
}
};
}
function peg$fail(expected) {
if (peg$currPos < peg$maxFailPos) { return; }
if (peg$currPos > peg$maxFailPos) {
peg$maxFailPos = peg$currPos;
peg$maxFailExpected = [];
}
peg$maxFailExpected.push(expected);
}
function peg$buildSimpleError(message, location) {
return new peg$SyntaxError(message, null, null, location);
}
function peg$buildStructuredError(expected, found, location) {
return new peg$SyntaxError(
peg$SyntaxError.buildMessage(expected, found),
expected,
found,
location
);
}
function peg$parsefilterQuery() {
var s0, s1, s2, s3;
s0 = peg$currPos;
s1 = peg$parse_();
s2 = peg$parseorExpr();
if (s2 !== peg$FAILED) {
s3 = peg$parse_();
peg$savedPos = s0;
s0 = peg$f0(s2);
} else {
peg$currPos = s0;
s0 = peg$FAILED;
}
if (s0 === peg$FAILED) {
s0 = peg$currPos;
s1 = peg$parse_();
peg$savedPos = s0;
s1 = peg$f1();
s0 = s1;
}
return s0;
}
function peg$parseorExpr() {
var s0, s1, s2, s3, s4, s5;
s0 = peg$currPos;
s1 = peg$parseandExpr();
if (s1 !== peg$FAILED) {
s2 = peg$parse_();
s3 = peg$parseOrOp();
if (s3 !== peg$FAILED) {
s4 = peg$parse_();
s5 = peg$parseorExpr();
if (s5 !== peg$FAILED) {
peg$savedPos = s0;
s0 = peg$f2(s1, s5);
} else {
peg$currPos = s0;
s0 = peg$FAILED;
}
} else {
peg$currPos = s0;
s0 = peg$FAILED;
}
} else {
peg$currPos = s0;
s0 = peg$FAILED;
}
if (s0 === peg$FAILED) {
s0 = peg$currPos;
s1 = peg$parseandExpr();
if (s1 !== peg$FAILED) {
peg$savedPos = s0;
s1 = peg$f0(s1);
}
s0 = s1;
}
return s0;
}
function peg$parseandExpr() {
var s0, s1, s2, s3, s4, s5;
s0 = peg$currPos;
s1 = peg$parsenotExpr();
if (s1 !== peg$FAILED) {
s2 = peg$parse_();
s3 = peg$parseAndOp();
if (s3 !== peg$FAILED) {
s4 = peg$parse_();
s5 = peg$parseandExpr();
if (s5 !== peg$FAILED) {
peg$savedPos = s0;
s0 = peg$f3(s1, s5);