.ai import: open the variable library and data sets from the editing data

Squashed from #5156 onto main.
This commit is contained in:
dotCooCoo
2026-11-02 16:19:19 +07:00
committed by bflatastic
parent 952446253f
commit 8ab68e4223
42 changed files with 1096 additions and 148 deletions
+2 -1
View File
@@ -203,6 +203,7 @@ fn cell_to_value(kind: VariableKind, cell: &str, quoted: bool, var: &str, line:
VariableKind::Graph if t.len() <= MAX_GRAPH_CSV => DataValue::Graph(t.to_string()),
VariableKind::Graph => return Err(bad(cmd, format!("line {line}: value for `{var}` is longer than {MAX_GRAPH_CSV} bytes"))),
VariableKind::Visibility => DataValue::Visible(parse_visible_cell(t, var, line, cmd)?),
VariableKind::Unknown => return Err(bad(cmd, format!("line {line}: value for `{var}` must match its variable kind"))),
}))
}
@@ -220,7 +221,7 @@ fn export_header(v: &Variable) -> String {
match v.kind {
VariableKind::Visibility => format!("#{}", v.name),
VariableKind::Image => format!("@{}", v.name),
VariableKind::Text | VariableKind::Graph => v.name.clone(),
VariableKind::Text | VariableKind::Graph | VariableKind::Unknown => v.name.clone(),
}
}