mktask 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mktask/__init__.py +8 -0
- mktask/__main__.py +153 -0
- mktask/mktask.toml +75 -0
- mktask/static/app.json +578 -0
- mktask/static/index.html +24 -0
- mktask/static/mktask.css +13 -0
- mktask-0.1.0.dist-info/METADATA +98 -0
- mktask-0.1.0.dist-info/RECORD +11 -0
- mktask-0.1.0.dist-info/WHEEL +4 -0
- mktask-0.1.0.dist-info/entry_points.txt +2 -0
- mktask-0.1.0.dist-info/licenses/LICENSE +190 -0
mktask/__init__.py
ADDED
mktask/__main__.py
ADDED
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
"""mktask CLI and server entry point."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import argparse
|
|
6
|
+
import socket
|
|
7
|
+
import sys
|
|
8
|
+
from pathlib import Path
|
|
9
|
+
from typing import Any
|
|
10
|
+
|
|
11
|
+
from mkio import create_app
|
|
12
|
+
from mkio.config import load_config
|
|
13
|
+
|
|
14
|
+
from mktask import __version__
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def serve(
|
|
18
|
+
config: str | Path | dict[str, Any] = "mktask.toml",
|
|
19
|
+
host: str | None = None,
|
|
20
|
+
port: int | None = None,
|
|
21
|
+
db_path: str | None = None,
|
|
22
|
+
) -> None:
|
|
23
|
+
"""Start the mktask server. Blocks until shutdown."""
|
|
24
|
+
cfg = _load_config(config)
|
|
25
|
+
if host is not None:
|
|
26
|
+
cfg["host"] = host
|
|
27
|
+
if port is not None:
|
|
28
|
+
cfg["port"] = port
|
|
29
|
+
if db_path is not None:
|
|
30
|
+
cfg["db_path"] = db_path
|
|
31
|
+
|
|
32
|
+
# Probe the port before anything else starts: a bind failure inside
|
|
33
|
+
# app.start() happens after the startup hooks have opened the database,
|
|
34
|
+
# whose aiosqlite threads then keep the process alive after the traceback.
|
|
35
|
+
_check_port(cfg["host"], cfg["port"])
|
|
36
|
+
|
|
37
|
+
app = create_app(cfg)
|
|
38
|
+
|
|
39
|
+
async def announce() -> None:
|
|
40
|
+
print(_banner(cfg, config), flush=True)
|
|
41
|
+
|
|
42
|
+
app.on_startup(announce)
|
|
43
|
+
app.run()
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def _check_port(host: str, port: int) -> None:
|
|
47
|
+
"""Fail fast, before anything else starts, if the web port can't be bound."""
|
|
48
|
+
family = socket.AF_INET6 if ":" in host else socket.AF_INET
|
|
49
|
+
try:
|
|
50
|
+
with socket.socket(family, socket.SOCK_STREAM) as probe:
|
|
51
|
+
probe.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
|
52
|
+
probe.bind((host, port))
|
|
53
|
+
except OSError as exc:
|
|
54
|
+
print(f"Error: cannot listen on {host}:{port}: {exc.strerror or exc}", file=sys.stderr)
|
|
55
|
+
raise SystemExit(1) from None
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def _banner(cfg: dict[str, Any], config: str | Path | dict[str, Any]) -> str:
|
|
59
|
+
"""Startup summary: where the UI is and what it is running on."""
|
|
60
|
+
host = cfg.get("host", "127.0.0.1")
|
|
61
|
+
port = cfg.get("port", 8080)
|
|
62
|
+
url_host = "localhost" if host in ("", "0.0.0.0", "::") else host
|
|
63
|
+
if ":" in url_host:
|
|
64
|
+
url_host = f"[{url_host}]"
|
|
65
|
+
listen = f"{host}:{port}"
|
|
66
|
+
if host in ("", "0.0.0.0", "::"):
|
|
67
|
+
listen += " (all interfaces)"
|
|
68
|
+
|
|
69
|
+
db_path = cfg.get("db_path", "mkio.db")
|
|
70
|
+
database = "in-memory (nothing persists)" if db_path == ":memory:" else str(Path(db_path).resolve())
|
|
71
|
+
config_desc = "<dict>" if isinstance(config, dict) else str(Path(config).resolve())
|
|
72
|
+
|
|
73
|
+
return "\n".join([
|
|
74
|
+
f"mktask {__version__}",
|
|
75
|
+
f" Web UI: http://{url_host}:{port}/",
|
|
76
|
+
f" Listening: {listen}",
|
|
77
|
+
f" Config: {config_desc}",
|
|
78
|
+
f" Database: {database}",
|
|
79
|
+
" Press Ctrl+C to stop.",
|
|
80
|
+
])
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
def _load_config(config: str | Path | dict[str, Any]) -> dict[str, Any]:
|
|
84
|
+
"""Load config, resolving the mkui static path and relative directories."""
|
|
85
|
+
config_dir = Path(config).parent.resolve() if isinstance(config, (str, Path)) else Path.cwd()
|
|
86
|
+
cfg = load_config(config)
|
|
87
|
+
cfg["version"] = __version__
|
|
88
|
+
|
|
89
|
+
statics = cfg.get("static", {})
|
|
90
|
+
for route, directory in list(statics.items()):
|
|
91
|
+
if directory == "__mkui__":
|
|
92
|
+
import mkui
|
|
93
|
+
statics[route] = str(mkui.static_dir)
|
|
94
|
+
else:
|
|
95
|
+
statics[route] = str((config_dir / directory).resolve())
|
|
96
|
+
|
|
97
|
+
return cfg
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
def _find_config() -> str:
|
|
101
|
+
"""Look for mktask.toml in the current directory, then the package."""
|
|
102
|
+
cwd = Path.cwd() / "mktask.toml"
|
|
103
|
+
if cwd.exists():
|
|
104
|
+
return str(cwd)
|
|
105
|
+
|
|
106
|
+
pkg = Path(__file__).parent / "mktask.toml"
|
|
107
|
+
if pkg.exists():
|
|
108
|
+
return str(pkg)
|
|
109
|
+
|
|
110
|
+
print("Error: mktask.toml not found. Provide a config path as argument.", file=sys.stderr)
|
|
111
|
+
sys.exit(1)
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
def main() -> None:
|
|
115
|
+
"""CLI entry point."""
|
|
116
|
+
parser = argparse.ArgumentParser(
|
|
117
|
+
prog="mktask",
|
|
118
|
+
description="Work task prioritizer built on mkio and mkui",
|
|
119
|
+
)
|
|
120
|
+
parser.add_argument(
|
|
121
|
+
"config", nargs="?", default=None,
|
|
122
|
+
help="path to mktask.toml config file (default: ./mktask.toml, else the built-in one)",
|
|
123
|
+
)
|
|
124
|
+
parser.add_argument(
|
|
125
|
+
"-p", "--port", type=int, default=None,
|
|
126
|
+
help="override listening port",
|
|
127
|
+
)
|
|
128
|
+
parser.add_argument(
|
|
129
|
+
"--host", default=None,
|
|
130
|
+
help="override listening host",
|
|
131
|
+
)
|
|
132
|
+
parser.add_argument(
|
|
133
|
+
"-d", "--db", default=None, metavar="PATH",
|
|
134
|
+
help="database filename (.db added if no extension; use ':memory:' for in-memory)",
|
|
135
|
+
)
|
|
136
|
+
parser.add_argument(
|
|
137
|
+
"--version", action="version", version=f"mktask {__version__}",
|
|
138
|
+
)
|
|
139
|
+
args = parser.parse_args()
|
|
140
|
+
|
|
141
|
+
db_path = args.db
|
|
142
|
+
if db_path is not None and db_path != ":memory:" and not Path(db_path).suffix:
|
|
143
|
+
db_path += ".db"
|
|
144
|
+
|
|
145
|
+
config_path = args.config or _find_config()
|
|
146
|
+
if not Path(config_path).is_file():
|
|
147
|
+
print(f"Error: config file not found: {config_path}", file=sys.stderr)
|
|
148
|
+
sys.exit(1)
|
|
149
|
+
serve(config_path, host=args.host, port=args.port, db_path=db_path)
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
if __name__ == "__main__":
|
|
153
|
+
main()
|
mktask/mktask.toml
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
name = "mktask"
|
|
2
|
+
# version is injected from mktask.__version__ at load time; do not add one here
|
|
3
|
+
port = 8080
|
|
4
|
+
host = "127.0.0.1"
|
|
5
|
+
db_path = "mktask.db"
|
|
6
|
+
auto_migrate = true
|
|
7
|
+
|
|
8
|
+
# ─── Tables ─────────────────────────────────────────────────────────
|
|
9
|
+
|
|
10
|
+
# One row per task. importance/urgency are 1..5; the UI derives a score
|
|
11
|
+
# from them (placeholder for the real prioritization model). Timestamps are
|
|
12
|
+
# UTC "YYYY-MM-DD HH:MM:SS" to match SQLite's CURRENT_TIMESTAMP.
|
|
13
|
+
[tables.tasks]
|
|
14
|
+
columns = { id = "INTEGER PRIMARY KEY AUTOINCREMENT", title = "TEXT NOT NULL", notes = "TEXT NOT NULL DEFAULT ''", status = "TEXT NOT NULL DEFAULT 'open'", importance = "INTEGER NOT NULL DEFAULT 3", urgency = "INTEGER NOT NULL DEFAULT 3", due = "TEXT NOT NULL DEFAULT ''", created_at = "TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP", updated_at = "TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP", done_at = "TEXT NOT NULL DEFAULT ''" }
|
|
15
|
+
|
|
16
|
+
# Saved window layouts for mkui's Layout menu: one row per save, the newest
|
|
17
|
+
# being the user's current layout and the older ones its restorable history
|
|
18
|
+
# (the client prunes through `delete`). mktask has no login, so every save
|
|
19
|
+
# lands under owner '' — the default history shared by everyone on this server.
|
|
20
|
+
[tables.mkui_layouts]
|
|
21
|
+
columns = { id = "INTEGER PRIMARY KEY AUTOINCREMENT", app = "TEXT NOT NULL DEFAULT ''", owner = "TEXT NOT NULL DEFAULT ''", saved = "TEXT DEFAULT CURRENT_TIMESTAMP", layout = "TEXT NOT NULL" }
|
|
22
|
+
|
|
23
|
+
# ─── Services ───────────────────────────────────────────────────────
|
|
24
|
+
|
|
25
|
+
[services.tasks]
|
|
26
|
+
protocol = "transaction"
|
|
27
|
+
description = "Add, edit, complete, reopen, and delete tasks"
|
|
28
|
+
|
|
29
|
+
[services.tasks.ops]
|
|
30
|
+
add = [
|
|
31
|
+
{ table = "tasks", op_type = "insert", fields = ["title", "notes", "importance", "urgency", "due"], defaults = { notes = "", importance = 3, urgency = 3, due = "" } },
|
|
32
|
+
]
|
|
33
|
+
edit = [
|
|
34
|
+
{ table = "tasks", op_type = "update", key = ["id"], fields = ["title", "notes", "importance", "urgency", "due", "updated_at"] },
|
|
35
|
+
]
|
|
36
|
+
done = [
|
|
37
|
+
{ table = "tasks", op_type = "update", key = ["id"], fields = ["done_at", "updated_at"], defaults = { status = "done" } },
|
|
38
|
+
]
|
|
39
|
+
reopen = [
|
|
40
|
+
{ table = "tasks", op_type = "update", key = ["id"], fields = ["updated_at"], defaults = { status = "open", done_at = "" } },
|
|
41
|
+
]
|
|
42
|
+
delete = [
|
|
43
|
+
{ table = "tasks", op_type = "delete", key = ["id"] },
|
|
44
|
+
]
|
|
45
|
+
|
|
46
|
+
[services.all_tasks]
|
|
47
|
+
protocol = "query"
|
|
48
|
+
description = "Every task, live"
|
|
49
|
+
primary_table = "tasks"
|
|
50
|
+
filterable = ["status"]
|
|
51
|
+
|
|
52
|
+
[services.mkui_layouts]
|
|
53
|
+
protocol = "transaction"
|
|
54
|
+
description = "Save and delete window layouts"
|
|
55
|
+
|
|
56
|
+
[services.mkui_layouts.ops]
|
|
57
|
+
save = { table = "mkui_layouts", op_type = "insert", fields = ["app", "owner", "layout"] }
|
|
58
|
+
delete = { table = "mkui_layouts", op_type = "delete", key = ["id"] }
|
|
59
|
+
|
|
60
|
+
[services.mkui_layouts_list]
|
|
61
|
+
protocol = "reqrep"
|
|
62
|
+
description = "Saved layouts of one app and owner, newest first"
|
|
63
|
+
sql = "SELECT id, saved FROM mkui_layouts WHERE app = :app AND owner = :owner ORDER BY id DESC"
|
|
64
|
+
|
|
65
|
+
[services.mkui_layouts_get]
|
|
66
|
+
protocol = "reqrep"
|
|
67
|
+
description = "One saved layout"
|
|
68
|
+
sql = "SELECT id, saved, layout FROM mkui_layouts WHERE id = :id"
|
|
69
|
+
|
|
70
|
+
# ─── Static files ───────────────────────────────────────────────────
|
|
71
|
+
# "__mkui__" resolves to the installed mkui package's static directory.
|
|
72
|
+
|
|
73
|
+
[static]
|
|
74
|
+
"/" = "./static"
|
|
75
|
+
"/mkui" = "__mkui__"
|
mktask/static/app.json
ADDED
|
@@ -0,0 +1,578 @@
|
|
|
1
|
+
{
|
|
2
|
+
"app": {
|
|
3
|
+
"title": "mktask",
|
|
4
|
+
"theme": "dark"
|
|
5
|
+
},
|
|
6
|
+
"state": {
|
|
7
|
+
"status": {
|
|
8
|
+
"message": "Connecting...",
|
|
9
|
+
"background": "#858585",
|
|
10
|
+
"color": "#000"
|
|
11
|
+
},
|
|
12
|
+
"selected_task": null
|
|
13
|
+
},
|
|
14
|
+
"menubar": [
|
|
15
|
+
{
|
|
16
|
+
"label": "Edit",
|
|
17
|
+
"items": [
|
|
18
|
+
{
|
|
19
|
+
"label": "Copy",
|
|
20
|
+
"action": "edit.copy",
|
|
21
|
+
"shortcut": "mod+C"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"label": "Select All",
|
|
25
|
+
"action": "edit.selectAll",
|
|
26
|
+
"shortcut": "mod+A"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"label": "Tasks",
|
|
32
|
+
"items": [
|
|
33
|
+
{
|
|
34
|
+
"label": "Tasks",
|
|
35
|
+
"action": "pane.show",
|
|
36
|
+
"args": "tasks"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"label": "Detail",
|
|
40
|
+
"action": "pane.show",
|
|
41
|
+
"args": "task-detail"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"sep": true
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"label": "Show Open Only",
|
|
48
|
+
"action": "table.filter",
|
|
49
|
+
"args": {
|
|
50
|
+
"pane": "tasks",
|
|
51
|
+
"filters": {
|
|
52
|
+
"status": [
|
|
53
|
+
"open"
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
"merge": true
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"label": "Show All",
|
|
61
|
+
"action": "table.filter",
|
|
62
|
+
"args": {
|
|
63
|
+
"pane": "tasks",
|
|
64
|
+
"filters": {
|
|
65
|
+
"status": null
|
|
66
|
+
},
|
|
67
|
+
"merge": true
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"label": "Layout",
|
|
74
|
+
"items": [
|
|
75
|
+
{
|
|
76
|
+
"label": "Save Layout",
|
|
77
|
+
"action": "layout.save"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"label": "Restore Layout",
|
|
81
|
+
"layouts": true
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"sep": true
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"label": "Reset to Default",
|
|
88
|
+
"action": "layout.reset"
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"label": "Window",
|
|
94
|
+
"items": [
|
|
95
|
+
{
|
|
96
|
+
"label": "Cascade",
|
|
97
|
+
"action": "window.cascade"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"label": "Tile",
|
|
101
|
+
"items": [
|
|
102
|
+
{
|
|
103
|
+
"label": "Horizontal",
|
|
104
|
+
"action": "window.tileH"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"label": "Vertical",
|
|
108
|
+
"action": "window.tileV"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"label": "Grid",
|
|
112
|
+
"action": "window.grid"
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"sep": true
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"windows": true
|
|
121
|
+
}
|
|
122
|
+
]
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
"statusbar": {
|
|
126
|
+
"left": [
|
|
127
|
+
{
|
|
128
|
+
"type": "text",
|
|
129
|
+
"bind": "status.message"
|
|
130
|
+
}
|
|
131
|
+
],
|
|
132
|
+
"right": [
|
|
133
|
+
{
|
|
134
|
+
"type": "text",
|
|
135
|
+
"text": "mktask"
|
|
136
|
+
}
|
|
137
|
+
],
|
|
138
|
+
"bindStyle": {
|
|
139
|
+
"color": "status.color",
|
|
140
|
+
"background": "status.background"
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"layouts": {
|
|
144
|
+
"key": "mktask",
|
|
145
|
+
"keep": 10,
|
|
146
|
+
"keepDays": 7
|
|
147
|
+
},
|
|
148
|
+
"panes": {
|
|
149
|
+
"tasks": {
|
|
150
|
+
"title": "Tasks",
|
|
151
|
+
"type": "mkio-table",
|
|
152
|
+
"service": "all_tasks",
|
|
153
|
+
"protocol": "query",
|
|
154
|
+
"columns": [
|
|
155
|
+
"id",
|
|
156
|
+
"title",
|
|
157
|
+
"score",
|
|
158
|
+
"importance",
|
|
159
|
+
"urgency",
|
|
160
|
+
"due",
|
|
161
|
+
"status",
|
|
162
|
+
"created_at"
|
|
163
|
+
],
|
|
164
|
+
"labels": {
|
|
165
|
+
"id": "ID",
|
|
166
|
+
"title": "Title",
|
|
167
|
+
"score": "Score",
|
|
168
|
+
"importance": "Imp",
|
|
169
|
+
"urgency": "Urg",
|
|
170
|
+
"due": "Due",
|
|
171
|
+
"status": "Status",
|
|
172
|
+
"created_at": "Created"
|
|
173
|
+
},
|
|
174
|
+
"values": {
|
|
175
|
+
"score": "importance * urgency"
|
|
176
|
+
},
|
|
177
|
+
"types": {
|
|
178
|
+
"due": "time",
|
|
179
|
+
"created_at": {
|
|
180
|
+
"type": "time",
|
|
181
|
+
"parse": "%Y-%m-%d %H:%M:%S"
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
"sort": "-score",
|
|
185
|
+
"filters": {
|
|
186
|
+
"status": [
|
|
187
|
+
"open"
|
|
188
|
+
]
|
|
189
|
+
},
|
|
190
|
+
"styles": {
|
|
191
|
+
"score": [
|
|
192
|
+
{
|
|
193
|
+
"when": "value >= 16",
|
|
194
|
+
"color": "#f44747",
|
|
195
|
+
"bold": true
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"when": "value >= 9",
|
|
199
|
+
"color": "#dcdcaa"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"color": "#858585"
|
|
203
|
+
}
|
|
204
|
+
],
|
|
205
|
+
"status": [
|
|
206
|
+
{
|
|
207
|
+
"when": "value == 'done'",
|
|
208
|
+
"color": "#4ec9b0"
|
|
209
|
+
}
|
|
210
|
+
]
|
|
211
|
+
},
|
|
212
|
+
"rowStyle": [
|
|
213
|
+
{
|
|
214
|
+
"when": "status == 'done'",
|
|
215
|
+
"color": "#858585",
|
|
216
|
+
"strike": true
|
|
217
|
+
}
|
|
218
|
+
],
|
|
219
|
+
"select": {
|
|
220
|
+
"state": "selected_task"
|
|
221
|
+
},
|
|
222
|
+
"buttons": [
|
|
223
|
+
{
|
|
224
|
+
"label": "+ Add",
|
|
225
|
+
"enable": {
|
|
226
|
+
"connected": true
|
|
227
|
+
},
|
|
228
|
+
"action": {
|
|
229
|
+
"type": "dialog",
|
|
230
|
+
"dialog": {
|
|
231
|
+
"title": "Add Task",
|
|
232
|
+
"modal": true,
|
|
233
|
+
"width": 440,
|
|
234
|
+
"fields": [
|
|
235
|
+
{
|
|
236
|
+
"name": "title",
|
|
237
|
+
"label": "Title",
|
|
238
|
+
"type": "text",
|
|
239
|
+
"required": true,
|
|
240
|
+
"placeholder": "What needs doing?"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"row": [
|
|
244
|
+
{
|
|
245
|
+
"name": "importance",
|
|
246
|
+
"label": "Importance",
|
|
247
|
+
"type": "select",
|
|
248
|
+
"width": 0.5,
|
|
249
|
+
"value": 3,
|
|
250
|
+
"options": [
|
|
251
|
+
{
|
|
252
|
+
"value": 1,
|
|
253
|
+
"label": "1 - Lowest"
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"value": 2,
|
|
257
|
+
"label": "2 - Low"
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"value": 3,
|
|
261
|
+
"label": "3 - Medium"
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"value": 4,
|
|
265
|
+
"label": "4 - High"
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"value": 5,
|
|
269
|
+
"label": "5 - Highest"
|
|
270
|
+
}
|
|
271
|
+
]
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"name": "urgency",
|
|
275
|
+
"label": "Urgency",
|
|
276
|
+
"type": "select",
|
|
277
|
+
"width": 0.5,
|
|
278
|
+
"value": 3,
|
|
279
|
+
"options": [
|
|
280
|
+
{
|
|
281
|
+
"value": 1,
|
|
282
|
+
"label": "1 - Lowest"
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"value": 2,
|
|
286
|
+
"label": "2 - Low"
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"value": 3,
|
|
290
|
+
"label": "3 - Medium"
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"value": 4,
|
|
294
|
+
"label": "4 - High"
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
"value": 5,
|
|
298
|
+
"label": "5 - Highest"
|
|
299
|
+
}
|
|
300
|
+
]
|
|
301
|
+
}
|
|
302
|
+
]
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
"name": "due",
|
|
306
|
+
"label": "Due (YYYY-MM-DD, optional)",
|
|
307
|
+
"type": "text",
|
|
308
|
+
"placeholder": "2026-12-31",
|
|
309
|
+
"value": ""
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
"name": "notes",
|
|
313
|
+
"label": "Notes",
|
|
314
|
+
"type": "textarea",
|
|
315
|
+
"value": ""
|
|
316
|
+
}
|
|
317
|
+
],
|
|
318
|
+
"submit": {
|
|
319
|
+
"label": "Add",
|
|
320
|
+
"service": "tasks",
|
|
321
|
+
"op": "add"
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"label": "Edit",
|
|
328
|
+
"unit": "row",
|
|
329
|
+
"enable": {
|
|
330
|
+
"connected": true
|
|
331
|
+
},
|
|
332
|
+
"action": {
|
|
333
|
+
"type": "dialog",
|
|
334
|
+
"dialog": {
|
|
335
|
+
"title": "Edit Task #${row.id}",
|
|
336
|
+
"modal": true,
|
|
337
|
+
"width": 440,
|
|
338
|
+
"fields": [
|
|
339
|
+
{
|
|
340
|
+
"name": "id",
|
|
341
|
+
"type": "hidden",
|
|
342
|
+
"value": "${row.id}"
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
"name": "updated_at",
|
|
346
|
+
"type": "hidden",
|
|
347
|
+
"value": "${TIME(NOW(), '%Y-%m-%d %H:%M:%S')}"
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
"name": "title",
|
|
351
|
+
"label": "Title",
|
|
352
|
+
"type": "text",
|
|
353
|
+
"required": true,
|
|
354
|
+
"placeholder": "What needs doing?",
|
|
355
|
+
"value": "${row.title}"
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
"row": [
|
|
359
|
+
{
|
|
360
|
+
"name": "importance",
|
|
361
|
+
"label": "Importance",
|
|
362
|
+
"type": "select",
|
|
363
|
+
"width": 0.5,
|
|
364
|
+
"value": "${row.importance}",
|
|
365
|
+
"options": [
|
|
366
|
+
{
|
|
367
|
+
"value": 1,
|
|
368
|
+
"label": "1 - Lowest"
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
"value": 2,
|
|
372
|
+
"label": "2 - Low"
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
"value": 3,
|
|
376
|
+
"label": "3 - Medium"
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
"value": 4,
|
|
380
|
+
"label": "4 - High"
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
"value": 5,
|
|
384
|
+
"label": "5 - Highest"
|
|
385
|
+
}
|
|
386
|
+
]
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
"name": "urgency",
|
|
390
|
+
"label": "Urgency",
|
|
391
|
+
"type": "select",
|
|
392
|
+
"width": 0.5,
|
|
393
|
+
"value": "${row.urgency}",
|
|
394
|
+
"options": [
|
|
395
|
+
{
|
|
396
|
+
"value": 1,
|
|
397
|
+
"label": "1 - Lowest"
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
"value": 2,
|
|
401
|
+
"label": "2 - Low"
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
"value": 3,
|
|
405
|
+
"label": "3 - Medium"
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
"value": 4,
|
|
409
|
+
"label": "4 - High"
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
"value": 5,
|
|
413
|
+
"label": "5 - Highest"
|
|
414
|
+
}
|
|
415
|
+
]
|
|
416
|
+
}
|
|
417
|
+
]
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
"name": "due",
|
|
421
|
+
"label": "Due (YYYY-MM-DD, optional)",
|
|
422
|
+
"type": "text",
|
|
423
|
+
"placeholder": "2026-12-31",
|
|
424
|
+
"value": "${row.due}"
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
"name": "notes",
|
|
428
|
+
"label": "Notes",
|
|
429
|
+
"type": "textarea",
|
|
430
|
+
"value": "${row.notes}"
|
|
431
|
+
}
|
|
432
|
+
],
|
|
433
|
+
"submit": {
|
|
434
|
+
"label": "Save",
|
|
435
|
+
"service": "tasks",
|
|
436
|
+
"op": "edit"
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
"label": "Done",
|
|
443
|
+
"enable": {
|
|
444
|
+
"connected": true,
|
|
445
|
+
"minSelected": 1,
|
|
446
|
+
"when": "ALL(rows, r -> r.status == 'open')"
|
|
447
|
+
},
|
|
448
|
+
"action": {
|
|
449
|
+
"type": "transaction",
|
|
450
|
+
"service": "tasks",
|
|
451
|
+
"op": "done",
|
|
452
|
+
"data": {
|
|
453
|
+
"id": "${row.id}",
|
|
454
|
+
"done_at": "${TIME(NOW(), '%Y-%m-%d %H:%M:%S')}",
|
|
455
|
+
"updated_at": "${TIME(NOW(), '%Y-%m-%d %H:%M:%S')}"
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
},
|
|
459
|
+
{
|
|
460
|
+
"label": "Reopen",
|
|
461
|
+
"enable": {
|
|
462
|
+
"connected": true,
|
|
463
|
+
"minSelected": 1,
|
|
464
|
+
"when": "ALL(rows, r -> r.status == 'done')"
|
|
465
|
+
},
|
|
466
|
+
"action": {
|
|
467
|
+
"type": "transaction",
|
|
468
|
+
"service": "tasks",
|
|
469
|
+
"op": "reopen",
|
|
470
|
+
"data": {
|
|
471
|
+
"id": "${row.id}",
|
|
472
|
+
"updated_at": "${TIME(NOW(), '%Y-%m-%d %H:%M:%S')}"
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
},
|
|
476
|
+
{
|
|
477
|
+
"label": "Delete",
|
|
478
|
+
"unit": "row",
|
|
479
|
+
"enable": {
|
|
480
|
+
"connected": true
|
|
481
|
+
},
|
|
482
|
+
"action": {
|
|
483
|
+
"type": "dialog",
|
|
484
|
+
"dialog": {
|
|
485
|
+
"title": "Delete Task #${row.id}",
|
|
486
|
+
"modal": true,
|
|
487
|
+
"width": 380,
|
|
488
|
+
"fields": [
|
|
489
|
+
{
|
|
490
|
+
"name": "id",
|
|
491
|
+
"type": "hidden",
|
|
492
|
+
"value": "${row.id}"
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
"label": "Delete this task?",
|
|
496
|
+
"type": "readonly",
|
|
497
|
+
"value": "${row.title}"
|
|
498
|
+
}
|
|
499
|
+
],
|
|
500
|
+
"submit": {
|
|
501
|
+
"label": "Delete",
|
|
502
|
+
"service": "tasks",
|
|
503
|
+
"op": "delete"
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
]
|
|
509
|
+
},
|
|
510
|
+
"task-detail": {
|
|
511
|
+
"title": "Detail",
|
|
512
|
+
"widgets": [
|
|
513
|
+
{
|
|
514
|
+
"type": "text",
|
|
515
|
+
"text": "${IF(state.selected_task == NULL, 'Select a task to see its notes.', FORMAT('#{} {}', state.selected_task.id, state.selected_task.title))}",
|
|
516
|
+
"class": "task-detail-title"
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
"type": "text",
|
|
520
|
+
"text": "${IF(state.selected_task == NULL, '', state.selected_task.notes)}",
|
|
521
|
+
"class": "task-detail-notes"
|
|
522
|
+
}
|
|
523
|
+
]
|
|
524
|
+
}
|
|
525
|
+
},
|
|
526
|
+
"frames": [
|
|
527
|
+
{
|
|
528
|
+
"id": "main",
|
|
529
|
+
"x": 0.02,
|
|
530
|
+
"y": 0.03,
|
|
531
|
+
"w": 0.64,
|
|
532
|
+
"h": 0.94,
|
|
533
|
+
"layout": {
|
|
534
|
+
"type": "tabs",
|
|
535
|
+
"active": 0,
|
|
536
|
+
"children": [
|
|
537
|
+
"tasks"
|
|
538
|
+
]
|
|
539
|
+
}
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
"id": "side",
|
|
543
|
+
"x": 0.68,
|
|
544
|
+
"y": 0.03,
|
|
545
|
+
"w": 0.3,
|
|
546
|
+
"h": 0.94,
|
|
547
|
+
"layout": {
|
|
548
|
+
"type": "tabs",
|
|
549
|
+
"active": 0,
|
|
550
|
+
"children": [
|
|
551
|
+
"task-detail"
|
|
552
|
+
]
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
],
|
|
556
|
+
"mkio": {
|
|
557
|
+
"url": "auto",
|
|
558
|
+
"expect": {
|
|
559
|
+
"name": "mktask",
|
|
560
|
+
"expr": "1"
|
|
561
|
+
},
|
|
562
|
+
"connected": {
|
|
563
|
+
"status.message": "Connected",
|
|
564
|
+
"status.color": null,
|
|
565
|
+
"status.background": null
|
|
566
|
+
},
|
|
567
|
+
"disconnected": {
|
|
568
|
+
"status.message": "Disconnected",
|
|
569
|
+
"status.color": "#000",
|
|
570
|
+
"status.background": "#858585"
|
|
571
|
+
},
|
|
572
|
+
"incompatible": {
|
|
573
|
+
"status.message": "Server mismatch",
|
|
574
|
+
"status.color": "#fff",
|
|
575
|
+
"status.background": "#cc0000"
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
}
|
mktask/static/index.html
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<title>mktask</title>
|
|
6
|
+
<link rel="stylesheet" href="/mkui/styles/mkui.css">
|
|
7
|
+
<link rel="stylesheet" href="/static/mktask.css">
|
|
8
|
+
<script type="module">
|
|
9
|
+
import "/mkui/src/index.js";
|
|
10
|
+
|
|
11
|
+
// Revalidate rather than trust heuristic freshness: mkio serves static
|
|
12
|
+
// files without Cache-Control, so a stale app.json silently pins the UI
|
|
13
|
+
// to an old layout.
|
|
14
|
+
const res = await fetch("/static/app.json", { cache: "no-cache" });
|
|
15
|
+
const config = await res.json();
|
|
16
|
+
const wsProto = location.protocol === "https:" ? "wss:" : "ws:";
|
|
17
|
+
config.mkio.url = `${wsProto}//${location.host}/ws`;
|
|
18
|
+
document.querySelector("mkui-app").setConfig(config);
|
|
19
|
+
</script>
|
|
20
|
+
</head>
|
|
21
|
+
<body>
|
|
22
|
+
<mkui-app></mkui-app>
|
|
23
|
+
</body>
|
|
24
|
+
</html>
|
mktask/static/mktask.css
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/* mktask — app-specific overrides on top of mkui's theme. */
|
|
2
|
+
|
|
3
|
+
/* Detail pane: text widgets render as inline spans; stack them. */
|
|
4
|
+
.task-detail-title,
|
|
5
|
+
.task-detail-notes {
|
|
6
|
+
display: block;
|
|
7
|
+
padding: 0.5em 0.75em 0;
|
|
8
|
+
white-space: pre-wrap;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.task-detail-title {
|
|
12
|
+
font-weight: bold;
|
|
13
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: mktask
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Work task prioritizer built on mkio and mkui
|
|
5
|
+
Project-URL: Homepage, https://github.com/markuskimius/mktask
|
|
6
|
+
Project-URL: Repository, https://github.com/markuskimius/mktask
|
|
7
|
+
Project-URL: Issues, https://github.com/markuskimius/mktask/issues
|
|
8
|
+
Author: Mark Kim
|
|
9
|
+
License-Expression: Apache-2.0
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: mkio,mkui,prioritization,tasks,todo
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Environment :: Web Environment
|
|
14
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
15
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Topic :: Office/Business :: Scheduling
|
|
21
|
+
Requires-Python: >=3.11
|
|
22
|
+
Requires-Dist: mkio>=0.2.0
|
|
23
|
+
Requires-Dist: mkui>=0.2.9
|
|
24
|
+
Provides-Extra: test
|
|
25
|
+
Requires-Dist: pytest; extra == 'test'
|
|
26
|
+
Requires-Dist: pytest-aiohttp; extra == 'test'
|
|
27
|
+
Requires-Dist: pytest-asyncio; extra == 'test'
|
|
28
|
+
Description-Content-Type: text/markdown
|
|
29
|
+
|
|
30
|
+
# mktask
|
|
31
|
+
|
|
32
|
+
[](https://pypi.org/project/mktask/)
|
|
33
|
+
[](https://pypi.org/project/mktask/)
|
|
34
|
+
[](https://github.com/markuskimius/mktask/blob/main/LICENSE)
|
|
35
|
+
|
|
36
|
+
A work task prioritizer built on [mkio](https://github.com/markuskimius/mkio)
|
|
37
|
+
(config-driven microservice backend) and
|
|
38
|
+
[mkui](https://github.com/markuskimius/mkui) (config-driven Web Components
|
|
39
|
+
workspace with dockable panes).
|
|
40
|
+
|
|
41
|
+
Tasks live in a local SQLite database and show up in a live-updating blotter
|
|
42
|
+
you can sort, filter, and arrange however you like. Each task carries an
|
|
43
|
+
importance and an urgency (1–5); the blotter derives a score from them so the
|
|
44
|
+
most pressing work floats to the top.
|
|
45
|
+
|
|
46
|
+
## Quick start
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
pip install mktask
|
|
50
|
+
mktask # http://127.0.0.1:8080/
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Everything installs via `pip`; nothing is fetched at runtime.
|
|
54
|
+
|
|
55
|
+
## CLI
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
mktask [config] [-p PORT] [--host HOST] [-d PATH] [--version]
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
- `config` — path to a `mktask.toml`. Defaults to `./mktask.toml` if
|
|
62
|
+
present, otherwise the one bundled with the package.
|
|
63
|
+
- `-p, --port` — override the listening port (default 8080).
|
|
64
|
+
- `--host` — override the listening host (default `127.0.0.1`).
|
|
65
|
+
- `-d, --db` — database file; `.db` is appended when there is no
|
|
66
|
+
extension. `:memory:` runs without persistence.
|
|
67
|
+
|
|
68
|
+
The server prints the URL to open once it is listening. If the port is
|
|
69
|
+
already taken it exits immediately with an error instead of starting.
|
|
70
|
+
|
|
71
|
+
## Customizing
|
|
72
|
+
|
|
73
|
+
Copy the bundled config out and edit it:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
python -c "import mktask, pathlib; print(pathlib.Path(mktask.__file__).parent / 'mktask.toml')"
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
`mktask.toml` declares the SQLite tables, the mkio services, and the static
|
|
80
|
+
routes; `static/app.json` next to it declares the UI (menus, panes, frames,
|
|
81
|
+
dialogs). Both are plain config — see the mkio and mkui READMEs for the
|
|
82
|
+
formats.
|
|
83
|
+
|
|
84
|
+
## Development
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
pip install -e '.[test]'
|
|
88
|
+
mktask -d :memory:
|
|
89
|
+
python -m pytest
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
The tests cover the CLI and config loading, a real server over HTTP and
|
|
93
|
+
WebSocket (every task op, the query filter, saved layouts, the port and
|
|
94
|
+
host flags), and the static integrity of `app.json` against `mktask.toml`.
|
|
95
|
+
|
|
96
|
+
## License
|
|
97
|
+
|
|
98
|
+
Apache License 2.0. See [LICENSE](LICENSE).
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
mktask/__init__.py,sha256=3NI1BOucJrgSde7x0VdKn1VQeJMlPA_W_yswseo9SA8,263
|
|
2
|
+
mktask/__main__.py,sha256=tOOzs4_ALojj0v-5LGwIf3PLgQji0LLfz1n7_R14ex8,4928
|
|
3
|
+
mktask/mktask.toml,sha256=NkwelfOFEKV5dH_6FgksEQ5okAe2XqnQuBmBNu_CrbI,3602
|
|
4
|
+
mktask/static/app.json,sha256=ZCs3-yzvJlUkSVMx0hAd3hnePWuvKzX9LW_HPkSXWTQ,14449
|
|
5
|
+
mktask/static/index.html,sha256=alN_BEu2rE7XUCe1MRkz8dTwD6XjNaPl7aiZaaI23qs,793
|
|
6
|
+
mktask/static/mktask.css,sha256=ULUlBRe5WsVdwGbj-EkCD-ssmigmoCvPKVxdVajiqT4,291
|
|
7
|
+
mktask-0.1.0.dist-info/METADATA,sha256=sfKqCjVxsz1batHIDTSR1OTuHX84ir_HhdmDvWqqgy8,3455
|
|
8
|
+
mktask-0.1.0.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
|
|
9
|
+
mktask-0.1.0.dist-info/entry_points.txt,sha256=vVn6-YAIDvlMtxu1JlCaoMRCosyiczKIymXz-TAjTqE,48
|
|
10
|
+
mktask-0.1.0.dist-info/licenses/LICENSE,sha256=6yqlSHcP6dLy30x4mERZlzbfbx1b8sXOZYaf_JgRJKU,10759
|
|
11
|
+
mktask-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to the Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by the Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding any notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
Copyright 2026 Mark Kim
|
|
179
|
+
|
|
180
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
181
|
+
you may not use this file except in compliance with the License.
|
|
182
|
+
You may obtain a copy of the License at
|
|
183
|
+
|
|
184
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
185
|
+
|
|
186
|
+
Unless required by applicable law or agreed to in writing, software
|
|
187
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
188
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
189
|
+
See the License for the specific language governing permissions and
|
|
190
|
+
limitations under the License.
|