Skip to content

Commit

Permalink
added example csv files
Browse files Browse the repository at this point in the history
  • Loading branch information
wxwilcke committed Mar 7, 2024
1 parent 4d79a01 commit 296073b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/csvw_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def __init__(self, mode=None, files=None, dataset=None, delimiter=None,
else:
print("Whoops for file {}".format(source_file))

if __name__ == '__main__':
def main():
parser = argparse.ArgumentParser(description="Not nearly CSVW compliant schema builder and RDF converter")
parser.add_argument('mode', choices=['convert','build'], default='convert', help='Use the schema of the `file` specified to convert it to RDF, or build a schema from scratch.')
parser.add_argument('files', metavar='file', nargs='+', type=str, help="Path(s) of the file(s) that should be used for building or converting. Must be a CSV file.")
Expand Down Expand Up @@ -116,3 +116,6 @@ def __init__(self, mode=None, files=None, dataset=None, delimiter=None,
COW(args.mode, files, args.dataset, args.delimiter, args.encoding,
args.quotechar, args.processes, args.chunksize, args.base,
args.format, args.gzip)

if __name__ == '__main__':
main()

0 comments on commit 296073b

Please sign in to comment.