pyCEURsemantify API Documentation
Created on 2026-10-01
@author: wf
ceursemantify_cmd
Created on 2026-10-01
@author: wf
CeurSemantifyCmd
Bases: BaseCmd
command line interface of pyCEURsemantify: generate volume pages, rebuild year pages, serve the endpoint
Source code in ceursemantify/ceursemantify_cmd.py
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 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 | |
__init__()
constructor
Source code in ceursemantify/ceursemantify_cmd.py
43 44 45 46 47 | |
add_arguments(parser)
add the arguments to the given parser
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
parser
|
ArgumentParser
|
the argument parser |
required |
Source code in ceursemantify/ceursemantify_cmd.py
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 | |
handle_args(args)
handle the parsed arguments
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
args
|
Namespace
|
the parsed arguments |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if the arguments were handled |
Source code in ceursemantify/ceursemantify_cmd.py
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 | |
show_report(title, report, args)
show the given report: problems always, written files if verbose
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
title
|
str
|
what the report is about |
required |
report
|
SiteReport
|
the report |
required |
args
|
Namespace
|
the parsed arguments |
required |
Source code in ceursemantify/ceursemantify_cmd.py
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | |
Version
dataclass
Version information for pyCEURsemantify
Source code in ceursemantify/ceursemantify_cmd.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | |
main(argv=None)
command line entry point
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
argv
|
Optional[List[str]]
|
the command line arguments |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
the exit code |
Source code in ceursemantify/ceursemantify_cmd.py
183 184 185 186 187 188 189 190 191 192 193 194 195 | |
convert
Created on 2026-10-01
@author: wf
Convert
conversions of source values to the values of the research model
Each conversion is named in resources/ceurspt_mapping.yaml and raises a ValueError for a value it can not convert.
Source code in ceursemantify/convert.py
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 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 | |
dblp_person_id(value)
classmethod
get the dblp person identifier of a dblp person url
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
Any
|
the url e.g. https://dblp.org/pid/32/7870 |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the identifier e.g. 32/7870 |
Source code in ceursemantify/convert.py
115 116 117 118 119 120 121 122 123 124 125 126 127 | |
dblp_record_id(value)
classmethod
get the dblp publication identifier of a dblp record url
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
Any
|
the url e.g. https://dblp.org/rec/conf/semtab/X24 |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the identifier e.g. conf/semtab/X24 |
Source code in ceursemantify/convert.py
129 130 131 132 133 134 135 136 137 138 139 140 141 | |
file_stem(value)
classmethod
get the file name without extension of an url
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
Any
|
the url e.g. https://ceur-ws.org/Vol-3889/paper0.pdf |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the stem e.g. paper0 |
Source code in ceursemantify/convert.py
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 | |
integer(value)
classmethod
convert the given value to an integer
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
Any
|
the source value |
required |
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
the integer |
Source code in ceursemantify/convert.py
36 37 38 39 40 41 42 43 44 45 46 47 48 | |
iso_date(value)
classmethod
check that the given value is an ISO date
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
Any
|
the source date |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the date as YYYY-MM-DD |
Source code in ceursemantify/convert.py
67 68 69 70 71 72 73 74 75 76 77 78 79 | |
last_path_parts(value, marker)
classmethod
get the part of the path of an url that follows the given marker
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
Any
|
the url or an identifier without url |
required |
marker
|
str
|
the path segment the identifier follows e.g. /pid/ |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the identifier |
Source code in ceursemantify/convert.py
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | |
page_end(value)
classmethod
get the last page of a page range
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
Any
|
the page range |
required |
Returns:
| Type | Description |
|---|---|
Optional[str]
|
Optional[str]: the last page |
Source code in ceursemantify/convert.py
192 193 194 195 196 197 198 199 200 201 202 203 204 | |
page_part(value, index)
classmethod
get the first or last page of a page range such as 1-11
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
Any
|
the page range or a single page |
required |
index
|
int
|
0 for the first page, -1 for the last page |
required |
Returns:
| Type | Description |
|---|---|
Optional[str]
|
Optional[str]: the page |
Source code in ceursemantify/convert.py
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 | |
page_start(value)
classmethod
get the first page of a page range
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
Any
|
the page range |
required |
Returns:
| Type | Description |
|---|---|
Optional[str]
|
Optional[str]: the first page |
Source code in ceursemantify/convert.py
178 179 180 181 182 183 184 185 186 187 188 189 190 | |
text(value)
classmethod
normalize whitespace: line breaks and runs of blanks become one blank
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
Any
|
the source text |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the single line text |
Source code in ceursemantify/convert.py
22 23 24 25 26 27 28 29 30 31 32 33 34 | |
volume_number(value)
classmethod
get the volume number of a volume identifier such as Vol-3889
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
Any
|
the volume identifier |
required |
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
the volume number |
Source code in ceursemantify/convert.py
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | |
wikidata_id(value)
classmethod
get the Q-identifier of a Wikidata entity url or identifier
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
Any
|
the entity url or Q-identifier |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the Q-identifier |
Source code in ceursemantify/convert.py
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | |
early_volume_html
Created on 2026-10-18
Input mapping of the early volume pages without CEUR marks: free form html with the papers as links in list items, table rows or paragraphs, partly as PostScript only, see https://github.com/ceurws/semantify/issues/26 and https://github.com/ceurws/semantify/issues/39
@author: wf
EarlyVolumeHtml
Bases: VolumeHtml
an early volume page without the CEUR marks of the volume template
Source code in ceursemantify/early_volume_html.py
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 | |
document_of(href)
get the stem and extension of a link to a document of the volume itself
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
href
|
Optional[str]
|
the href of the link |
required |
Returns:
| Type | Description |
|---|---|
Optional[Tuple[str, str]]
|
Optional[Tuple[str, str]]: the stem and the extension, None for other links and for documents outside the volume |
Source code in ceursemantify/early_volume_html.py
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | |
papers(url, result)
get the papers of the volume: every document of the volume itself the page links, one paper per file stem in the order of the page
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
url
|
str
|
the url of the volume |
required |
result
|
MappingResult
|
the mapping result to report issues to |
required |
Returns:
| Type | Description |
|---|---|
List[Paper]
|
List[Paper]: the papers, the pdfUrl is the official PDF also when only a PostScript file exists, see https://github.com/ceurws/semantify/issues/39 |
Source code in ceursemantify/early_volume_html.py
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 | |
title_of(link)
get the title of the paper the given link belongs to
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
link
|
Tag
|
the link to the document of the paper |
required |
Returns:
| Type | Description |
|---|---|
Optional[str]
|
Optional[str]: the text of the entry when it holds only this paper, the link text otherwise |
Source code in ceursemantify/early_volume_html.py
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | |
volume_number_of(result)
get the volume number from the Vol-N of the path, the page has no CEURVOLNR see https://github.com/ceurws/semantify/issues/37
Source code in ceursemantify/early_volume_html.py
110 111 112 113 114 115 | |
embed
Created on 2026-10-13
@author: wf
Embedder
embed the JSON-LD into the volume page of the proceedings chair: the state comment before the html element, the alternate link and the fence in the head; the markup of the chair is otherwise untouched
Source code in ceursemantify/embed.py
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 | |
__init__(state)
constructor
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
state
|
PageState
|
the state the page announces |
required |
Source code in ceursemantify/embed.py
28 29 30 31 32 33 34 35 | |
embed(html_text, jsonld_text, source)
embed the given JSON-LD into the given page, replacing an earlier embedding
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
html_text
|
str
|
the html of a volume page |
required |
jsonld_text
|
str
|
the pretty printed JSON-LD |
required |
source
|
str
|
what the JSON-LD was derived from e.g. the url of the volume |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the html with the JSON-LD embedded |
Raises:
| Type | Description |
|---|---|
ValueError
|
if the page has no html or no head element |
Source code in ceursemantify/embed.py
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 | |
strip(html_text)
remove the embedded parts from the given page
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
html_text
|
str
|
the html of a volume page |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the html without state comment, alternate link and fence |
Source code in ceursemantify/embed.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 | |
endpoint
Created on 2026-10-01
@author: wf
LoadReport
dataclass
what was loaded into the endpoint
Source code in ceursemantify/endpoint.py
16 17 18 19 20 21 22 23 24 | |
SptEndpoint
single point of truth endpoint: the JSON-LD files of the site loaded into memory on startup and served by the NPQ endpoint of pyLoDStorage, see https://cr.bitplan.com/index.php/NPQ-FakeSparql
Source code in ceursemantify/endpoint.py
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 | |
__init__(site, name='ceur-ws')
constructor
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
site
|
Site
|
the directory tree with the JSON-LD files |
required |
name
|
str
|
the name the graph is served under: /npq/ |
'ceur-ws'
|
Source code in ceursemantify/endpoint.py
34 35 36 37 38 39 40 41 42 43 44 | |
load()
load all JSON-LD files of the site into the graph
Returns:
| Name | Type | Description |
|---|---|---|
LoadReport |
LoadReport
|
number of files and triples and the time used |
Source code in ceursemantify/endpoint.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | |
serve(host='127.0.0.1', port=9987)
serve the graph over the SPARQL protocol
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
host
|
str
|
the host to listen on |
'127.0.0.1'
|
port
|
int
|
the port to listen on |
9987
|
Source code in ceursemantify/endpoint.py
62 63 64 65 66 67 68 69 70 71 72 | |
generator
Created on 2026-10-01
@author: wf
Generator
generate the pages of volumes and years of the site
Source code in ceursemantify/generator.py
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 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 | |
__init__(site, config, mapper, jsonld, spt, state=None)
constructor
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
site
|
Site
|
the directory tree to generate into |
required |
config
|
SiteConfig
|
the site configuration |
required |
mapper
|
Mapper
|
the mapper of the source records to the research model |
required |
jsonld
|
JsonLd
|
the JSON-LD support of the research model |
required |
spt
|
CeurSpt
|
the service that provides the source records |
required |
state
|
Optional[PageState]
|
the state the pages announce, generated today if None |
None
|
Source code in ceursemantify/generator.py
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 | |
embed_volume(path, report, yaml=False)
embed the JSON-LD into the volume page of the proceedings chair at the given path and write index.jsonld next to it, see issue 28
The page is rewritten only if the round trip holds: the proceedings parsed from the embedded page equal the proceedings parsed from the original page.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
the index.html of the volume or its directory |
required |
report
|
SiteReport
|
the report to add the written files and problems to |
required |
yaml
|
bool
|
if True also write index.yaml, the human-editable record, see issue 59 |
False
|
Source code in ceursemantify/generator.py
290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 | |
embed_volumes(paths, progress=False, yaml=False)
embed the JSON-LD into the volume pages at the given paths
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
paths
|
List[str]
|
the index.html files of the volumes or their directories |
required |
progress
|
bool
|
if True show a progress bar |
False
|
yaml
|
bool
|
if True also write index.yaml per volume, see issue 59 |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
SiteReport |
SiteReport
|
the written files, the problems and the time used |
Source code in ceursemantify/generator.py
333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 | |
fetch_proceedings(number, report)
fetch the source record of the volume with the given number and map it to the research model
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
number
|
int
|
the volume number |
required |
report
|
SiteReport
|
the report to add problems to |
required |
Returns:
| Type | Description |
|---|---|
Optional[Proceedings]
|
Optional[Proceedings]: the proceedings, None if the record could not be fetched |
Source code in ceursemantify/generator.py
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | |
generate_paths(paths, progress=False, in_place=False, yaml=False)
generate the pages of the volumes from their local volume pages instead of ceur-spt, see issues 33 and 34; the volume pages are not touched unless in_place is set, see issue 43: then the volume page, its index.jsonld and the paper pages are written into the volume directory itself and the year tree of the site is not used
A volume that can not be read or has no event start date is not written and reported as a problem. Year pages are not touched.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
paths
|
List[str]
|
the index.html files of the volumes or their directories |
required |
progress
|
bool
|
if True show a progress bar |
False
|
in_place
|
bool
|
if True write into the volume directories of the given pages |
False
|
yaml
|
bool
|
if True read each volume from its index.yaml, see issue 59 |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
SiteReport |
SiteReport
|
the written files, the problems and the time used |
Source code in ceursemantify/generator.py
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 | |
generate_volumes(numbers, progress=False)
generate the pages of the volumes with the given numbers
A volume that can not be fetched or has no event start date is not written and reported as a problem. Year pages are not touched.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
numbers
|
List[int]
|
the volume numbers |
required |
progress
|
bool
|
if True show a progress bar |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
SiteReport |
SiteReport
|
the written files, the problems and the time used |
Source code in ceursemantify/generator.py
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | |
of_output(output_dir, config=None)
classmethod
create a generator for the given output directory
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
output_dir
|
str
|
the directory that holds the year directories |
required |
config
|
Optional[SiteConfig]
|
the site configuration, the default configuration if None |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
Generator |
Generator
|
the generator |
Source code in ceursemantify/generator.py
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | |
read_proceedings(path, report, yaml=False)
read the proceedings from the local volume page at the given path, an embedded page from its JSON-LD, see issues 33 and 34; with yaml from the index.yaml next to the page, the human-editable record, see issue 59
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
the index.html of the volume or its directory |
required |
report
|
SiteReport
|
the report to add problems to |
required |
yaml
|
bool
|
if True read the index.yaml next to the page |
False
|
Returns:
| Type | Description |
|---|---|
Optional[Proceedings]
|
Optional[Proceedings]: the proceedings, None if the page could not be read |
Source code in ceursemantify/generator.py
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 | |
rebuild_year(year)
rebuild the page of the given year from the volumes present for it
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
year
|
int
|
the year |
required |
Returns:
| Name | Type | Description |
|---|---|---|
SiteReport |
SiteReport
|
the written file, the problems and the time used |
Source code in ceursemantify/generator.py
249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 | |
regenerate_year(year, progress=False)
regenerate the given year: fetch and write the volumes present for the year again and rebuild the page of the year
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
year
|
int
|
the year |
required |
progress
|
bool
|
if True show a progress bar |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
SiteReport |
SiteReport
|
the written files, the problems and the time used |
Source code in ceursemantify/generator.py
270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 | |
round_trip(page_dir)
check the round trip of a generated volume or paper: the JSON-LD extracted from the fence of index.html equals index.jsonld
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
page_dir
|
str
|
the directory of the volume or paper |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if the page has exactly one json-ld fence and the documents are equal |
Source code in ceursemantify/generator.py
352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 | |
write_paper(proceedings, paper, report, paper_dir)
write the page and the JSON-LD file of the given paper
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
proceedings
|
Proceedings
|
the proceedings the paper is published in |
required |
paper
|
Paper
|
the paper, with an id |
required |
report
|
SiteReport
|
the report to add the written files to |
required |
paper_dir
|
str
|
the directory to write to |
required |
Source code in ceursemantify/generator.py
170 171 172 173 174 175 176 177 178 179 180 181 182 | |
write_volume(proceedings, report, volume_dir=None)
write the page and the JSON-LD file of the given proceedings
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
proceedings
|
Proceedings
|
the proceedings, with a year |
required |
report
|
SiteReport
|
the report to add the written files to |
required |
volume_dir
|
Optional[str]
|
the directory to write to, the year tree of the site if None |
None
|
Source code in ceursemantify/generator.py
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 | |
yaml_path(path)
classmethod
get the path of the index.yaml next to the given index.html
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
the path of the index.html |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the path of the index.yaml |
Source code in ceursemantify/generator.py
137 138 139 140 141 142 143 144 145 146 147 148 149 | |
jsonld
Created on 2026-10-01
@author: wf
JsonLd
JSON-LD of the research model according to the context table resources/context.yaml
Source code in ceursemantify/jsonld.py
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 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | |
__init__(table)
constructor
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
table
|
Dict[str, Any]
|
the context table: namespaces, provisional terms and classes |
required |
Source code in ceursemantify/jsonld.py
23 24 25 26 27 28 29 30 31 | |
as_text(instance)
get the pretty printed JSON-LD document of the given object
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
instance
|
Any
|
the object e.g. a Proceedings or a Paper |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the JSON-LD with an indent of two |
Source code in ceursemantify/jsonld.py
143 144 145 146 147 148 149 150 151 152 153 154 | |
context()
get the JSON-LD context: the namespaces and per class a type scoped context with the terms of its fields
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Dict[str, Any]: the value of @context |
Source code in ceursemantify/jsonld.py
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | |
default_table_path()
classmethod
get the path of the context table
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the path of resources/context.yaml |
Source code in ceursemantify/jsonld.py
33 34 35 36 37 38 39 40 41 42 | |
document(instance)
get the JSON-LD document of the given object of the research model
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
instance
|
Any
|
the object e.g. a Proceedings or a Paper |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Dict[str, Any]: the document with @context |
Source code in ceursemantify/jsonld.py
129 130 131 132 133 134 135 136 137 138 139 140 141 | |
node(instance)
get the JSON-LD node of the given object of the research model
Fields without value are left out.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
instance
|
Any
|
the object e.g. a Proceedings |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Dict[str, Any]: the node with @type and, if the class has an id field, @id |
Source code in ceursemantify/jsonld.py
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 | |
of_yaml(path=None)
classmethod
create the JSON-LD support from the given context table
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
Optional[str]
|
the path of the yaml file, the default table if None |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
JsonLd |
JsonLd
|
the JSON-LD support |
Source code in ceursemantify/jsonld.py
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | |
paper(document)
get the paper of the given JSON-LD document
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
document
|
Dict[str, Any]
|
a document as created by the document method for a paper |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Paper |
Paper
|
the paper |
Source code in ceursemantify/jsonld.py
186 187 188 189 190 191 192 193 194 195 196 197 | |
plain(value)
remove the JSON-LD keywords from the given value
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
Any
|
a node, a list of nodes or a plain value |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
the value without the keys that start with @ |
Source code in ceursemantify/jsonld.py
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | |
proceedings(document)
get the proceedings of the given JSON-LD document
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
document
|
Dict[str, Any]
|
a document as created by the document method |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Proceedings |
Proceedings
|
the proceedings |
Source code in ceursemantify/jsonld.py
173 174 175 176 177 178 179 180 181 182 183 184 | |
term_definition(term)
get the JSON-LD term definition for the given row of the context table
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
term
|
Dict[str, Any]
|
the row: id or reverse, optionally type and container |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Dict[str, Any]: the term definition |
Source code in ceursemantify/jsonld.py
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | |
loctime
Created on 2026-10-13
@author: wf
LocTime
dataclass
location and time of an event as given in the CEURLOCTIME text of a volume page e.g. Verona, Italy, June 8-12, 2026
Source code in ceursemantify/loctime.py
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 | |
iso_date(year, month, day)
classmethod
get the ISO date of the given parts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
year
|
str
|
the four digit year |
required |
month
|
str
|
the month name, full or abbreviated |
required |
day
|
str
|
the day, with an optional ordinal suffix |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the date as YYYY-MM-DD |
Raises:
| Type | Description |
|---|---|
ValueError
|
if the parts are not a valid date |
Source code in ceursemantify/loctime.py
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | |
parse(text)
classmethod
parse the given location and time text
The date is the last part of the text; what is before it is the location, its first comma separated part the city and its last part the country. An online or virtual location has no city and no country.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
the text e.g. Verona, Italy, June 8-12, 2026 |
required |
Returns:
| Name | Type | Description |
|---|---|---|
LocTime |
LocTime
|
the location and time, with a message if the date could not be parsed |
Source code in ceursemantify/loctime.py
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 | |
mapper
Created on 2026-10-01
@author: wf
Mapper
map source records to the research model as declared in a mapping table
Source code in ceursemantify/mapper.py
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 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 | |
__init__(mapping)
constructor
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mapping
|
Dict[str, Any]
|
the mapping table: per target class the fields and the ignored source keys |
required |
Source code in ceursemantify/mapper.py
47 48 49 50 51 52 53 54 | |
convert(value, rule, result)
convert a source value according to the given rule
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
Any
|
the source value |
required |
rule
|
Dict[str, Any]
|
the rule of the mapping table for the target field |
required |
result
|
MappingResult
|
the mapping result to add issues to |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
the converted value, None if the value could not be converted |
Source code in ceursemantify/mapper.py
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | |
default_mapping_path()
classmethod
get the path of the mapping table for the JSON-LD of ceur-spt
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the path of resources/ceurspt_mapping.yaml |
Source code in ceursemantify/mapper.py
56 57 58 59 60 61 62 63 64 65 | |
map_nested(value, class_name, into, result)
map a nested source value to an object or a list of objects
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
Any
|
a source record, a list of source records or a plain value |
required |
class_name
|
str
|
the name of the target class |
required |
into
|
Optional[str]
|
the field of the target class that takes a plain value |
required |
result
|
MappingResult
|
the mapping result to add issues to |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
the object or list of objects |
Source code in ceursemantify/mapper.py
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | |
map_record(record, class_name)
map the given source record to an object of the given class
Source keys that are neither mapped nor ignored and values that can not be converted are reported as issues.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
record
|
Dict[str, Any]
|
the source record |
required |
class_name
|
str
|
the name of the target class e.g. Proceedings |
required |
Returns:
| Name | Type | Description |
|---|---|---|
MappingResult |
MappingResult
|
the object and the issues |
Source code in ceursemantify/mapper.py
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 | |
of_yaml(path=None)
classmethod
create a mapper from the given mapping table
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
Optional[str]
|
the path of the yaml file, the ceur-spt mapping if None |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
Mapper |
Mapper
|
the mapper |
Source code in ceursemantify/mapper.py
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | |
target_class(class_name)
get the class of the research model with the given name
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
class_name
|
str
|
the name of the class e.g. Proceedings |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Type |
Type
|
the class |
Source code in ceursemantify/mapper.py
85 86 87 88 89 90 91 92 93 94 95 96 | |
MappingIssue
dataclass
a source value that could not be mapped
Source code in ceursemantify/mapper.py
17 18 19 20 21 22 23 24 25 26 27 28 29 | |
MappingResult
dataclass
the result of mapping one source record
Source code in ceursemantify/mapper.py
32 33 34 35 36 37 38 39 | |
model
Created on 2026-10-01
Research model of CEUR-WS: the core entities and CrSchema of https://cr.bitplan.com/index.php/CoreEntities and https://cr.bitplan.com/index.php/CrSchema
Field names follow CrSchema. Where CrSchema has no property the term of the CEUR-WS proceedings ontology in the ontology directory is used. Fields that have a term in neither are listed as provisional in resources/context.yaml.
@author: wf
City
large permanent human settlement
Source code in ceursemantify/model.py
22 23 24 25 26 27 28 29 | |
Country
distinct region in geography
Source code in ceursemantify/model.py
32 33 34 35 36 37 38 39 | |
Event
a meeting of researchers at a specific time and place
Source code in ceursemantify/model.py
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 | |
year()
get the year of the event
Returns:
| Type | Description |
|---|---|
Optional[int]
|
Optional[int]: the year of the start date, None if there is no start date |
Source code in ceursemantify/model.py
114 115 116 117 118 119 120 121 122 123 124 | |
Paper
a paper is e.g. a scholarly article
Source code in ceursemantify/model.py
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 | |
publish_in(url)
set the volume the paper is published in and the landing page of the paper under it, the directory named by the paper id, see issue 32
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
url
|
str
|
the url of the volume e.g. https://ceur-ws.org/Vol-4298/ |
required |
Source code in ceursemantify/model.py
148 149 150 151 152 153 154 155 156 157 158 | |
Proceedings
a collection of papers mostly documenting the results of an academic event
Source code in ceursemantify/model.py
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 | |
year()
get the year the proceedings belong to: the year of the event
Returns:
| Type | Description |
|---|---|
Optional[int]
|
Optional[int]: the year, None if there is no event start date |
Source code in ceursemantify/model.py
184 185 186 187 188 189 190 191 192 193 194 | |
Publisher
organization that publishes proceedings
Source code in ceursemantify/model.py
42 43 44 45 46 47 48 49 | |
Scholar
person who engages in research
Source code in ceursemantify/model.py
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 | |
full_name()
get first name and last name of the scholar
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the name parts that are set, separated by a blank |
Source code in ceursemantify/model.py
83 84 85 86 87 88 89 90 91 92 | |
of_full_name(full_name)
classmethod
get a scholar from a full name as written on a volume page
The last word is taken as the family name, the words before it as the first name; a heuristic that fails e.g. for Spanish double surnames.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
full_name
|
str
|
the name e.g. Mieke Jans |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Scholar |
Scholar
|
the scholar |
Source code in ceursemantify/model.py
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | |
pages
Created on 2026-10-01
HTML pages of the generated site: each view has an as_html method that escapes its values first and then fills a multiline f-string.
@author: wf
Fence
JSON-LD as semantify³ fence in an html comment
Source code in ceursemantify/pages.py
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 | |
as_html(jsonld_text)
classmethod
get the html comment with the json-ld fence
An html comment ends at the first -->; the JSON string escape \u003e for > keeps the JSON equal and the comment intact.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
jsonld_text
|
str
|
the JSON-LD |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the html comment |
Source code in ceursemantify/pages.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | |
Header
the page header: an html snippet outside the code with {{ variable }} placeholders that are filled by the parameter handling of pyLoDStorage
Source code in ceursemantify/pages.py
763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 | |
__init__(config)
constructor
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
SiteConfig
|
the site configuration with the path of the snippet, without a path the header is the title as plain heading |
required |
Source code in ceursemantify/pages.py
769 770 771 772 773 774 775 776 777 778 779 780 781 | |
as_html(title)
get the header for the page with the given title
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
title
|
str
|
the title of the page |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the snippet with all placeholders filled |
Raises:
| Type | Description |
|---|---|
ValueError
|
if the snippet uses a variable that is not available |
Source code in ceursemantify/pages.py
818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 | |
value(raw_value)
prepare the given value for a placeholder
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
raw_value
|
Any
|
the value |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the escaped text; a backslash and an opening brace are given as character references since the parameter handling replaces by regular expression and a value must not introduce a placeholder |
Source code in ceursemantify/pages.py
783 784 785 786 787 788 789 790 791 792 793 794 795 796 | |
values(title)
get the values of the variables a snippet may use
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
title
|
str
|
the title of the page |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, str]
|
Dict[str, str]: the escaped value by variable name |
Source code in ceursemantify/pages.py
798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 | |
PageState
dataclass
the state a page announces in its header comment
Source code in ceursemantify/pages.py
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 | |
as_html(source, state='generated')
get the header comment
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
str
|
what the page was generated from |
required |
state
|
str
|
generated for a page written by the generator, embedded for the page of the proceedings chair with the JSON-LD embedded |
'generated'
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the html comment |
Source code in ceursemantify/pages.py
108 109 110 111 112 113 114 115 116 117 118 119 120 121 | |
today()
classmethod
get the state for a page generated today
Returns:
| Name | Type | Description |
|---|---|---|
PageState |
PageState
|
the state |
Source code in ceursemantify/pages.py
97 98 99 100 101 102 103 104 105 106 | |
PaperPage
the landing page of one paper
Source code in ceursemantify/pages.py
591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 | |
__init__(paper, proceedings, config, jsonld, state)
constructor
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
paper
|
Paper
|
the paper |
required |
proceedings
|
Proceedings
|
the proceedings the paper is published in |
required |
config
|
SiteConfig
|
the site configuration |
required |
jsonld
|
JsonLd
|
the JSON-LD support of the research model |
required |
state
|
PageState
|
the state to announce |
required |
Source code in ceursemantify/pages.py
596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 | |
as_html()
get the complete page
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the html document |
Source code in ceursemantify/pages.py
705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 | |
author_as_html(author)
get one author with the links to the identifiers
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
author
|
Scholar
|
the author |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the html list item |
Source code in ceursemantify/pages.py
644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 | |
highwire_as_html()
get the Highwire tags as meta elements of the head
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the html meta elements, one per line |
Source code in ceursemantify/pages.py
693 694 695 696 697 698 699 700 701 702 703 | |
highwire_tags()
get the Highwire tags of the paper for Google Scholar, see issue 50: each tag is a walk from the paper node of the core entities, a walk that ends in an empty field gives no tag
Returns:
| Type | Description |
|---|---|
List[Tuple[str, str]]
|
List[Tuple[str, str]]: name and content per tag, in document order |
Source code in ceursemantify/pages.py
660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 | |
jsonld_text()
get the pretty printed JSON-LD of the paper
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the JSON-LD |
Source code in ceursemantify/pages.py
613 614 615 616 617 618 619 620 621 | |
navigation_as_html()
get the links to the previous and the next paper of the volume
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the html paragraph |
Source code in ceursemantify/pages.py
623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 | |
PaperView
html view of a paper in the table of contents
Source code in ceursemantify/pages.py
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 | |
__init__(paper)
constructor
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
paper
|
Paper
|
the paper |
required |
Source code in ceursemantify/pages.py
189 190 191 192 193 194 195 196 | |
as_html()
get the table of contents entry of the paper
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the html list item |
Source code in ceursemantify/pages.py
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 | |
pages_as_html()
get the page range of the paper
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the html span, empty if the paper has no pages |
Source code in ceursemantify/pages.py
198 199 200 201 202 203 204 205 206 207 208 209 210 | |
ScholarView
html view of a scholar
Source code in ceursemantify/pages.py
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | |
__init__(scholar)
constructor
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scholar
|
Scholar
|
the scholar |
required |
Source code in ceursemantify/pages.py
137 138 139 140 141 142 143 144 | |
as_html(css_class)
get the name of the scholar as a span
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
css_class
|
str
|
the CEUR-WS class of the span e.g. CEURAUTHOR |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the html span |
Source code in ceursemantify/pages.py
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | |
identifiers_as_html()
get the links to the identifiers of the scholar
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the html links, empty if the scholar has no identifiers |
Source code in ceursemantify/pages.py
167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | |
VolumePage
the page of the proceedings of one volume
Source code in ceursemantify/pages.py
243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 | |
__init__(proceedings, config, jsonld, state, in_place=False)
constructor
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
proceedings
|
Proceedings
|
the proceedings |
required |
config
|
SiteConfig
|
the site configuration |
required |
jsonld
|
JsonLd
|
the JSON-LD support of the research model |
required |
state
|
PageState
|
the state to announce |
required |
in_place
|
bool
|
if True the page replaces the volume page of the original site, see issue 44 |
False
|
Source code in ceursemantify/pages.py
248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 | |
acronym_as_html()
get the acronym of the event, linked to its homepage if there is one
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the html span or link |
Source code in ceursemantify/pages.py
400 401 402 403 404 405 406 407 408 409 410 411 412 413 | |
as_html()
get the complete page
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the html document |
Source code in ceursemantify/pages.py
546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 | |
colocated_as_html()
get the event the event of the proceedings is co-located with
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the html text, empty if the event is not co-located |
Source code in ceursemantify/pages.py
415 416 417 418 419 420 421 422 423 424 425 426 427 428 | |
editors_as_html()
get the editors of the proceedings
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the html paragraph and heading |
Source code in ceursemantify/pages.py
454 455 456 457 458 459 460 461 462 463 464 465 466 | |
footer_as_html()
get the footer with publication date, series and checker link
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the html span |
Source code in ceursemantify/pages.py
528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 | |
head_as_html()
get the head of the page
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the html head element |
Source code in ceursemantify/pages.py
300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 | |
header_as_html()
get the header with volume number, URN and copyright
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the html table |
Source code in ceursemantify/pages.py
364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 | |
jsonld_text()
get the pretty printed JSON-LD of the proceedings
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the JSON-LD |
Source code in ceursemantify/pages.py
290 291 292 293 294 295 296 297 298 | |
license_as_html()
get the license of the proceedings as in the copyright text of the Vol-XXX template, see issue 44
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the license name with the abbreviation linked to the license, the bare URL for an unknown license |
Source code in ceursemantify/pages.py
348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 | |
links_as_html()
get the links to the original volume, its copy and the year; a page in place is the original and has no year tree, so it has no such links
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the html paragraph, empty in place |
Source code in ceursemantify/pages.py
321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 | |
original_url()
get the url of the volume at the original site
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the url |
Source code in ceursemantify/pages.py
267 268 269 270 271 272 273 274 275 | |
page_url()
get the url the page is served from
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the url |
Source code in ceursemantify/pages.py
277 278 279 280 281 282 283 284 285 286 287 288 | |
summary_as_html()
get the summary sentence with the numbers of submitted and accepted papers as in the Vol-XXX template, see issue 54
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the html paragraph, empty if the proceedings have neither number |
Source code in ceursemantify/pages.py
501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 | |
title_as_html()
get the headings with acronym, title, location and time
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the html headings |
Source code in ceursemantify/pages.py
430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 | |
toc_as_html()
get the table of contents
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the html division |
Source code in ceursemantify/pages.py
468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 | |
YearEntry
the entry of one volume on the page of its year
Source code in ceursemantify/pages.py
842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 | |
__init__(proceedings, config)
constructor
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
proceedings
|
Proceedings
|
the proceedings |
required |
config
|
SiteConfig
|
the site configuration |
required |
Source code in ceursemantify/pages.py
847 848 849 850 851 852 853 854 855 856 | |
as_html()
get the entry
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the html division |
Source code in ceursemantify/pages.py
858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 | |
YearPage
the page of one year with the volumes whose event started in that year
Source code in ceursemantify/pages.py
888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 | |
__init__(year, proceedings_list, years, config, state)
constructor
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
year
|
int
|
the year |
required |
proceedings_list
|
List[Proceedings]
|
the proceedings of the year |
required |
years
|
List[int]
|
all years that have a page |
required |
config
|
SiteConfig
|
the site configuration |
required |
state
|
PageState
|
the state to announce |
required |
Source code in ceursemantify/pages.py
893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 | |
as_html()
get the complete page
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the html document |
Source code in ceursemantify/pages.py
943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 | |
entries_as_html()
get the entries of the volumes, the highest volume number first
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the html divisions |
Source code in ceursemantify/pages.py
931 932 933 934 935 936 937 938 939 940 941 | |
navigation_as_html()
get the links to the previous and the next year, where those exist
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the html paragraph |
Source code in ceursemantify/pages.py
912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 | |
doi_as_html(doi)
get the DOI linked to its resolver, see issue 14
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
doi
|
Any
|
the DOI, None gives the empty string |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the html span, empty if there is no DOI |
Source code in ceursemantify/pages.py
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | |
esc(value)
escape the given value for use in html text and attributes
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
Any
|
the value, None gives the empty string |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the escaped text |
Source code in ceursemantify/pages.py
24 25 26 27 28 29 30 31 32 33 34 35 36 | |
register-dois
doiPrefix = config.get('doiPrefix', '')
module-attribute
Possible return codes from DataCite REST API
200 DOI updated 201 DOI registered 422 This DOI has already been taken
see https://support.datacite.org/docs/api-error-codes
site
Created on 2026-10-01
@author: wf
CeurSpt
access to the JSON-LD of volumes as served by ceur-spt
Source code in ceursemantify/site.py
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 | |
__init__(spt_url, timeout=60.0)
constructor
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
spt_url
|
str
|
the base url of the service, http, https or file |
required |
timeout
|
float
|
the time in seconds to wait for an answer |
60.0
|
Source code in ceursemantify/site.py
73 74 75 76 77 78 79 80 81 82 83 84 | |
volume_record(number)
fetch the JSON-LD of the volume with the given number
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
number
|
int
|
the volume number |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Dict[str, Any]: the JSON-LD document |
Raises:
| Type | Description |
|---|---|
OSError
|
if the service does not answer or answers with an error |
ValueError
|
if the answer is not JSON |
Source code in ceursemantify/site.py
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | |
volume_text(number)
fetch the text of the JSON-LD of the volume with the given number
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
number
|
int
|
the volume number |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the text |
Raises:
| Type | Description |
|---|---|
OSError
|
if the service does not answer or answers with an error |
Source code in ceursemantify/site.py
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | |
volume_url(number)
get the url of the JSON-LD of the volume with the given number
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
number
|
int
|
the volume number |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the url |
Source code in ceursemantify/site.py
86 87 88 89 90 91 92 93 94 95 96 97 | |
Site
the directory tree of the generated pages:
Source code in ceursemantify/site.py
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 | |
__init__(root, jsonld)
constructor
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
root
|
str
|
the directory that holds the year directories |
required |
jsonld
|
JsonLd
|
the JSON-LD support of the research model |
required |
Source code in ceursemantify/site.py
190 191 192 193 194 195 196 197 198 199 | |
jsonld_paths(year=None)
get the paths of the JSON-LD files of the volumes
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
year
|
Optional[int]
|
the year to get the files for, all years if None |
None
|
Returns:
| Type | Description |
|---|---|
List[str]
|
List[str]: the sorted paths of the index.jsonld files |
Source code in ceursemantify/site.py
255 256 257 258 259 260 261 262 263 264 265 266 267 268 | |
paper_dir(proceedings, paper_id)
get the directory of the paper with the given id
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
proceedings
|
Proceedings
|
the proceedings the paper is published in |
required |
paper_id
|
str
|
the id of the paper e.g. paper1 |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the path |
Source code in ceursemantify/site.py
227 228 229 230 231 232 233 234 235 236 237 238 239 | |
proceedings_of_year(year)
get the proceedings that are present for the given year
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
year
|
int
|
the year |
required |
Returns:
| Type | Description |
|---|---|
List[Proceedings]
|
List[Proceedings]: the proceedings |
Source code in ceursemantify/site.py
299 300 301 302 303 304 305 306 307 308 309 310 | |
read_proceedings(path)
read the proceedings of the given JSON-LD file
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
the path of an index.jsonld file |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Proceedings |
Proceedings
|
the proceedings |
Source code in ceursemantify/site.py
284 285 286 287 288 289 290 291 292 293 294 295 296 297 | |
volume_dir(proceedings)
get the directory of the given proceedings
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
proceedings
|
Proceedings
|
the proceedings, with a year and a volume number |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the path |
Source code in ceursemantify/site.py
214 215 216 217 218 219 220 221 222 223 224 225 | |
volume_numbers(year)
get the numbers of the volumes that are present for the given year
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
year
|
int
|
the year |
required |
Returns:
| Type | Description |
|---|---|
List[int]
|
List[int]: the sorted volume numbers |
Source code in ceursemantify/site.py
270 271 272 273 274 275 276 277 278 279 280 281 282 | |
write(path, content, report)
write the given content to the given file
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
the path of the file |
required |
content
|
str
|
the content |
required |
report
|
SiteReport
|
the report to add the path to |
required |
Source code in ceursemantify/site.py
241 242 243 244 245 246 247 248 249 250 251 252 253 | |
year_dir(year)
get the directory of the given year
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
year
|
int
|
the year |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the path |
Source code in ceursemantify/site.py
201 202 203 204 205 206 207 208 209 210 211 212 | |
years()
get the years that have a directory
Returns:
| Type | Description |
|---|---|
List[int]
|
List[int]: the sorted years |
Source code in ceursemantify/site.py
312 313 314 315 316 317 318 319 320 321 322 | |
SiteConfig
configuration of the generated site, see resources/site.yaml
Source code in ceursemantify/site.py
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 | |
default_path()
classmethod
get the path of the default site configuration
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the path of resources/site.yaml |
Source code in ceursemantify/site.py
36 37 38 39 40 41 42 43 44 45 | |
of_yaml(path=None)
classmethod
load the site configuration
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
Optional[str]
|
the path of the yaml file, the default configuration if None |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
SiteConfig |
SiteConfig
|
the configuration, with the path of the header resolved against the directory of the yaml file |
Source code in ceursemantify/site.py
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | |
SiteReport
what a run wrote and what it could not handle
Source code in ceursemantify/site.py
173 174 175 176 177 178 179 180 181 | |
VolumeRanges
volume numbers given as numbers and ranges e.g. 3889 3887-3912
Source code in ceursemantify/site.py
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | |
numbers(ranges)
classmethod
get the volume numbers of the given numbers and ranges
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ranges
|
List[str]
|
numbers such as 3889 and ranges such as 3887-3912 |
required |
Returns:
| Type | Description |
|---|---|
List[int]
|
List[int]: the sorted volume numbers without duplicates |
Raises:
| Type | Description |
|---|---|
ValueError
|
if a range is not a number or two numbers separated by a hyphen |
Source code in ceursemantify/site.py
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | |
volume_html
Created on 2026-10-13
Input mapping of a volume page as submitted by the proceedings chair (https://ceur-ws.org/Vol-XXX/index.html template) to the research model, see https://github.com/ceurws/semantify/issues/28
@author: wf
VolumeHtml
a volume page with the CEUR* marks of the volume template
Source code in ceursemantify/volume_html.py
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 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 | |
__init__(text, base_url='https://ceur-ws.org', volume_number=None)
constructor
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
the html of the volume page |
required |
base_url
|
str
|
the url of the site the volume is published on |
'https://ceur-ws.org'
|
volume_number
|
Optional[int]
|
the number of the volume for pages without CEURVOLNR |
None
|
Source code in ceursemantify/volume_html.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | |
decode(raw)
classmethod
decode the bytes of a volume page with its declared charset, then with the fallback encodings, see https://github.com/ceurws/semantify/issues/38
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
raw
|
bytes
|
the bytes of the page |
required |
Returns:
| Type | Description |
|---|---|
Tuple[str, Optional[str], str]
|
Tuple[str, Optional[str], str]: the text, the declared charset or None and the encoding used |
Source code in ceursemantify/volume_html.py
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 | |
editors()
get the editors of the volume
Returns:
| Type | Description |
|---|---|
List[Scholar]
|
List[Scholar]: the editors in the order of the page |
Source code in ceursemantify/volume_html.py
278 279 280 281 282 283 284 285 286 | |
event(result)
get the event of the volume
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
result
|
MappingResult
|
the mapping result to report issues to |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Event |
Event
|
the event |
Source code in ceursemantify/volume_html.py
224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 | |
in_volume(pdf_url, url)
classmethod
check whether the given pdf lies in the directory of the volume, the criterion for a paper of the volume, see https://github.com/ceurws/semantify/issues/35; the scheme is ignored so that http links to an https site still count
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pdf_url
|
str
|
the absolute url of the pdf |
required |
url
|
str
|
the url of the volume |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if the pdf is in the volume directory or one of its subdirectories |
Source code in ceursemantify/volume_html.py
339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 | |
jsonld()
classmethod
the JSON-LD support of the research model, loaded once
Source code in ceursemantify/volume_html.py
63 64 65 66 67 68 69 70 | |
link_of(element)
get the href of the link the given element is or is wrapped in
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
element
|
Optional[Tag]
|
the element |
required |
Returns:
| Type | Description |
|---|---|
Optional[str]
|
Optional[str]: the href, None if the element is not linked |
Source code in ceursemantify/volume_html.py
191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 | |
mark(css_class, root=None)
get the first element with the given CEUR mark
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
css_class
|
str
|
the mark e.g. CEURVOLNR |
required |
root
|
Optional[Tag]
|
the element to search in, the whole page if None |
None
|
Returns:
| Type | Description |
|---|---|
Optional[Tag]
|
Optional[Tag]: the element, None if there is none |
Source code in ceursemantify/volume_html.py
159 160 161 162 163 164 165 166 167 168 169 170 171 172 | |
mark_text(css_class, root=None)
get the text of the first element with the given CEUR mark
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
css_class
|
str
|
the mark e.g. CEURVOLNR |
required |
root
|
Optional[Tag]
|
the element to search in, the whole page if None |
None
|
Returns:
| Type | Description |
|---|---|
Optional[str]
|
Optional[str]: the single line text, None if there is no element or no text |
Source code in ceursemantify/volume_html.py
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | |
of_file(path, base_url='https://ceur-ws.org')
classmethod
read the volume page from the given file
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
the path of the index.html, the volume number is taken from a Vol-N part of it |
required |
base_url
|
str
|
the url of the site the volume is published on |
'https://ceur-ws.org'
|
Returns:
| Name | Type | Description |
|---|---|---|
VolumeHtml |
VolumeHtml
|
the volume page, an EarlyVolumeHtml for a page without CEURVOLNR |
Source code in ceursemantify/volume_html.py
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | |
paper(item, url, result)
get the paper of the given table of contents item
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
item
|
Tag
|
the li element of the paper, the id of the paper is the li id or the stem of the pdf link when the li has no id see https://github.com/ceurws/semantify/issues/36 |
required |
url
|
str
|
the url of the volume |
required |
result
|
MappingResult
|
the mapping result to report issues to |
required |
Returns:
| Type | Description |
|---|---|
Optional[Paper]
|
Optional[Paper]: the paper, None if the item has no link to a pdf, has no id and links to a pdf outside the volume, or links to a pdf outside the volume directory: a paper published elsewhere, see https://github.com/ceurws/semantify/issues/35 |
Source code in ceursemantify/volume_html.py
288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 | |
papers(url, result)
get the papers of the volume
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
url
|
str
|
the url of the volume |
required |
result
|
MappingResult
|
the mapping result to report issues to |
required |
Returns:
| Type | Description |
|---|---|
List[Paper]
|
List[Paper]: the papers in the order of the table of contents |
Source code in ceursemantify/volume_html.py
358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 | |
proceedings()
map the volume page to the proceedings of the research model
Returns:
| Name | Type | Description |
|---|---|---|
MappingResult |
MappingResult
|
the proceedings and the issues |
Source code in ceursemantify/volume_html.py
399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 | |
read_embedded(path)
read the JSON-LD record of a page, the source of the mapping instead of the markup, see issue 28: index.jsonld beside the page is the record that the DOI registration writes, for every page whatever its state, see issues 42 and 49; the fence of an embedded or generated page is the copy and is read only when there is no index.jsonld
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
the path of the index.html |
required |
Source code in ceursemantify/volume_html.py
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 | |
required(css_class, result)
get the text of a mark that every volume page must have
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
css_class
|
str
|
the mark |
required |
result
|
MappingResult
|
the mapping result to report a missing mark to |
required |
Returns:
| Type | Description |
|---|---|
Optional[str]
|
Optional[str]: the text, None if the mark is missing |
Source code in ceursemantify/volume_html.py
208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 | |
scholar(element)
get the scholar of the given CEURVOLEDITOR or CEURAUTHOR element
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
element
|
Tag
|
the element with the name, optionally linked to an ORCID |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Scholar |
Scholar
|
the scholar |
Source code in ceursemantify/volume_html.py
261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 | |
volume_number_of(result)
get the volume number of the CEURVOLNR mark
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
result
|
MappingResult
|
the mapping result to report a missing or unparsed mark to |
required |
Returns:
| Type | Description |
|---|---|
Optional[int]
|
Optional[int]: the volume number, None if the mark is missing or unparsed |
Source code in ceursemantify/volume_html.py
380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 | |