Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring/2022 #114

Open
wants to merge 62 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
f08db93
Add caddy export changes.
Feb 24, 2022
7e5d680
Fix exporting routines.
Feb 28, 2022
384f5ca
w.i.p. createLists
Mar 3, 2022
76e3bdf
Fix createlists.
Mar 3, 2022
14c8b0f
Allow multiple authors in iiif generation.
Mar 4, 2022
27b3205
Allow more than 10 volumes in iiif generation.
Mar 4, 2022
97f72b2
Declare namespaces.
Mar 4, 2022
6ebc79a
small fixes to get iiif and lemma rendering running.
May 19, 2022
b54209c
small fixes to get list creation running.
May 19, 2022
aae4212
Many fixes. RestXQ, logging and more.
May 25, 2022
6a46147
fixes...
Jun 23, 2022
2a3d7c8
Improve logging, add some checks.
Jul 13, 2022
7a357dd
Fix sorting of works (strip diacritics from names).
Jul 13, 2022
bd6aaed
Fix duplicate html rendering of frontmatter divs.
Jul 13, 2022
45d7d16
Update handling of argument elements.
Jul 21, 2022
8a6d319
Fix config for source-type divs.
awagner-mainz Jul 22, 2022
65f3505
Don't list manifests several times (collection + individual mf.).
Aug 31, 2022
154feba
Update index factory.
Feb 15, 2023
ae280ab
Add some images.
Mar 1, 2023
c1feacf
Add image file.
Mar 1, 2023
2bafd6c
Remove http_s_ from module ids.
Mar 8, 2023
a2d5f7e
Add AC image.
Mar 22, 2023
3e698c6
Add functions and variables for crumbtrails and pdf
MariaHu May 23, 2023
11c3873
Merge pull request #112 from MariaHu/refactoring/2022
MariaHu May 23, 2023
e03db2f
Merge pull request #1 from digicademy/refactoring/2022
MariaHu May 24, 2023
a341135
Add columns for crumbs, rdf et pdf
MariaHu May 24, 2023
d18e1a5
add redirection to crumbring + pdf
MariaHu May 24, 2023
a430168
Merge pull request #113 from MariaHu/refactoring/2022
MariaHu May 24, 2023
4cddddb
Some updates reconciling git repo with live code on refactoring host.
May 24, 2023
3e345e0
Add some Lemma data files.
May 24, 2023
8c7b751
Set salamanca.school namespaces to httpS.
May 24, 2023
d3fe373
Declare svsal to be beta, not alpha any longer.
May 24, 2023
8a93ce6
Disable debug output in note/label creation.
May 24, 2023
7ccf230
Changed redirection to crumbtrails
MariaHu May 24, 2023
87c687b
Update namespaces to httpS and some fixes for crumbtrail/index/routin…
May 24, 2023
2aeb5a8
Improve indentation.
May 25, 2023
87e75c2
Add/change catalogue view production.
May 26, 2023
ce15180
Improve volumes in ToC popups.
May 26, 2023
df8436a
Add upload.xql.
May 26, 2023
3e0d891
Enabling pdf-upload redirection
MariaHu May 26, 2023
be7f43c
Merge branch 'refactoring/2022' into refactoring/2022
MariaHu May 26, 2023
f561fa8
Merge pull request #115 from MariaHu/refactoring/2022
MariaHu May 26, 2023
2216b2e
Fix iiif multivolumes.
May 26, 2023
c358d86
Add pdf creation support.
May 26, 2023
29178c3
Make all [www|api].salamanca urls httpS.
Jun 5, 2023
951733d
Update details and routes administration functions.
awagner-mainz Jun 5, 2023
fd4b5e7
Disable info logging for api requests.
Jun 6, 2023
60d88b1
Some fixes noticed when relaunching refactoring server.
Jun 6, 2023
d864c8d
Updates to indexing and fragmentation.
awagner-mainz Jun 6, 2023
11d3c5a
Fix index and iiif factories.
Jun 6, 2023
8329dcb
Fix details creation for volumes of already-indexed multivolumes.
Jun 11, 2023
7f455ba
Catch caddy response and empty thumbnail problems.
Jun 12, 2023
2dc4b51
Allow for multiple arguments in citeIDs.
Jun 12, 2023
b83aefb
Fix hostname assignment.
Jun 16, 2023
e96be52
Fix pdf exporting.
Jun 16, 2023
809f22b
Improve feedback in routing creation.
Jun 16, 2023
2f862df
Fix cutnpaste (resulting bracketing) error.
Jun 16, 2023
0f63a80
Fix stats generation (catch some errors, better debugging output).
Jun 21, 2023
7f643ab
Fix iiif generation (catch errors, improve debugging output).
Jun 21, 2023
b7ee1b0
Fix RDF creation without having crumbtrail info in nodeIndex.
Jun 21, 2023
8025c69
Fix handling of nonavailable citeIDs in enhance-tei.
awagner-mainz Jun 26, 2023
6740b47
Fix RDF creation (some hardcoded servernames still in there).
awagner-mainz Jun 26, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions admin.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,42 @@ <h1>
Link to <a target="_new" href="https://stats.adwmainz.net/index.php?module=CoreHome&amp;action=index&amp;idSite=20&amp;period=day&amp;date=yesterday&amp;ignoreSalt=eb2d7603c7b3f98ce81efb011e901d4c#?module=Dashboard&amp;action=embeddedIndex&amp;idSite=20&amp;period=day&amp;date=yesterday&amp;ignoreSalt=eb2d7603c7b3f98ce81efb011e901d4c&amp;idDashboard=1">Piwik page</a>.<br/>
<a href="reindex.xql" target="_new">Reindex</a> eXist-db.
</p>
<!-- <p><a href="admin-svn.html">SVN Functions</a>.</p> -->
</div>

