dasch-swiss / beol

Bernoulli-Euler OnLine
https://beol.dasch.swiss
GNU Affero General Public License v3.0
0 stars 1 forks source link

Add link to obtain a letter as TEI/XML #135

Closed tobiasschweizer closed 5 years ago

tobiasschweizer commented 5 years ago

closes #76

tobiasschweizer commented 5 years ago

@SepidehAlassi I am thinking about making the TEI link generation code a directive.

SepidehAlassi commented 5 years ago

@tobiasschweizer that is a good idea!

tobiasschweizer commented 5 years ago

@SepidehAlassi I made it a directive. It only creates a TEI link if there is a proper config element.

tobiasschweizer commented 5 years ago

@SepidehAlassi Could you have a look at this PR?

SepidehAlassi commented 5 years ago

TEI export

SepidehAlassi commented 5 years ago

@tobiasschweizer now that you have removed the config for the letter, is there anything I else I should change for checking this PR?

tobiasschweizer commented 5 years ago

@SepidehAlassi you just have to provide the settings in the config (https://github.com/dhlab-basel/beol/blob/develop/src/config/config.dev.json) like in the test for the directive:

{
                ...
                'tei': {
                    'http://0.0.0.0:3333/ontology/0801/beol/v2#letter': {
                        'textProperty': 'http://0.0.0.0:3333/ontology/0801/beol/v2#hasText',
                        'mappingIRI': 'http://rdfh.ch/projects/yTerZGyxjZVqFMNNKXCDPF/mappings/BEOLTEIMapping',
                        'gravsearchTemplateIri': 'http://rdfh.ch/0801/templateIri',
                        'teiHeaderXSLTIri': 'http://rdfh.ch/0801/headerIri'
                    }
                }
            }

You get the settings when you run the Python script in Knora (https://github.com/dhlab-basel/Knora/blob/develop/webapi/_test_data/test_route/texts/beol/beolTEI.py).

tobiasschweizer commented 5 years ago

But actually this PR is just about generating the link and display it, so it is actually enough to look at the directive.

SepidehAlassi commented 5 years ago

@tobiasschweizer I see, now all works. I had a problem with configuration, it did not show me the link.

tobiasschweizer commented 5 years ago

top right placement: https://github.com/dhlab-basel/beol/pull/135/commits/ab96df08da50db9bf8f24c12ae07c2618d7fbc6a