Burnmydays Claude Opus 4.8 (1M context) commited on
Commit
74bfa34
·
1 Parent(s): 9e55406

Add ./sigrank launcher (no python/python3 fuss); importer-first copy uses ./sigrank

Browse files
Files changed (2) hide show
  1. app.py +9 -3
  2. sigrank +11 -0
app.py CHANGED
@@ -167,9 +167,15 @@ with _b as demo:
167
  lb = gr.HTML(board_html())
168
 
169
  with gr.Tab("Measure yourself"):
170
- gr.Markdown("""**Get your operator profile.** Run `npx ccusage@latest --json` (Claude Code)
171
- or `ccusage codex --json` (Codex) and paste the whole thing — or just paste four numbers
172
- (input, output, cache_create, cache_read).
 
 
 
 
 
 
173
  *Codex note: combined input is split via the 2:1 field anchor; estimated rows are flagged.*""")
174
  nm = gr.Textbox(label="operator name", placeholder="your handle", max_lines=1)
175
  blob = gr.Textbox(label="ccusage / codex JSON —or— four numbers", lines=6,
 
167
  lb = gr.HTML(board_html())
168
 
169
  with gr.Tab("Measure yourself"):
170
+ gr.Markdown("""**Get your operator profile automatic, no paste.**
171
+
172
+ **① Run the local importer** (reads your usage on your machine, 100% local):
173
+ ```
174
+ ./sigrank
175
+ ```
176
+ (or `python3 sigrank.py`). It auto-runs `ccusage`, computes your profile + Υ, and prints your board rank. No paste, no upload, no token.
177
+
178
+ **② Paste — the backup.** No importer handy? Run `npx ccusage@latest --json` (Claude Code) or `ccusage codex --json` (Codex) and drop it below, or just four numbers (input, output, cache_create, cache_read).
179
  *Codex note: combined input is split via the 2:1 field anchor; estimated rows are flagged.*""")
180
  nm = gr.Textbox(label="operator name", placeholder="your handle", max_lines=1)
181
  blob = gr.Textbox(label="ccusage / codex JSON —or— four numbers", lines=6,
sigrank ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ # her-style launcher for the SigRank importer — no python/python3 fuss.
3
+ # Usage: ./sigrank (auto-reads ccusage)
4
+ # ./sigrank --codex ./sigrank --file u.json cat u.json | ./sigrank -
5
+ set -e
6
+ DIR="$(cd "$(dirname "$0")" && pwd)"
7
+ if [ -x "$DIR/.venv/bin/python" ]; then PY="$DIR/.venv/bin/python"
8
+ elif command -v python3 >/dev/null 2>&1; then PY="python3"
9
+ elif command -v python >/dev/null 2>&1; then PY="python"
10
+ else echo "sigrank: no python found — install Python 3." >&2; exit 1; fi
11
+ exec "$PY" "$DIR/sigrank.py" "$@"