Difference between revisions of "OS4X plugin os4xplugin charset convert"

From OS4X
Jump to navigation Jump to search
 
Line 1: Line 1:
 
[[Category:Plugins]]
 
[[Category:Plugins]]
== Zweck ==
 
Dieses Plugin ändern den Zeichensatz aller Dateien des Auftrags von einem konfigurierten Quell-Zeichensatz in den konfigurierten Ziel-Zeichensatz. Eine optionale maximale Dateigröße limitiert hierbei die Konvertierung der gefundenen Dateien. Es können Fehler bei der Zeichensatzkonvertierung ignoriert werden, sodass im Fehlerfall die original-Datei weiter genutzt werden kann. Die Ausgabedatei wird mit einem temporären Namen im temp. Verzeichnis von OS4X erzeugt, der Dateisuffix lautet "<code>_charset_converted.job_[''Auftragsnummer'']</code>".
 
  
== Voraussetzungen ==
+
== Purpose ==
 +
This plugin changes the character set of all files in the job from a configured source character set to the configured target character set. An optional maximum file size limits the conversion of the files found. Errors in character set conversion can be ignored, so that in the event of an error, the original file can continue to be used. The output file is saved with a temporary name in temp. Directory created by OS4X, the file suffix is ​​"<code>_charset_converted.job_[''Job number'']</code>".
  
* 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 ==
Als Zeichensätze können alle verfügbaren Zeichensätze des Konfigurations-Pulldownmenüs genutzt werden (derzeit über 1100).
+
All available character sets in the configuration pull-down menu can be used as character sets (currently over 1100).
  
*source_charset: Quellzeichensatz (standardäßig "ISO-8859-15")
+
*source_charset: Source character set (default "ISO-8859-15")
*target_charset: Zielzeichensatz (standardäßig "ISO-8859-15")
+
*target_charset: Target character set (default "ISO-8859-15")
*maxsize: maximale Dateigröße derjenigen Dateien, die noch mit dem Plugin bearbeitet werden. Ein Wert von 0 deaktiviert die Prüfung und konvertiert alle Dateien.
+
*maxsize: Maximum file size of those files that are still being processed with the plugin. A value of 0 disables checking and converts all files.
*ignore_conversion_errors: ein boolscher Schalter zur Ignorierung aller Konvertierungsprobleme.
+
*ignore_conversion_errors: a boolean switch to ignore any conversion issues.
  
== Rückgabewerte ==
+
== Return codes ==
*0: alles OK
+
*0: everything OK
*1: XML konnte nicht geparsed werden oder Konvertierungsfehler
+
*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 or conversion errors

Latest revision as of 08:57, 29 July 2024


Purpose

This plugin changes the character set of all files in the job from a configured source character set to the configured target character set. An optional maximum file size limits the conversion of the files found. Errors in character set conversion can be ignored, so that in the event of an error, the original file can continue to be used. The output file is saved with a temporary name in temp. Directory created by OS4X, the file suffix is ​​"_charset_converted.job_[Job number]".

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

All available character sets in the configuration pull-down menu can be used as character sets (currently over 1100).

  • source_charset: Source character set (default "ISO-8859-15")
  • target_charset: Target character set (default "ISO-8859-15")
  • maxsize: Maximum file size of those files that are still being processed with the plugin. A value of 0 disables checking and converts all files.
  • ignore_conversion_errors: a boolean switch to ignore any conversion issues.

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 or conversion errors