Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(xmlupload): add documentation to verbose option (DSP-1797) #74

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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__)))

irinaschubert marked this conversation as resolved.
Show resolved Hide resolved

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:])


irinaschubert marked this conversation as resolved.
Show resolved Hide resolved
if __name__ == '__main__':
program(sys.argv[1:])