upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/sanitize-logs.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/sanitize-logs.sh b/scripts/sanitize-logs.sh
index 123e72c..7225fe4 100755
--- a/scripts/sanitize-logs.sh
+++ b/scripts/sanitize-logs.sh
@@ -1,4 +1,4 @@
1#!/bin/bash 1#!/usr/bin/env bash
2# sanitize-logs.sh - Truncates verbose log lines for LLM analysis 2# sanitize-logs.sh - Truncates verbose log lines for LLM analysis
3# 3#
4# Usage: 4# Usage:
@@ -9,8 +9,8 @@
9set -euo pipefail 9set -euo pipefail
10 10
11# Default settings 11# Default settings
12HEAD_CHARS=100 12HEAD_CHARS=200
13TAIL_CHARS=20 13TAIL_CHARS=100
14MAX_LINE_LENGTH=$((HEAD_CHARS + TAIL_CHARS + 20)) # buffer for the ellipsis marker 14MAX_LINE_LENGTH=$((HEAD_CHARS + TAIL_CHARS + 20)) # buffer for the ellipsis marker
15 15
16# Parse arguments 16# Parse arguments
@@ -35,8 +35,8 @@ while [[ $# -gt 0 ]]; do
35 echo "Reads from stdin, writes to stdout." 35 echo "Reads from stdin, writes to stdout."
36 echo "" 36 echo ""
37 echo "Options:" 37 echo "Options:"
38 echo " --head-chars N Show first N chars of long lines (default: 100)" 38 echo " --head-chars N Show first N chars of long lines (default: 200)"
39 echo " --tail-chars N Show last N chars of long lines (default: 20)" 39 echo " --tail-chars N Show last N chars of long lines (default: 100)"
40 echo " --max-line N Lines shorter than this are unchanged (default: head+tail+20)" 40 echo " --max-line N Lines shorter than this are unchanged (default: head+tail+20)"
41 echo " -h, --help Show this help" 41 echo " -h, --help Show this help"
42 echo "" 42 echo ""