Recognize Action as a rundown title header
Beffroi/beffroi-tools/pipeline/head This commit looks good
Details
Beffroi/beffroi-tools/pipeline/head This commit looks good
Details
This commit is contained in:
parent
245c17c2d0
commit
9fce395af7
|
|
@ -45,6 +45,7 @@ fn role(header: &str) -> Option<&'static str> {
|
|||
"segment / cue",
|
||||
"deroulement",
|
||||
"contenu / detail",
|
||||
"action",
|
||||
"activity",
|
||||
"activite",
|
||||
"description",
|
||||
|
|
|
|||
|
|
@ -2177,3 +2177,24 @@ fn named_gaps_create_timers_and_multiple_gap_choices_remain_independent() {
|
|||
assert!(a.diagnostics.is_empty());
|
||||
assert_eq!(a.rundown.unwrap().gaps.len(), 1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn french_action_header_allows_data_inference_for_temps() {
|
||||
let t = table(&[
|
||||
&["Heure", "Action", "Temps", "Intervenant"],
|
||||
&["09:00", "Welcome", "5 min", "Host"],
|
||||
&["09:05", "Presentation", "20 min", "Speaker"],
|
||||
]);
|
||||
let mapping = detect::infer(&t, &Profile::default()).unwrap();
|
||||
assert_eq!(mapping.header_row, 1);
|
||||
assert_eq!(mapping.start, 0);
|
||||
assert_eq!(mapping.title, 1);
|
||||
assert_eq!(mapping.duration, Some(2));
|
||||
let mut invalid = t;
|
||||
invalid.rows[2][2].text = "Ask the stage manager".into();
|
||||
let mapping = detect::infer(&invalid, &Profile::default()).unwrap();
|
||||
assert_eq!(
|
||||
mapping.duration, None,
|
||||
"Temps must not force a duration meaning"
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -243,6 +243,10 @@ When the source is ambiguous, stop export with a precise explanation and ask for
|
|||
clearer headers or an explicit column mapping. Never silently swap start times
|
||||
and durations, discard questionable rows, or fill unknown durations with zero.
|
||||
|
||||
Header detection recognizes French labels including **Heure** and **Action**
|
||||
(event title). An ambiguous label such as **Temps** is resolved from the column
|
||||
data, rather than assumed to mean duration.
|
||||
|
||||
## Workflow
|
||||
|
||||
Open or drop a document and select its sheet/table, then follow five stages:
|
||||
|
|
|
|||
Loading…
Reference in New Issue