You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The purpose of this package is to populate and update the database used by another package produced at [zbMATH](https://zbmath.org/), namely the zbMATH Links API `zbmath-links-api`, available [here](https://github.com/zbMATHOpen/linksApi).
3
+
The purpose of this package is to populate and update the database used by another package produced at [zbMATH](https://zbmath.org/), namely the zbMATH Links API `zbmath-links-api`, available [here](https://github.com/zbMATHOpen/linksApi).
4
4
The usage of the present package is mainly described in the README file of the `zbmath-links-api` package.
5
5
6
6
Here we provide some simple instructions to install and use this package.
@@ -14,8 +14,8 @@ On a first install:
14
14
pip install -e .
15
15
```
16
16
17
-
This will install the package, `update-zblinks-api`, in the [virtual environment](https://docs.python.org/3/tutorial/venv.html).
18
-
17
+
This will install the package, `update-zblinks-api`, in the [virtual environment](https://docs.python.org/3/tutorial/venv.html).
18
+
19
19
20
20
2) Fill in the `config_template.ini` and save it as `config.ini`.
21
21
@@ -27,47 +27,54 @@ On a first install:
27
27
(iii) The API-KEY is the one used by the API package `zbmath-links-api`.
28
28
29
29
30
-
3) The package has two entry points:
30
+
3) The package has three entry points:
31
31
32
32
(i) To scrape (i.e., to obtain all links) all zbMATH partners and update the database used by the package `zbmath-links-api` use the command
33
33
34
34
```
35
35
update-api
36
36
```
37
-
38
-
This will automatically add new links, delete links that no longer exist, and edit links that have been modified.
39
-
40
-
**Remark 1.** The present version of the package works with the [Digital Library of Mathematical Functions](https://dlmf.nist.gov/) (DLMF) as zbMATH partner.
37
+
38
+
This will automatically add new links, delete links that no longer exist, and edit links that have been modified.
39
+
40
+
**Remark 1.** The present version of the package works with the [Digital Library of Mathematical Functions](https://dlmf.nist.gov/) (DLMF) as zbMATH partner.
41
41
Therefore, one can use the command
42
-
42
+
43
43
```
44
44
update-api -p DLMF
45
45
```
46
-
46
+
47
47
to update the DLMF dataset managed by `zbmath-links-api`.
48
48
In the next future, some scraping scripts for other partners will be integrated into this package, and the command
49
-
49
+
50
50
```
51
51
update-api
52
52
```
53
-
53
+
54
54
will do an automatic update of all links managed by `zbmath-links-api` for all partners.
55
55
56
56
**Remark 2.** To generate CSV files (but not update the database) which can be used to manually update the database use the command
57
-
57
+
58
58
```
59
59
update-api --file
60
60
```
61
-
62
-
This creates three CSV files: `new_links.csv`, `to_edit.csv`, `delete.csv` with the obvious contents, contained in the `update_zblinks_api/results` folder.
61
+
62
+
This creates three CSV files: `{partner}_new_links.csv`, `{partner}_to_edit.csv`, `{partner}_delete.csv` with the obvious contents, contained in the `update_zblinks_api/results` folder.
63
63
64
64
(ii) Use the command
65
65
66
66
```
67
-
csv-initial -p DLMF
67
+
csv-initial -p <partner>
68
68
```
69
-
70
-
to create two csv files with real DLMF data up to the year 2020: `DLMF_deids_table_init.csv` (to be inserted into the table `document_external_ids`) and `DLMF_source_table_init.csv` (to be inserted into the table `source`).
69
+
70
+
to create two csv files with real historical parter data: `{partner}_deids_table_init.csv` (to be inserted into the table `document_external_ids`) and `{partner}_source_table_init.csv` (to be inserted into the table `source`).
71
71
These files are contained in the `update_zblinks_api/results` folder.
72
72
73
+
(iii) Use the command
74
+
75
+
```
76
+
csv-to-db
77
+
```
78
+
79
+
to use the csv files from the output of update-api --file and export the information from the files to the database.
0 commit comments