Rename project to Kao
- Renamed sentry.py to kao.py - Updated all references from Sentry-Emote to Kao - Kao (顔) means "face" in Japanese Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
||||
|
||||
## Project Overview
|
||||
|
||||
Sentry-Emote is a minimalist system status monitor designed for an old Pixel phone used as an ambient display. It uses ASCII "emotes" to represent system health instead of complex graphs.
|
||||
Kao is a minimalist system status monitor designed for an old Pixel phone used as an ambient display. It uses ASCII "emotes" to represent system health instead of complex graphs.
|
||||
|
||||
## Architecture
|
||||
|
||||
@@ -20,7 +20,7 @@ Sentry-Emote is a minimalist system status monitor designed for an old Pixel pho
|
||||
- **Aggregator** (`aggregator.py`) — Flask service managing the event queue and priority logic
|
||||
- **Detectors** (`detectors/*.py`) — Independent scripts monitoring system metrics
|
||||
- **Emote-UI** (`index.html`) — OLED-optimized web frontend
|
||||
- **Sentry** (`sentry.py`) — Unified entry point managing all processes
|
||||
- **Sentry** (`kao.py`) — Unified entry point managing all processes
|
||||
|
||||
## Quick Start
|
||||
|
||||
@@ -28,7 +28,7 @@ Sentry-Emote is a minimalist system status monitor designed for an old Pixel pho
|
||||
python -m venv venv
|
||||
source venv/bin/activate # or .\venv\Scripts\activate on Windows
|
||||
pip install -r requirements.txt
|
||||
python sentry.py
|
||||
python kao.py
|
||||
```
|
||||
|
||||
UI available at http://localhost:5000
|
||||
@@ -107,7 +107,7 @@ Additional states:
|
||||
## File Structure
|
||||
|
||||
```
|
||||
├── sentry.py # Unified entry point
|
||||
├── kao.py # Unified entry point
|
||||
├── aggregator.py # Event broker/API server
|
||||
├── index.html # OLED-optimized frontend
|
||||
├── config.json # Runtime configuration
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Sentry-Emote
|
||||
# Kao
|
||||
|
||||
A minimalist system status monitor that uses ASCII emotes to display server health on an old phone.
|
||||
|
||||
@@ -20,14 +20,14 @@ Turn an old phone (with its OLED screen) into a glanceable ambient display for y
|
||||
|
||||
```bash
|
||||
# Clone and setup
|
||||
git clone https://github.com/yourusername/sentry-emote.git
|
||||
cd sentry-emote
|
||||
git clone https://github.com/yourusername/kao.git
|
||||
cd kao
|
||||
python -m venv venv
|
||||
source venv/bin/activate # Windows: .\venv\Scripts\activate
|
||||
pip install -r requirements.txt
|
||||
|
||||
# Run everything
|
||||
python sentry.py
|
||||
python kao.py
|
||||
```
|
||||
|
||||
Open http://localhost:5000 on your phone (use Fully Kiosk Browser for best results).
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Sentry-Emote Aggregator
|
||||
Kao Aggregator
|
||||
A lightweight event broker that manages priority-based system status.
|
||||
"""
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
"""
|
||||
Sentry-Emote
|
||||
Kao
|
||||
Single entry point for the entire system - aggregator + all detectors.
|
||||
|
||||
Usage:
|
||||
python sentry.py [--config config.json]
|
||||
python kao.py [--config config.json]
|
||||
"""
|
||||
|
||||
import json
|
||||
@@ -22,7 +22,7 @@ RESTART_DELAY = 5
|
||||
AGGREGATOR_STARTUP_TIMEOUT = 10
|
||||
|
||||
|
||||
class SentryEmote:
|
||||
class KaoManager:
|
||||
def __init__(self, config_path):
|
||||
self.config_path = Path(config_path)
|
||||
self.base_dir = self.config_path.parent
|
||||
@@ -150,7 +150,7 @@ class SentryEmote:
|
||||
def stop_all(self):
|
||||
"""Stop all processes (detectors first, then aggregator)."""
|
||||
self.running = False
|
||||
print("\nShutting down Sentry-Emote...")
|
||||
print("\nShutting down Kao...")
|
||||
|
||||
# Stop detectors first
|
||||
for name, info in list(self.processes.items()):
|
||||
@@ -176,14 +176,14 @@ class SentryEmote:
|
||||
except subprocess.TimeoutExpired:
|
||||
process.kill()
|
||||
|
||||
print("Sentry-Emote stopped.")
|
||||
print("Kao stopped.")
|
||||
|
||||
def run(self):
|
||||
"""Main run loop."""
|
||||
self.load_config()
|
||||
|
||||
print("=" * 50)
|
||||
print(" Sentry-Emote")
|
||||
print(" Kao")
|
||||
print("=" * 50)
|
||||
print(f"Config: {self.config_path}")
|
||||
print(f"Aggregator URL: {self.config.get('aggregator_url')}")
|
||||
@@ -247,17 +247,17 @@ def main():
|
||||
sys.exit(1)
|
||||
|
||||
# Setup signal handlers
|
||||
sentry = SentryEmote(config_path)
|
||||
kao = KaoManager(config_path)
|
||||
|
||||
def signal_handler(sig, frame):
|
||||
sentry.stop_all()
|
||||
kao.stop_all()
|
||||
sys.exit(0)
|
||||
|
||||
signal.signal(signal.SIGINT, signal_handler)
|
||||
signal.signal(signal.SIGTERM, signal_handler)
|
||||
|
||||
# Run
|
||||
sentry.run()
|
||||
kao.run()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
Reference in New Issue
Block a user