add converters
This commit is contained in:
parent
f2fc240e28
commit
39d14472fc
2 changed files with 3 additions and 3 deletions
|
|
@ -55,13 +55,13 @@ class MarkItUp:
|
|||
for plugin_name, converter in plugins.items():
|
||||
self.converters[plugin_name] = converter
|
||||
|
||||
def convert(self, stream: BinaryIO, file_name: str) -> Dict[DocumentConverterResult, StreamInfo]:
|
||||
def convert(self, stream: BinaryIO, file_name: str, **kwargs) -> Dict[DocumentConverterResult, StreamInfo]:
|
||||
stream_info: StreamInfo = self._get_stream_info(stream, file_name)
|
||||
# Deal with unsupported file types
|
||||
try:
|
||||
if stream_info.category in self.converters.keys():
|
||||
converter = self.converters[stream_info.category](config=self.config)
|
||||
return converter.convert(stream, stream_info), stream_info
|
||||
return converter.convert(stream, stream_info, **kwargs), stream_info
|
||||
else:
|
||||
match stream_info.category:
|
||||
case "ppt":
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ class AudioConverter(DocumentConverter):
|
|||
file_stream: BinaryIO,
|
||||
stream_info: StreamInfo,
|
||||
** kwargs: Any, # Options to pass to the converter
|
||||
) -> Tuple[DocumentConverterResult, StreamInfo]:
|
||||
) -> DocumentConverterResult:
|
||||
md_content = ""
|
||||
|
||||
# Transcribe
|
||||
|
|
|
|||
Loading…
Reference in a new issue