Mentions légales du service

Skip to content
Snippets Groups Projects
Commit eddc788a authored by Robin Tissot's avatar Robin Tissot
Browse files

Adds the stored source to the exports and api.

parent 57ce6281
No related branches found
No related tags found
No related merge requests found
......@@ -133,7 +133,8 @@ class PartSerializer(serializers.ModelSerializer):
'workflow',
'order',
'recoverable',
'transcription_progress'
'transcription_progress',
'source'
)
def create(self, data):
......
{% load export_tags %}<?xml version="1.0" encoding="UTF-8"?>
<alto xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.loc.gov/standards/alto/ns-v4#"
xsi:schemaLocation="http://www.loc.gov/standards/alto/ns-v4# https://gitlab.inria.fr/scripta/escriptorium/-/raw/develop/app/escriptorium/static/alto-4-1-baselines.xsd">
xsi:schemaLocation="http://www.loc.gov/standards/alto/ns-v4# http://www.loc.gov/standards/alto/v4/alto-4-2.xsd">
<Description>
<MeasurementUnit>pixel</MeasurementUnit>
<sourceImageInformation>
<fileName>{{ part.filename }}</fileName>
{% if part.source %}<fileIdentifier>{{ part.source }}</fileIdentifier>{% endif %}
</sourceImageInformation>
</Description>
{% if valid_block_types or valid_line_types %}
......
{% load export_tags %}<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<PcGts xmlns="http://schema.primaresearch.org/PAGE/gts/pagecontent/2019-07-15" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schema.primaresearch.org/PAGE/gts/pagecontent/2019-07-15 http://schema.primaresearch.org/PAGE/gts/pagecontent/2019-07-15/pagecontent.xsd">
<Metadata>
<Metadata{% if part.source %} externalRef="{{part.source}}"{% endif %}>
<Creator>escriptorium</Creator>
<Created>{% current_time %}</Created>
<LastChange>{% current_time %}</LastChange>
<LastChange>{% current_time %}</LastChange>
</Metadata>
<Page imageFilename="{{ part.filename }}" imageWidth="{{ part.image.width }}" imageHeight="{{ part.image.height }}">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment