MCPcopy Create free account
hub / github.com/LearnPrompt/LearnPrompt / main

Function main

scripts/convert_to_webp.py:48–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

46 print(f'Could not read file {file_path} due to UnicodeDecodeError.')
47
48def 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
59if __name__ == "__main__":
60 main()

Callers 1

convert_to_webp.pyFile · 0.85

Calls 2

convert_to_webpFunction · 0.85
update_pathsFunction · 0.85

Tested by

no test coverage detected