DHBern / presentation_parzival

https://dhbern.github.io/presentation_parzival/
0 stars 2 forks source link

Use data from https://dhbern.github.io/parzival-static-api #20

Closed pdaengeli closed 6 months ago

pdaengeli commented 6 months ago

The following static endpoints are ready for consumption/integration:


Furthermore there is a flat collection of all TEI files available at:

Given the lacking Git control in eXist it would be good to use these files in order to have a single source of truth. Consequently, we should remove these files from the parzival_data repo and keep only the ODD file and other TEIPublisher-related stuff there.


Any additional needs are best recorded in a new issue at parzival-static-api.

flicksolutions commented 6 months ago

could you restructure the metadata-ms-page.json? The most performant would be to get separate files per siglum. ie. https://dhbern.github.io/parzival-static-api/api/json/metadata-ms-page/${id}.json

Structure could be the same as in the files that are at the moment in the lib folder: https://github.com/DHBern/presentation_parzival/tree/main/src/lib/metadata-ms-page

pdaengeli commented 6 months ago

Perhaps this is implemented already with the split_output param.

If I set it to true I get the following output:

tree ``` $ tree metadata-ms-page metadata-ms-page ├── d.json ├── fr10.json ├── fr11.json ├── fr12.json ├── fr13.json ├── fr14.json ├── fr15.json ├── fr16.json ├── fr17.json ├── fr18.json ├── fr19.json ├── fr1.json ├── fr20.json ├── fr21.json ├── fr22.json ├── fr23.json ├── fr24.json ├── fr25.json ├── fr26.json ├── fr27.json ├── fr28.json ├── fr29.json ├── fr2.json ├── fr30.json ├── fr31.json ├── fr32.json ├── fr33.json ├── fr34.json ├── fr35.json ├── fr36.json ├── fr37.json ├── fr38.json ├── fr39.json ├── fr3.json ├── fr40.json ├── fr41.json ├── fr42.json ├── fr43.json ├── fr44.json ├── fr45.json ├── fr46.json ├── fr47.json ├── fr48.json ├── fr49.json ├── fr4.json ├── fr50.json ├── fr51.json ├── fr52.json ├── fr53.json ├── fr54.json ├── fr55.json ├── fr56.json ├── fr57.json ├── fr58.json ├── fr59.json ├── fr5.json ├── fr60.json ├── fr61.json ├── fr62.json ├── fr63.json ├── fr64.json ├── fr65.json ├── fr66.json ├── fr67.json ├── fr68.json ├── fr69.json ├── fr6.json ├── fr70.json ├── fr71.json ├── fr72.json ├── fr7.json ├── fr8.json ├── fr9.json ├── g.json ├── i.json ├── l.json ├── m.json ├── mk.json ├── nk.json ├── o.json ├── ok.json ├── q.json ├── r.json ├── t.json ├── u.json ├── v.json ├── vv.json ├── w.json └── z.json 0 directories, 89 files ```
sample: d.json, fr1.json * [d.json](https://github.com/user-attachments/files/15515580/d.json) * [fr1.json](https://github.com/user-attachments/files/15515581/fr1.json)

Would that work? Then I change the default and commit the JSON files.

flicksolutions commented 6 months ago

yes, that's what I need! It's the same files that are used atm Thank you!

pdaengeli commented 6 months ago

Indeed, diffing shows that they are identitcal:

fr1 ```diff diff <(curl -s https://raw.githubusercontent.com/DHBern/presentation_parzival/main/src/lib/metadata-ms-page/fr1.json) metadata-ms-page/fr1.json 515c515 < "generated-by": "file:\/data\/WORK\/DH-unibe\/parzival\/parzival-static-backend-prep\/src\/util\/metadata-ms-page.xsl", --- > "generated-by": "file:\/data\/WORK\/DH-unibe\/parzival\/parzival-static-api\/src\/util\/metadata-ms-page.xsl", 517c517 < "generated-on": "2024-04-23T23:56:30.502349+02:00", --- > "generated-on": "2024-05-31T17:00:29.507889+02:00", ```
d (more complex) ```diff diff <(curl -s https://raw.githubusercontent.com/DHBern/presentation_parzival/main/src/lib/metadata-ms-page/d.json) metadata-ms-page/d.json 26200c26200 < "generated-by": "file:\/data\/WORK\/DH-unibe\/parzival\/parzival-static-backend-prep\/src\/util\/metadata-ms-page.xsl", --- > "generated-by": "file:\/data\/WORK\/DH-unibe\/parzival\/parzival-static-api\/src\/util\/metadata-ms-page.xsl", 26202c26202 < "generated-on": "2024-04-23T23:56:30.502349+02:00", --- > "generated-on": "2024-05-31T17:00:29.507889+02:00", ```

I'll commit and push shortly.

pdaengeli commented 6 months ago

Good to go now, e.g. https://dhbern.github.io/parzival-static-api/api/json/metadata-ms-page/fr1.json

pdaengeli commented 6 months ago

How about defining a constant for https://dhbern.github.io/parzival-static-api/api/ and use it in +server.js#L9 and +page.js#L5?