rpa-suite 1.6.2__py3-none-any.whl → 1.6.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
rpa_suite/core/email.py CHANGED
@@ -9,8 +9,12 @@ from email.mime.base import MIMEBase
9
9
  from email import encoders
10
10
 
11
11
  # imports internal
12
- from rpa_suite.functions._printer import alert_print, error_print, success_print
12
+ from rpa_suite.functions._printer import success_print
13
13
 
14
+ class EmailError(Exception):
15
+ """Custom exception for Email errors."""
16
+ def __init__(self, message):
17
+ super().__init__(f'EmailError: {message}')
14
18
 
15
19
  class Email:
16
20
  """
@@ -80,7 +84,14 @@ class Email:
80
84
  body_message: str = "<p>Testing message body</p>"
81
85
  auth_tls: bool = (False,)
82
86
 
83
- def __init__(self): ...
87
+ def __init__(self) -> None:
88
+ """
89
+ Constructor function for the Email class that provides utilities for email management.
90
+
91
+ This class offers functionalities for sending emails via SMTP protocol with support
92
+ for attachments, HTML formatting, and various SMTP server configurations.
93
+ """
94
+ pass
84
95
 
85
96
  def send_smtp(
86
97
  self,
@@ -93,7 +104,7 @@ class Email:
93
104
  smtp_server: str = "smtp.hostinger.com",
94
105
  smtp_port: str = 465,
95
106
  auth_tls: bool = False,
96
- display_message: bool = True,
107
+ verbose: bool = True,
97
108
  ):
98
109
  """
99
110
  Sends an email using the specified SMTP server.
@@ -158,17 +169,17 @@ class Email:
158
169
  self.attachments = attachments
159
170
  self.auth_tls = auth_tls
160
171
 
161
- # Criando a mensagem
172
+ # Creating the message
162
173
  msg = MIMEMultipart()
163
174
  msg["From"] = self.email_user
164
175
  msg["To"] = ", ".join(self.email_to) if isinstance(self.email_to, list) else self.email_to
165
176
  msg["Subject"] = str(self.subject_title)
166
177
 
167
- # Corpo do e-mail
178
+ # Email body
168
179
  body = str(self.body_message)
169
180
  msg.attach(MIMEText(body, "html"))
170
181
 
171
- # Anexos (opcional)
182
+ # Attachments (optional)
172
183
  if self.attachments:
173
184
  for attachment_path in self.attachments:
174
185
  try:
@@ -183,29 +194,29 @@ class Email:
183
194
  msg.attach(part)
184
195
 
185
196
  except Exception as e:
186
- error_print(f"Erro ao anexar o arquivo {attachment_path}: {str(e)}")
197
+ EmailError(f"Error attaching file {attachment_path}: {str(e)}")
187
198
 
188
199
  try:
189
200
  if self.auth_tls:
190
- # Conectando ao servidor SMTP com TLS
201
+ # Connecting to SMTP server with TLS
191
202
  server = smtplib.SMTP(self.smtp_server, self.smtp_port)
192
203
  server.starttls()
193
204
  server.login(self.email_user, self.email_password)
194
205
  else:
195
- # Conectando ao servidor SMTP com SSL
206
+ # Connecting to SMTP server with SSL
196
207
  server = smtplib.SMTP_SSL(self.smtp_server, self.smtp_port)
197
208
  server.login(self.email_user, self.email_password)
198
209
 
199
- # Enviando o e-mail
210
+ # Sending the email
200
211
  server.sendmail(self.email_user, self.email_to, msg.as_string())
201
- if display_message:
202
- success_print("E-mail enviado com sucesso!")
212
+ if verbose:
213
+ success_print("Email sent successfully!")
203
214
 
204
- # Encerrando a conexão
215
+ # Closing the connection
205
216
  server.quit()
206
217
 
207
218
  except Exception as e:
208
- alert_print(f"Falha ao enviar o e-mail: {str(e)}")
219
+ EmailError(f"Failed to send email: {str(e)}")
209
220
 
210
221
  except Exception as e:
211
- error_print(f"Ocorreu um erro geral na função sendmail: {str(e)}")
222
+ EmailError(f"A general error occurred in the sendmail function: {str(e)}")
rpa_suite/core/file.py CHANGED
@@ -9,9 +9,13 @@ from typing import Dict, List, Union
9
9
  from colorama import Fore
10
10
 
11
11
  # imports internal
