Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
SADE
SADE
Commits
ad7bc174
Commit
ad7bc174
authored
Jul 05, 2017
by
Mathias Goebel
🎠
Browse files
Merge branch 'release/2.2.2'
parents
4dcb7e14
37450780
Changes
2
Hide whitespace changes
Inline
Side-by-side
expath-pkg.xml
View file @
ad7bc174
<?xml version="1.0" encoding="UTF-8"?>
<package
xmlns=
"http://expath.org/ns/pkg"
name=
"http://textgrid.de/ns/SADE"
abbrev=
"SADE"
version=
"2.2.
1
"
spec=
"1.0"
>
<package
xmlns=
"http://expath.org/ns/pkg"
name=
"http://textgrid.de/ns/SADE"
abbrev=
"SADE"
version=
"2.2.
2
"
spec=
"1.0"
>
<title>
Scalable Architecture for Digital Editions powered by TextGrid
</title>
<dependency
package=
"http://exist-db.org/apps/markdown"
/>
<dependency
package=
"http://exist-db.org/apps/monex"
/>
...
...
modules/fontane/misc.xqm
View file @
ad7bc174
...
...
@@ -423,20 +423,19 @@ switch ($develop)
};
declare function f-misc:textgridStatus($node as node(), $model as map(*)) {
let $col := "/db/sade-projects/textgrid"
let $res := "tgstatus.xml"
let $url := "https://dariah-de.github.io/status/textgrid/repstatus.html"
let $lastMod := xmldb:last-modified($col, $res)
let $path := $col || "/" || $res
let $doc := doc( $path )
let $active := not( exists( $doc//ok ) )
let $need
lookup
:=
(
not(doc-available(
$path
)) or $lastMod < (current-dateTime() - xs:dayTimeDuration("PT12H"))
)
let $getStatus :=
if( $need
lookup
)
then
let $col := "/db/sade-projects/textgrid"
let $res := "tgstatus.xml"
let $url := "https://dariah-de.github.io/status/textgrid/repstatus.html"
let $lastMod := xmldb:last-modified($col, $res)
let $path := $col || "/" || $res
let $doc := doc( $path )
let $active := not( exists( $doc//ok ) )
let $need
Update
:= not(doc-available($path)) or $lastMod < (current-dateTime() - xs:dayTimeDuration("PT12H"))
let $getStatus :=
if( $need
Update
)
then
let $status := httpclient:get(xs:anyURI($url), false(), ())//xhtml:div[contains(@class, 'repstatus')][not( contains(@class, 'ok') )]
let $status := if( exists( $status ) ) then $status else <ok/>
let $console := console:log( $status )
return
xmldb:store($col, $res, $status)
else if($active and $lastMod < (current-dateTime() - xs:dayTimeDuration("PT2H")))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment