def read_args(): args = commandline.parse() Config._batch = False if args['batch']: Config._batch = True print "Script runs in batch mode (any error condition simply aborts)." Config._local = False if args['local']: Config._local = True print "Script running locally." Config._force = False if args['force'] and not Config._local: Config._force = True print "Forcing remote font versions without checking difference." Config._init = False if args['init']: Config._init = True print "Initializing a new local font repository." Config._local_font_repo = Config._get_local_repo_path(args['font_directory']) print "\nDetermined font directory:\n {}".format(Config.font_repo()) Config._lilypond_font_roots = Config._get_lilypond_font_paths(args['targets']) print "\nDetermined LilyPond font root directories:\n - {}".format( '\n - '.join(Config._lilypond_font_roots))
def main(): info('Gruppen - generate-voice\n') info('Generate voice') # add script specific options to the command line parser add_commandline_args() # read and interpret options args = commandline.parse() voice_props = get_voice_props(args) # open target repository proj = script.open_project(args) # create a new Voice object for the project new_voice = voice.Voice(proj, voice_props) new_voice.print_props() # process all cell teimpate files and write to disk info('Writing {} segments to {}'.format( len(new_voice.segments._segments_list), os.path.join(proj['paths']['root'], new_voice.music_dir))) file_list = new_voice.segments.write_segments() # process part concatenation template new_voice.segments.write_part_concat_file(file_list) # process part standalone file new_voice.segments.write_part_file()
def main(): dataset_conf, computed_data_conf, images_paths_to_recognize = commandline.parse( ) con = create_computed_data(dataset_conf, computed_data_conf) create_results_from_computed_data(con, computed_data_conf) recognize_images(con, images_paths_to_recognize)
def execute(self): #print self._cmd args = commandline.parse(self._cmd) #print args ret_code = subprocess.call(args) #print ret_code return ret_code
def main(): global project args = commandline.parse() # try to open a project try: project = project.Project(args) except AssertionError, e: print '\n', e, '\n' sys.exit(1)
def execute(self): #print self._cmd args = commandline.parse(self._cmd) #print args ret_code = subprocess.call(args) #print ret_code return ret_code
def main(): info('Trunknes Lied - clean up \\annotate\n') args = commandline.parse() proj = script.open_project(args) proj.read_voices() grid = proj.status.grid() for v in proj['voice_names']: for s in proj['segment_names']: if not grid[v][s].deleted: cleanup(grid[v][s])
def main(): info('Gruppen - project-status\n') info('Generate status information about a Crowd-Editing project') commandline.parser.add_argument( '-t', '--target-directory', help = ("directory where the JSON/HTML file will be " + "saved to (will be created if it doesn't exist). " + "accepts absolute or relative paths")) commandline.parser.add_argument( '--prune-directory', action = 'store_true', help=("Remove JSON/HTML files from the same day, " + "so there is at most one file per day.")) args = commandline.parse() # set external target directory if passed script.target_directory = args['target_directory'] if args['target_directory'] else '' proj = script.open_project(args) # ensure the repo is in the right state init.prepare_repository(proj.vcs) try: # add all present voices proj.read_voices() # generate JSON data proj.status.write_json() # optionally prune output directory if args['prune_directory']: proj.status.prune_out_dir() finally: init.finish_repository(proj.vcs)
while (not self.shutdown and t.is_alive()): t.join(timeout=0.1) # wait a little before checking again for more frames. time.sleep(0.002) # flush out log messages print("Checking for new frames after short break") if (not truncated_list): delay = 0 while (delay < self.args.checkevery and not self.shutdown): delay += 0.1 time.sleep(0.1) if __name__ == "__main__": args = commandline.parse() # setup logging dtslog = dts_logger.dts_logging() logger = logging.getLogger("ODI-DTS") ppa = ppa_sender.PPA_Sender() ppa.start() time.sleep(1) # make sure to create the DTS scratch directory if (not os.path.isdir(config.tar_scratchdir)): os.mkdir(config.tar_scratchdir) if (not args.db or not args.monitor):
def main(): dataset_conf, csv_data = commandline.parse() dataset.build_csvs_if_none(dataset_conf, csv_data)