-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsimulate.sh
More file actions
executable file
·53 lines (45 loc) · 1.3 KB
/
Copy pathsimulate.sh
File metadata and controls
executable file
·53 lines (45 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
#
# GitHub Contribution Simulator - Quick Start Script
#
# Usage: ./simulate.sh [start_year] [intensity]
# Example: ./simulate.sh 2022 medium
set -e
# Default values
START_YEAR="${1:-2020}"
INTENSITY="${2:-medium}"
REPO_DIR="./simulated-repo"
# Validate intensity
if [[ ! "$INTENSITY" =~ ^(light|medium|heavy)$ ]]; then
echo "❌ Error: Intensity must be 'light', 'medium', or 'heavy'"
exit 1
fi
echo "🌱 GitHub Contribution Simulator"
echo "================================="
echo ""
echo "Configuration:"
echo " Start Year: $START_YEAR"
echo " Intensity: $INTENSITY"
echo " Repository: $REPO_DIR"
echo ""
# Step 1: Preview
echo "📊 Step 1: Previewing contribution pattern..."
python3 simulator.py --start "${START_YEAR}-01-01" --intensity "$INTENSITY" --stats-only
echo ""
# Step 2: Confirm
read -p "⚡ Create commits? (y/N): " confirm
if [[ ! "$confirm" =~ ^[Yy]$ ]]; then
echo "👋 Cancelled."
exit 0
fi
# Step 3: Generate commits
echo ""
echo "🔨 Step 2: Generating commits..."
python3 generate_commits.py --start "${START_YEAR}-01-01" --intensity "$INTENSITY" --repo "$REPO_DIR"
echo ""
echo "✅ Complete!"
echo ""
echo "Next steps:"
echo " 1. cd $REPO_DIR"
echo " 2. git remote add origin https://github.com/YOUR_USERNAME/YOUR_REPO.git"
echo " 3. git push -u origin main"