From d5b5c94f4273b70423101ce11b523bd407e814f8 Mon Sep 17 00:00:00 2001 From: thurask Date: Mon, 11 Jun 2018 22:40:49 -0400 Subject: [PATCH] add defaultparser to gapfill, uploader --- tclcheck_gapfill.py | 10 ++++++++++ upload_logs.py | 9 +++++++++ 2 files changed, 19 insertions(+) diff --git a/tclcheck_gapfill.py b/tclcheck_gapfill.py index ecf20cf..477a801 100755 --- a/tclcheck_gapfill.py +++ b/tclcheck_gapfill.py @@ -6,14 +6,24 @@ """Query existence of missing OTAs.""" import json +import sys import requests +from tcllib import argparser from tcllib.devices import MobileDevice from tcllib.dumpmgr import write_info_if_dumps_found from tcllib.requests import CheckRequest, RequestRunner, ServerVoteSelector +dpdesc = """ + Queries the database server for known versions and tries to find OTA files not yet in the database. +""" +dp = argparser.DefaultParser(__file__, dpdesc) +args = dp.parse_args(sys.argv[1:]) +del args + + # 1. Fetch list of missing OTAs (e.g. from ancient versions to current) # 2. Query updates from FOTA servers (and store XML) # (3. Upload will be done manually with upload_logs.py) diff --git a/upload_logs.py b/upload_logs.py index cac8212..5bb8d0d 100755 --- a/upload_logs.py +++ b/upload_logs.py @@ -9,9 +9,18 @@ import glob import os +import sys import requests +from tcllib import argparser +dpdesc = """ + Uploads contents of logs folder to remote database. + """ +dp = argparser.DefaultParser(__file__, dpdesc) +args = dp.parse_args(sys.argv[1:]) +del args + # This is the URL to an installation of https://github.com/mbirth/tcl_update_db UPLOAD_URL = "https://tclota.birth-online.de/"