Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • bibliothek-der-neologie/intermediate-format
1 result
Show changes
xquery version "3.1";
(:
: Copyright (c) 2018 Uwe Sikora
: Copyright (c) 2018–2019 Michelle Weidling
: Copyright (c) 2020–2021 Stefan Hynek
: Copyright (c) 2021 Simon Sendler
:
: This file is part of intermediate-format.
:
: intermediate-format is free software: you can redistribute it and/or modify
: it under the terms of the GNU General Public License as published by
: the Free Software Foundation, either version 3 of the License, or
: (at your option) any later version.
:
: intermediate-format is distributed in the hope that it will be useful,
: but WITHOUT ANY WARRANTY; without even the implied warranty of
: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
: GNU General Public License for more details.
:
: You should have received a copy of the GNU General Public License
: along with intermediate-format. If not, see <https://www.gnu.org/licenses/>.
:)
(:~
: PREPROCESSING Module ("pre", "http://bdn.edition.de/intermediate_format/preprocessing")
: *******************************************************************************************
......@@ -275,10 +298,25 @@ declare function pre:preprocessing
let $spaced-out :=
for $iii in 1 to $str-length return
if(not($iii = $str-length)) then
(substring($text, $iii, 1), "@")
(if (substring($text, $iii, 1) = " ") then
element {"seg"} {
attribute {"type"} {"spaced-interword-space"}
}
else
(
text {substring($text, $iii, 1)},
if (substring($text,$iii+1, 1) != " ") then
(element {"seg"} {
attribute {"type"} {"spaced-filler"}
}
)
else
()
)
)
else
substring($text, $iii, 1)
return string-join($spaced-out, '')
text {substring($text, $iii, 1)}
return $spaced-out
}
else (
pre:default-element( $node, pre:preprocessing($node/node(), $replace-whitespace) )
......
xquery version "3.0";
(:
: Copyright (c) 2018 Uwe Sikora
: Copyright (c) 2018–2019 Michelle Weidling
: Copyright (c) 2020 Stefan Hynek
:
: This file is part of intermediate-format.
:
: intermediate-format is free software: you can redistribute it and/or modify
: it under the terms of the GNU General Public License as published by
: the Free Software Foundation, either version 3 of the License, or
: (at your option) any later version.
:
: intermediate-format is distributed in the hope that it will be useful,
: but WITHOUT ANY WARRANTY; without even the implied warranty of
: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
: GNU General Public License for more details.
:
: You should have received a copy of the GNU General Public License
: along with intermediate-format. If not, see <https://www.gnu.org/licenses/>.
:)
(:~
: WHITESPACE Module ("whitespace", "http://bdn.edition.de/intermediate_format/whitespace_handling")
: *******************************************************************************************
......@@ -30,8 +52,8 @@ declare default element namespace "http://www.tei-c.org/ns/1.0";
declare function whitespace:text
( $text as text()*, $escape-char as xs:string? ) as text()* {
let $whitespace-node := $text[matches(., "[\s\n\r\t]") and normalize-space(.) = ""]
let $single-whitespace-between-nodes := $text = " "
let $whitespace-node := $text[matches(., "[\n\r\t]") and normalize-space(.) = ""]
return
if (not($whitespace-node)) then (
......@@ -63,16 +85,3 @@ declare function whitespace:escape-text
text {replace($text, '[\s]+', $escape)}
};
declare function whitespace:remove($nodes as node()*) as node()* {
for $node in $nodes
return
typeswitch ($node)
case text() return
if([matches($node, "[\s\n\r\t]") and normalize-space(.) = ""]) then
()
else
$node
default return
$node
};
xquery version "3.1";
(:
: Copyright (c) 2018 Uwe Sikora
: Copyright (c) 2018–2019 Michelle Weidling
: Copyright (c) 2020 Stefan Hynek
:
: This file is part of intermediate-format.
:
: intermediate-format is free software: you can redistribute it and/or modify
: it under the terms of the GNU General Public License as published by
: the Free Software Foundation, either version 3 of the License, or
: (at your option) any later version.
:
: intermediate-format is distributed in the hope that it will be useful,
: but WITHOUT ANY WARRANTY; without even the implied warranty of
: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
: GNU General Public License for more details.
:
: You should have received a copy of the GNU General Public License
: along with intermediate-format. If not, see <https://www.gnu.org/licenses/>.
:)
(:~
: This is the main XQuery which will (by default) be called by controller.xql
: to process any URI ending with ".html". It receives the HTML from
: the controller and passes it to the templating system.
:)
xquery version "3.1";
import module namespace templates="http://exist-db.org/xquery/templates" ;
(:
: The following modules provide functions which will be called by the
(:
: The following modules provide functions which will be called by the
: templating.
:)
import module namespace config="http://bdn-edition.de/intermediate_format/config" at "config.xqm";
......
This diff is collapsed.
{
"private": true,
"name": "interformat",
"author": "Stefan Hynek",
"devDependencies": {
"@semantic-release/changelog": "^5.0.0",
"@semantic-release/exec": "^5.0.0",
"@semantic-release/git": "^9.0.0",
"@semantic-release/gitlab-config": "^8.0.0",
"commitizen": "^4.2.3",
"cz-conventional-changelog": "^3.3.0",
"semantic-release": "^17.3.3"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
},
"release": {
"branches": [
"master"
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/changelog",
{
"changelogFile": "CHANGELOG.md"
}
],
[
"@semantic-release/gitlab",
{
"gitlabUrl": "https://gitlab.gwdg.de",
"assets": [
{
"path": ".build/bdn-*.xar",
"label": "XML Archive File"
},
{
"path": "CHANGELOG.md",
"label": "Changelog"
}
]
}
],
[
"@semantic-release/exec",
{
"prepareCmd": "./prepare production ${nextRelease.version}",
"publishCmd": "./publish .build/interformat-${nextRelease.version}.xar"
}
],
[
"@semantic-release/git",
{
"assets": [
"CHANGELOG.md"
]
}
]
]
}
}
#!/bin/bash
usage () {
cat << EOF
Usage: $(basename $0) branch_name version
This script is ment to be invoked in a CI environment only.
EOF
exit 2
}
# TODO: check for `CI_COMMIT_SHORT_SHA` and `EXIST_UPLOAD_PW`; if not set, show warning that not in CI
[[ $# -ne 2 ]] && { usage; }
export BRANCH=$1
export SR_PV=$2
echo "Building $BRANCH environment $SR_PV..."
./build
exit $?
#!/bin/bash
usage () {
cat << EOF
Usage: $(basename $0) file
This script is ment to be invoked in a CI environment only.
EOF
exit 2
}
# TODO: check for `CI_COMMIT_SHORT_SHA` and/or `EXIST_UPLOAD_PW`; if not set, show warning that not in CI
[[ $# -ne 1 ]] && { usage; }
export FILE=$1
echo "Uploading $FILE ..."
curl -u ci:${EXIST_UPLOAD_PW} -X POST -F file=@${FILE} https://ci.de.dariah.eu/exist-upload
exit $?
\ No newline at end of file
......@@ -4,11 +4,11 @@
<author>Uwe Sikora</author>
<website/>
<status>alpha</status>
<license>GNU-LGPL</license>
<license>GPL-3.0-or-later</license>
<copyright>true</copyright>
<type>application</type>
<target>interformat</target>
<prepare>pre-install.xql</prepare>
<finish/>
<deployed>2018-03-26T10:38:10.685+02:00</deployed>
<deployed />
</meta>
\ No newline at end of file