()
| 46 | print(f'Could not read file {file_path} due to UnicodeDecodeError.') |
| 47 | |
| 48 | def main(): |
| 49 | current_path = Path('../') |
| 50 | for file_path in current_path.rglob('*'): |
| 51 | if 'node_modules' in file_path.parts or '.docusaurus' in file_path.parts: |
| 52 | continue # Skip files in 'node_modules' or '.docusaurus' directories |
| 53 | if file_path.is_file(): # Check if the path is a file |
| 54 | if file_path.suffix in image_types: |
| 55 | convert_to_webp(file_path) |
| 56 | elif file_path.suffix in ['.js', '.md']: |
| 57 | update_paths(file_path) |
| 58 | |
| 59 | if __name__ == "__main__": |
| 60 | main() |
no test coverage detected