gbv / coli-ana

API to analyze DDC numbers
https://coli-conc.gbv.de/coli-ana/app/
MIT License
2 stars 0 forks source link

Show PICA data with syntax highlighting #12

Closed nichtich closed 3 years ago

nichtich commented 3 years ago

Possible with PicaEditor or prism but it makes more sense to first discuss how results of coli-ana should become part of the K10plus catalog.

nichtich commented 3 years ago

Just fetch the PICA Plain data (format=pp) and display between analysis and list of download formats. Syntax highlighting can be added afterwards.

stefandesu commented 3 years ago

Only problem I see is that for PICA Plain, we need one request per notation. Maybe we could only load it when necessary? Or add some way to either

?

nichtich commented 3 years ago

You can convert to PICA in the browser with serializePica(picaFromDDC(jskosConcept)).

stefandesu commented 3 years ago

You can convert to PICA in the browser with serializePica(picaFromDDC(jskosConcept)).

That's even better! But where do those methods come from? They aren't used in coli-ana. 🤔

nichtich commented 3 years ago

I've added them in lib/pica.js

stefandesu commented 3 years ago

Now implemented in dev (without syntax highlighting though).

nichtich commented 3 years ago

Syntax highlighting should be easy to implement by (re-)implementing it in a few lines of code instead of using e syntax highlighting library.

nichtich commented 3 years ago

Syntax highlighting is nice but not important in this case as it is always the same PICA field definition. I've added Pica3 instead.