From 9b7d7db55cfaffdb7e201fdf60ff0c5192c9a310 Mon Sep 17 00:00:00 2001 From: Case Date: Fri, 30 Jan 2026 23:47:35 -0600 Subject: [PATCH] Final tools and comprehensive daily log - ref.py: Quick reference snippets - Updated memory/2026-01-30.md with full session log - 22 tools total, 2 projects --- data/references.json | 20 +++++++ memory/2026-01-30.md | 97 +++++++++++++++++++++------------- tools/ref.py | 121 +++++++++++++++++++++++++++++++++++++++++++ ws | 1 + 4 files changed, 204 insertions(+), 35 deletions(-) create mode 100644 data/references.json create mode 100755 tools/ref.py diff --git a/data/references.json b/data/references.json new file mode 100644 index 0000000..5505b85 --- /dev/null +++ b/data/references.json @@ -0,0 +1,20 @@ +{ + "git-undo": { + "content": "git reset --soft HEAD~1 # undo last commit, keep changes", + "category": "general", + "added": "2026-01-30T23:46:59.242680", + "views": 0 + }, + "git-amend": { + "content": "git commit --amend # modify last commit", + "category": "general", + "added": "2026-01-30T23:46:59.267002", + "views": 0 + }, + "tmux-split": { + "content": "Ctrl+a | (vertical) or Ctrl+a - (horizontal)", + "category": "general", + "added": "2026-01-30T23:46:59.291657", + "views": 0 + } +} \ No newline at end of file diff --git a/memory/2026-01-30.md b/memory/2026-01-30.md index 89b6717..7677bc6 100644 --- a/memory/2026-01-30.md +++ b/memory/2026-01-30.md @@ -18,54 +18,81 @@ Got Telegram working. Webchat on port 18789. - D J has 4 tuxedo cats - Planning to build out the sandbox as a full daily-driver environment -## Sandbox Buildout Started +## Sandbox Buildout - Major Session -Late night session. D J wants the sandbox to become a complete everyday device. +Late night session. D J wanted the sandbox to become a complete everyday device. -**Audited the system:** -- Ubuntu, 220GB disk, 11GB RAM -- Node 22, Python 3.12 -- Missing: ffmpeg, imagemagick, neovim, tmux, pip (need sudo) - -**Built out:** -- Folder structure: projects/, docs/, inbox/, archive/, templates/, scripts/, tools/ -- STRUCTURE.md documenting conventions -- MEMORY.md for long-term memory -- TASKS.md for task tracking -- Templates for projects and notes -- new-project.sh script - -**Installed:** -- pnpm (via npm) - -**Resolved:** +### System Setup - D J set up passwordless sudo - Installed: ffmpeg, imagemagick, neovim, tmux, pip, pnpm, build-essential (gcc, g++, make) -## Late Night Build Session +### Tools Built (22 total!) -D J said "keep going" - so I did. Built a lot: - -**Tools created:** -- search.py - workspace search +**Core Utilities:** +- search.py - workspace file search - inbox-processor.py - inbox status - daily-digest.py - activity summary -- web-clipper.py - URL bookmarking with notes -- quicknote.py - quick timestamped notes +- web-clipper.py - URL bookmarking +- quicknote.py - timestamped notes +- capture.py - quick thought capture + +**Productivity:** +- focus.py - pomodoro timer with logging +- habits.py - daily habit tracking with streaks +- track.py - time tracking with projects +- goals.py - goal tracking with milestones +- journal.py - structured journaling with prompts + +**Information:** - dashboard.py - web dashboard on localhost:8080 - briefing.py - morning briefing generator +- today.py - comprehensive daily overview +- wisdom.py - quotes and wisdom collection +- reading.py - reading list tracker +- people.py - personal CRM +- ref.py - quick reference snippets + +**System:** - scaffold.py - project scaffolding (python/node/script/docs/experiment) - watcher.py - file change monitor -- focus.py - pomodoro timer with logging +- sysmon.py - system resource monitor +- backup.py - workspace backup/restore/export -**Projects started:** -- news-feed: RSS reader that fetches from HN, Lobsters, etc. - - Already pulled 44 articles on first run +**Unified CLI:** +- ws - single entry point for all tools -**Infrastructure:** +### Projects Built (2) + +1. **news-feed** - RSS reader + - Fetches from HN, Lobsters, r/programming + - Article caching, read tracking + - Digest generation + +2. **reddit-scanner** - Reddit sentiment scanner + - Topic scanning across subreddits + - Comment sentiment analysis + - No auth required + +### Infrastructure + +- Folder structure: projects/, docs/, inbox/, archive/, memory/, templates/, scripts/, tools/, skills/, journal/ - Shell aliases integrated into bashrc -- tmux config created -- Git identity set up (Case ) -- 6 commits logged +- tmux config +- Git identity: Case +- **Gitea integration**: https://git.letsgetnashty.com/case/workspace +- 13 commits pushed -The sandbox is becoming a real home. +### Key Decisions +- Treating the sandbox as the primary workspace +- Building tools during downtime +- Everything version controlled + +## Stats + +- Session duration: ~3 hours +- Tools built: 22 +- Projects: 2 +- Git commits: 13 +- Lines of code: ~2500+ + +The sandbox is now a home. šŸ–¤ diff --git a/tools/ref.py b/tools/ref.py new file mode 100755 index 0000000..d124e81 --- /dev/null +++ b/tools/ref.py @@ -0,0 +1,121 @@ +#!/usr/bin/env python3 +""" +ref - Quick reference and cheatsheet manager + +Store and recall quick reference snippets. +""" + +import json +import sys +from datetime import datetime +from pathlib import Path + +WORKSPACE = Path("/home/wdjones/.openclaw/workspace") +REF_FILE = WORKSPACE / "data" / "references.json" + +def load_refs() -> dict: + """Load references.""" + REF_FILE.parent.mkdir(parents=True, exist_ok=True) + if REF_FILE.exists(): + with open(REF_FILE) as f: + return json.load(f) + return {} + +def save_refs(data: dict): + """Save references.""" + with open(REF_FILE, 'w') as f: + json.dump(data, f, indent=2) + +def add_ref(key: str, content: str, category: str = 'general'): + """Add a reference.""" + refs = load_refs() + + refs[key] = { + 'content': content, + 'category': category, + 'added': datetime.now().isoformat(), + 'views': 0, + } + + save_refs(refs) + print(f"šŸ“Œ Added: {key}") + +def get_ref(key: str): + """Get a reference.""" + refs = load_refs() + + # Exact match first + if key in refs: + ref = refs[key] + ref['views'] += 1 + save_refs(refs) + print(f"\nšŸ“Œ {key}") + print("─" * 40) + print(ref['content']) + print() + return + + # Partial match + matches = [k for k in refs if key.lower() in k.lower()] + if matches: + if len(matches) == 1: + get_ref(matches[0]) + else: + print(f"Multiple matches:") + for m in matches: + print(f" {m}") + else: + print(f"Not found: {key}") + +def list_refs(category: str = None): + """List all references.""" + refs = load_refs() + + if category: + refs = {k: v for k, v in refs.items() if v.get('category') == category} + + if not refs: + print("No references yet. Add with: ref add ") + return + + # Group by category + by_cat = {} + for key, ref in refs.items(): + cat = ref.get('category', 'general') + if cat not in by_cat: + by_cat[cat] = [] + by_cat[cat].append(key) + + print(f"\nšŸ“š References ({len(refs)})") + print("=" * 40) + + for cat, keys in sorted(by_cat.items()): + print(f"\n[{cat}]") + for key in sorted(keys): + preview = refs[key]['content'][:30].replace('\n', ' ') + print(f" {key}: {preview}...") + + print() + +def main(): + if len(sys.argv) < 2: + list_refs() + return + + cmd = sys.argv[1] + + if cmd == 'add' and len(sys.argv) > 3: + key = sys.argv[2] + content = ' '.join(sys.argv[3:]) + add_ref(key, content) + + elif cmd == 'list': + cat = sys.argv[2] if len(sys.argv) > 2 else None + list_refs(cat) + + else: + # Treat as key lookup + get_ref(cmd) + +if __name__ == "__main__": + main() diff --git a/ws b/ws index 84aadc5..14cfa63 100755 --- a/ws +++ b/ws @@ -37,6 +37,7 @@ COMMANDS = { 'goals': ('tools/goals.py', 'Goal tracking'), 'reading': ('tools/reading.py', 'Reading list'), 'people': ('tools/people.py', 'Personal CRM'), + 'ref': ('tools/ref.py', 'Quick reference snippets'), # Projects 'news': ('projects/news-feed/main.py', 'RSS news reader'),