def new(path='.', template=None): """Creates a new project """ path = abspath(path.rstrip(sep)) template = template or SKELETON render_skeleton(template, path, include_this=['.gitignore']) print(SKELETON_HELP % (path,))
def new_project(path, tmpl=None, **options): data = default_context.copy() data['package'] = basename(path) tmpl = tmpl or SKELETON_PATH print(tmpl, path) render_skeleton(tmpl, path, data=data, include_this=['.gittouch'], **options)
def new(path='.', template=None): """Creates a new project """ path = abspath(path.rstrip(sep)) template = template or DEFAULT_TEMPLATE_URL render_skeleton(template, path, include_this=['.gitignore']) print(HELP_MSG % (path,))
def render(dst, **kwargs): data = { 'package': 'demo', 'py3': True, 'make_secret': lambda: sha1(urandom(48)).hexdigest() } kwargs.setdefault('quiet', True) voodoo.render_skeleton(SKELETON_PATH, dst, data=data, **kwargs)
def new_project(path, tmpl=None, **options): data = default_context.copy() data['package'] = basename(path) tmpl = tmpl or SKELETON_PATH print(tmpl, path) render_skeleton(tmpl, path, data=data, include_this=['.gittouch'], **options)
def new_project(path, options): data = default_context.copy() yaml_filename = options.pop('config') print("Loading configuration from %s" % yaml_filename) with open(yaml_filename) as f: config_dict = yaml.load(f) data = get_merged_dict(data, config_dict) #data['project_name'] = prompt("Project name", basename(path)) #data['project_title'] = prompt("Project title", data['project_name']) render_skeleton(SKELETON_PATH, path, data=data, **options) return data
def new(path='.', template=None): """Creates a new project """ path = abspath(path.rstrip(sep)) template = template or DEFAULT_TEMPLATE_URL render_skeleton( template, path, include_this=['.gitignore'], filter_this=[ '~*', '*.py[co]', '__pycache__', '__pycache__/*', '.git', '.git/*', '.hg', '.hg/*', '.svn', '.svn/*', ] ) print(HELP_MSG % (path,))
def new(path='.', template=None): """Creates a new project """ path = abspath(path.rstrip(sep)) template = template or DEFAULT_TEMPLATE_URL render_skeleton(template, path, include_this=['.gitignore'], filter_this=[ '~*', '*.py[co]', '__pycache__', '__pycache__/*', '.git', '.git/*', '.hg', '.hg/*', '.svn', '.svn/*', ]) print(HELP_MSG % (path, ))
def test_skeleton_not_found(dst): with pytest.raises(ValueError): voodoo.render_skeleton('foobar', dst) with pytest.raises(ValueError): voodoo.render_skeleton(__file__, dst)
def new(path='.'): """Creates a new project """ path = abspath(path.rstrip(sep)) render_skeleton(SKELETON, path, include_this=['.gitignore']) print(SKELETON_HELP % (path,))
def render(dst, **kwargs): kwargs.setdefault('quiet', True) voodoo.render_skeleton(SKELETON_PATH, dst, data=DATA, **kwargs)
def new(path='.'): """Creates a new project """ path = abspath(path.rstrip(sep)) render_skeleton(SKELETON, path, include_this=['.gitignore']) print(SKELETON_HELP % (path, ))
def test_skeleton_not_found(dst): with pytest.raises(ValueError): voodoo.render_skeleton('foobar', dst) with pytest.raises(ValueError): voodoo.render_skeleton(__file__, dst)
def new_project(path, options): data = default_context.copy() data['package'] = basename(path) # print(SKELETON_PATH, path, data, options) render_skeleton(SKELETON_PATH, path, data=data, include_this=['.gittouch'], **options)