#!/usr/bin/env python """ script to create a new python project Workflow: 0. create a virtualenv and `src` subdirectory 1. initialize a project from `MakeItSo` 2. initialize local repository - if remote is defined - 3. create remote repository 4. modify local .hgrc to have it upstream 5. push to it (stage) makeitso python-package -o html2menu Enter url: http://k0s.org Enter repo: http://k0s.org/hg/html2menu Enter description: convert an HTML file to a fluxbox and other menus Resources: - http://k0s.org/hg/config/file/tip/python/setup_repo.py - http://k0s.org/mozilla/hg/MakeItSo """ # TODO: # - this script should -> MakeItSo # - create hgrc.py # - Create new project should be pluggable # * post install (eg adding to a project list) # * repository (is there software for doing this across VCSs?) # TODO: these projects still need to be made: # - netflix importer # - hgtricks (setup_repo.py and hgrc.py should go here) import optparse import sys def main(args=sys.argv[1:]): # command line parser usage = '%prog [options] project' parser = optparse.OptionParser(usage=usage) parser.add_option('-V', '--venv', dest='venv', help="use this directory instead of creating a new virtualenv") options, args = parser.parse_args(args) if len(args) != 1: parser.error("specify one project") if __name__ == '__main__': main()