Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Enhance file type detection to include video formats and bump version… #10

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion code_buddy/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ def get_all_files(repo):
def is_image_file(filename):
"""Check if a file is an image based on its extension."""
image_extensions = {'.jpg', '.jpeg', '.png', '.gif', '.bmp', '.tiff', '.webp', '.svg', '.ico', '.yaml', '.woff'}
return Path(filename).suffix.lower() in image_extensions
video_extensions = {'.webm', '.wmv', '.flv', '.ogv', '.mkv', '.avi', '.mov', '.mp4', '.f4v', '.vob', '.nsv', '.roq'}
extensions = image_extensions.union(video_extensions)
return Path(filename).suffix.lower() in extensions

# is_file_name: takes a path to a file and returns False if file is excluded, file can be a relative path
def is_excluded_file_name(file):
Expand Down
2 changes: 1 addition & 1 deletion version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# version.py
__version__ = "0.6.0"
__version__ = "0.6.1"
Loading