Difference between revisions of "OS4X plugin os4xplugin zip decompress"

From OS4X
Jump to navigation Jump to search
 
Line 1: Line 1:
 
[[Category:Plugins]]
 
[[Category:Plugins]]
== Zweck ==
 
Testet jede einzelne Datei des Auftrags ob es eine per ZIP komprimierte Datei ist. Im Erfolgsfall wird die Datei dekomprimiert, der Zielpfad entspricht der Position der Datei (d.h. eventuelle Verzeichnisstrukturen werden ebenfalls dort abgelegt). Die ZIP-Datei selbst wird nach erfolgreicher Dekompression aus dem Auftrag entfernt (logisch, nicht physikalisch).
 
  
== Voraussetzungen ==
+
== Purpose ==Tests each individual file in the job to see whether it is a ZIP compressed file. If successful, the file is decompressed, the target path corresponds to the position of the file (i.e. any directory structures are also stored there). The ZIP file itself is removed from the job after successful decompression (logically, not physically).
  
* Datei <code>/etc/os4x.conf</code> bzw. Konfigurationsdatei in der Umgebungsvariable <code>$OS4X_CFGFILE</code> definiert. Über die Datenbank, die hier konfiguriert ist, wird das temporäre Verzeichnis sowie das Lizenzfile bezogen.  
+
== Requirements ==
 +
* File <code>/etc/os4x.conf</code> or configuration file referenced by environment variable <code>$OS4X_CFGFILE</code>. The temporary directory and the license file are obtained via the database that is configured here.
  
== Konfiguration ==
+
== Configuration ==
*extractOnlyZip: Falls dieser boolsche Konfigurationswert aktiviert wird, werden nur Dateien mit der Endung "<code>.zip</code>" dekomprimiert. Dies erleichtert die Behandlung von ZIP-Archiven, die nicht als solche ersichtlich sind, wie z.B. JAR-, docx-, pptx-, xlsx- oder ähnliche Dateiformate.
+
*extractOnlyZip: If this boolean configuration value is activated, only files with the extension "<code>.zip</code>" will be decompressed. This makes it easier to handle ZIP archives that are not apparent as such, such as JAR, docx, pptx, xlsx or similar file formats.
  
Das Programm "<code>unzip</code>" wird im <code>PATH</code> der Shell gesucht, unter der das Plugin gestartet wird. Somit kann durch geschickte Positionierung oder Definition des Default-PATHs die genutzte unzip-Version beeinflusst werden.
+
The program "<code>unzip</code>" is searched for in the <code>PATH</code> of the shell under which the plugin is started. This means that the unzip version used can be influenced by clever positioning or definition of the default PATH.
  
== Rückgabewerte ==
+
== Return codes ==
*0: alles OK
+
*0: everything OK
*1: Fehler beim Parsen des XMLs
+
*1: Number of parameters != 1; Config file <code>/etc/os4x.conf</code> not found; Config in database not readable; License not valid; XML file invalid

Latest revision as of 09:00, 29 July 2024


== Purpose ==Tests each individual file in the job to see whether it is a ZIP compressed file. If successful, the file is decompressed, the target path corresponds to the position of the file (i.e. any directory structures are also stored there). The ZIP file itself is removed from the job after successful decompression (logically, not physically).

Requirements

  • File /etc/os4x.conf or configuration file referenced by environment variable $OS4X_CFGFILE. The temporary directory and the license file are obtained via the database that is configured here.

Configuration

  • extractOnlyZip: If this boolean configuration value is activated, only files with the extension ".zip" will be decompressed. This makes it easier to handle ZIP archives that are not apparent as such, such as JAR, docx, pptx, xlsx or similar file formats.

The program "unzip" is searched for in the PATH of the shell under which the plugin is started. This means that the unzip version used can be influenced by clever positioning or definition of the default PATH.

Return codes

  • 0: everything OK
  • 1: Number of parameters != 1; Config file /etc/os4x.conf not found; Config in database not readable; License not valid; XML file invalid