From 1b6e80f28948c141b7f3dba2eef3c7d5463c22a3 Mon Sep 17 00:00:00 2001 From: pengtao Date: Wed, 16 Oct 2019 17:29:24 +0800 Subject: [PATCH] =?UTF-8?q?tap=20order=20=20=E6=95=B0=E6=8D=AE=E5=86=99?= =?UTF-8?q?=E5=85=A5mysql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- taptap/taptap_report.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/taptap/taptap_report.py b/taptap/taptap_report.py index fef365c..82c19f6 100644 --- a/taptap/taptap_report.py +++ b/taptap/taptap_report.py @@ -168,13 +168,17 @@ class TapTapReport: def main(): - if len(sys.argv) == 2: + if len(sys.argv) == 3: day = sys.argv[1] + methods = sys.argv[2] else: day = (datetime.date.today() - datetime.timedelta(days=1)).strftime('%Y-%m-%d') tap = TapTapReport(day) - #tap.get_order() - tap.build_report() - + if methods == 'data': + tap.get_order() + elif methods == "build": + tap.build_report() + else: + print("PLS input methods in ('data','build')") if __name__ == "__main__": main()