12
- from rpa_suite.functions._printer import error_print, success_print, alert_print
12
+ from rpa_suite.functions._printer import success_print, alert_print
13
13
  from rpa_suite.functions.__create_ss_dir import __create_ss_dir as create_ss_dir
14
14
 
15
+ class FileError(Exception):
16
+ """Custom exception for File errors."""
17
+ def __init__(self, message):
18
+ super().__init__(f'FileError: {message}')
15
19
 
16
20
  class File:
17
21
  """
@@ -65,7 +69,11 @@ class File:
65
69
  """
66
70
 
67
71
  def __init__(self):
68
- self.__create_ss_dir = create_ss_dir
72
+ """Initialize the File class."""
73
+ try:
74
+ self.__create_ss_dir = create_ss_dir
75
+ except Exception as e:
76
+ raise FileError(f"Error trying execute: {self.__init__.__name__}! {str(e)}.")
69
77
 
70
78
  def screen_shot(
71
79
  self,
@@ -75,7 +83,7 @@ class File:
75
83
  delay: int = 1,
76
84
  use_default_path_and_name: bool = True,
77
85
  name_ss_dir: str | None = None,
78
- display_message: bool = False,
86
+ verbose: bool = False,
79
87
  ) -> str | None:
80
88
  """
81
89
  Function responsible for create a dir for screenshot, and file screenshot and save this in dir to create, if dir exists save it on original dir. By default uses date on file name. \n
@@ -88,7 +96,7 @@ class File:
88
96
  ``delay: int`` - should be a int, by default 1 (represents seconds).
89
97
  ``use_default_path_and_name: bool`` - should be a boolean, by default `True`
90
98
  ``name_ss_dir: str`` - should be a string, by default type `None`
91
- ``display_message`` - should be a boolean, by default `False`
99
+ ``verbose`` - should be a boolean, by default `False`
92
100
 
93
101
  Return:
94
102
  ----------
@@ -97,22 +105,22 @@ class File:
97
105
 
98
106
  Description: pt-br
99
107
  ----------
100
- Função responsável por criar um diretório para captura de tela, e arquivo de captura de tela e salvar isso no diretório a ser criado, se o diretório existir, salve-o no diretório original. Por padrão, usa a data no nome do arquivo.
108
+ Function responsible for creating a screenshot directory, and screenshot file and saving it in the directory to be created, if the directory exists, save it in the original directory. By default, uses date in the file name.
101
109
 
102
- Parâmetros:
110
+ Parameters:
103
111
  ----------
104
- ``file_name: str`` - deve ser uma string, por padrão o nome é `screenshot`.
105
- ``file_path: str`` - deve ser uma string, não tem um caminho padrão.
106
- ``save_with_date: bool`` - deve ser um booleano, por padrão `True` salva o nome do arquivo com a data `foo_dd_mm_yyyy-hh_mm_ss.png`.
107
- ``delay: int`` - deve ser um int, por padrão 1 representado em segundo(s).
108
- ``use_default_path_and_name: bool`` - deve ser um booleano, por padrão `True`
109
- ``name_ss_dir: str`` - deve ser uma string, por padrão do tipo `None`
110
- ``display_message`` - deve ser um booleano, por padrão `False`
111
-
112
- Retorno:
112
+ ``file_name: str`` - should be a string, by default the name is `screenshot`.
113
+ ``file_path: str`` - should be a string, has no default path.
114
+ ``save_with_date: bool`` - should be a boolean, by default `True` saves the file name with date `foo_dd_mm_yyyy-hh_mm_ss.png`.
115
+ ``delay: int`` - should be an int, by default 1 represented in second(s).
116
+ ``use_default_path_and_name: bool`` - should be a boolean, by default `True`
117
+ ``name_ss_dir: str`` - should be a string, by default of type `None`
118
+ ``verbose`` - should be a boolean, by default `False`
119
+
120
+ Return:
113
121
  ----------
114
- >>> tipo: str
115
- * 'screenshot_path': str - representa o caminho absoluto do arquivo criado
122
+ >>> type: str
123
+ * 'screenshot_path': str - represents the absolute path of the created file
116
124
  """
117
125
 
118
126
  # proccess
@@ -143,9 +151,8 @@ class File:
143
151
 
144
152
  image.save(path_file_screenshoted)
145
153
 
146
- if display_message:
154
+ if verbose:
147
155
  success_print(path_file_screenshoted)
