summaryrefslogtreecommitdiff
path: root/htroot
diff options
context:
space:
mode:
authorMichael Peter Christen <mc@yacy.net>2025-06-19 10:52:08 +0200
committerMichael Peter Christen <mc@yacy.net>2025-06-19 10:52:08 +0200
commit76210ab9fbfd3c89fa40074ea93ee6c651d8eb68 (patch)
tree60afdbb0e8f20d3086b9dbf63fbaf3ee74462ae3 /htroot
parent4bf55a6ef957b16a377064ce155cf23179539f0d (diff)
added ZIM importer servlet
Diffstat (limited to 'htroot')
-rw-r--r--htroot/IndexImportZim_p.html53
-rw-r--r--htroot/env/templates/submenuIndexImport.template1
2 files changed, 54 insertions, 0 deletions
diff --git a/htroot/IndexImportZim_p.html b/htroot/IndexImportZim_p.html
new file mode 100644
index 000000000..68d74762e
--- /dev/null
+++ b/htroot/IndexImportZim_p.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>YaCy '#[clientname]#': ZIM File Import</title>
+ #%env/templates/metas.template%#
+ #(import)#::<meta http-equiv="REFRESH" content="10;url=IndexImportZim_p.html" />
+ <!-- the url= removes http get parameters on refresh, preventing restart of import -->
+ #(/import)#
+ </head>
+ <body id="IndexImportZim">
+ #%env/templates/header.template%#
+ #%env/templates/submenuIndexImport.template%#
+ <h2>ZIM File Import</h2>
+
+ #(import)#
+ <p>No import thread is running, you can start a new thread here</p>
+ <form action="IndexImportZim_p.html" method="post" enctype="multipart/form-data" accept-charset="UTF-8">
+ <!-- no post method here, we don't want to transmit the whole file, only the path-->
+ <fieldset>
+ <legend>Zim File Selection: select a '.zim' file</legend>
+ <p>
+ You can download ZIM files for example here
+ <a href="https://download.kiwix.org/zim/" target="_blank">Kiwix ZIM Archive</a>.
+ </p>
+ <dl>
+ <dt class="TableCellDark"><label for="file">File:</label></dt>
+ <dd><input name="file" id="file" type="file" value="" size="75" /></dd>
+ <dt></dt>
+ <dd><input name="submit" class="btn btn-primary" type="submit" value="Import ZIM File" /></dd>
+ </dl>
+ </fieldset>
+ </form>
+
+ <br />
+ ::
+ <form>
+ <fieldset><legend>Import Process</legend>
+ <dl>
+ <dt>Thread:</dt><dd>#[thread]#</dd>
+ <dt>ZIM File:</dt><dd>#[zimfile]#</dd>
+ <dt>Processed:</dt><dd>#[count]# Entries</dd>
+ <dt>Speed:</dt><dd>#[speed]# pages per second</dd>
+ <dt>Running Time:</dt><dd>#[runningHours]# hours, #[runningMinutes]# minutes</dd>
+ <dt>Remaining Time:</dt><dd>#[remainingHours]# hours, #[remainingMinutes]# minutes</dd>
+ </dl>
+ </fieldset>
+ <input name="abort" type="submit" class="btn btn-danger" value="Stop"/>
+ </form>
+ #(/import)#
+
+ #%env/templates/footer.template%#
+ </body>
+</html> \ No newline at end of file
diff --git a/htroot/env/templates/submenuIndexImport.template b/htroot/env/templates/submenuIndexImport.template
index 39a1029a3..ccbc49412 100644
--- a/htroot/env/templates/submenuIndexImport.template
+++ b/htroot/env/templates/submenuIndexImport.template
@@ -14,6 +14,7 @@
<li><a href="Load_RSS_p.html" class="MenuItemLink #(authorized)#lock::unlock#(/authorized)#">RSS Feed Importer</a></li>
<li><a href="IndexImportOAIPMH_p.html" class="MenuItemLink #(authorized)#lock::unlock#(/authorized)#">OAI-PMH Importer</a></li>
<li><a href="IndexImportWarc_p.html" class="MenuItemLink #(authorized)#lock::unlock#(/authorized)#">Warc Importer</a></li>
+ <li><a href="IndexImportZim_p.html" class="MenuItemLink #(authorized)#lock::unlock#(/authorized)#">Zim Importer</a></li>
<li><a href="IndexImportJsonList_p.html" class="MenuItemLink #(authorized)#lock::unlock#(/authorized)#">JsonList Importer</a></li>
</ul>
</div>