Skip to content

Commit

Permalink
add documentation to verbose option, fix main method and path (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
irinaschubert committed Jul 27, 2021
1 parent 0abd691 commit 9ecd794
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/dsp-tools-usage.md
Expand Up @@ -81,6 +81,7 @@ The following options are available:
- `-p` | `--password` _password_: password used for authentication with the DSP API (default: test)
- `-i` | `--imgdir` _dirpath_: path to the directory where the bitstream objects are stored (default: .)
- `-S` | `--sipi` _SIPIserver_: URL of the SIPI IIIF server (default: http://0.0.0.0:1024)
- `-v` | `--verbose`: If set, more information about the uploaded resources is printed to the console.

The command is used to upload data defined in an XML file onto a DSP server. The following example shows how to upload
data from an XML file `xml_data_file.xml` onto the DSP server `https://api.dsl.server.org` provided with the `-s` option.
Expand Down
2 changes: 1 addition & 1 deletion docs/dsp-tools-xmlupload.md
Expand Up @@ -180,7 +180,7 @@ Example for a property element of type text (`<text-prop>`) with two value eleme

| ⚠ Look out |
|:----------|
| In case of a cardinality 1-n, you must **NOT** create multiple `<text-prop>` tags, but multiple `<text>` tags in one single `<text-prop>`! |
| In case of a cardinality 1-n, multiple `<text>` tags have to be created inside the `<text-prop>` tag (do not use multiple `<text-prop>` tags). |

The following property elements exist:

Expand Down
8 changes: 6 additions & 2 deletions knora/dsp_tools.py
Expand Up @@ -7,15 +7,15 @@

import pkg_resources # part of setuptools

sys.path.append(os.path.dirname(os.path.realpath(__file__)))

from dsplib.utils.onto_create_lists import create_lists
from dsplib.utils.onto_create_ontology import create_ontology
from dsplib.utils.onto_get import get_ontology
from dsplib.utils.onto_process_excel import list_excel2json
from dsplib.utils.onto_validate import validate_list, validate_ontology
from dsplib.utils.xml_upload import xml_upload

sys.path.append(os.path.dirname(os.path.realpath(__file__)))


def program(args: list) -> None:
"""
Expand Down Expand Up @@ -109,5 +109,9 @@ def program(args: list) -> None:
label=args.label, lang=args.lang, outfile=args.outfile, verbose=args.verbose)


def main():
program(sys.argv[1:])


if __name__ == '__main__':
program(sys.argv[1:])

0 comments on commit 9ecd794

Please sign in to comment.