def main(argv): """ @param argv [unicode] @return int """ dprint("enter") ok = False if not argv or len(argv) == 1 and argv[0] in ('-h', '--help'): usage() #elif len(argv) != 1: # dwarn("invalid number of parameters") # usage() else: family = argv[-1] quiet = '-q' in argv or '--quiet' in argv try: msg(family) init() ok = run(family) if ok and not quiet: from sakurakit import skos font = FONTS[family] path = os.path.join(FONT_DIR, font['path']) if font['type'] == 'file': path = os.path.dirname(path) skos.open_location(os.path.abspath(path)) except Exception, e: dwarn(e)
def _finish(self): if self._failedVids: growl.pageBreak() growl.error("[main] %s: %s" % (my.tr("failed videos"), ", ".join(self._failedVids))) else: skos.open_location(self.location) self.quit()
def main(argv): """ @param argv [unicode] @return int """ dprint("enter") ok = False if not argv or len(argv) == 1 and argv[0] in ('-h', '--help'): usage() elif len(argv) != 1: dwarn("invalid number of parameters") usage() else: dic, = argv if dic == 'ipa': dic = 'ipadic' try: msg(dic) init() ok = run(dic) if ok: from sakurakit import skos dicdir = os.path.join(DIC_DIR, dic) skos.open_location(os.path.abspath(dicdir)) except Exception, e: dwarn(e)
def main(): """ @return int """ dprint("enter") ok = False try: init() ok = get() and makedb() if ok: from sakurakit import skos skos.open_location(os.path.abspath(TARGET_DIR)) except Exception, e: dwarn(e)
def main(argv): """ @param argv [unicode] @return int """ dprint("enter") ok = False try: init() ok = get() and run() if ok: from sakurakit import skos skos.open_location(os.path.abspath(INST_DIR)) except Exception, e: dwarn(e)
def main(argv): """ @param argv [unicode] @return int """ dprint("enter") ok = False if not argv or len(argv) == 1 and argv[0] in ('-h', '--help'): usage() elif len(argv) != 1: dwarn("invalid number of parameters") usage() else: lang, = argv try: init() ok = get(lang) if ok: from sakurakit import skos skos.open_location(os.path.abspath(DB_DIR)) except Exception, e: dwarn(e)
def main(argv): """ @param argv [unicode] @return int """ dprint("enter") ret = 0 try: if len(argv) < 2: dwarn("usage: %s" % USAGE) else: path = argv[0] videos = argv[1:] if not os.path.exists(path): os.makedirs(path) # recursively create dir writelog(path, videos) ok = dispatch(path, videos) from sakurakit import skos skos.open_location(os.path.abspath(path)) ret = 0 if ok else 1 except Exception, e: dwarn(e) ret = 1