<div class="row" data-template="app:loadListOfWorks" data-template-sort="wid">
<div class="row" data-template="admin:loadListOfWorks" data-template-sort="wid">
<h2>Works</h2>
<p>
<span data-template="app:workCount">0</span> works found.
</p>
<p>
<a href="createLists.html" role="button" class="btn btn-primary">Write/overwrite list of works and save!</a>
<!-- here we can add a button to collect and post all routing information to caddy <a href="createLists.html" role="button" class="btn btn-primary">Write/overwrite list of works and save!</a> -->
</p>
<table class="table table-hover">
<tr>
<th>Werk-ID</th>
<th>IIIF Resource</th>
<th>Node Index</th>
<th>Crumbtrails</th>
<th>Full PDF</th>
<th>HTML Fragments</th>
<th>Catalogue/details Page</th>
<th>Sphinx Fragments</th>
<th>RDF Triples</th>
<th>IIIF Resource</th>
<th>Routing Information</th>
</tr>
<tr data-template="templates:each" data-template-from="listOfWorks" data-template-to="currentWork">
<td data-template="admin:workString">boing</td>
<td data-template="admin:needsIIIFResourceString">boing</td>
<td data-template="admin:needsIndexString">boing</td>
<td data-template="admin:needsCrumbtrails">boing</td>
<td data-template="admin:needsPdfDatei">boing</td>
<td data-template="admin:needsHTMLString">boing</td>
<td data-template="admin:needsDetailsString">boing</td>
<td data-template="admin:needsSphinxSnippetsString">boing</td>
<td data-template="admin:needsRDFString">boing</td>
<td data-template="admin:needsIIIFResourceString">boing</td>
<td data-template="admin:needsRoutingString">boing</td>
</tr>
<br/>
<a href="createLists.html" role="button" class="btn btn-primary">Write/overwrite list of works and save!</a>
<br/>
</table>
<p>
<span data-template="admin:needsTeiCorpusZip">boing</span>
Expand Down
21 changes: 11 additions & 10 deletions controller.xql
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import module namespace util = "http://exist-db.org/xquery/util";
import module namespace functx = "http://www.functx.com";
import module namespace rest = "http://exquery.org/ns/restxq";

import module namespace config = "http://www.salamanca.school/xquery/config" at "modules/config.xqm";
import module namespace net = "http://www.salamanca.school/xquery/net" at "modules/net.xqm";
import module namespace iiif = "http://www.salamanca.school/xquery/iiif" at "modules/iiif.xqm";
import module namespace config = "https://www.salamanca.school/xquery/config" at "modules/config.xqm";
import module namespace net = "https://www.salamanca.school/xquery/net" at "modules/net.xqm";
import module namespace iiif = "https://www.salamanca.school/xquery/iiif" at "modules/iiif.xqm";

declare namespace exist = "http://exist.sourceforge.net/NS/exist";
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
Expand Down Expand Up @@ -67,6 +67,7 @@ let $parameterString :=


(: Print request context for debugging :)
(:
let $debug :=
if ($config:debug = "trace") then
console:log("Request at '" || request:get-header('X-Forwarded-Host') || "' for " || request:get-effective-uri() || "&#x0d; " ||
Expand All @@ -77,7 +78,7 @@ let $debug :=
"$lang: " || $lang || "."
)
else ()

:)

