diff --git a/workflowy-helper/diary.opml b/workflowy-helper/diary.opml index 58716c8..3b17cf2 100644 --- a/workflowy-helper/diary.opml +++ b/workflowy-helper/diary.opml @@ -1,2 +1,2 @@ -contact@gregoryleeman.com \ No newline at end of file +contact@gregoryleeman.com \ No newline at end of file diff --git a/workflowy-helper/diary.py b/workflowy-helper/diary.py index aa89b0b..5b4164a 100644 --- a/workflowy-helper/diary.py +++ b/workflowy-helper/diary.py @@ -26,7 +26,7 @@ def generate_weekly_opml(week_num, year=2025): day_outline = ET.SubElement( week_outline, "outline", - text=f"{weekday} {ordinal(day_date.day)} {day_date.strftime('%b')}", + text=f"{weekday} {ordinal(day_date.day)} {day_date.strftime('%b')}", _note=f"" ) if weekday in ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']: diff --git a/workflowy-helper/main.js b/workflowy-helper/main.js index 46024fb..490aa9a 100644 --- a/workflowy-helper/main.js +++ b/workflowy-helper/main.js @@ -176,6 +176,7 @@ removeClassesStartingWith(projectNode, "time"); const names = []; const notes = []; + const text = []; for (let i = 0; i < projectNode.children.length; i++) { const child = projectNode.children[i]; if (child.classList.contains('name')) { @@ -184,11 +185,37 @@ if (child.classList.contains('notes')) { 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) { if (ns.length > 0) { const n = ns[0]; 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'); if (text.startsWith("!")) { const links = n.querySelectorAll('a.contentLink'); @@ -237,10 +264,10 @@ }); }); - if (isIosSafari()) { - const content = n.querySelector('.content'); - removeKeyboard(content); - } + // if (isIosSafari()) { + // const content = n.querySelector('.content'); + // removeKeyboard(content); + // } } }); diff --git a/workflowy-helper/style.css b/workflowy-helper/style.css index b5edbc7..ad82286 100644 --- a/workflowy-helper/style.css +++ b/workflowy-helper/style.css @@ -44,6 +44,9 @@ body { /* .root:not(.board) > .name { */ /* /1* max-width: 800px; *1/ */ /* } */ +.name > .content > .innerContentContainer::before { + margin-right: 4px; +} body::-webkit-scrollbar { display: none; @@ -98,8 +101,8 @@ body::-webkit-scrollbar { .project .breadcrumbs { position: absolute; z-index: 20; - left: 25px; - top: -3px; + right: 25px; + top: 10px; } .project .breadcrumbs > a, .project .breadcrumbs > svg, @@ -115,83 +118,150 @@ body::-webkit-scrollbar { content: "→"; } -.tagged-GOAL > .name .innerContentContainer, -.tagged-GOAL > .notes .innerContentContainer { +.linked-xGOAL > .name .innerContentContainer, +.linked-xGOAL > .notes .innerContentContainer { color: var(--yellow); } - -.tagged-GOAL > .name .innerContentContainer { +.linked-xGOAL > .name .innerContentContainer { font-weight: bold; } +.linked-xGOAL > .name > .content > .innerContentContainer::before { + content: "★"; + color: var(--yellow); +} -.tagged-RESPONSIBILITY > .name .innerContentContainer, -.tagged-RESPONSIBILITY > .notes .innerContentContainer { +.linked-xRESPONSIBILITY > .name > .content > .innerContentContainer::before { + content: "✦"; 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; } -.tagged-VISUALISATION > .name .innerContentContainer, -.tagged-VISUALISATION > .notes .innerContentContainer { +.linked-xVISUALISATION > .name > .content > .innerContentContainer::before { + content: "☁︎"; + color: var(--green); +} + +.linked-xVISUALISATION > .name .innerContentContainer, +.linked-xVISUALISATION > .notes .innerContentContainer { color: var(--green); } -.tagged-VISUALISATION > .name .innerContentContainer { +.linked-xVISUALISATION > .name .innerContentContainer { font-weight: bold; } -.tagged-PROJECT > .name .innerContentContainer { +.linked-xPROJECT > .name .innerContentContainer { font-weight: bold; } -.tagged-PROJECT.tagged-ACTIVE > .name .innerContentContainer, -.tagged-PROJECT.tagged-ACTIVE > .notes .innerContentContainer { +.linked-xPROJECT > .name > .content > .innerContentContainer::before { + 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); } -.tagged-PROJECT.tagged-PLANT > .name .innerContentContainer, -.tagged-PROJECT.tagged-PLANT > .notes .innerContentContainer { +.linked-xPROJECT.tagged-PLANT > .name > .content > .innerContentContainer::before { + /* 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); } -.tagged-PROJECT.tagged-STALLED > .name .innerContentContainer, -.tagged-PROJECT.tagged-STALLED > .notes .innerContentContainer { +.linked-xPROJECT.tagged-STALLED > .name > .content > .innerContentContainer::before { + /* 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); } -.tagged-PROJECT.tagged-SOMEDAY > .name .innerContentContainer, -.tagged-PROJECT.tagged-SOMEDAY > .notes .innerContentContainer { +.linked-xPROJECT.tagged-SOMEDAY > .name > .content > .innerContentContainer::before { + /* 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); } -.tagged-HABIT > .name .innerContentContainer, -.tagged-HABIT > .notes .innerContentContainer { +.linked-xHABIT > .name > .content > .innerContentContainer::before { + 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); } -.tagged-TASK.tagged-READY > .name .innerContentContainer, -.tagged-TASK.tagged-READY > .notes .innerContentContainer { +.linked-xTASK > .name > .content > .innerContentContainer::before { + /* 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); } -.tagged-TASK.tagged-DAILY > .name .innerContentContainer, -.tagged-TASK.tagged-DAILY > .notes .innerContentContainer, -.tagged-TASK.tagged-WEEKLY > .name .innerContentContainer, -.tagged-TASK.tagged-WEEKLY > .notes .innerContentContainer, -.tagged-TASK.tagged-MONTHLY > .name .innerContentContainer, -.tagged-TASK.tagged-MONTHLY > .notes .innerContentContainer, -.tagged-TASK.tagged-IRREGULAR > .name .innerContentContainer, -.tagged-TASK.tagged-IRREGULAR > .notes .innerContentContainer { +.linked-xTASK.tagged-DAILY > .name > .content > .innerContentContainer::before, +.linked-xTASK.tagged-WEEKLY > .name > .content > .innerContentContainer::before, +.linked-xTASK.tagged-MONTHLY > .name > .content > .innerContentContainer::before, +.linked-xTASK.tagged-IRREGULAR > .name > .content > .innerContentContainer::before { + content: "↻"; + color: var(--green); +} +.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); } -.tagged-TASK.tagged-WAITING > .name .innerContentContainer, -.tagged-TASK.tagged-WAITING > .notes .innerContentContainer { +.linked-xTASK.tagged-WAITING > .name > .content > .innerContentContainer::before { + color: var(--cyan); +} +.linked-xTASK.tagged-WAITING > .name .innerContentContainer, +.linked-xTASK.tagged-WAITING > .notes .innerContentContainer { 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); } -.tagged-TASK.tagged-MAYBE > .name .innerContentContainer, -.tagged-TASK.tagged-MAYBE > .notes .innerContentContainer { +.linked-xTASK.tagged-BLOCKED > .name .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); } @@ -212,7 +282,8 @@ body::-webkit-scrollbar { color: var(--red) !important; } -.tag-RELAX { +.tag-RELAX, +.tag-REVIEW { color: var(--yellow) !important; } @@ -245,7 +316,7 @@ body::-webkit-scrollbar { .project.collapsed > .name, .project.open > .name, .root > .name { - color: var(--white) !important; + /* color: var(--white) !important; */ } .tagged-done > .name > .content, @@ -282,39 +353,31 @@ body::-webkit-scrollbar { color: var(--blue) !important; } -.tagged-event > .name > .content > .innerContentContainer, -.tagged-event > .name > .content > .innerContentContainer > .contentTag { - background-color: var(--red) !important; - color: var(--black) !important; +.tagged-event > .name > .content > .innerContentContainer { + color: var(--red) !important; } -.tagged-reminder > .name > .content > .innerContentContainer, -.tagged-reminder > .name > .content > .innerContentContainer > .contentTag { - background-color: var(--blue) !important; - color: var(--black) !important; +.tagged-reminder > .name > .content > .innerContentContainer { + color: var(--blue) !important; } -.tagged-gym > .name > .content > .innerContentContainer, -.tagged-gym > .name > .content > .innerContentContainer > .contentTag { - background-color: var(--yellow) !important; - color: var(--black) !important; +.tagged-gym > .name > .content > .innerContentContainer { + color: var(--yellow) !important; } -.tagged-meeting > .name > .content > .innerContentContainer, -.tagged-meeting > .name > .content > .innerContentContainer > .contentTag { - background-color: var(--magenta) !important; - color: var(--black) !important; +.tagged-plan > .name > .content > .innerContentContainer { + color: var(--green) !important; } .tagged-work > .name > .content > .innerContentContainer { - color: var(--red) !important; + color: var(--magenta) !important; } - -.tagged-plan > .name > .content > .innerContentContainer { - color: var(--green) !important; +.tagged-birthday > .name > .content > .innerContentContainer { + color: var(--violet) !important; } + .half-open.tagged-a > .name > .bullet, .collapsed.tagged-a > .name > .bullet, .tagged-a > .name > .bullet { @@ -365,3 +428,42 @@ body::-webkit-scrollbar { 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; +}