Browse Source

lazygit

main
Gregory Leeman 1 month ago
parent
commit
ef4a02648e
  1. 2
      workflowy-helper/diary.opml
  2. 2
      workflowy-helper/diary.py
  3. 35
      workflowy-helper/main.js
  4. 224
      workflowy-helper/style.css

2
workflowy-helper/diary.opml

File diff suppressed because one or more lines are too long

2
workflowy-helper/diary.py

@ -26,7 +26,7 @@ def generate_weekly_opml(week_num, year=2025):
day_outline = ET.SubElement( day_outline = ET.SubElement(
week_outline, week_outline,
"outline", "outline",
text=f"<b><span class='colored c-{get_color(weekday)}'>{weekday} {ordinal(day_date.day)} {day_date.strftime('%b')}</span></b>", text=f"{weekday} {ordinal(day_date.day)} {day_date.strftime('%b')}",
_note=f"<time startYear='2025' startMonth='{day_date.month}' startDay='{day_date.day}'> {weekday[:3]}, {day_date.strftime('%b')} {day_date.day}, 2025</time>" _note=f"<time startYear='2025' startMonth='{day_date.month}' startDay='{day_date.day}'> {weekday[:3]}, {day_date.strftime('%b')} {day_date.day}, 2025</time>"
) )
if weekday in ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']: if weekday in ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']:

35
workflowy-helper/main.js

@ -176,6 +176,7 @@
removeClassesStartingWith(projectNode, "time"); removeClassesStartingWith(projectNode, "time");
const names = []; const names = [];
const notes = []; const notes = [];
const text = [];
for (let i = 0; i < projectNode.children.length; i++) { for (let i = 0; i < projectNode.children.length; i++) {
const child = projectNode.children[i]; const child = projectNode.children[i];
if (child.classList.contains('name')) { if (child.classList.contains('name')) {
@ -184,11 +185,37 @@
if (child.classList.contains('notes')) { if (child.classList.contains('notes')) {
notes.push(child); notes.push(child);
} }
if (child.classList.contains('leading-s')) {
text.push(child);
}
} }
const hotspots = ["admin", "art","mind","health","social","church","career","work"]
text.forEach(function(t) {
const breadcrumb = t.querySelector('.breadcrumbs');
if (breadcrumb !== null) {
const breadcrumbs = breadcrumb.querySelectorAll('a');
breadcrumbs.forEach(bc => {
var text = bc.innerText.trim();
if (hotspots.includes(text)) {
const hotspot = text;
projectNode.classList.add(`hotspot-${hotspot}`);
}
});
}
});
[notes, names].forEach(function(ns) { [notes, names].forEach(function(ns) {
if (ns.length > 0) { if (ns.length > 0) {
const n = ns[0]; const n = ns[0];
const text = safeGetContent(n, ".content > .innerContentContainer"); const text = safeGetContent(n, ".content > .innerContentContainer");
if (hotspots.includes(text)) {
const hotspot = text;
projectNode.classList.add(`hotspot-${hotspot}`);
const children = projectNode.querySelectorAll('.project');
children.forEach(child => {
console.log(child);
child.classList.add(`hotspot-${hotspot}`);
});
}
const tags = n.querySelectorAll('.contentTag'); const tags = n.querySelectorAll('.contentTag');
if (text.startsWith("!")) { if (text.startsWith("!")) {
const links = n.querySelectorAll('a.contentLink'); const links = n.querySelectorAll('a.contentLink');
@ -237,10 +264,10 @@
}); });
}); });
if (isIosSafari()) { // if (isIosSafari()) {
const content = n.querySelector('.content'); // const content = n.querySelector('.content');
removeKeyboard(content); // removeKeyboard(content);
} // }
} }
}); });

224
workflowy-helper/style.css

