brain backup 2026-09-14
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
export function isGradeThreeSource(source) {
|
||||
return /\bGrade 3\b/i.test(source.title ?? '') || /(?:^|[_-])G3(?:[_-]|$)/i.test(source.filename ?? '');
|
||||
}
|
||||
|
||||
export function classifyUnit(filename) {
|
||||
const name = String(filename);
|
||||
if (/CKMath/i.test(name)) return 'Math';
|
||||
if (/CKSci/i.test(name)) return 'Science';
|
||||
if (/CKLA/i.test(name)) return 'Language Arts';
|
||||
if (/CKHG|CKIYS|LABB_CKHG/i.test(name)) return 'History & Geography';
|
||||
if (/CKMusic|CKVA/i.test(name)) return 'Arts';
|
||||
return 'Other';
|
||||
}
|
||||
|
||||
export function roleForPdf(filename) {
|
||||
const name = String(filename);
|
||||
if (/(?:^|[_-])(TG|TeacherGuide|Teacher[_ -]?Guide)(?:[_-]|\.)/i.test(name)) return 'Teacher Guide';
|
||||
if (/(?:^|[_-])(SR|StudentReader|Student[_ -]?Reader|ActivityBook)(?:[_-]|\.)/i.test(name)) return 'Student Reader';
|
||||
return 'Reference';
|
||||
}
|
||||
Reference in New Issue
Block a user