148
-
149
156
  return path_file_screenshoted
150
157
 
151
158
  else: # not use date on file name
@@ -155,24 +162,21 @@ class File:
155
162
 
156
163
  image.save(path_file_screenshoted)
157
164
 
158
- if display_message:
165
+ if verbose:
159
166
  success_print(path_file_screenshoted)
160
-
161
167
  return path_file_screenshoted
162
168
 
163
169
  except Exception as e:
164
-
165
- error_print(f"Error to execute function:{self.screen_shot.__name__}! Error: {str(e)}")
166
- return None
170
+ FileError(f"Error to execute function:{self.screen_shot.__name__}! Error: {str(e)}")
167
171
 
168
172
  def flag_create(
169
173
  self,
170
174
  name_file: str = "running.flag",
171
175
  path_to_create: str | None = None,
172
- display_message: bool = True,
176
+ verbose: bool = True,
173
177
  ) -> None:
174
178
  """
175
- Cria um arquivo de sinalização indicando que o robô está em execução.
179
+ Creates a flag file indicating that the robot is running.
176
180
  """
177
181
 
178
182
  try:
@@ -184,20 +188,20 @@ class File:
184
188
 
185
189
  with open(full_path_with_name, "w", encoding="utf-8") as file:
186
190
  file.write("[RPA Suite] - Running Flag File")
187
- if display_message:
191
+ if verbose:
188
192
  success_print("Flag file created.")
189
193
 
190
194
  except Exception as e:
191
- error_print(f"Erro na função file_scheduling_create: {str(e)}")
195
+ FileError(f"Error in function file_scheduling_create: {str(e)}")
192
196
 
193
197
  def flag_delete(
194
198
  self,
195
199
  name_file: str = "running.flag",
196
200
  path_to_delete: str | None = None,
197
- display_message: bool = True,
201
+ verbose: bool = True,
198
202
  ) -> None:
199
203
  """
200
- Deleta o arquivo de sinalização indicando que o robô terminou a execução.
204
+ Deletes the flag file indicating that the robot has finished execution.
201
205
  """
202
206
 
203
207
  try:
@@ -210,20 +214,19 @@ class File:
210
214
 
211
215
  if os.path.exists(full_path_with_name):
212
216
  os.remove(full_path_with_name)
213
- if display_message:
217
+ if verbose:
214
218
  success_print("Flag file deleted.")
215
219
  else:
216
220
  alert_print("Flag file not found.")
217
221
 
218
222
  except Exception as e:
219
- error_print(f"Erro na função file_scheduling_delete: {str(e)}")
220
- time.sleep(1)
223
+ FileError(f"Error in function file_scheduling_delete: {str(e)}") from e
221
224
 
222
225
  def count_files(
223
226
  self,
224
227
  dir_to_count: List[str] = ["."],
225
228
  type_extension: str = "*",
226
- display_message: bool = False,
229
+ verbose: bool = False,
227
230
  ) -> Dict[str, Union[bool, int]]:
228
231
  """
229
232
  Function responsible for counting files within a folder, considers subfolders to do the count, searches by file type, being all files by default. \n
@@ -241,18 +244,18 @@ class File:
241
244
 
242
245
  Description: pt-br
243
246
  ----------
244
- Função responsavel por fazer a contagem de arquivos dentro de uma pasta, considera subpastas para fazer a contagem, busca por tipo de arquivo, sendo todos arquivos por default. \n
247
+ Function responsible for counting files within a folder, considers subfolders to do the count, searches by file type, being all files by default. \n
245
248
 
246
- Parametros:
249
+ Parameters:
247
250
  ----------
248
- ``dir_to_count: list`` - deve ser uma lista, aceita mais de um caminho para contar arquivos.
249
- ``type_extension: str`` - deve ser uma string com o formato/extensão do tipo de arquivo que deseja ser buscado para contagem, se vazio por default sera usado ``*`` que contará todos arquivos.
251
+ ``dir_to_count: list`` - should be a list, accepts more than one path to count files.
252
+ ``type_extension: str`` - should be a string with the format/extension of the type of file you want to be searched for counting, if empty by default will be used ``*`` which will count all files.
250
253
 
251
- Retorno:
254
+ Return:
252
255
  ----------
253
256
  >>> type:dict
254
- * 'success': bool - representa se ação foi realizada com sucesso
255
- * 'qt': int - numero que representa a quantidade de arquivos que foram contados
257
+ * 'success': bool - represents if the action was performed successfully
258
+ * 'qt': int - number that represents the quantity of files that were counted
256
259
  """