(: Here comes the actual routing ... :)
return
Expand All @@ -97,7 +98,7 @@ return
else if ($exist:resource = "favicon.ico") then
(:let $debug := if ($config:debug = "trace") then util:log("warn", "Favicon requested: " || $net:forwardedForServername || $exist:path || ".") else ()
return :)
if ($config:instanceMode = "testing") then
if ($config:instanceMode = ("testing", "fakeprod")) then
net:forward("/resources/favicons/" || replace($exist:resource, "favicon", "favicon_red"), $netVars)
else
net:forward("/resources/favicons/" || $exist:resource, $netVars)
Expand All @@ -116,12 +117,12 @@ return


(: *** Entity resolver (X-Forwarded-Host = 'id.{$config:serverdomain}') *** :)
else if (request:get-header('X-Forwarded-Host') = "id." || $config:serverdomain) then
else if (request:get-header('X-Forwarded-Host') = "id." || $config:serverdomain or substring($exist:path, 1, 7) = "/texts/") then
let $debug1 := if ($config:debug = ("trace", "info")) then console:log("Id requested: " || $net:forwardedForServername || $exist:path || $parameterString || ". (" || net:negotiateContentType($net:servedContentTypes, '') || ')') else ()
let $debug1 := if ($config:debug = ("trace")) then console:log("Redirect (303) to '" || $config:apiserver || "/v1" || $exist:path || $parameterString || "'.") else ()
let $debug1 := if ($config:debug = ("trace")) then console:log("Redirect (303) to '" || $config:apiserver || "/v1" || translate($exist:path, "_", ":") || $parameterString || "'.") else ()
return
if (matches($exist:path, '(/texts|/concepts/|/authors)')) then
net:redirect-with-303($config:apiserver || "/v1" || $exist:path || $parameterString)
net:redirect-with-303($config:apiserver || "/v1" || translate($exist:path, "_", ":") || $parameterString)
else if (matches($exist:path, '/works\.')) then
net:redirect-with-303($config:apiserver || "/v1" || replace($exist:path, '/works\.', '/texts/') || $parameterString)
else net:error(404, $netVars, ())
Expand Down Expand Up @@ -267,11 +268,11 @@ return

(: Relative path requests from sub-collections are redirected there :)
else if (contains($exist:path, "/resources/")) then
let $debug := if ($config:debug = "trace") then console:log("Resource requested: " || $net:forwardedForServername || $exist:path || $parameterString || ".") else ()
let $debug := () (: if ($config:debug = "trace") then console:log("Resource requested: " || $net:forwardedForServername || $exist:path || $parameterString || ".") else ():)
(: let $debug := if ($config:debug = "trace") then util:log("warn", "Favicon requested: " || $net:forwardedForServername || $exist:path || ".") else ():)
return
if (contains(lower-case($exist:resource), "favicon")) then
if ($config:instanceMode = "testing") then
if ($config:instanceMode = ("testing", "fakeprod")) then
net:forward("/resources/favicons/" || replace($exist:resource, "favicon", "favicon_red"), $netVars)
else
net:forward("/resources/favicons/" || $exist:resource, $netVars)
Expand Down
28 changes: 25 additions & 3 deletions createLists.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,37 @@ <h2 class="hidden-lg hidden-md">
</h2>
<div class="row">
<div class="col-md-6">
<div data-template="admin:saveFileWRK">
<div data-template="admin:buildFacets">
Booo! Something went wrong!
</div>
</div>
<div class="col-md-6">
<div data-template="admin:saveFileWRKnoJs">
<div data-template="admin:buildFacetsNoJs">
Booo! Something went wrong!
</div>
</div>
<!-- <div class="col-md-6">
<div data-template="admin : exportFileWRK">
Booo! Something went wrong!
</div>
</div>
<div class="col-md-6">
<div data-template="admin : saveFileWRKnoJs">
Booo! Something went wrong!
</div>
</div>
<div class="col-md-6">
<div data-template="admin : exportFileWRKnoJs">
Booo! Something went wrong!
</div>
</div>
-->
</div>
<div class="row">
<div class="col-md-6">
<a href="works.html" class="btn btn-info" role="button">
<span class="glyphicon glyphicon-thumbs-up" aria-hidden="true"></span> Open works.html</a>
</div>
</div>
</div>
</div>
</div>
1 change: 1 addition & 0 deletions data/L0998.html

Large diffs are not rendered by default.

Loading