Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

More information

You can develop Powershell Scripts that are executed by the Beebox each time a new source file is processed or a translated files are created.

The Beebox logs operations on both source files and target files. Source file operations refer to verification of file format and the extraction of text contents. Target file operations refer to the creation of the final or preliminary (MT) translated files. These operations can run both automatically (see the various Automation options) or be triggered from the Beebox user interface. Whenever a file operation fails, the log includes a detailed error description. If automated, the system will retry failed operations in regular intervals.

Powershell scripting lets you:

  • Transfer translated files to other locations or a content management system
  • Identify erroneous source files and maintain your own logs or alerts
  • Identify target files that could not be created due to incorrect translations (e.g. invalid markup)


Adding Powershell scripts

Powershell scripts are enabled per Beebox project. This is done from the project settings page. Select a project, then click "Settings" and go to the "Automation" tab:

The script must be named and saved to the exact location printed.

Script location and parameters

The Powershell script name and location is preset by the system and specific to each project. You must save your script to this exact location.

{project base directory}\scripts\script-actions-files.ps1

 

The Powershell script is called with the parameters listed below.

>script-actions-files.ps1 -log {log path} -project {project id}

Parameters:

  • log: The path of the file containing all file operations since the last script execution.
  • project: The project id. This information is included for information purposes.

 

Log file contents

The log file contains one line per source or target file operation. Each line is composed of pipe separated fields. Some characters are encoded and you need to unencode them: "\" => "\\", {newline} => "\n", {linefeed} => "\r", "|" => (removed).

Typical lines may look like this:

2014-09-30T15:04:49.3653064+02:00|SOURCE|FAILED|en|c:\\beebox\\93f522ff-74e7-4522-a886-8af737082059\\in\\R-GeneralText - Copie.xliff||Failed to extract texts from source file.|Exception: The Xliff file contains languages other than the Beebox project languages\r\n at Wordbee.Beebox.Core.ProjectBuilder\r\n 
2014-09-30T15:04:49.5684508+02:00|TARGET|OK|fr|c:\\beebox\\93f522ff-74e7-4522-a886-8af737082059\\in\\R-Cautions.htm|c:\\beebox\\93f522ff-74e7-4522-a886-8af737082059\\out\\fr\\R-Cautions.prelim.htm|| 
2014-09-30T15:04:49.7075493+02:00|TARGET|OK|es|c:\\beebox\\93f522ff-74e7-4522-a886-8af737082059\\in\\R-Cautions.htm|c:\\beebox\\93f522ff-74e7-4522-a886-8af737082059\\out\\es\\R-Cautions.prelim.htm||

 

 

The fields are:

  • Field 1: The ISO formatted date when this line was written.
  • Field 2: "SOURCE" if the operation refers to the analysis of a source file, "TARGET" if it refers to the creation of a translated file.
  • Field 3: Status of operation. Either "OK" or "FAILED".
  • Field 4: The language code of the file. If the line is for a source file then this always is the project source language.
  • Field 5: The full path of the source file.
  • Field 6: The full path of the translated file. Empty if the operation refers to the analysis of a source file.
  • Field 7: Error message, if operation failed.
  • Field 8: Full error details, if operation failed. This information is typically very technical.

 

 

  • No labels