257
260
 
258
261
  # Local Variables
@@ -267,11 +270,11 @@ class File:
267
270
  result["qt"] += 1
268
271
  result["success"] = True
269
272
 
270
- if display_message:
273
+ if verbose:
271
274
  success_print(f'Function: {self.count_files.__name__} counted {result["qt"]} files.')
272
275
 
273
276
  except Exception as e:
274
277
  result["success"] = False
275
- error_print(f"Error when trying to count files! Error: {str(e)}")
278
+ FileError(f"Error when trying to count files! Error: {str(e)}")
276
279
 
277
280
  return result
rpa_suite/core/iris.py CHANGED
@@ -1,33 +1,34 @@
1
1
  # rpa_suite/core/iris.py
2
2
 
3
3
  """
4
- Iris (OCR-IA) módulo para conversão de documentos usando DocLing.
4
+ Iris (OCR-AI) module for document conversion using DocLing.
5
5
 
6
- Este módulo fornece uma interface simplificada para converter documentos
7
- em vários formatos, otimizado para uso em automação RPA.
6
+ This module provides a simplified interface for converting documents
7
+ in various formats, optimized for use in RPA automation.
8
8
  """
9
9
 
10
- # imports externos
10
+ # external imports
11
11
  try:
12
- from docling.document_converter import DocumentConverter
12
+ from docling.document_converter import DocumentConverter as IrisEngine
13
13
  except ImportError as e:
14
- raise ImportError("Iris - Error: Não foi possível importar 'docling.document_converter'. Certifique-se de que a biblioteca 'docling' está instalada.") from e
14
+ raise ImportError("Iris - Error: Could not import 'docling.document_converter'. Make sure the 'docling' library is installed.") from e
15
15
 
16
- # imports de terceiros
16
+ # third party imports
17
17
  from enum import Enum
18
- from pathlib import Path
19
- from typing import Any, Dict, List, Optional, Union
18
+ from typing import Optional, Union
20
19
 
21
- # imports internos
22
- from rpa_suite.functions._printer import alert_print, error_print, success_print
20
+ # internal imports
21
+ from rpa_suite.functions._printer import success_print
23
22
 
24
23
  class IrisError(Exception):
25
- """Exceção personalizada para erros do Iris."""
24
+ """Custom exception for Iris errors."""
26
25
  def __init__(self, message):
27
- super().__init__(f'Iris - Error: {message}')
26
+ # Remove "Iris Error:" from message if it already exists, as it will be added by default
27
+ clean_message = message.replace("Iris Error:", "").strip()
28
+ super().__init__(f'Iris Error: {clean_message}')
28
29
 
29
30
  class ExportFormats(Enum):
30
- """Formatos de exportação suportados para conversão de documentos."""
31
+ """Supported export formats for document conversion."""
31
32
  MARKDOWN = "markdown"
32
33
  DICT = "dict"
33
34
  DOCTAGS = "doctags"
@@ -37,76 +38,94 @@ class ExportFormats(Enum):
37
38
 
38
39
  class Iris:
39
40
  """
40
- Iris (OCR-IA)
41
- Conversor de documentos usando a biblioteca DocLing.
42
-
43
- Esta classe fornece uma interface simplificada para converter documentos
44
- em vários formatos (PDF, imagens, texto) para formatos estruturados como
45
- Markdown, HTML, texto simples, entre outros.
46
-
47
- Atributos:
48
- ``engine:`` Instância do DocumentConverter do DocLing.
49
- ``last_result:`` Último resultado de conversão processado.
50
- ``list_results:`` Lista de resultados gerados pelo processamento em lote com: ``read_documents``
51
-
52
- Exemplo:
41
+ Iris (OCR-AI)
42
+ Document converter with support for multiple extensions.
43
+
44
+ This class provides a simplified interface to convert documents
45
+ in various formats (PDF, images, text) to structured formats like
46
+ Markdown, HTML, plain text, among others.
47
+
48
+ Attributes:
49
+ ``engine:`` IrisEngine instance.
50
+ ``last_result:`` Last processed conversion result.
51
+ ``list_results:`` List of results generated by batch processing with: ``read_documents``
52
+
53
+ On Error:
54
+ Raise ``IrisError``: If the document conversion fails.
55
+
56
+ Example:
57
+ >>> from rpa_suite.core import ExportFormats
53
58
  >>> iris = Iris()
54
59
  >>> content = iris.read_document("document.pdf", ExportFormats.MARKDOWN)
55
60
  >>> print(content)
56
61
  """
