Check if this processor can handle the given file. Args: file_path: Path to the file to check Returns: True if this processor can handle the file
(self, file_path: str)
| 16 | """Processor for HTML files using markdownify for conversion.""" |
| 17 | |
| 18 | def can_process(self, file_path: str) -> bool: |
| 19 | """Check if this processor can handle the given file. |
| 20 | |
| 21 | Args: |
| 22 | file_path: Path to the file to check |
| 23 | |
| 24 | Returns: |
| 25 | True if this processor can handle the file |
| 26 | """ |
| 27 | if not os.path.exists(file_path): |
| 28 | return False |
| 29 | |
| 30 | # Check file extension - ensure file_path is a string |
| 31 | file_path_str = str(file_path) |
| 32 | _, ext = os.path.splitext(file_path_str.lower()) |
| 33 | return ext in ['.html', '.htm'] |
| 34 | |
| 35 | def process(self, file_path: str) -> ConversionResult: |
| 36 | """Process the HTML file and return a conversion result. |
nothing calls this directly
no outgoing calls
no test coverage detected