openconvert module
OpenConvert CLI Tool
A command-line interface for connecting to the OpenConvert OpenAgents network to discover file conversion services and perform file conversions.
- openconvert.convert(input_files, output_path, host='network.openconvert.ai', port=8765)[source]
Convert files using the OpenConvert network.
- Parameters:
- Returns:
True if conversion successful, False otherwise
- Return type:
- openconvert.convert_file(input_path, output_path, host='network.openconvert.ai', port=8765)[source]
Convert a single file using the OpenConvert network.
- Parameters:
- Returns:
True if conversion successful, False otherwise
- Return type:
Example
>>> from openconvert import convert_file >>> success = convert_file("document.txt", "document.pdf") >>> if success: ... print("Conversion completed!")
Main Functions
convert_file
- openconvert.convert_file(input_path, output_path, host='network.openconvert.ai', port=8765)[source]
Convert a single file using the OpenConvert network.
- Parameters:
- Returns:
True if conversion successful, False otherwise
- Return type:
Example
>>> from openconvert import convert_file >>> success = convert_file("document.txt", "document.pdf") >>> if success: ... print("Conversion completed!")
convert
Module Information
- openconvert.__version__ = '1.1.1'
str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.
- openconvert.__author__ = 'OpenAgents Team'
str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.
- openconvert.__email__ = 'team@openagents.com'
str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.