| Akron | c71176d | 2022-03-14 11:15:07 +0100 | [diff] [blame] | 1 | use Mojo::ByteStream 'b'; |
| Akron | 85559f0 | 2023-09-04 11:42:45 +0200 | [diff] [blame] | 2 | |
| 3 | $main::ENV{MOJO_MAX_LINE_SIZE} = 65536; |
| 4 | |
| Akron | c71176d | 2022-03-14 11:15:07 +0100 | [diff] [blame] | 5 | my $api = 'http://10.0.10.51:9000/api/'; |
| 6 | { |
| 7 | Search => { |
| 8 | engine => 'Kalamar::API' |
| 9 | }, |
| 10 | 'Kalamar-Auth' => { |
| Akron | 2e0811c | 2023-11-03 16:19:00 +0100 | [diff] [blame] | 11 | client_id => b($app->home->child('.client_id')->slurp)->trim, |
| 12 | client_secret => b($app->home->child('.client_secret')->slurp)->trim, |
| Akron | c71176d | 2022-03-14 11:15:07 +0100 | [diff] [blame] | 13 | oauth2 => 1, |
| 14 | experimental_client_registration => 1 |
| 15 | }, |
| 16 | Kalamar => { |
| 17 | api_path => $api, |
| Akron | 4a11874 | 2023-09-04 11:41:46 +0200 | [diff] [blame] | 18 | log_path => $app->home . '/log', |
| Akron | c71176d | 2022-03-14 11:15:07 +0100 | [diff] [blame] | 19 | secure_cookie => 1, |
| 20 | https_only => 1, |
| 21 | plugins => ['Auth', 'Piwik','Plugins'], |
| 22 | experimental_proxy => 1, |
| 23 | proxy_inactivity_timeout => 120, |
| 24 | proxy_connect_timeout => 120, |
| Akron | 8ceba02 | 2024-04-18 09:18:53 +0200 | [diff] [blame] | 25 | openapi => 'openapi', |
| Akron | c71176d | 2022-03-14 11:15:07 +0100 | [diff] [blame] | 26 | Piwik => { |
| 27 | ping_requests => 1, |
| 28 | ping_site_id => 13 |
| 29 | }, |
| 30 | navi_ext => [ |
| 31 | { |
| Akron | 5664405 | 2026-01-19 15:27:48 +0100 | [diff] [blame] | 32 | "title" => "corpus", |
| 33 | "id" => "corpus", |
| 34 | "class" => "folded", |
| 35 | "items" => [ |
| 36 | { |
| 37 | "title" => "composition", |
| 38 | "id" => "composition" |
| 39 | }, |
| 40 | { |
| 41 | "title" => "useful_subcorpora", |
| 42 | "id" => "useful_subcorpora" |
| 43 | }, |
| 44 | { |
| 45 | "title" => "named_vc", |
| 46 | "id" => "named_vc" |
| 47 | } |
| 48 | ] |
| Akron | c71176d | 2022-03-14 11:15:07 +0100 | [diff] [blame] | 49 | }, |
| 50 | { |
| 51 | "title" => "Privacy", |
| 52 | "id" => "privacy" |
| 53 | }, |
| Akron | 8dbf9c6 | 2024-03-20 17:24:15 +0100 | [diff] [blame] | 54 | { |
| 55 | "title" => "News", |
| 56 | "id" => "news" |
| 57 | }, |
| Akron | c71176d | 2022-03-14 11:15:07 +0100 | [diff] [blame] | 58 | ], |
| 59 | }, |
| 60 | CSP => { |
| 61 | 'frame-src' => 'self', |
| 62 | 'frame-ancestors' => ['self','http://*.ids-mannheim.de/','https://*.ids-mannheim.de/','http://klinux10/'] |
| 63 | }, |
| 64 | 'Kalamar-Plugins' => { |
| 65 | default_plugins => 'default.plugins.json' |
| 66 | }, |
| 67 | Piwik => { |
| 68 | url => 'https://stats.ids-mannheim.de', |
| 69 | token_auth => '8515ea786127a63a2974de25a0808b00', |
| 70 | site_id => 8, |
| 71 | embed => 1 |
| 72 | }, |
| 73 | hypnotoad => { |
| 74 | listen => ['http://*:4348'], |
| 75 | workers => 5, |
| 76 | inactivity_timeout => 120, |
| 77 | proxy => 1 |
| 78 | }, |
| 79 | MailException => { |
| 80 | from => join('@', 'diewald', 'ids-mannheim.de'), |
| 81 | to => join('@', 'diewald', 'ids-mannheim.de'), |
| 82 | subject => '[KorAP] Kalamar crashed' |
| 83 | }, |
| 84 | Localize => { |
| 85 | dict => { |
| 86 | de_loginExplanation => 'Anmeldung mit einem registrierten <%= link_to "Cosmas-II" => "https://perso.ids-mannheim.de/registration/", style => "white-space: nowrap" %>-Konto', |
| 87 | en_loginExplanation => 'Login with a registered <%= link_to "Cosmas-II" => "https://perso.ids-mannheim.de/registration/", style => "white-space: nowrap" %> account', |
| 88 | en_Nav_privacy => 'Privacy', |
| 89 | de_Nav_privacy => 'Datenschutz', |
| 90 | de_Nav_corpora => 'Korpora', |
| 91 | en_Nav_corpora => 'Corpora', |
| 92 | en_howToCite => 'Citation Help', |
| 93 | de_howToCite => 'Zitierhilfe', |
| 94 | en_recentCorpusPub => 'Recent publications to refer to DeReKo as linguistic research data', |
| 95 | de_recentCorpusPub => 'Neuere Publikationen zu DeReKo als linguistische Forschungsdatengrundlage', |
| Akron | bd2b957 | 2023-09-04 11:26:19 +0200 | [diff] [blame] | 96 | en_recentToolPub => 'Recent publications to refer to KorAP as a research tool', |
| Akron | c71176d | 2022-03-14 11:15:07 +0100 | [diff] [blame] | 97 | de_recentToolPub => 'Neuere Publikationen zu KorAP als Forschungswerkzeug', |
| Marc Kupietz | 152dfc9 | 2025-04-11 10:02:27 +0200 | [diff] [blame] | 98 | de_usefulvcs => 'Nützliche virtuelle Sub-Korpora', |
| 99 | en_usefulvcs => 'Useful virtual sub-corpora', |
| 100 | de_currentdb => 'Aktuelle Datengrundlage: virtuelles Korpus <%= t code => stash("vc") %>', |
| 101 | en_currentdb => 'Current data set: Virtual corpus <%= t code => stash("vc") %>', |
| 102 | de_compositionbysource => 'Zusammensetzung nach Quelle', |
| 103 | en_compositionbysource => 'Composition by source', |
| Akron | 5664405 | 2026-01-19 15:27:48 +0100 | [diff] [blame] | 104 | de_Title_composition => 'Korpus-Zusammensetzung', |
| 105 | en_Title_composition => 'Corpus Composition', |
| 106 | en_Nav_composition => 'Composition', |
| 107 | de_Nav_composition => 'Zusammensetzung', |
| 108 | en_Nav_useful_subcorpora => 'Useful subcorpora', |
| 109 | de_Nav_useful_subcorpora => 'Nützliche Subkorpora', |
| 110 | en_Nav_named_vc => 'Named VC', |
| 111 | de_Nav_named_vc => 'Benamte VC', |
| Akron | c71176d | 2022-03-14 11:15:07 +0100 | [diff] [blame] | 112 | } |
| 113 | }, |
| 114 | 'TagHelpers-ContentBlock' => { |
| 115 | footer => [ |
| 116 | { |
| 117 | inline => '<%= link_to loc("about") => "https://www.ids-mannheim.de/digspra/kl/projekte/korap/" %>', |
| 118 | position => 70 |
| 119 | }, |
| 120 | { |
| Akron | dc1b9bb | 2025-07-21 14:34:05 +0200 | [diff] [blame] | 121 | inline => '<%= link_to loc("howToCite") => url_for(doc => { page => "faq", scope => undef })->fragment("howToCite") %>', |
| Akron | c71176d | 2022-03-14 11:15:07 +0100 | [diff] [blame] | 122 | position => 75 |
| 123 | }, |
| 124 | { |
| Akron | dc1b9bb | 2025-07-21 14:34:05 +0200 | [diff] [blame] | 125 | inline => '<%= link_to loc("privacy") => url_for(doc => { page => "privacy", scope => undef }) %>', |
| Akron | c71176d | 2022-03-14 11:15:07 +0100 | [diff] [blame] | 126 | position => 90 |
| 127 | }, |
| 128 | { |
| 129 | inline => '<%= link_to loc("imprint") => "https://www.ids-mannheim.de/allgemein/impressum/" %>', |
| 130 | position => 80 |
| 131 | }, |
| 132 | ], |
| 133 | faq => [ |
| 134 | { |
| 135 | position => 50, |
| 136 | inline => <<'HOWTOCITE' |
| 137 | <section> |
| 138 | <h3 id="howToCite"><%= loc 'howToCite' %></h3> |
| 139 | %= include 'custom/partial/citation' |
| 140 | </section> |
| 141 | HOWTOCITE |
| 142 | } |
| 143 | ], |
| 144 | loginInfo => [ |
| 145 | { |
| 146 | inline => '<p><%== loc "loginExplanation" %></p>', |
| 147 | position => 50 |
| 148 | }#, |
| 149 | # { |
| 150 | # inline => '<p class="announcement"><time datetime="2018-05-24">24.05.2018</time> Um weitere Anwendungen für die Nutzung von DeReKo anbieten zu können, haben wir die <%= link_to "Nutzungsvereinbarung", "https://www.ids-mannheim.de/cosmas2/projekt/registrierung/Nutzungsvereinbarung.html" %> angepasst!</p>', |
| 151 | # position => 100 |
| 152 | # } |
| Akron | 743c2d6 | 2025-03-05 14:37:59 +0100 | [diff] [blame] | 153 | ], |
| 154 | headerButtonGroup => [ |
| 155 | { |
| Akron | dc1b9bb | 2025-07-21 14:34:05 +0200 | [diff] [blame] | 156 | inline => '<h3 class="nav-link"><%= link_to loc("news") => url_for(doc => {page => "news", scope => undef }) %></h3>', |
| Akron | 743c2d6 | 2025-03-05 14:37:59 +0100 | [diff] [blame] | 157 | position => 30 |
| 158 | } |
| Akron | c71176d | 2022-03-14 11:15:07 +0100 | [diff] [blame] | 159 | ] |
| 160 | }, |
| 161 | |
| 162 | # See Mojolicious::Plugin::CHI |
| 163 | CHI => { |
| 164 | default => { |
| 165 | driver => 'FastMmap', |
| 166 | root_dir => app->home . '/cache/data', |
| 167 | cache_size => '500m', |
| 168 | max_size => '500m' |
| 169 | }, |
| 170 | user => { |
| 171 | l1_cache => { |
| 172 | driver => 'FastMmap', |
| 173 | root_dir => app->home . '/cache/usermap', |
| 174 | cache_size => '50m', |
| 175 | max_size => '50m' |
| 176 | }, |
| 177 | driver => 'File', |
| 178 | root_dir => app->home . '/cache/userfile', |
| 179 | max_key_length => 64, |
| 180 | max_size => '500m' |
| 181 | } |
| 182 | } |
| 183 | }; |