ConvertFile
Converts a file from one format to a different format by using the convert-to function of Libre Office. For a list of supported input/output formats see: https://wiki.openoffice.org/wiki/Framework/Article/Filter/FilterList_OOo_3_0
python · Common Scripts
Details
| ID | ConvertFile |
|---|---|
| Language | python |
| From Version | 5.0.0 |
| Docker Image | demisto/office-utils:2.0.0.9067966 |
| Tags | Utility |
README
Converts a file from one format to a different format by using the convert-to function of Libre Office. For a list of supported input/output formats see: https://wiki.openoffice.org/wiki/Framework/Article/Filter/FilterList_OOo_3_0
Troubleshooting
Operation not permitted
If you get an error such as:
cannot access 'soffice': Operation not permitted
Or:
/usr/bin/soffice: 191: exec: /usr/bin/oosplash: not found
You may need to upgrade Docker, runc, and the libseccomp rpm on your host machine.
Script Data
| Name | Description |
|---|---|
| Script Type | python3 |
| Tags | Utility |
| Cortex XSOAR Version | 5.0.0 |
Used In
This script is used in the following playbooks and scripts.
- Extract Indicators From File - Generic v2
Inputs
| Argument Name | Description |
|---|---|
| entry_id | The War Room entryID of the file to convert. |
| format | Output format to which to convert. Can specify only file extension, such as: “pdf” or <ext:writer> such as “txt:Text (Encoded)”. Default is “pdf”. |
| all_files | If “yes”, will return all generated files. If “no”, will return only the main file. Relevant for formats that might generate multiple files, such as html (which will generate image files additionally to the main html file). Default is “no”. |
Outputs
| Path | Description | Type |
|---|---|---|
| File.Name | The name of the output file. | String |
| File.Extension | The extension of the file. | String |
| File.EntryID | The entry ID of the file. | String |
| File.Info | Additional information about the file. | String |
| File.Type | The file type. | String |
commonfields: id: ConvertFile version: -1 name: ConvertFile script: '' type: python subtype: python3 fromversion: 5.0.0 tags: - Utility comment: 'Converts a file from one format to a different format by using the convert-to function of Libre Office. For a list of supported input/output formats see: https://wiki.openoffice.org/wiki/Framework/Article/Filter/FilterList_OOo_3_0' enabled: true args: - name: entry_id required: true default: true description: The War Room entryID of the file to convert. - name: format description: 'Output format to which to convert. Can specify only file extension, such as: "pdf" or <ext:writer> such as "txt:Text (Encoded)". Default is "pdf".' defaultValue: pdf - name: all_files auto: PREDEFINED predefined: - 'yes' - 'no' description: If "yes", will return all generated files. If "no", will return only the main file. Relevant for formats that might generate multiple files, such as html (which will generate image files additionally to the main html file). Default is "no". defaultValue: 'no' outputs: - contextPath: File.Name description: The name of the output file. type: String - contextPath: File.Extension description: The extension of the file. type: String - contextPath: File.EntryID description: The entry ID of the file. type: String - contextPath: File.Info description: Additional information about the file. type: String - contextPath: File.Type description: The file type. type: String scripttarget: 0 dockerimage: demisto/office-utils:2.0.0.9067966 runas: DBotWeakRole tests: - No tests (auto formatted)