Here's a fully self-contained, zero-dependency solution for your task tracking system using HTML + CSS + Python. It allows:
- Editing Markdown tables in a browser
- Adding/Removing rows
- Marking tasks as done/undone
- Copying the table as Markdown
- Saving to
.md files
- Local server with
python -m http.server
✅ Features
| Feature | Description |
|---|
| 📝 Edit Markdown tables | In-browser, with buttons to add rows/columns |
| ✅ Task status | Checkbox for "Done" or "Pending" |
| 📤 Copy as Markdown | One-click copy to clipboard |
| 📁 Local server | python -m http.server for file access |
| 🧩 Zero dependencies | Pure HTML, CSS, JS, and Python |
📁 Folder Structure
task_tracker/
│
├── index.html # Web UI
├── style.css # Basic styling
├── script.js # JavaScript for table editing
├── server.py # Local HTTP server
└── tasks.md # Your task tracking file
📄 1. index.html (Main Interface)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>📝 Task Tracker</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div class="container">
<h1>📝 Task Tracker</h1>
<div class="toolbar">
<button onclick="addRow()">➕ Add Row</button>
<button onclick="copyTable()">📋 Copy as Markdown</button>
<input type="file" id="fileInput" accept=".md" />
<button onclick="loadFile()">📁 Load .md</button>
<button onclick="saveFile()">💾 Save .md</button>
</div>
<div class="table-container">
<table id="taskTable">
<thead>
<tr>
<th>Task</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<!-- Rows added dynamically -->
</tbody>
</table>
</div>
</div>
<script src="script.js"></script>
</body>
</html>
🎨 2. style.css (Basic Styling)
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background: #f5f5f5;
}
.container {
max-width: 800px;
margin: 2rem auto;
padding: 1rem;
background: white;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.toolbar {
display: flex;
gap: 0.5rem;
margin-bottom: 1rem;
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 1rem;
}
th, td {
border: 1px solid #ccc;
padding: 0.5rem;
text-align: left;
}
td input[type="checkbox"] {
transform: scale(1.2);
}
button {
padding: 0.5rem 1rem;
cursor: pointer;
}
🧠 3. script.js (Table Logic)
let table = document.getElementById("taskTable").getElementsByTagName("tbody")[0];
function addRow() {
let row = table.insertRow();
let cell1 = row.insertCell(0);
let cell2 = row.insertCell(1);
cell1.innerHTML = `<input type="text" placeholder="Task name">`;
cell2.innerHTML = `<input type="checkbox">`;
}
function copyTable() {
let table = document.getElementById("taskTable");
let markdown = "| Task | Status |\n|------|--------|\n";
for (let i = 1; i < table.rows.length; i++) {
let task = table.rows[i].cells[0].querySelector("input").value;
let status = table.rows[i].cells[1].querySelector("input").checked ? "✅" : "⬜";
markdown += `| ${task} | ${status} |\n`;
}
navigator.clipboard.writeText(markdown).then(() => {
alert("✅ Table copied to clipboard!");
});
}
function loadFile() {
let input = document.createElement("input");
input.type = "file";
input.accept = ".md";
input.onchange = function () {
let file = input.files[0];
let reader = new FileReader();
reader.onload = function (e) {
let content = e.target.result;
parseMarkdownTable(content);
};
reader.readAsText(file);
};
input.click();
}
function parseMarkdownTable(text) {
let lines = text.split("\n");
let table = document.getElementById("taskTable").getElementsByTagName("tbody")[0];
table.innerHTML = ""; // Clear existing rows
for (let line of lines) {
if (line.trim().startsWith("|")) {
let [task, status] = line.trim().split("|").map(s => s.trim());
if (task && status) {
let row = table.insertRow();
row.insertCell(0).innerHTML = `<input type="text" value="${task}">`;
row.insertCell(1).innerHTML = `<input type="checkbox" ${status === "✅" ? "checked" : ""}>`;
}
}
}
}
function saveFile() {
let table = document.getElementById("taskTable");
let markdown = "| Task | Status |\n|------|--------|\n";
for (let i = 1; i < table.rows.length; i++) {
let task = table.rows[i].cells[0].querySelector("input").value;
let status = table.rows[i].cells[1].querySelector("input").checked ? "✅" : "⬜";
markdown += `| ${task} | ${status} |\n`;
}
let blob = new Blob([markdown], { type: "text/markdown" });
let url = URL.createObjectURL(blob);
let a = document.createElement("a");
a.href = url;
a.download = "tasks.md";
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
URL.revokeObjectURL(url);
}
🚀 4. server.py (Local HTTP Server)
import http.server
import socketserver
PORT = 8000
Handler = http.server.SimpleHTTPRequestHandler
httpd = socketserver.TCPServer(("", PORT), Handler)
print(f"Serving at http://localhost:{PORT}")
httpd.serve_forever()
🧪 How to Use
- Create a folder with the files above
- Run the server:
python server.py
- Open in browser:
http://localhost:8000
- Load
.md file (if you have one) or start fresh
- Edit the table, add rows, check boxes
- Copy as Markdown or Save as
.md
✅ Example .md File
| Task | Status |
|-----------------------|--------|
| Implement activation stats | ⬜ |
| Hook to GNN layers | ⬜ |
| Write curriculum.yaml | ⬜ |
🛠️ Future Enhancements
- Add auto-save to
.md
- Add search/filter for tasks
- Add task categories (e.g., "Diagnostics", "Curriculum")
- Add versioning (e.g., timestamped backups)
This setup is fully local, zero dependencies, and easy to extend. Let me know if you want to add any of these features! 🚀