Skip to content

Instantly share code, notes, and snippets.

@redlumE01
Created January 9, 2020 18:11
Show Gist options
  • Select an option

  • Save redlumE01/23d9a2869faeb54f7d2e7e3ba11010a2 to your computer and use it in GitHub Desktop.

Select an option

Save redlumE01/23d9a2869faeb54f7d2e7e3ba11010a2 to your computer and use it in GitHub Desktop.
python automation VVV config
# imports
import sys
import os
import subprocess
# agrument passing / var init
newDir = sys.argv[1] # new directory
type = sys.argv[2] # type / wp downloads dutch core
os.chdir('VVV/www')
os.system('mkdir ' + newDir)
os.chdir(newDir)
os.system('mkdir public_html')
os.chdir('public_html')
if type == "wp" :
os.system('wp core download --locale=nl_NL')
# Switch to config
os.chdir('../../..')
os.chdir('config')
# Open with atom
subprocess.Popen(["atom", 'config.yml'])
# navigate to nginx sites
os.chdir('nginx-config/sites')
os.system('open .')
# open DB software
os.system('open -a "Sequel Pro"')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment