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 181 182 183 184 185 186 187 188 189 190 191 192 193 | |
__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 116 117 118 119 120 | |
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
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 | |
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
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | |
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
196 197 198 199 200 201 202 203 204 205 206 207 208 | |
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
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 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 | |
__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
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 | |
assign_year(proceedings, label, report, volume_dir=None)
assign the year of publication on CEUR-WS to the given proceedings by the year rule, see issue 78; a year that is not the year of the publication date of the proceedings is kept as inferred with its source and reported, a missing year is reported
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
proceedings
|
Proceedings
|
the proceedings |
required |
label
|
str
|
the volume or path the report names |
required |
report
|
SiteReport
|
the report to add problems to |
required |
volume_dir
|
Optional[str]
|
the directory of the local volume page, None if there is none |
None
|
Returns:
| Type | Description |
|---|---|
Optional[int]
|
Optional[int]: the year, None if the volume has no year |
Source code in ceursemantify/generator.py
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 | |
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
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 | |
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
482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 | |
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
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | |
generate_paths(paths, progress=False, in_place=False, yaml=False, gate=True)
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 publication year 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
|
gate
|
bool
|
if False replace the chair pages without check-index-errors, see issue 65 |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
SiteReport |
SiteReport
|
the written files, the problems and the time used |
Source code in ceursemantify/generator.py
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 | |
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 publication year 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
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 | |
neighbours_of(number, volume_years)
classmethod
get the previous and the next volume of the given one: the nearest existing lower and higher volume number, see issue 84
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
number
|
Optional[int]
|
the volume number |
required |
volume_years
|
Dict[int, int]
|
the year of each volume |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Neighbours |
Neighbours
|
number and year of the previous and of the next volume, None where there is none |
Source code in ceursemantify/generator.py
248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 | |
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
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | |
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
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 | |
rebuild_overview()
rebuild the overview of the years from the years present, see issue 81
Returns:
| Name | Type | Description |
|---|---|---|
SiteReport |
SiteReport
|
the written file and the time used |
Source code in ceursemantify/generator.py
404 405 406 407 408 409 410 411 412 413 414 415 416 417 | |
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
383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 | |
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
419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 | |
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
501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 | |
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
300 301 302 303 304 305 306 307 308 309 310 311 312 | |
write_volume(proceedings, report, volume_dir=None, gate=True, neighbours=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
|
gate
|
bool
|
if False a page written in place replaces the chair page without the check, see issue 65 |
True
|
neighbours
|
Optional[Neighbours]
|
the previous and the next volume of the year tree, looked up in the tree if None, see issue 84 |
None
|
Source code in ceursemantify/generator.py
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 | |
write_volumes(volumes, report, gate=True)
write the given volumes, each with its links to the previous and the next volume: the years of all volumes of the call are known before the first page is written, the other volumes are those of the tree, see issue 84
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
volumes
|
List[Tuple[Proceedings, Optional[str]]]
|
the proceedings with a year, each with the directory to write to, the year tree if None |
required |
report
|
SiteReport
|
the report to add the written files to |
required |
gate
|
bool
|
if False a page written in place replaces the chair page without the check, see issue 65 |
True
|
Source code in ceursemantify/generator.py
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 | |
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
171 172 173 174 175 176 177 178 179 180 181 182 183 | |
index_check
Created on 2026-10-28
@author: wf
IndexCheck
check-index-errors of the CEUR-WS team as gate of a generated volume page, see issue 62
The check reports by ERROR (rule) lines and gives no exit status, so the rule ids are read from its output. A run counts only when the check announced itself, either as the chair check or as the team check.
Source code in ceursemantify/index_check.py
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 | |
available
property
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if the check is on the PATH |
__init__(command, ignore=None, timeout=300)
constructor
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
command
|
str
|
the name or path of the check |
required |
ignore
|
Optional[List[str]]
|
the rule ids the gate does not count |
None
|
timeout
|
int
|
the seconds one run may take |
300
|
Source code in ceursemantify/index_check.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 | |
errors(volume_dir)
get the rule ids the check reports in the given volume directory; the script chooses the team check for a published volume and the chair check otherwise, the gate never forces the chair check with pre, see issue 68
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
volume_dir
|
str
|
the directory holding the index.html to check |
required |
Returns:
| Type | Description |
|---|---|
Optional[Set[str]]
|
Optional[Set[str]]: the rule ids, None if the check did not run |
Source code in ceursemantify/index_check.py
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | |
run(volume_dir, pre=False)
run the check in the given volume directory
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
volume_dir
|
str
|
the directory holding the index.html to check |
required |
pre
|
bool
|
if True run the chair check also where the team check would be chosen |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
IndexCheckRun |
IndexCheckRun
|
whether the check ran, the rule ids it reported and its output |
Source code in ceursemantify/index_check.py
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | |
IndexCheckRun
dataclass
the result of one run of the check on a volume directory
Source code in ceursemantify/index_check.py
14 15 16 17 18 19 20 21 22 | |
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
24 25 26 27 28 29 30 31 | |
Country
distinct region in geography
Source code in ceursemantify/model.py
34 35 36 37 38 39 40 41 | |
Event
a meeting of researchers at a specific time and place
Source code in ceursemantify/model.py
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 | |
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
116 117 118 119 120 121 122 123 124 125 126 | |
Paper
a paper is e.g. a scholarly article
Source code in ceursemantify/model.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 158 159 160 | |
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
150 151 152 153 154 155 156 157 158 159 160 | |
Proceedings
a collection of papers mostly documenting the results of an academic event
Source code in ceursemantify/model.py
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 | |
plausible_year(year)
classmethod
check that the given year lies in the range of CEUR-WS
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
year
|
Optional[int]
|
the year |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if the year is from 1995 to the current year |
Source code in ceursemantify/model.py
196 197 198 199 200 201 202 203 204 205 206 207 208 | |
publication_year()
get the year of the publication date, the CEURPUBDATE of the volume page
Returns:
| Type | Description |
|---|---|
Optional[int]
|
Optional[int]: the year, None if there is no plausible publication date |
Source code in ceursemantify/model.py
228 229 230 231 232 233 234 235 236 | |
year()
get the year the proceedings belong to: the year of the publication on CEUR-WS, the inferred year where the year rule set one, else the year of the publication date, see issue 78
Returns:
| Type | Description |
|---|---|
Optional[int]
|
Optional[int]: the year, None if there is neither an inferred year nor a publication date |
Source code in ceursemantify/model.py
238 239 240 241 242 243 244 245 246 247 248 | |
year_of(date_text)
classmethod
get the plausible four digit year of the given date text
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
date_text
|
Optional[str]
|
the date, e.g. 2024-10-24 or 28-Nov-2012 |
required |
Returns:
| Type | Description |
|---|---|
Optional[int]
|
Optional[int]: the year, None if there is no plausible year |
Source code in ceursemantify/model.py
210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 | |
Publisher
organization that publishes proceedings
Source code in ceursemantify/model.py
44 45 46 47 48 49 50 51 | |
Scholar
person who engages in research
Source code in ceursemantify/model.py
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 | |
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
85 86 87 88 89 90 91 92 93 94 | |
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
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | |
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
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 | |
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
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | |
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
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 886 887 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 | |
__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
852 853 854 855 856 857 858 859 860 861 862 863 864 | |
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
901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 | |
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
866 867 868 869 870 871 872 873 874 875 876 877 878 879 | |
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
881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 | |
PageState
dataclass
the state a page announces in its header comment
Source code in ceursemantify/pages.py
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 | |
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
128 129 130 131 132 133 134 135 136 137 138 139 140 141 | |
today()
classmethod
get the state for a page generated today
Returns:
| Name | Type | Description |
|---|---|---|
PageState |
PageState
|
the state |
Source code in ceursemantify/pages.py
117 118 119 120 121 122 123 124 125 126 | |
PaperPage
the landing page of one paper
Source code in ceursemantify/pages.py
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 761 762 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 840 841 842 843 | |
__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
679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 | |
as_html()
get the complete page
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the html document |
Source code in ceursemantify/pages.py
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 840 841 842 843 | |
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
727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 | |
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
776 777 778 779 780 781 782 783 784 785 786 | |
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
743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 | |
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
696 697 698 699 700 701 702 703 704 | |
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
706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 | |
PaperView
html view of a paper in the table of contents
Source code in ceursemantify/pages.py
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 | |
__init__(paper)
constructor
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
paper
|
Paper
|
the paper |
required |
Source code in ceursemantify/pages.py
209 210 211 212 213 214 215 216 | |
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
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 | |
is_frontmatter()
check whether the paper is a preface or other frontmatter, which check-index-errors A47 identifies by an id containing reface
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if the id of the paper contains reface, case insensitive |
Source code in ceursemantify/pages.py
268 269 270 271 272 273 274 275 276 277 | |
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
218 219 220 221 222 223 224 225 226 227 228 229 230 | |
ScholarView
html view of a scholar
Source code in ceursemantify/pages.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 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 | |
__init__(scholar)
constructor
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scholar
|
Scholar
|
the scholar |
required |
Source code in ceursemantify/pages.py
157 158 159 160 161 162 163 164 | |
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
166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 | |
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
187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 | |
VolumePage
the page of the proceedings of one volume
Source code in ceursemantify/pages.py
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 589 590 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 | |
__init__(proceedings, config, jsonld, state, in_place=False, neighbours=None)
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
|
neighbours
|
Optional[Neighbours]
|
number and year of the previous and of the next volume of the year tree, see issue 84 |
None
|
Source code in ceursemantify/pages.py
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 | |
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
472 473 474 475 476 477 478 479 480 481 482 483 484 485 | |
as_html()
get the complete page
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the html document |
Source code in ceursemantify/pages.py
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 | |
colocated_as_html()
get the event the event of the proceedings is co-located with
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the html text; for an event that is not co-located the comment line of the Vol-XXX template, so that the CEURCOLOCATED tag stays, see issue 55 |
Source code in ceursemantify/pages.py
487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 | |
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
528 529 530 531 532 533 534 535 536 537 538 539 540 | |
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
602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 | |
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
345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 | |
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
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 | |
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
335 336 337 338 339 340 341 342 343 | |
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
414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 | |
navigation_as_html()
get the links to the year, the overview of the years and the original volume, see issue 84; a page in place is the original and has no year tree, so it has no such links, see issue 44
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the html line of the header cell, empty in place |
Source code in ceursemantify/pages.py
387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 | |
neighbour_as_html(neighbour, rel)
get the link to the previous or next volume of the year tree, see issue 84
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
neighbour
|
Optional[Tuple[int, int]]
|
number and year of the volume, None if there is none |
required |
rel
|
str
|
prev or next |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the html link with its separator, empty if there is no such volume |
Source code in ceursemantify/pages.py
366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 | |
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
312 313 314 315 316 317 318 319 320 | |
page_url()
get the url the page is served from
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the url |
Source code in ceursemantify/pages.py
322 323 324 325 326 327 328 329 330 331 332 333 | |
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
575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 | |
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
504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 | |
toc_as_html()
get the table of contents
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the html division |
Source code in ceursemantify/pages.py
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 | |
YearEntry
the entry of one volume on the page of its year
Source code in ceursemantify/pages.py
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 | |
__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
930 931 932 933 934 935 936 937 938 939 | |
as_html()
get the entry
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the html division |
Source code in ceursemantify/pages.py
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 | |
YearPage
the page of one year with the volumes published on CEUR-WS in that year
Source code in ceursemantify/pages.py
971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 | |
__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
976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 | |
as_html()
get the complete page
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the html document |
Source code in ceursemantify/pages.py
1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 | |
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
1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 | |
navigation_as_html()
get the links to the previous and the next year that have a page, also across years without one
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the html paragraph |
Source code in ceursemantify/pages.py
995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 | |
YearsPage
the overview of the years that have a page, see issue 81
Source code in ceursemantify/pages.py
1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 | |
__init__(numbers_by_year, config, state)
constructor
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
numbers_by_year
|
Dict[int, List[int]]
|
the sorted volume numbers of each year |
required |
config
|
SiteConfig
|
the site configuration |
required |
state
|
PageState
|
the state to announce |
required |
Source code in ceursemantify/pages.py
1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 | |
as_html()
get the complete page
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the html document |
Source code in ceursemantify/pages.py
1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 | |
rows_as_html()
get one table row per year, the newest year first: the year, its number of volumes and its lowest and highest volume number
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the html table rows |
Source code in ceursemantify/pages.py
1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 | |
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
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | |
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
27 28 29 30 31 32 33 34 35 36 37 38 39 | |
voldoi_as_html(doi)
get the DOI for the volume header linked to its resolver
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
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | |
register-dois
verbose = args.verbose
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
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 | |
__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
79 80 81 82 83 84 85 86 87 88 89 90 | |
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
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | |
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
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | |
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
92 93 94 95 96 97 98 99 100 101 102 103 | |
Site
the directory tree of the generated pages:
Source code in ceursemantify/site.py
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 | |
__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
196 197 198 199 200 201 202 203 204 205 | |
jsonld_paths(year=None)
get the paths of the JSON-LD files of the volumes: in the year tree
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
306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 | |
overview_path()
get the path of the overview of the years, see issue 81
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
the path of years/index.html |
Source code in ceursemantify/site.py
261 262 263 264 265 266 267 268 269 | |
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
233 234 235 236 237 238 239 240 241 242 243 244 245 | |
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
355 356 357 358 359 360 361 362 363 364 365 366 | |
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
340 341 342 343 344 345 346 347 348 349 350 351 352 353 | |
remove_other_years(proceedings)
remove the directory of the given proceedings from every year but their own, and a year that is left without volumes, see issue 78
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
proceedings
|
Proceedings
|
the proceedings, with a year and a volume number |
required |
Source code in ceursemantify/site.py
271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 | |
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
220 221 222 223 224 225 226 227 228 229 230 231 | |
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
326 327 328 329 330 331 332 333 334 335 336 337 338 | |
volume_years()
get the year of each volume of the year tree
Returns:
| Type | Description |
|---|---|
Dict[int, int]
|
Dict[int, int]: the year by volume number |
Source code in ceursemantify/site.py
247 248 249 250 251 252 253 254 255 256 257 258 259 | |
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
292 293 294 295 296 297 298 299 300 301 302 303 304 | |
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
207 208 209 210 211 212 213 214 215 216 217 218 | |
years()
get the years that have a directory
Returns:
| Type | Description |
|---|---|
List[int]
|
List[int]: the sorted years |
Source code in ceursemantify/site.py
368 369 370 371 372 373 374 375 376 377 378 | |
SiteConfig
configuration of the generated site, see resources/site.yaml
Source code in ceursemantify/site.py
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 | |
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
42 43 44 45 46 47 48 49 50 51 | |
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
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | |
SiteReport
what a run wrote and what it could not handle
Source code in ceursemantify/site.py
179 180 181 182 183 184 185 186 187 | |
VolumeRanges
volume numbers given as numbers and ranges e.g. 3889 3887-3912
Source code in ceursemantify/site.py
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 | |
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
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 | |
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 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 | |
__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
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | |
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
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 | |
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
281 282 283 284 285 286 287 288 289 | |
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
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 | |
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
364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 | |
is_plain_name(name)
classmethod
check whether the given paper id can name a directory below the volume directory: no path separator, not empty, not . or .., see issue 79
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
the paper id |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if the id is a plain name |
Source code in ceursemantify/volume_html.py
349 350 351 352 353 354 355 356 357 358 359 360 361 362 | |
jsonld()
classmethod
the JSON-LD support of the research model, loaded once
Source code in ceursemantify/volume_html.py
66 67 68 69 70 71 72 73 | |
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
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | |
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
162 163 164 165 166 167 168 169 170 171 172 173 174 175 | |
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
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 | |
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
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 | |
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
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 | |
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
383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 | |
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
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 | |
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
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 | |
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
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 | |
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
264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 | |
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
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 | |
year_rule
Created on 2026-11-20
The rule for the year of a volume: its year of publication on CEUR-WS, see issue 78. The order of the sources follows their measured agreement with CEURPUBDATE on the volume pages of 2026-11-18, see SemanticLongTail issue 1.
@author: wf
YearRule
decide the year of publication of a volume from its sources in order: the CEURPUBDATE mark, the publication date of the volume browser data, the modification time of index.html.orig, the date of the submitted by line, the modification time of the oldest file of the volume directory
A year counts only if it lies in the range of CEUR-WS and within MAX_DISTANCE years of the median of the publication years of the NEIGHBOURS volumes on each side; else the next source is asked.
Source code in ceursemantify/year_rule.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 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 | |
__init__(volumes_json=None)
constructor
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
volumes_json
|
Optional[str]
|
the volumes.json of the volume browser, no volume browser source if None or missing |
None
|
Source code in ceursemantify/year_rule.py
38 39 40 41 42 43 44 45 46 47 | |
browser_year(number)
get the year of the publication date of the volume browser data
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
number
|
Optional[int]
|
the volume number |
required |
Returns:
| Type | Description |
|---|---|
Optional[int]
|
Optional[int]: the year, None if the data or the date is missing |
Source code in ceursemantify/year_rule.py
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | |
candidates(proceedings, volume_dir=None)
get the year each source gives for the given proceedings, in the order of the rule
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
proceedings
|
Proceedings
|
the proceedings |
required |
volume_dir
|
Optional[str]
|
the directory of the local volume page, None if there is none |
None
|
Returns:
| Type | Description |
|---|---|
List[Tuple[Optional[int], str]]
|
List[Tuple[Optional[int], str]]: year and name of each source |
Source code in ceursemantify/year_rule.py
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 | |
decide(proceedings, volume_dir=None)
decide the year of publication of the given proceedings: the first source whose year passes the gate
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
proceedings
|
Proceedings
|
the proceedings |
required |
volume_dir
|
Optional[str]
|
the directory of the local volume page, None if there is none |
None
|
Returns:
| Type | Description |
|---|---|
Optional[Tuple[int, str]]
|
Optional[Tuple[int, str]]: the year and its source, None if no source passes |
Source code in ceursemantify/year_rule.py
180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 | |
file_candidates(volume_dir)
get the years of the modification times of index.html.orig and of the oldest file of the given volume directory
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
volume_dir
|
str
|
the volume directory |
required |
Returns:
| Type | Description |
|---|---|
Tuple[Optional[int], Optional[int]]
|
Tuple[Optional[int], Optional[int]]: the year of index.html.orig and of the oldest file |
Source code in ceursemantify/year_rule.py
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | |
first_year(text)
classmethod
get the first four digit number of the given text
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
Optional[str]
|
the text, e.g. 2024-10-24 or 28-Nov-2012 |
required |
Returns:
| Type | Description |
|---|---|
Optional[int]
|
Optional[int]: the number, None if there is none |
Source code in ceursemantify/year_rule.py
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | |
mark_year(volume_dir)
get the year of the CEURPUBDATE mark of the page of the given volume directory
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
volume_dir
|
str
|
the volume directory |
required |
Returns:
| Type | Description |
|---|---|
Optional[int]
|
Optional[int]: the year as written, None if there is no page or no mark |
Source code in ceursemantify/year_rule.py
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | |
neighbour_median(volume_dir)
get the median of the CEURPUBDATE years of the NEIGHBOURS volume directories on each side of the given one
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
volume_dir
|
Optional[str]
|
the volume directory Vol-N, its neighbours lie beside it |
required |
Returns:
| Type | Description |
|---|---|
Optional[int]
|
Optional[int]: the median, None if no neighbour has a publication date |
Source code in ceursemantify/year_rule.py
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | |