-
Notifications
You must be signed in to change notification settings - Fork 9
/
gpt.sh
executable file
·44 lines (38 loc) · 1.12 KB
/
gpt.sh
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
#!/usr/bin/env bash
# Collect all files to paste to ChatGPT o1
OUTPUT="gpt.txt"
# Start fresh
> "$OUTPUT"
echo "" >> "$OUTPUT"
# Define the patterns you want to collect files from:
patterns=(
# "docker-entrypoint.sh"
# "Dockerfile"
"backend/app/*.py"
"backend/app/schemas/*.py"
"backend/app/api/*.py"
# "backend/app/api/tests/*.py"
# "backend/app/api/tests/test_frames.py"
# "backend/app/api/tests/test_settings.py"
# "backend/app/models/*.py"
"backend/app/tasks/*.py"
# "backend/app/models/tests/*.py"
# "frontend/src/urls.ts"
# "frontend/src/main.tsx"
# "frontend/src/types.tsx"
# "frontend/src/scenes/App.tsx"
# "frontend/src/scenes/scenes.tsx"
# "frontend/src/scenes/sceneLogic.tsx"
# "frameos/src/apps/*/*/config.json"
)
for pattern in "${patterns[@]}"; do
for f in $pattern; do
# Check if the file actually exists and is a regular file
if [ -f "$f" ]; then
echo "$f" >> "$OUTPUT"
echo "-------------" >> "$OUTPUT"
cat "$f" >> "$OUTPUT"
echo "-------------" >> "$OUTPUT"
fi
done
done