Example #1
0
def add(options):
    if len(argv) != 2:
        templatetools.print_usage(options['indicator'])
        sys.exit(4)

    abs_template_path = templatetools.get_template_path_from_project()
    abs_command_path = os.path.abspath(os.path.dirname(sys.argv[0]))

    if not configurationhandler.project_config:
        configurationhandler.loadConfig()
    project_name = configurationhandler.project_config['project']

    template_python_dir = os.path.join(abs_template_path, 'store', 'python')
    # take files from command directory if don't exist
    python_file = os.path.join(template_python_dir, 'indicator.py')
    python_name = templatetools.python_name(project_name)
    target_python_dir = python_name

    project_sentence_name, project_camel_case_name = \
        templatetools.conventional_names(project_name)

    substitutions = (("project_name", project_name), ("python_name",
                                                      python_name))

    templatetools.file_from_template(template_python_dir, "indicator.py",
                                     target_python_dir, substitutions)
def add(options):
    if len(argv) != 2:
        templatetools.print_usage(options['indicator'])
        sys.exit(4)

    abs_template_path = templatetools.get_template_path_from_project()
    abs_command_path = os.path.abspath(os.path.dirname(sys.argv[0]))

    if not configurationhandler.project_config:
        configurationhandler.loadConfig()
    project_name = configurationhandler.project_config['project']

    template_python_dir = os.path.join(abs_template_path, 'store', 'python')
    # take files from command directory if don't exist
    python_file = os.path.join(template_python_dir,
                               'indicator.py')
    python_name = templatetools.python_name(project_name)
    target_python_dir = python_name

    project_sentence_name, project_camel_case_name = \
        templatetools.conventional_names(project_name)

    substitutions = (("project_name",project_name),
                    ( "python_name",python_name))

    templatetools.file_from_template(template_python_dir, 
                                    "indicator.py", 
                                    target_python_dir, 
                                    substitutions)
def add(options):
    if len(argv) != 3:
        templatetools.print_usage(options['help-topic'])
        sys.exit(4)

    try:
        topic_name = templatetools.quickly_name(argv[2])
    except templatetools.bad_project_name, e:
        print(e)
        sys.exit(1)
Example #4
0
def add(options):
    if len(argv) != 3:
        templatetools.print_usage(options['dialog'])
        sys.exit(4)

    try:
        dialog_name = templatetools.quickly_name(argv[2])
    except templatetools.bad_project_name, e:
        print(e)
        sys.exit(1)
def usage():
    templatetools.print_usage(
        _('quickly submitubuntu [--ppa <ppa | group/ppa>] [release-version] [comments]'
          ))
Example #6
0
def usage():
    templatetools.print_usage(_('quickly run -- [program arguments]'))
Example #7
0
def usage():
    templatetools.print_usage(_('quickly create <template> <project-name>'))
def usage():
    templatetools.print_usage('quickly package [--extras]')
Example #9
0
def usage():
    templatetools.print_usage('quickly edit')
Example #10
0
def usage():
    templatetools.print_usage(_('quickly share [--ppa <ppa | group/ppa>]'))
Example #11
0
def usage():
    templatetools.print_usage(_('quickly license [license-name]'))
    licenses = get_supported_licenses()
    licenses.sort()
    print _('Candidate licenses: %s') % ', '.join(licenses + ['other'])
Example #12
0
def usage():
    templatetools.print_usage('quickly upgrade')
Example #13
0
def usage():
    templatetools.print_usage(options.values())
def usage():
    templatetools.print_usage(options.values())
                                           project.name)
    except launchpadaccess.launchpad_project_error, e:
        print(e)
        sys.exit(1)
    # get the project now and save the url into setup.py
    project_url = launchpadaccess.launchpad_url + '/' + project.name
    quicklyutils.set_setup_value('url', project_url)
    about_dialog_file_name = quicklyutils.get_about_file_name()
    if about_dialog_file_name:
        quicklyutils.change_xml_elem(about_dialog_file_name, "object/property",
                                     "name", "website", project_url, {})

# change default ppa
elif argv[1] == "ppa":
    if len(argv) != 3:
        templatetools.print_usage(options['ppa'])
        print _("\nUse shell completion to find all available PPAs")
        sys.exit(4)

    # connect to LP
    try:
        launchpad = launchpadaccess.initialize_lpi()
    except launchpadaccess.launchpad_connection_error, e:
        print(e)
        sys.exit(1)

    ppa_name = argv[2]
    # choose right ppa parameter (users, etc.) ppa or staging
    try:
        (ppa_user, ppa_name, dput_ppa_name,
         ppa_url) = packaging.choose_ppa(launchpad, ppa_name)
Example #16
0
def usage():
    templatetools.print_usage(_('quickly license [license-name]'))
    licenses = get_supported_licenses()
    licenses.sort()
    print _('Candidate licenses: %s') % ', '.join(licenses + ['other'])
        internal.apportutils.update_apport(quickly_project_name, previous_lp_project_name, project.name)
    except launchpadaccess.launchpad_project_error, e:
        print(e)
        sys.exit(1)
    # get the project now and save the url into setup.py
    project_url  = launchpadaccess.launchpad_url + '/' + project.name
    quicklyutils.set_setup_value('url', project_url)
    about_dialog_file_name = quicklyutils.get_about_file_name()
    if about_dialog_file_name:
        quicklyutils.change_xml_elem(about_dialog_file_name, "object/property",
                                     "name", "website", project_url, {})

# change default ppa
elif argv[1] == "ppa":
    if len(argv) != 3:
        templatetools.print_usage(options['ppa'])
        print _("\nUse shell completion to find all available PPAs")
        sys.exit(4)

    # connect to LP
    try:
        launchpad = launchpadaccess.initialize_lpi()
    except launchpadaccess.launchpad_connection_error, e:
        print(e)
        sys.exit(1)

    ppa_name = argv[2]
    # choose right ppa parameter (users, etc.) ppa or staging
    try:
        (ppa_user, ppa_name, dput_ppa_name, ppa_url) = packaging.choose_ppa(launchpad, ppa_name)
    except packaging.user_team_not_found, e:
Example #18
0
def usage():
    templatetools.print_usage('quickly design')
Example #19
0
def usage():
    templatetools.print_usage(_("quickly license [license-name]"))
    licenses = get_supported_licenses()
    licenses.sort()
    print _("Candidate licenses: %s") % ", ".join(licenses + ["other"])
Example #20
0
def usage():
    templatetools.print_usage(_('quickly debug -- [program arguments]'))
Example #21
0
def usage():
    templatetools.print_usage(_('quickly save [comments]'))
Example #22
0
def usage():
    templatetools.print_usage(_('quickly save [comments]'))
Example #23
0
def usage():
    templatetools.print_usage('quickly package [--extras]')
Example #24
0
def usage():
    templatetools.print_usage("quickly tutorial")
Example #25
0
def usage():
    templatetools.print_usage('quickly tutorial')
Example #26
0
def usage():
    templatetools.print_usage('quickly test')
Example #27
0
def usage():
    templatetools.print_usage(_('quickly submitubuntu [--ppa <ppa | group/ppa>] [release-version] [comments]'))
Example #28
0
def usage():
    templatetools.print_usage('quickly design')
Example #29
0
def usage():
    templatetools.print_usage(_('quickly create <template> <project-name>'))
Example #30
0
def usage():
    templatetools.print_usage(_('quickly share [--ppa <ppa | group/ppa>]'))