%%sh
python wctool.py -h

"""
Explanation: The following shows how to invoke the tool. The help section is automagically generated and needs some rework. Thus, see below for some real usage or read the README in the GitHub repository.
End of explanation
"""


%%sh
python wctool.py -l

"""
Explanation: The first command lists the existing workspaces. Before you can use the tool you need to put your credentials for Watson Conversation into the file config.json. A template is provided as config.json.sample.
End of explanation
"""


%%sh
python wctool.py -g -id "93fac4d7-2fab-4a02-b282-ce28a1d9f3f5"

"""
Explanation: Get the details for one of the existing workspaces. There is not much extra information compared to the LIST command.
End of explanation
"""


%%sh
python wctool.py -g -id "93fac4d7-2fab-4a02-b282-ce28a1d9f3f5" -full

"""
Explanation: However, when using the option "-full", then the entire workspace is returned.
End of explanation
"""


%%sh
python wctool.py -g -id "93fac4d7-2fab-4a02-b282-ce28a1d9f3f5" -o henriksWorkspace.json

"""
Explanation: Instead of printing the workspace to the screen, it can be saved to a file. When the "-o" (output) option is used it is assumed that you are interested in the full workspace.
End of explanation
"""


%%sh
python wctool.py -c -name HenriksNewWorkspace -desc "Test for my blog" -lang de -i henriksWorkspace.json

"""
Explanation: An existing workspace can be used to populate a new workspace. So here is how to create one:
End of explanation
"""


%%sh
python wctool.py -u -id "f5db2447-55dd-4c7e-a764-2319a17dbfee" -name "Henrik renamed it"

"""
Explanation: An existing workspace can be updated and the name, its language or the description be changed. It is also possible to replace intents, entities and other parts of the workspace (shown in the step hereafter).
End of explanation
"""


%%sh
python wctool.py -u -id "f5db2447-55dd-4c7e-a764-2319a17dbfee" -intents -counterexamples -i henriksWorkspace.json

"""
Explanation: Now you would edit the local file to make changes to intents, entities or dialog node and store the changes back to the file henriksWorkspace.json. That file is taken as input for the UPDATE command. Only those section specified as options are updated. In the sample below only intents and counterexamples are updated.
End of explanation
"""


%%sh
python wctool.py -d -id "f5db2447-55dd-4c7e-a764-2319a17dbfee"

"""
Explanation: A workspace can also be deleted. Use with care...
End of explanation
"""


%%sh
python wctool.py -logs -id "09969794-a510-4eab-95f3-b482d94a7ac6" -filter "request.input.text:Hello"

"""
Explanation: Use the logs option to obtain dialog logs. Using the -filter option you can pass a filter string (see README.md).
End of explanation
"""


%%sh
python wctool.py -dialog -id "09969794-a510-4eab-95f3-b482d94a7ac6"

"""
Explanation: A powerful option is -dialog. It allows to testdrive a dialog:
End of explanation
"""


