fix: no longer support 'form' in filename when cleaning. Only look for 'part X' and add that to the filename if it exists

This commit is contained in:
Nelson Jovel 2024-02-22 10:55:48 -08:00
parent ed07114a91
commit 0a32fb50ff
2 changed files with 9 additions and 45 deletions

View file

@ -40,7 +40,7 @@ class Cleaner
row.school.name
end.to_set
part = filepath&.match(/[\b\s_.]+(part|form)[\W*_](?<label>[\w\d])/i)&.named_captures&.[]("label")&.upcase
part = filepath&.match(/[\b\s_.]+(part)[\W*_](?<label>[\w\d])/i)&.named_captures&.[]("label")&.upcase
school_name = schools.first.parameterize