@ -44,6 +44,9 @@ body {
/* .root:not(.board) > .name { */ /* .root:not(.board) > .name { */
/* /1* max-width: 800px; *1/ */ /* /1* max-width: 800px; *1/ */
/* } */ /* } */
.name > .content > .innerContentContainer::before {
margin-right: 4px;
}
body::-webkit-scrollbar { body::-webkit-scrollbar {
display: none; display: none;
@ -98,8 +101,8 @@ body::-webkit-scrollbar {
.project .breadcrumbs { .project .breadcrumbs {
position: absolute; position: absolute;
z-index: 20; z-index: 20;
left: 25px; right: 25px;
top: -3px; top: 10px;
} }
.project .breadcrumbs > a, .project .breadcrumbs > a,
.project .breadcrumbs > svg, .project .breadcrumbs > svg,
@ -115,83 +118,150 @@ body::-webkit-scrollbar {
content: "→"; content: "→";
} }
.tagged-GOAL > .name .innerContentContainer, .linked-xGOAL > .name .innerContentContainer,
.tagged-GOAL > .notes .innerContentContainer { .linked-xGOAL > .notes .innerContentContainer {
color: var(--yellow); color: var(--yellow);
} }
.linked-xGOAL > .name .innerContentContainer {
.tagged-GOAL > .name .innerContentContainer {
font-weight: bold; font-weight: bold;
} }
.linked-xGOAL > .name > .content > .innerContentContainer::before {
content: "★";
color: var(--yellow);
}
.tagged-RESPONSIBILITY > .name .innerContentContainer, .linked-xRESPONSIBILITY > .name > .content > .innerContentContainer::before {
.tagged-RESPONSIBILITY > .notes .innerContentContainer { content: "✦";
color: var(--red); color: var(--red);
} }
.tagged-RESPONSIBILITY > .name .innerContentContainer { .linked-xRESPONSIBILITY > .name .innerContentContainer,
.linked-xRESPONSIBILITY > .notes .innerContentContainer {
color: var(--red);
}
.linked-xRESPONSIBILITY > .name .innerContentContainer {
font-weight: bold; font-weight: bold;
} }
.tagged-VISUALISATION > .name .innerContentContainer, .linked-xVISUALISATION > .name > .content > .innerContentContainer::before {
.tagged-VISUALISATION > .notes .innerContentContainer { content: "☁︎";
color: var(--green);
}
.linked-xVISUALISATION > .name .innerContentContainer,
.linked-xVISUALISATION > .notes .innerContentContainer {
color: var(--green); color: var(--green);
} }
.tagged-VISUALISATION > .name .innerContentContainer { .linked-xVISUALISATION > .name .innerContentContainer {
font-weight: bold; font-weight: bold;
} }
.tagged-PROJECT > .name .innerContentContainer { .linked-xPROJECT > .name .innerContentContainer {
font-weight: bold; font-weight: bold;
} }
.tagged-PROJECT.tagged-ACTIVE > .name .innerContentContainer, .linked-xPROJECT > .name > .content > .innerContentContainer::before {
.tagged-PROJECT.tagged-ACTIVE > .notes .innerContentContainer { content: "⚑";
}
.linked-xPROJECT.tagged-ACTIVE > .name > .content > .innerContentContainer::before {
/* filter: invert(50%) sepia(100%) saturate(300%) hue-rotate(300deg) brightness(100%) contrast(300%); */
color: var(--magenta);
}
.linked-xPROJECT.tagged-ACTIVE > .name .innerContentContainer,
.linked-xPROJECT.tagged-ACTIVE > .notes .innerContentContainer {
color: var(--magenta); color: var(--magenta);
} }
.tagged-PROJECT.tagged-PLANT > .name .innerContentContainer, .linked-xPROJECT.tagged-PLANT > .name > .content > .innerContentContainer::before {
.tagged-PROJECT.tagged-PLANT > .notes .innerContentContainer { /* filter: invert(50%) sepia(100%) saturate(300%) hue-rotate(340deg) brightness(100%) contrast(100%); */
color: var(--orange);
}
.linked-xPROJECT.tagged-PLANT > .name .innerContentContainer,
.linked-xPROJECT.tagged-PLANT > .notes .innerContentContainer {
color: var(--orange); color: var(--orange);
} }
.tagged-PROJECT.tagged-STALLED > .name .innerContentContainer, .linked-xPROJECT.tagged-STALLED > .name > .content > .innerContentContainer::before {
.tagged-PROJECT.tagged-STALLED > .notes .innerContentContainer { /* filter: invert(50%) sepia(100%) saturate(300%) hue-rotate(120deg) brightness(100%) contrast(100%); */
color: var(--cyan);
}
.linked-xPROJECT.tagged-STALLED > .name .innerContentContainer,
.linked-xPROJECT.tagged-STALLED > .notes .innerContentContainer {
color: var(--cyan); color: var(--cyan);
} }
.tagged-PROJECT.tagged-SOMEDAY > .name .innerContentContainer, .linked-xPROJECT.tagged-SOMEDAY > .name > .content > .innerContentContainer::before {
.tagged-PROJECT.tagged-SOMEDAY > .notes .innerContentContainer { /* filter: invert(50%) sepia(100%) saturate(300%) hue-rotate(210deg) brightness(100%) contrast(100%); */
color: var(--violet);
}
.linked-xPROJECT.tagged-SOMEDAY > .name .innerContentContainer,
.linked-xPROJECT.tagged-SOMEDAY > .notes .innerContentContainer {
color: var(--violet); color: var(--violet);
} }
.tagged-HABIT > .name .innerContentContainer, .linked-xHABIT > .name > .content > .innerContentContainer::before {
.tagged-HABIT > .notes .innerContentContainer { content: "↻";
/* filter: invert(50%) sepia(100%) saturate(300%) hue-rotate(330deg) brightness(100%) contrast(100%); */
color: var(--orange);
}
.linked-xHABIT > .name .innerContentContainer,
.linked-xHABIT > .notes .innerContentContainer {
color: var(--orange); color: var(--orange);
} }
.tagged-TASK.tagged-READY > .name .innerContentContainer, .linked-xTASK > .name > .content > .innerContentContainer::before {
.tagged-TASK.tagged-READY > .notes .innerContentContainer { /* content: "✔️"; */
content: "✓";
}
.linked-xTASK.tagged-NEXT > .name > .content > .innerContentContainer::before {
/* filter: invert(50%) sepia(100%) saturate(300%) hue-rotate(160deg) brightness(90%) contrast(100%); */
color: var(--blue);
}
.linked-xTASK.tagged-NEXT > .name .innerContentContainer,
.linked-xTASK.tagged-NEXT > .notes .innerContentContainer {
color: var(--blue); color: var(--blue);
} }
.tagged-TASK.tagged-DAILY > .name .innerContentContainer, .linked-xTASK.tagged-DAILY > .name > .content > .innerContentContainer::before,
.tagged-TASK.tagged-DAILY > .notes .innerContentContainer, .linked-xTASK.tagged-WEEKLY > .name > .content > .innerContentContainer::before,
.tagged-TASK.tagged-WEEKLY > .name .innerContentContainer, .linked-xTASK.tagged-MONTHLY > .name > .content > .innerContentContainer::before,
.tagged-TASK.tagged-WEEKLY > .notes .innerContentContainer, .linked-xTASK.tagged-IRREGULAR > .name > .content > .innerContentContainer::before {
.tagged-TASK.tagged-MONTHLY > .name .innerContentContainer, content: "↻";
.tagged-TASK.tagged-MONTHLY > .notes .innerContentContainer, color: var(--green);
.tagged-TASK.tagged-IRREGULAR > .name .innerContentContainer, }
.tagged-TASK.tagged-IRREGULAR > .notes .innerContentContainer { .linked-xTASK.tagged-DAILY > .name .innerContentContainer,
.linked-xTASK.tagged-DAILY > .notes .innerContentContainer,
.linked-xTASK.tagged-WEEKLY > .name .innerContentContainer,
.linked-xTASK.tagged-WEEKLY > .notes .innerContentContainer,
.linked-xTASK.tagged-MONTHLY > .name .innerContentContainer,
.linked-xTASK.tagged-MONTHLY > .notes .innerContentContainer,
.linked-xTASK.tagged-IRREGULAR > .name .innerContentContainer,
.linked-xTASK.tagged-IRREGULAR > .notes .innerContentContainer {
color: var(--green); color: var(--green);
} }
.tagged-TASK.tagged-WAITING > .name .innerContentContainer, .linked-xTASK.tagged-WAITING > .name > .content > .innerContentContainer::before {
.tagged-TASK.tagged-WAITING > .notes .innerContentContainer { color: var(--cyan);
}
.linked-xTASK.tagged-WAITING > .name .innerContentContainer,
.linked-xTASK.tagged-WAITING > .notes .innerContentContainer {
color: var(--cyan); color: var(--cyan);
} }
.tagged-TASK.tagged-BLOCKED > .name .innerContentContainer,
.tagged-TASK.tagged-BLOCKED > .notes .innerContentContainer { .linked-xTASK.tagged-BLOCKED > .name > .content > .innerContentContainer::before {
color: var(--red); color: var(--red);
} }
.tagged-TASK.tagged-MAYBE > .name .innerContentContainer, .linked-xTASK.tagged-BLOCKED > .name .innerContentContainer,
.tagged-TASK.tagged-MAYBE > .notes .innerContentContainer { .linked-xTASK.tagged-BLOCKED > .notes .innerContentContainer {
color: var(--red);
}
.linked-xTASK.tagged-MAYBE > .name > .content > .innerContentContainer::before {
/* filter: invert(50%) sepia(100%) saturate(300%) hue-rotate(210deg) brightness(90%) contrast(100%); */
color: var(--violet);
}
.linked-xTASK.tagged-MAYBE > .name .innerContentContainer,
.linked-xTASK.tagged-MAYBE > .notes .innerContentContainer {
color: var(--violet); color: var(--violet);
} }
@ -212,7 +282,8 @@ body::-webkit-scrollbar {
color: var(--red) !important; color: var(--red) !important;
} }
.tag-RELAX { .tag-RELAX,
.tag-REVIEW {
color: var(--yellow) !important; color: var(--yellow) !important;
} }
@ -245,7 +316,7 @@ body::-webkit-scrollbar {
.project.collapsed > .name, .project.collapsed > .name,
.project.open > .name, .project.open > .name,
.root > .name { .root > .name {
color: var(--white) !important; /* color: var(--white) !important; */
} }
.tagged-done > .name > .content, .tagged-done > .name > .content,
@ -282,39 +353,31 @@ body::-webkit-scrollbar {
color: var(--blue) !important; color: var(--blue) !important;
} }
.tagged-event > .name > .content > .innerContentContainer, .tagged-event > .name > .content > .innerContentContainer {
.tagged-event > .name > .content > .innerContentContainer > .contentTag { color: var(--red) !important;
background-color: var(--red) !important;
color: var(--black) !important;
} }
.tagged-reminder > .name > .content > .innerContentContainer, .tagged-reminder > .name > .content > .innerContentContainer {
.tagged-reminder > .name > .content > .innerContentContainer > .contentTag { color: var(--blue) !important;
background-color: var(--blue) !important;
color: var(--black) !important;
} }
.tagged-gym > .name > .content > .innerContentContainer, .tagged-gym > .name > .content > .innerContentContainer {
.tagged-gym > .name > .content > .innerContentContainer > .contentTag { color: var(--yellow) !important;
background-color: var(--yellow) !important;
color: var(--black) !important;
} }
.tagged-meeting > .name > .content > .innerContentContainer, .tagged-plan > .name > .content > .innerContentContainer {
.tagged-meeting > .name > .content > .innerContentContainer > .contentTag { color: var(--green) !important;
background-color: var(--magenta) !important;
color: var(--black) !important;
} }
.tagged-work > .name > .content > .innerContentContainer { .tagged-work > .name > .content > .innerContentContainer {
color: var(--red) !important; color: var(--magenta) !important;
} }
.tagged-birthday > .name > .content > .innerContentContainer {
.tagged-plan > .name > .content > .innerContentContainer { color: var(--violet) !important;
color: var(--green) !important;
} }
.half-open.tagged-a > .name > .bullet, .half-open.tagged-a > .name > .bullet,
.collapsed.tagged-a > .name > .bullet, .collapsed.tagged-a > .name > .bullet,
.tagged-a > .name > .bullet { .tagged-a > .name > .bullet {
@ -365,3 +428,42 @@ body::-webkit-scrollbar {
margin-left: 0; margin-left: 0;
} }
.hotspot-admin > .name .innerContentContainer::after {
content: "✏️";
margin-left: 4px;
}
.hotspot-mind > .name .innerContentContainer::after {
content: "🧠";
margin-left: 4px;
}
.hotspot-health > .name .innerContentContainer::after {
content: "💪";
margin-left: 4px;
}
.hotspot-art > .name .innerContentContainer::after {
content: "🎨";
margin-left: 4px;
}
.hotspot-social > .name .innerContentContainer::after {
content: "👥";
margin-left: 4px;
}
.hotspot-career > .name .innerContentContainer::after {
content: "💻";
margin-left: 4px;
}
.hotspot-church > .name .innerContentContainer::after {
content: "☦️";
margin-left: 4px;
}
.hotspot-work > .name .innerContentContainer::after {
content: "💼";
margin-left: 4px;
}

Loading…
Cancel
Save