Skip to content

Commit 92ac678

Browse files
authored
docs: add links from usage subpage to other subpages (DEV-812) (#208)
* update broken links in docs * add links between "dsp-tools-usage.md" and the other parts of the docs
1 parent 05c9c4d commit 92ac678

9 files changed

Lines changed: 65 additions & 26 deletions

‎.github/pull_request_template.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
===REMOVE===
22

33
Important! Please follow the new guidelines for naming Pull
4-
Requests: https://docs.dasch.swiss/developers/dsp/contribution/#pull-request-guidelines
4+
Requests: https://docs.dasch.swiss/latest/developers/dsp/contribution/#pull-request-guidelines
55

66
> **Note:** If a pull request consists consists of *only one* commit when squash-merging it to main, the commit message will *not* be correct. In this case you have to manually ensure that the commit message is identical to the PR title, not the commit that the PR consists of.
77

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ For formatting Markdown files (*.md) we use the default styling configuration pr
9292

9393
## Publishing
9494
Publishing is automated with GitHub Actions and should _not_ be done manually. Please follow the
95-
[Pull Request Guidelines](https://docs.dasch.swiss/developers/dsp/contribution/#pull-request-guidelines). If done
95+
[Pull Request Guidelines](https://docs.dasch.swiss/latest/developers/dsp/contribution/#pull-request-guidelines). If done
9696
correctly, when merging a pull request into `main`, the `release-please` action will create or update a pull request for
9797
a release. This pull request will follow semantic versioning and update the change log. Once all desired features are
9898
merged, the release can be executed by merging this release pull request into `main`. This will trigger actions that

‎docs/dsp-tools-create.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ determines the structure of data. Data models are typically specified by a data
99
humanities scholar in a data modeling notation". The following sections describe the notation for ontologies in the
1010
context of DSP.
1111

12+
A data model as described in this document can be uploaded to a DSP server. The command to do so is described
13+
[here](./dsp-tools-usage.md#create-a-data-model-on-a-dsp-server).
14+
1215
## A short overview
1316

1417
A complete data model definition for DSP looks like this:

‎docs/dsp-tools-excel.md‎

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,14 @@ dsp-tools is able to process Excel files and output the appropriate JSON or XML
66
used to create the ontology on the DSP server or import data to the DSP repository. dsp-tools can also be used to
77
create a list from an Excel file.
88

9+
10+
11+
912
## Create the resources for a data model from an Excel file
1013

11-
With dsp-tools, the `resources` section used in a data model (JSON) can be created from an Excel file. Only `XLSX`
12-
files are allowed. The `resources` section can be inserted into the ontology file and then be uploaded onto a DSP
13-
server.
14+
With dsp-tools, the `resources` section used in a data model (JSON) can be created from an Excel file. The command for
15+
this is documented [here](./dsp-tools-usage.md#create-resources-from-an-excel-file). Only `XLSX` files are allowed.
16+
The `resources` section can be inserted into the ontology file and then be uploaded onto a DSP server.
1417

1518
**An Excel file template can be found [here](assets/templates/resources_template.xlsx). It is recommended to work from
1619
the template.**
@@ -44,11 +47,15 @@ The GUI order is given by the order in which the properties are listed in the Ex
4447

4548
For further information about resources, see [here](./dsp-tools-create-ontologies.md#resources).
4649

50+
51+
52+
4753
## Create the properties for a data model from an Excel file
4854

49-
With dsp-tools, the `properties` section used in a data model (JSON) can be created from an Excel file. Only the first
50-
worksheet of the Excel file is considered and only XLSX files are allowed. The `properties` section can be inserted
51-
into the ontology file and then be uploaded onto a DSP server.
55+
With dsp-tools, the `properties` section used in a data model (JSON) can be created from an Excel file. The command for
56+
this is documented [here](./dsp-tools-usage.md#create-properties-from-an-excel-file). Only the first worksheet of the
57+
Excel file is considered and only XLSX files are allowed. The `properties` section can be inserted into the ontology
58+
file and then be uploaded onto a DSP server.
5259

5360
**An Excel file template can be found [here](assets/templates/properties_template.xlsx). It is recommended to work
5461
from the template.**
@@ -73,18 +80,21 @@ For backwards compatibility, files containing a column `hlist` are valid, but de
7380

7481
For further information about properties, see [here](./dsp-tools-create-ontologies.md#properties).
7582

83+
84+
85+
7686
## Create a DSP-conform XML file from an Excel file
7787

7888
[not yet implemented]
7989

8090

8191

8292

83-
8493
## Create a list from one or several Excel files
8594

86-
With dsp-tools, a JSON list can be created from one or several Excel files. The list can then be inserted into a JSON
87-
ontology and uploaded to a DSP server. It is possible to create multilingual lists. In this case, a separate
95+
With dsp-tools, a JSON list can be created from one or several Excel files. The command for this is documented
96+
[here](./dsp-tools-usage.md#create-a-json-list-file-from-one-or-several-excel-files). The list can then be inserted
97+
into a JSON ontology and uploaded to a DSP server. It is possible to create multilingual lists. In this case, a separate
8898
Excel file has to be created for each language. The data must be in the first worksheet of each Excel file.
8999
It is important that all the Excel lists have the same structure. So, the translation of a label in one Excel
90100
sheet has to be in the exact same cell than the original was in the other Excel sheet (i.e. same cell index).

‎docs/dsp-tools-information-for-developers.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ For formatting Markdown files (*.md) we use the default styling configuration pr
6868
## Publishing
6969

7070
Publishing is automated with GitHub Actions and should _not_ be done manually. Please follow the
71-
[Pull Request Guidelines](https://docs.dasch.swiss/developers/dsp/contribution/#pull-request-guidelines). If done
71+
[Pull Request Guidelines](https://docs.dasch.swiss/latest/developers/dsp/contribution/#pull-request-guidelines). If done
7272
correctly, when merging a pull request into `main`, the `release-please` action will create or update a pull request for
7373
a release. This pull request will follow semantic versioning and update the change log. Once all desired features are
7474
merged, the release can be executed by merging this release pull request into `main`. This will trigger actions that

‎docs/dsp-tools-usage.md‎

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
The following paragraphs gives you an overview of how to install and use dsp-tools.
66

7+
8+
9+
710
## Installation
811

912
To install the latest version run:
@@ -18,6 +21,9 @@ To update to the latest version run:
1821
pip3 install --upgrade dsp-tools
1922
```
2023

24+
25+
26+
2127
## Create a data model on a DSP server
2228

2329
```bash
@@ -45,6 +51,9 @@ dsp-tools create -s https://api.dsl.server.org -u root@example.com -p test data_
4551

4652
The description of the expected JSON format can be found [here](./dsp-tools-create.md).
4753

54+
55+
56+
4857
## Get a data model from a DSP server
4958

5059
```bash
@@ -69,6 +78,11 @@ the password `test` are used. The data model is saved into the output file `outp
6978
dsp-tools get -s https://api.test.dasch.swiss -u root@example.com -p test -P my_project output_file.json
7079
```
7180

81+
The description of the JSON format can be found [here](./dsp-tools-create.md).
82+
83+
84+
85+
7286
## Upload data to a DSP server
7387

7488
```bash
@@ -98,13 +112,16 @@ dsp-tools xmlupload -s https://api.dsl.server.org -u root@example.com -p test -S
98112

99113
The description of the expected XML format can be found [here](./dsp-tools-xmlupload.md).
100114

101-
An internal ID is used in the `<resptr>` tag of an XML file used for `xmlupload` to reference resources inside the same
102-
XML file. Once data is uploaded to DSP it cannot be referenced by this internal ID anymore. Instead, the resource's IRI
103-
has to be used. The mapping of internal IDs to their respective IRIs is written to a file
104-
called `id2iri_mapping_[timstamp].json` after a successful `xmlupload`.
115+
An internal ID is used in the `<resptr>` tag of an XML file to reference resources inside the same XML file. Once data
116+
is uploaded to DSP, it cannot be referenced by this internal ID anymore. Instead, the resource's IRI has to be used.
117+
After a successful `xmlupload`, the mapping of internal IDs to their respective IRIs is written to a file
118+
called `id2iri_mapping_[timstamp].json`.
105119
See [`dsp-tools id2iri`](./dsp-tools-usage.md#replace-internal-ids-with-iris-in-xml-file) for more information about how
106120
to use this file to replace internal IDs in an existing XML file to reference existing resources.
107121

122+
123+
124+
108125
## Create a JSON list file from one or several Excel files
109126

110127
```bash
@@ -131,6 +148,9 @@ The description of the expected Excel format can be found [here](./dsp-tools-cre
131148
information about the usage of this command can be
132149
found [here](./dsp-tools-excel.md#create-a-list-from-one-or-several-excel-files).
133150

151+
152+
153+
134154
## Create resources from an Excel file
135155

136156
```bash
@@ -148,8 +168,10 @@ dsp-tools excel2resources Resources.xlsx resources.json
148168
```
149169

150170
More information about the usage of this command can be
151-
found [here](./dsp-tools-excel.md#create-the-resources-for-a-data-model-from-an-excel-file)
152-
.
171+
found [here](./dsp-tools-excel.md#create-the-resources-for-a-data-model-from-an-excel-file).
172+
173+
174+
153175

154176
## Create properties from an Excel file
155177

@@ -168,8 +190,10 @@ dsp-tools excel2properties Properties.xlsx properties.json
168190
```
169191

170192
More information about the usage of this command can be found
171-
[here](./dsp-tools-excel.md#create-the-properties-for-a-data-model-from-an-excel-file)
172-
.
193+
[here](./dsp-tools-excel.md#create-the-properties-for-a-data-model-from-an-excel-file).
194+
195+
196+
173197

174198
## Replace internal IDs with IRIs in XML file
175199

‎docs/dsp-tools-xmlupload.md‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ standard XML file as described on this page. After a successful upload of the da
77
`id2iri_mapping_[timstamp].json`) with the mapping from the internal IDs used inside the XML to their corresponding IRIs which
88
uniquely identify them inside DSP. This file should be kept if data is later added with the `--incremental` [option](#incremental-xml-upload).
99

10+
The command to import an XML file on a DSP server is described [here](./dsp-tools-usage.md#upload-data-to-a-dsp-server).
11+
1012
The import file must start with the standard XML header:
1113

1214
```xml
@@ -48,7 +50,7 @@ The `<knora>` element can only contain the following sub-elements:
4850

4951
The DSP server provides access control for each resource and each field of a resource through permissions. For a
5052
thorough explanation of the permission and access system of DSP, see
51-
[DSP permissions](https://docs.knora.org/02-knora-ontologies/knora-base/#permissions).
53+
[DSP permissions](https://docs.dasch.swiss/latest/DSP-API/02-knora-ontologies/knora-base/#permissions).
5254

5355
It is optional to define permissions in the XML. If not defined, default permissions are applied, so that only project and
5456
system administrators can view and edit resources. All other users have no rights at all, not even view or restricted view permissions.
@@ -662,7 +664,7 @@ The `<text>` element has the following attributes:
662664
- `encoding`: either "utf8" or "xml" (required)
663665
- `utf8`: The element describes a simple text without markup. The text is a simple UTF-8 string.
664666
- `xml`: The element describes a complex text containing markup. It must follow the XML format as defined by the
665-
[DSP standard mapping](https://docs.knora.org/03-apis/api-v1/xml-to-standoff-mapping/).
667+
[DSP standard mapping](https://docs.dasch.swiss/latest/DSP-API/03-apis/api-v2/xml-to-standoff-mapping/).
666668
- `permissions`: Permission ID (optional, but if omitted, users who are lower than a `ProjectAdmin` have no permissions at all, not even view rights)
667669
- `comment`: a comment for this specific value (optional)
668670

@@ -689,7 +691,7 @@ whitespaces will be taken into the text field as they are.
689691
#### Text with markup (XML)
690692

691693
dsp-tools assumes that for markup (standoff markup), the
692-
[DSP standard mapping](https://docs.knora.org/03-apis/api-v1/xml-to-standoff-mapping/) is used (custom mapping is not yet
694+
[DSP standard mapping](https://docs.dasch.swiss/latest/DSP-API/03-apis/api-v2/xml-to-standoff-mapping/) is used (custom mapping is not yet
693695
implemented).
694696

695697
Example of a text containing a link to another resource:
@@ -921,7 +923,7 @@ To do an incremental XML upload, one of the following procedures is recommended.
921923
shortcode="0001"
922924
default-ontology="anything">
923925

924-
<!-- permissions: see https://docs.dasch.swiss/DSP-API/05-internals/design/api-admin/administration/#permissions -->
926+
<!-- permissions: see https://docs.dasch.swiss/latest/DSP-API/02-knora-ontologies/knora-base/#permissions -->
925927
<permissions id="res-default">
926928
<allow group="UnknownUser">V</allow>
927929
<allow group="KnownUser">V</allow>

‎testdata/test-data.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
shortcode="4123"
77
default-ontology="testonto">
88

9-
<!-- permissions: see https://docs.dasch.swiss/DSP-API/05-internals/design/api-admin/administration/#permissions -->
9+
<!-- permissions: see https://docs.dasch.swiss/latest/DSP-API/02-knora-ontologies/knora-base/#permissions -->
1010
<permissions id="res-default">
1111
<allow group="UnknownUser">RV</allow>
1212
<allow group="KnownUser">V</allow>

‎testdata/test-id2iri-data.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
shortcode="4123"
77
default-ontology="testonto">
88

9-
<!-- :permissions see https://docs.dasch.swiss/DSP-API/05-internals/design/api-admin/administration/#permissions -->
9+
<!-- :permissions see https://docs.dasch.swiss/latest/DSP-API/02-knora-ontologies/knora-base/#permissions -->
1010
<permissions id="res-default">
1111
<allow group="UnknownUser">RV</allow>
1212
<allow group="KnownUser">V</allow>

0 commit comments

Comments
 (0)