57
62
 
58
- engine: Optional[DocumentConverter]
63
+ engine: Optional[IrisEngine]
59
64
  last_result = None
60
65
  list_results = list | None
61
66
 
62
67
  def __init__(self) -> None:
63
68
  """
64
- Inicializa a classe Iris com o conversor de documentos.
69
+ Iris (OCR-AI)
70
+ Document converter with support for multiple extensions.
71
+
72
+ This class provides a simplified interface to convert documents
73
+ in various formats (PDF, images, text) to structured formats like
74
+ Markdown, HTML, plain text, among others.
65
75
 
66
- Levanta:
67
- ``IrisError:`` Se a biblioteca DocLing não estiver instalada.
76
+ Attributes:
77
+ ``engine:`` IrisEngine instance.
78
+ ``last_result:`` Last processed conversion result.
79
+ ``list_results:`` List of results generated by batch processing with: ``read_documents``
80
+
81
+ On Error:
82
+ Raise ``IrisError``: If the document conversion fails.
83
+
84
+ Example:
85
+ >>> from rpa_suite.core import ExportFormats
86
+ >>> iris = Iris()
87
+ >>> content = iris.read_document("document.pdf", ExportFormats.MARKDOWN)
88
+ >>> print(content)
68
89
  """
69
90
  try:
70
- self.engine = DocumentConverter()
91
+ self.engine = IrisEngine()
71
92
  self.result_converted = None
72
93
  self.last_result = None
73
94
  self.list_results = []
74
95
 
75
96
  except Exception as e:
76
- error_print("Iris - Error: Falha ao inicializar o DocumentConverter.")
77
- raise IrisError(f"Falha ao inicializar o DocumentConverter: {e}")
97
+ raise IrisError(f"Failed to initialize DocumentConverter: {str(e)}.")
78
98
 
79
99
  def __convert_document(self, path_file: str = None):
80
100
  """
81
- Converte o documento informado pelo caminho.
101
+ Converts the document specified by the path.
82
102
 
83
- Levanta:
84
- ``IrisError:`` Se ocorrer erro na conversão do documento.
103
+ Raises:
104
+ ``IrisError:`` If an error occurs during document conversion.
85
105
  """
86
106
  try:
87
107
  if not path_file:
88
- raise IrisError("Caminho do arquivo não informado para conversão.")
108
+ raise IrisError("Specify the file path for conversion.")
89
109
  self.result_converted = self.engine.convert(path_file)
90
110
  except Exception as e:
91
- error_print(f"Iris - Error: Falha ao converter o documento: {e}")
92
- raise IrisError(f"Falha ao converter o documento: {e}")
111
+ raise IrisError(f"Error trying to convert document! {str(e)}.")
93
112
 
94
113
  def read_document(self, file_path: str = None, result_format=ExportFormats.MARKDOWN, verbose: bool = False) -> Optional[Union[str, dict]]:
