dotfiles/bin/newpyproject

16 lines
333 B
Plaintext
Raw Normal View History

2022-10-21 06:15:28 -04:00
#!/bin/bash
if [ $# -lt 1 ];then
echo "Failed get arguments"
echo "./newpyproject [project name]"
exit
fi
mkdir $1
cd $1
git init
poetry init
cp ~/.config/pyright/pyrightconfig.json .
venv_path=$(poetry env info -p)
echo -e $(jq -r --arg path "$venv_path" '.venvPath |= $path' pyrightconfig.json) > pyrightconfig.json