def commandline(cls, args): # Report time for all projects if args.all: projects=ctt.listprojects.ListProjects.list_projects() else: projects = [] for x in args.project: fnames = glob.glob(os.path.join(ctt.ctt_dir(), x)) projects.extend(fnames) total_time = 0 for project in projects: report = cls(project, args.start, args.end, args.output_format, args.regexp, args.ignore_case) report.report() total_time = total_time + report.total_time cls.summary(total_time)
def commandline(cls, args): # Report time for all projects if args.all: projects = ctt.listprojects.ListProjects.list_projects() else: projects = [] for x in args.project: fnames = glob.glob(os.path.join(ctt.ctt_dir(), x)) projects.extend(fnames) total_time = 0 reports = collections.OrderedDict() for project in projects: report = cls(project=project, start_date=args.start, end_date=args.end, output_format=args.output_format, regexp=args.regexp, ignore_case=args.ignore_case) report_data = report.report() reports[report.project] = (report, report_data) total_time = total_time + report.total_time cls.print_reports(reports, args.output_format, args.summary) cls.summary(total_time)
def commandline(cls, args): # Report time for all projects if args.all: projects=ctt.listprojects.ListProjects.list_projects() else: projects = [] for x in args.project: fnames = glob.glob(os.path.join(ctt.ctt_dir(), x)) projects.extend(fnames) total_time = 0 reports = collections.OrderedDict() for project in projects: report = cls(project=project, start_date=args.start, end_date=args.end, output_format=args.output_format, regexp=args.regexp, ignore_case=args.ignore_case) report_data = report.report() reports[report.project] = (report, report_data) total_time = total_time + report.total_time cls.print_reports(reports, args.output_format, args.summary) cls.summary(total_time)
def list_projects(): for project in sorted(os.listdir(ctt.ctt_dir())): if project[0] == ".": continue yield project
def list_projects(): for project in ctt.list_projects(ctt.ctt_dir()): yield project