Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
221ef0da61 | |||
30c26352cd | |||
ae200646c2 | |||
70fb324923 | |||
3834385d2f | |||
c956acbd4f |
@ -5,6 +5,8 @@ A common gateway inferface (CGI) program written in C to display Race CTS leader
|
||||
## Requirements
|
||||
sqlite-devel python3 python-sqlite
|
||||
|
||||
The first is only needed for compilation of the C program. The latter two are only for the auxiliary script `allmaps.py`.
|
||||
|
||||
## Compiling
|
||||
`make` makes a static page generator.
|
||||
|
||||
|
@ -50,7 +50,7 @@ def get_list_from_server_txt(filename):
|
||||
def init_logging(folder, base_file_name="dbimport-%s.log"):
|
||||
if not exists(folder):
|
||||
return False
|
||||
filename = "%s/%s" % (folder, base_file_name)
|
||||
filename = folder + "/" + base_file_name
|
||||
i = 0
|
||||
while exists(filename % i):
|
||||
i += 1
|
||||
@ -223,20 +223,20 @@ def check_duplicates(database, data):
|
||||
if __name__ == "__main__":
|
||||
ap = argparse.ArgumentParser()
|
||||
ap.add_argument('dest',
|
||||
help="destination, a sqlite3 database (or query file, if given -q flag)")
|
||||
help="destination, either an sqlite3 database or query file")
|
||||
ap.add_argument('src',
|
||||
help="source, should be data generated by a Xonotic server")
|
||||
ap.add_argument('-q', '--export-query',
|
||||
action='store_true',
|
||||
help="write query file (as opposed to executing / inserting rows into database)")
|
||||
ap.add_argument('-t', '--test',
|
||||
action='store_true',
|
||||
help="test database for duplicates")
|
||||
ap.add_argument('-l', '--log-dir',
|
||||
ap.add_argument('-q', '--export-query',
|
||||
action='store_true',
|
||||
help="write query file (as opposed to executing / inserting rows into database)")
|
||||
ap.add_argument('-l', '--log',
|
||||
type=str,
|
||||
help="set folder to store log files")
|
||||
args = ap.parse_args()
|
||||
log_dir = args.log_dir or "logs"
|
||||
log_dir = args.log or "logs"
|
||||
log_file = init_logging(log_dir)
|
||||
if log_file:
|
||||
print("writing log to folder '%s'," % log_dir, log_file, file=sys.stderr)
|
||||
|
Loading…
Reference in New Issue
Block a user