Skip to content

Instantly share code, notes, and snippets.

@annibal
Last active September 25, 2024 17:31
Show Gist options
  • Save annibal/304de272c5557387c9bcf041dd2896df to your computer and use it in GitHub Desktop.
Save annibal/304de272c5557387c9bcf041dd2896df to your computer and use it in GitHub Desktop.
Print all file names and content, recursively, from a Project's root folder, into an output file. Use to ask GPT to create a README for the Project.
find . -name ".py" | while read -r file; do
sed -i .bak '/^#/d' "$file";
sed -i '' "1s|^|# ${file}\n|" "$file";
done;
find . -name ".py" -exec cat {} + | pbcopy;
find . -name "*.bak" -type f -delete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment