Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature: Add reset triplestore command line command (ongoing)
- Loading branch information
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import os | ||
from typing import List, Set, Dict, Tuple, Optional | ||
from pprint import pprint | ||
import argparse | ||
import json | ||
from jsonschema import validate | ||
from knora import KnoraError, Knora | ||
import sys | ||
|
||
|
||
def main(args): | ||
# parse the arguments of the command line | ||
parser = argparse.ArgumentParser() | ||
parser.add_argument("-s", "--server", type=str, default="http://0.0.0.0:3333", help="URL of the Knora server") | ||
|
||
args = parser.parse_args(args) | ||
|
||
# create the knora connection object | ||
con = Knora(args.server) | ||
con.login(args.user, args.password) | ||
con.reset_triplestore_content() | ||
|
||
if __name__ == '__main__': | ||
main(sys.argv[1:]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters