34 lines
1004 B
Bash
34 lines
1004 B
Bash
#!/bin/bash
|
|||
|
|
|
||
|
|
CHALLENGE_DIR=~/challenge
|
||
|
|
PROGRESS_FILE="$CHALLENGE_DIR/.progress"
|
||
|
|
SCORE_FILE="$CHALLENGE_DIR/.score"
|
||
|
|
LOG_FILE="$CHALLENGE_DIR/.challenge.log"
|
||
|
|
|
||
|
|
# Colors
|
||
|
|
GREEN='\033[0;32m'
|
||
|
|
YELLOW='\033[1;33m'
|
||
|
|
RED='\033[0;31m'
|
||
|
|
NC='\033[0m'
|
||
|
|
|
||
|
|
show_progress() {
|
||
|
|
local current_score=$(cat "$SCORE_FILE" 2>/dev/null || echo "0")
|
||
|
|
local total_possible=1500 # Base challenges + bonus
|
||
|
|
local progress=$((current_score * 100 / total_possible))
|
||
|
|
|
||
|
|
echo -e "${GREEN}Challenge Progress${NC}"
|
||
|
|
echo "----------------------------------------"
|
||
|
|
echo -e "Current Score: ${YELLOW}$current_score${NC} / $total_possible points"
|
||
|
|
echo -e "Progress: ${YELLOW}$progress%${NC}"
|
||
|
|
echo "----------------------------------------"
|
||
|
|
|
||
|
|
# Show recent activity
|
||
|
|
echo -e "\n${GREEN}Recent Activity:${NC}"
|
||
|
|
tail -n 5 "$LOG_FILE"
|
||
|
|
|
||
|
|
# Show incomplete challenges
|
||
|
|
echo -e "\n${GREEN}Remaining Challenges:${NC}"
|
||
|
|
"$CHALLENGE_DIR/.tracking/verify-level1.sh" --list-incomplete
|
||
|
|
}
|
||
|
|
|
||
|
|
show_progress
|