Skip to content

Instantly share code, notes, and snippets.

@mr-karan
Created March 5, 2016 15:47
Show Gist options
  • Save mr-karan/51d3009d4ef0ccccecbc to your computer and use it in GitHub Desktop.
Save mr-karan/51d3009d4ef0ccccecbc to your computer and use it in GitHub Desktop.
Coala-New-bear
from distutils.dir_util import copy_tree
import argparse
parser = argparse.ArgumentParser(prog='coala-new-bear',description='New Lint Bear')
parser.add_argument('-n', '--name', help='Enter Bear name')
args = parser.parse_args()
fromdir = "skeleton"
userProv = args.name
beardir = "bears/{0}".format(userProv)
testdir = "tests/{0}".format(userProv)
def copybear():
copy_tree(fromdir+"/examplebear", beardir)
def copytest():
copy_tree(fromdir+"/exampletest", testdir)
if __name__ == '__main__':
copybear()
copytest()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment