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
This commit is contained in:
20
data/references.json
Normal file
20
data/references.json
Normal file
@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -18,54 +18,81 @@ Got Telegram working. Webchat on port 18789.
|
|||||||
- D J has 4 tuxedo cats
|
- D J has 4 tuxedo cats
|
||||||
- Planning to build out the sandbox as a full daily-driver environment
|
- 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:**
|
### System Setup
|
||||||
- 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:**
|
|
||||||
- D J set up passwordless sudo
|
- D J set up passwordless sudo
|
||||||
- Installed: ffmpeg, imagemagick, neovim, tmux, pip, pnpm, build-essential (gcc, g++, make)
|
- 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:
|
**Core Utilities:**
|
||||||
|
- search.py - workspace file search
|
||||||
**Tools created:**
|
|
||||||
- search.py - workspace search
|
|
||||||
- inbox-processor.py - inbox status
|
- inbox-processor.py - inbox status
|
||||||
- daily-digest.py - activity summary
|
- daily-digest.py - activity summary
|
||||||
- web-clipper.py - URL bookmarking with notes
|
- web-clipper.py - URL bookmarking
|
||||||
- quicknote.py - quick timestamped notes
|
- 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
|
- dashboard.py - web dashboard on localhost:8080
|
||||||
- briefing.py - morning briefing generator
|
- 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)
|
- scaffold.py - project scaffolding (python/node/script/docs/experiment)
|
||||||
- watcher.py - file change monitor
|
- watcher.py - file change monitor
|
||||||
- focus.py - pomodoro timer with logging
|
- sysmon.py - system resource monitor
|
||||||
|
- backup.py - workspace backup/restore/export
|
||||||
|
|
||||||
**Projects started:**
|
**Unified CLI:**
|
||||||
- news-feed: RSS reader that fetches from HN, Lobsters, etc.
|
- ws - single entry point for all tools
|
||||||
- Already pulled 44 articles on first run
|
|
||||||
|
|
||||||
**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
|
- Shell aliases integrated into bashrc
|
||||||
- tmux config created
|
- tmux config
|
||||||
- Git identity set up (Case <case@openclaw.local>)
|
- Git identity: Case <case@openclaw.local>
|
||||||
- 6 commits logged
|
- **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. 🖤
|
||||||
|
|||||||
121
tools/ref.py
Executable file
121
tools/ref.py
Executable file
@ -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 <key> <content>")
|
||||||
|
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()
|
||||||
1
ws
1
ws
@ -37,6 +37,7 @@ COMMANDS = {
|
|||||||
'goals': ('tools/goals.py', 'Goal tracking'),
|
'goals': ('tools/goals.py', 'Goal tracking'),
|
||||||
'reading': ('tools/reading.py', 'Reading list'),
|
'reading': ('tools/reading.py', 'Reading list'),
|
||||||
'people': ('tools/people.py', 'Personal CRM'),
|
'people': ('tools/people.py', 'Personal CRM'),
|
||||||
|
'ref': ('tools/ref.py', 'Quick reference snippets'),
|
||||||
|
|
||||||
# Projects
|
# Projects
|
||||||
'news': ('projects/news-feed/main.py', 'RSS news reader'),
|
'news': ('projects/news-feed/main.py', 'RSS news reader'),
|
||||||
|
|||||||
Reference in New Issue
Block a user