Skip to content

Instantly share code, notes, and snippets.

@jeremydouglass
Created November 25, 2017 00:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeremydouglass/56a1d17643e314d51f235c69a325d0d6 to your computer and use it in GitHub Desktop.
Save jeremydouglass/56a1d17643e314d51f235c69a325d0d6 to your computer and use it in GitHub Desktop.
Create a Processing.py blank sketch project in a new Git repository
#!/usr/bin/env bash
#
# Create a Processing.py blank sketch project in a new Git repository
#
# Usage:
# new_processingpy_sketch.sh sketchname
# create repo
mkdir $1
cd $1
git init
git commit --allow-empty -m "Initial commit"
git status
# create default gitignore
echo "
.DS_Store
applet
application.linux32
application.linux64
application.windows32
application.windows64
application.macosx
__pycache__/
*.py[cod]
*\$py.class
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
.python-version
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
" >> .gitignore
git add .gitignore
git commit -m "add .gitignore defaults"
# create a blank processing.py sketch with the same name
echo "mode=Python
mode.id=jycessing.mode.PythonMode" >> sketch.properties
echo "def setup():
pass
def draw():
pass" >> $1.pyde
git add sketch.properties $1.pyde
git commit -m "blank processing.py sketch"
# instructions on pushing to GitHub
echo "To sync to GitHub, create a repo $1, then:"
echo " git remote add origin https://github.com/YOURACCOUNT/$1.git"
echo " git push -u origin master"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment