:::: MENU ::::
Monthly Archives: April 2021

Rename multiple files with find and rename

Nice shorthand to rename multiple files. First, make sure you have rename available:

brew install rename

and then use the snippet

find . -exec rename 's|FIND|REPLACE_WITH|' {} +

Dump python requirements for file or folder but not for the whole project

I don’t want to dump requirements for my whole project using:

pip freeze > requirements.txt

Instead of that I want to dump requirements for a file or particular folder. It’s a piece of cake with pipreqs. Install the package

pip install pipreqs

and then just run it with the folder or file for which you want to generate requirements.txt file

pipreqs my_folder