Using AI and Python to automate my news data collection and then converts them into audio
# For MacOS
if [[ ":$PATH:" != *":$HOME/.local/bin:"* ]]; then
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
echo "Added ~/.local/bin to .zshrc"
fi
# Download the launcher
curl -L -O https://static.pantsbuild.org/setup/get-pants.sh && bash get-pants.sh
# Create the global configuration file
cat <<EOF > pants.toml
[GLOBAL]
pants_version = "2.30.0"
backend_packages = [
"pants.backend.python",
]
[source]
# Tells Pants where to look for your code
root_patterns = ["/"]
[python]
# Locks your environment to Python 3.10 as requested
interpreter_constraints = [">=3.10,<3.11"]
enable_resolves = true
EOF
echo "Setup complete! Please run 'source ~/.zshrc' or restart your terminal."# Run the sync.sh to export an virtual environment that VS Code can use for intellisense
./sync.sh