A Python program which parses the data in the coblob database and transforms into a format which the co-data project can use. One of the main goals of this project is to reduce the load on the CPU in the co-data project.
https://www.craigoates.net/Software/project/17
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
789 B
21 lines
789 B
import argparse |
|
import os |
|
|
|
def dir_path(string): |
|
if os.path.isdir(string): |
|
return string |
|
else: |
|
raise NotADirectoryError(string) |
|
|
|
def create_args(): |
|
parser = argparse.ArgumentParser( |
|
"Parses the coblob database and transforms it. " + |
|
"This is mostly for the the benefit of the co-data project. " + |
|
"It, also, requires access to the co-api project, via the internet.") |
|
parser.add_argument("-t", "--target", type = dir_path, required = True, |
|
help = "the location you would like the data to be stored at.") |
|
parser.add_argument("-v", "--verbose", action = "store_true", |
|
help = "provides detailed output when program is running.") |
|
|
|
args = parser.parse_args() |
|
return args
|
|
|