-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpubliccode.yml
144 lines (92 loc) · 4.58 KB
/
publiccode.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# This repository adheres to the publiccode.yml standard by including this
# metadata file that makes public software easily discoverable.
# More info at https://github.com/italia/publiccode.yml
publiccodeYmlVersion: '0.2'
name: ckanext-datasetsnippets
url: 'https://github.com/berlinonline/ckanext-datasetsnippets'
releaseDate: '2022-02-22'
softwareVersion: 0.1.11
developmentStatus: stable
softwareType: addon
categories:
- it-development
- knowledge-management
maintenance:
type: internal
contacts:
- name: Dr. Knud Möller
email: knud.moeller@berlinonline.de
legal:
license: AGPL-3.0-only
mainCopyrightOwner: BerlinOnline GmbH
repoOwner: BerlinOnline GmbH
localisation:
localisationReady: false
description:
it:
genericName: ckanext-datasetsnippets
documentation: >-
https://github.com/berlinonline/ckanext-datasetsnippets?tab=readme-ov-file#ckanext-datasetsnippets
apiDocumentation: >-
https://github.com/berlinonline/ckanext-datasetsnippets?tab=readme-ov-file#api
shortDescription: >-
ckanext-datasetsnippets provides markup snippets for dataset pages and
dataset search. These snippets can be loaded from the data portal's public
CMS
longDescription: >
This plugin belongs to a set of plugins for the _Datenregister_ – the
non-public [CKAN](https://ckan.org/) instance that is part of Berlin's
open data portal [daten.berlin.de](https://daten.berlin.de/).
_ckanext-datasetsnippets_ provides markup snippets for dataset pages and
dataset search. These snippets can be loaded from the data portal's public
CMS to handle all requests for datasets.
The plugin implements the following CKAN interfaces:
-
[ITemplateHelpers](http://docs.ckan.org/en/latest/extensions/plugin-interfaces.html#ckan.plugins.interfaces.ITemplateHelpers)
-
[IBlueprint](http://docs.ckan.org/en/latest/extensions/plugin-interfaces.html#ckan.plugins.interfaces.IBlueprint)
-
[IAuthFunctions](http://docs.ckan.org/en/latest/extensions/plugin-interfaces.html#ckan.plugins.interfaces.IAuthFunctions)
## Requirements
This plugin has been tested with CKAN 2.9.9 (which requires Python 3).
## API
The Snippet API has the following two endpoints:
### `/snippet/dataset`
This is the search endpoint of the snippet API, which is equivalent to
`/dataset` in the regular CKAN UI. Without additional parameters, this
returns markup for the paginated list of all datasets. Parameters (search
facets, ordering etc.) can be use to restrict the result. The parameters
are identical to the regular CKAN search parameters.
### `/snippet/dataset/<id>`
This is the dataset detail endpoint of the snippet API, which is
equivalent to `/dataset/<id>` in the regular CKAN UI. `<id>` is the name
or id of a dataset.
### Parameters
Both endpoints allow a `root\_breadcrumb` parameter to set the root
element of the breadcrumb returned in the snippets. The
`root\_breadcrumb`-URL-parameter takes precedence over the
`datasetsnippets.default\_root\_breadcrumb` config (see below).
## Configuration
The plugin introduces the following configuration options:
### datasetsnippets.path
Defines the path component that is prefixed to links that the snippets
contain. In the regular CKAN UI, this would be `dataset`, but the site
calling the snippet API might require a different path.
datasetsnippets.path = 'datensaetze'
### datasetsnippets.datasets\_per\_page
Defines how many datasets are shown per result page in pagination. The
option is equivalent to
[ckan.datasets\_per\_page](https://docs.ckan.org/en/2.9/maintaining/configuration.html#ckan-datasets-per-page),
but only applies to the snippets and leaves the regular CKAN UI untouched.
datasetsnippets.datasets\_per\_page = 10
### datasetsnippets.default\_root\_breadcrumb
Defines the string that is used as the root element for the breadcrumb
that is part of the returned snippets.
datasetsnippets.default\_root\_breadcrumb = 'Berlin Open Data'
### datasetsnippets.datenportal\_url
Defines the url to the datenportal. The url will then be used for
generating the feeds using the provided url.
datasetsnippets.datenportal\_url = link\_to\_portal
### datasetsnippets.datenportal\_title
Defines a string that will be used as a title in the feeds.
datasetsnippets.datenportal\_title = 'Berlin Open Data'