mirror of
https://github.com/shadoll/moma.git
synced 2026-08-28 11:33:25 +00:00
feat: Add HDR extraction from filename and update tests
This commit is contained in:
@@ -76,4 +76,16 @@ class FilenameExtractor:
|
||||
if re.search(r'\b' + re.escape(indicator) + r'\b', self.file_name, re.IGNORECASE):
|
||||
return 'Unclassified'
|
||||
|
||||
return 'Unclassified'
|
||||
return 'Unclassified'
|
||||
|
||||
def extract_hdr(self) -> str | None:
|
||||
"""Extract HDR information from filename"""
|
||||
# Check for SDR first - indicates no HDR
|
||||
if re.search(r'\bSDR\b', self.file_name, re.IGNORECASE):
|
||||
return None
|
||||
|
||||
# Check for HDR, but not NoHDR
|
||||
if re.search(r'\bHDR\b', self.file_name, re.IGNORECASE) and not re.search(r'\bNoHDR\b', self.file_name, re.IGNORECASE):
|
||||
return 'HDR'
|
||||
|
||||
return None
|
||||
Reference in New Issue
Block a user