95
114
  """
96
- e converte um documento para o formato especificado.
115
+ Reads and converts a document to the specified format.
97
116
 
98
117
  Args:
99
- ``file_path:`` Caminho para o arquivo do documento.
100
- ``result_format:`` Formato de exportação desejado.
101
- ``verbose:`` Se True, exibe mensagens de sucesso.
118
+ ``file_path:`` Path to the document file.
119
+ ``result_format:`` Desired export format.
120
+ ``verbose:`` If True, displays success messages.
102
121
 
103
- Retorna:
104
- Documento convertido para o formato especificado, ou None se falhar.
122
+ Returns:
123
+ Document converted to the specified format, or None if it fails.
105
124
 
106
- Levanta:
107
- ``IrisError:`` Se ocorrer erro durante validação, conversão ou exportação.
125
+ Raises:
126
+ ``IrisError:`` If an error occurs during validation, conversion or export.
108
127
 
109
- Exemplo:
128
+ Example:
110
129
  >>> iris = Iris()
111
130
  >>> content = iris.read_document("doc.pdf", ExportFormats.TEXT)
112
131
  >>> print(content)
@@ -115,7 +134,7 @@ class Iris:
115
134
  self.__convert_document(file_path)
116
135
 
117
136
  if not self.result_converted or not hasattr(self.result_converted, 'document'):
118
- raise IrisError("Conversão falhou ou objeto retornado inválido.")
137
+ raise IrisError("Failed to convert file or invalid object resulted.")
119
138
 
120
139
  if result_format == ExportFormats.MARKDOWN:
121
140
  self.last_result = self.result_converted.document.export_to_markdown()
@@ -130,37 +149,30 @@ class Iris:
130
149
  elif result_format == ExportFormats.INDENTEDTEXT:
131
150
  self.last_result = self.result_converted.document._export_to_indented_text()
132
151
  else:
133
- alert_print(f'Iris - Error: Formato não suportado: {result_format}.')
134
- raise IrisError(f"Formato não suportado: {result_format}.")
135
-
152
+ raise IrisError(f"Not supported format: {result_format}.")
136
153
  if verbose:
137
- success_print('Irir - Convertido com sucesso!')
154
+ success_print('Iris: Successfully converted!')
138
155
 
139
156
  return self.last_result
140
-
141
- except IrisError as ie:
142
- error_print(str(ie))
143
- return None
144
157
  except Exception as e:
145
- error_print(f"Iris - Error: Erro inesperado ao ler o documento: {e}")
146
- raise IrisError(f"Erro inesperado ao ler o documento: {e}")
158
+ raise IrisError(f"Error trying to read document: {str(e)}.")
147
159
 
148
160
  def read_documents(self, list_file_path: list[str] = None, result_format=ExportFormats.MARKDOWN, verbose: bool = False) -> Optional[list]:
149
161
  """
150
- e converte um documento para o formato especificado.
162
+ Reads and converts multiple documents to the specified format.
151
163
 
152
164
  Args:
153
- ``list_file_path:`` Lista de documentos em formato de caminho.
154
- ``result_format:`` Formato de exportação desejado.
155
- ``verbose:`` Se True, exibe mensagens de sucesso.
165
+ ``list_file_path:`` List of documents in path format.
166
+ ``result_format:`` Desired export format.
167
+ ``verbose:`` If True, displays success messages.
156
168
 
157
- Retorna:
158
- ``Lista`` de Documentos convertidos para o formato especificado, ou None se falhar.
169
+ Returns:
170
+ ``List`` of documents converted to the specified format, or None if it fails.
159
171
 
160
- Levanta:
161
- ``IrisError:`` Se ocorrer erro durante validação, conversão ou exportação.
172
+ Raises:
173
+ ``IrisError:`` If an error occurs during validation, conversion or export.
162
174
 
163
- Exemplo:
175
+ Example:
164
176
  >>> iris = Iris()
165
177
  >>> contents = iris.read_documents(["doc.pdf", "doc2.docx"], ExportFormats.TEXT)
166
178
  >>> print(contents)
@@ -172,7 +184,7 @@ class Iris:
172
184
  self.__convert_document(file_path)
173
185
 
174
186
  if not self.result_converted or not hasattr(self.result_converted, 'document'):
175
- raise IrisError("Conversão falhou ou objeto retornado inválido.")
187
+ raise IrisError("Failed to convert file or invalid object resulted.")
176
188
 
177
189
  if result_format == ExportFormats.MARKDOWN:
178
190
  self.last_result = self.result_converted.document.export_to_markdown()
@@ -193,16 +205,12 @@ class Iris:
193
205
  self.last_result = self.result_converted.document._export_to_indented_text()
194
206
  self.list_results.append(self.last_result)
195
207
  else:
196
- alert_print(f'Iris - Error: Formato não suportado: {result_format}.')
197
- raise IrisError(f"Formato não suportado: {result_format}.")
198
-
208
+ raise IrisError(f"Not supported format: {result_format}.")
199
209
  if verbose:
200
- success_print('Irir - Convertido com sucesso!')
201
-
210
+ success_print('Iris: Successfully converted!')
202
211
  except IrisError as ie:
203
- error_print(str(ie))
204
- return None
212
+ raise ie from ie
205
213
  except Exception as e:
206
- error_print(f"Iris - Error: Erro inesperado ao ler o documento: {e}")
207
- raise IrisError(f"Erro inesperado ao ler o documento: {e}")
214
+ raise IrisError(f"Error trying to read documents: {str(e)}.")
215
+
208
216
  return self.list_results