Exemplo n.º 1
0
    def run(self, argv):
        args = self.parse_args(argv)
        keyword = args.keyword
        packages = PackageHelper.search_keyword(keyword)
        if packages is None:
            print "[PACKAGE] not found packages for keyword '%s'" % keyword
            return

        keys = packages.keys()
        print "[PACKAGE] list all packages for keyword '%s'" % keyword
        keys.sort()
        for k in keys:
            package_data = packages[k]
            print "[PACKAGE] > %s %s (%s)" % (package_data["name"], package_data["version"], package_data["author"])

        print ""
Exemplo n.º 2
0
    def run(self, argv):
        args = self.parse_args(argv)
        keyword = args.keyword
        packages = PackageHelper.search_keyword(keyword)
        if packages is None:
            print MultiLanguage.get_string('PACKAGE_SEARCH_ERROR_NO_KEY_FMT', keyword)
            return

        keys = packages.keys()
        print MultiLanguage.get_string('PACKAGE_SEARCH_TIP_FMT', keyword)
        keys.sort()
        for k in keys:
            package_data = packages[k]
            print MultiLanguage.get_string('PACKAGE_ITEM_FMT',
                                           (package_data["name"], package_data["version"], package_data["author"]))

        print ""
Exemplo n.º 3
0
    def run(self, argv):
        args = self.parse_args(argv)
        keyword = args.keyword
        packages = PackageHelper.search_keyword(keyword)
        if packages is None:
            print cocos.MultiLanguage.get_string('PACKAGE_SEARCH_ERROR_NO_KEY_FMT') % keyword
            return

        keys = packages.keys()
        print cocos.MultiLanguage.get_string('PACKAGE_SEARCH_TIP_FMT') % keyword
        keys.sort()
        for k in keys:
            package_data = packages[k]
            print cocos.MultiLanguage.get_string('PACKAGE_ITEM_FMT')\
                  % (package_data["name"], package_data["version"], package_data["author"])

        print ""