Skip to content

Commit

Permalink
add info to result (script info + commit)
Browse files Browse the repository at this point in the history
  • Loading branch information
matyaskopp committed Apr 8, 2024
1 parent 3084e7f commit e4f0dee
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ release2teitok: tools/parlamint-lib.xsl
mkdir -p $(DATA-TEITOK)/
@test -n "$(PROFILE)" && echo "RUNNING PROFILER saxon param: $(PROF)" || :
$s $(PROF) -xsl:tools/ParCzech2teitok.xsl \
commit=$(shell git -C . rev-parse HEAD) \
outDir=$(DATA-TEITOK)/ \
jobsCnt=$(JOBS-CNT) \
jobN=${JOB-N} \
Expand Down
19 changes: 19 additions & 0 deletions src/tools/ParCzech2teitok.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<xsl:param name="outDir"/>
<xsl:param name="jobsCnt">1</xsl:param>
<xsl:param name="jobN">1</xsl:param>
<xsl:param name="commit"/>

<xsl:import href="parlamint-lib.xsl"/>

Expand Down Expand Up @@ -153,6 +154,24 @@
</xsl:element>
</xsl:template>

<xsl:template mode="comp" match="tei:encodingDesc">
<xsl:param name="TEI"/>
<xsl:variable name="when" select="$TEI//tei:teiHeader//tei:setting/tei:date/@when"/>
<xsl:element name="{local-name()}">
<xsl:apply-templates mode="comp">
<xsl:with-param name="TEI" select="$TEI"/>
</xsl:apply-templates>
<appInfo>
<application ident="ParCzech2teitok" version="{$commit}">
<label>ParCzech2teitok.xsl</label>
<desc xml:lang="en">Script available at <ref target="{concat('https://github.com/ufal/ParCzech/tree/',$commit,'/src/tools/ParCzech2teitok.xsl')}">GitHub ufal/ParCzech</ref></desc>
</application>
</appInfo>
</xsl:element>
</xsl:template>



<xsl:template mode="comp" match="tei:pc | tei:w">
<xsl:param name="TEI"/>
<xsl:variable name="startId" select="./preceding-sibling::tei:*[1][local-name() = 'anchor']/@synch/substring-after(.,'#')"/>
Expand Down

0 comments on commit e4f0dee

Please sign in to comment.