diff --git a/taptap/taptap_report.py b/taptap/taptap_report.py index 82c19f6..fee6d1d 100644 --- a/taptap/taptap_report.py +++ b/taptap/taptap_report.py @@ -169,16 +169,19 @@ class TapTapReport: def main(): if len(sys.argv) == 3: - day = sys.argv[1] - methods = sys.argv[2] + day = sys.argv[2] + methods = sys.argv[1] else: + methods = sys.argv[1] day = (datetime.date.today() - datetime.timedelta(days=1)).strftime('%Y-%m-%d') + if not (day and methods): + raise Exception(f"PLs input day={day} methods={methods}") tap = TapTapReport(day) if methods == 'data': tap.get_order() - elif methods == "build": + elif methods == "report": tap.build_report() else: - print("PLS input methods in ('data','build')") + print("PLS input methods in ('data','report')") if __name__ == "__main__": main()