add Bash Context Generator and Update PowerShell Version to use Timestamp for Output File Name ...
This commit is contained in:
@@ -6,4 +6,4 @@ ForEach-Object {
|
||||
"`n### FILE: $($_.FullName)`n"
|
||||
Get-Content $_.FullName
|
||||
} |
|
||||
Out-File .\all-code.txt -Encoding utf8
|
||||
Out-File ".\xDashboard-$(Get-Date -Format 'yyyyMMdd_HHmmss').txt" -Encoding utf8
|
||||
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
timestamp="$(date +%Y%m%d_%H%M%S)"
|
||||
output_file="./xDashboard-${timestamp}.txt"
|
||||
|
||||
find . -type f \( \
|
||||
-name "Dockerfile" \
|
||||
-o -name "docker-compose.yaml" \
|
||||
-o -name "*.cs" \
|
||||
\) \
|
||||
-not -path "*/bin/*" \
|
||||
-not -path "*/obj/*" \
|
||||
-print0 |
|
||||
while IFS= read -r -d '' file; do
|
||||
printf '\n### FILE: %s\n\n' "$file"
|
||||
cat "$file"
|
||||
done > "$output_file"
|
||||
|
||||
# echo "Context generated: $output_file"
|
||||
Reference in New Issue
Block a user