chore: remove configuration files and enhance blockchain explorer with advanced search, analytics, and export features
- Delete .aitbc.yaml.example CLI configuration template - Delete .lycheeignore link checker exclusion rules - Delete .nvmrc Node.js version specification - Add advanced search panel with filters for address, amount range, transaction type, time range, and validator - Add analytics dashboard with transaction volume, active addresses, and block time metrics - Add Chart.js integration
This commit is contained in:
103
scripts/move-to-right-folder.sh
Normal file
103
scripts/move-to-right-folder.sh
Normal file
@@ -0,0 +1,103 @@
|
||||
#!/bin/bash
|
||||
# scripts/move-to-right-folder.sh
|
||||
|
||||
echo "🔄 Moving files to correct folders..."
|
||||
|
||||
# Colors
|
||||
GREEN='\033[0;32m'
|
||||
BLUE='\033[0;34m'
|
||||
YELLOW='\033[1;33m'
|
||||
NC='\033[0m'
|
||||
|
||||
# Auto mode
|
||||
AUTO_MODE=false
|
||||
if [[ "$1" == "--auto" ]]; then
|
||||
AUTO_MODE=true
|
||||
fi
|
||||
|
||||
# Change to project root
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
# Function to move file with confirmation
|
||||
move_file() {
|
||||
local file="$1"
|
||||
local target_dir="$2"
|
||||
|
||||
if [[ -f "$file" ]]; then
|
||||
echo -e "${BLUE}📁 Moving '$file' to '$target_dir/'${NC}"
|
||||
|
||||
if [[ "$AUTO_MODE" == "true" ]]; then
|
||||
mkdir -p "$target_dir"
|
||||
mv "$file" "$target_dir/"
|
||||
echo -e "${GREEN}✅ Moved automatically${NC}"
|
||||
else
|
||||
read -p "Move this file? (y/N): " -n 1 -r
|
||||
echo
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
mkdir -p "$target_dir"
|
||||
mv "$file" "$target_dir/"
|
||||
echo -e "${GREEN}✅ Moved${NC}"
|
||||
else
|
||||
echo -e "${YELLOW}⏭️ Skipped${NC}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Function to move directory with confirmation
|
||||
move_dir() {
|
||||
local dir="$1"
|
||||
local target_dir="$2"
|
||||
|
||||
if [[ -d "$dir" ]]; then
|
||||
echo -e "${BLUE}📁 Moving directory '$dir' to '$target_dir/'${NC}"
|
||||
|
||||
if [[ "$AUTO_MODE" == "true" ]]; then
|
||||
mkdir -p "$target_dir"
|
||||
mv "$dir" "$target_dir/"
|
||||
echo -e "${GREEN}✅ Moved automatically${NC}"
|
||||
else
|
||||
read -p "Move this directory? (y/N): " -n 1 -r
|
||||
echo
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
mkdir -p "$target_dir"
|
||||
mv "$dir" "$target_dir/"
|
||||
echo -e "${GREEN}✅ Moved${NC}"
|
||||
else
|
||||
echo -e "${YELLOW}⏭️ Skipped${NC}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Move test files
|
||||
for file in test_*.py test_*.sh run_mc_test.sh; do
|
||||
move_file "$file" "dev/tests"
|
||||
done
|
||||
|
||||
# Move development scripts
|
||||
for file in patch_*.py fix_*.py simple_test.py; do
|
||||
move_file "$file" "dev/scripts"
|
||||
done
|
||||
|
||||
# Move multi-chain files
|
||||
for file in MULTI_*.md; do
|
||||
move_file "$file" "dev/multi-chain"
|
||||
done
|
||||
|
||||
# Move environment directories
|
||||
for dir in node_modules .venv cli_env; do
|
||||
move_dir "$dir" "dev/env"
|
||||
done
|
||||
|
||||
# Move cache directories
|
||||
for dir in .pytest_cache .ruff_cache logs .vscode; do
|
||||
move_dir "$dir" "dev/cache"
|
||||
done
|
||||
|
||||
# Move configuration files
|
||||
for file in .aitbc.yaml .aitbc.yaml.example .env.production .nvmrc .lycheeignore; do
|
||||
move_file "$file" "config"
|
||||
done
|
||||
|
||||
echo -e "${GREEN}🎉 File organization complete!${NC}"
|
||||
Reference in New Issue
Block a user