From 84d823acda1ce8f111ac63d53c05e11803b0aa0a Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Mon, 2 Mar 2015 14:21:57 -0800 Subject: [PATCH] Added --add to edscupdate.py to add systems to local db automatically --- edscupdate.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/edscupdate.py b/edscupdate.py index c2de3d03..ec65772d 100755 --- a/edscupdate.py +++ b/edscupdate.py @@ -95,6 +95,13 @@ def parse_arguments(): required=False, help='Show systems in random order, maximum of 10.', ) + parser.add_argument( + '--add-to-local-db', '-A', + action='store_true', + required=False, + help='Add accepted systems to the local database.', + dest='add', + ) parser.add_argument( '--test', required=False, @@ -375,6 +382,15 @@ def main(): if ok.lower() != 'y': continue + if argv.add: + tdb.addLocalSystem( + name, + x, y, z, + added='Release 1.00-EDStar', + modified=created, + commit=True + ) + print("'{}',{},{},{},'Release 1.00-EDStar','{}'".format( name, x, y, z, created, ), file=output)