Use shared CSV and TSV format mappings

This commit is contained in:
Dylan M. Taylor committed 2026-11-13 01:52:51 -05:00
1 parent 29e0198952
commit a23b40e29a
3 files changed
+25 -25

No files matched your search

Generated
+21 -21
View File
@@ -1152,12 +1152,12 @@ dependencies = [
[[package]]
name = "craft-eps"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=ba24fe2435adb3c81ad6057faf36365fbba736cf#ba24fe2435adb3c81ad6057faf36365fbba736cf"
source = "git+https://github.com/storytold/craft-libs?rev=71337f6772b57a61e0f171c941f695822eea19a5#71337f6772b57a61e0f171c941f695822eea19a5"
[[package]]
name = "craft-eps"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=fccc0082711b8ae4e19824dd20339a8473d47309#fccc0082711b8ae4e19824dd20339a8473d47309"
source = "git+https://github.com/storytold/craft-libs?rev=ba24fe2435adb3c81ad6057faf36365fbba736cf#ba24fe2435adb3c81ad6057faf36365fbba736cf"
[[package]]
name = "craft-epub"
@@ -1172,12 +1172,12 @@ dependencies = [
[[package]]
name = "craft-file-formats"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=fccc0082711b8ae4e19824dd20339a8473d47309#fccc0082711b8ae4e19824dd20339a8473d47309"
source = "git+https://github.com/storytold/craft-libs?rev=71337f6772b57a61e0f171c941f695822eea19a5#71337f6772b57a61e0f171c941f695822eea19a5"
dependencies = [
"craft-eps 0.1.0 (git+https://github.com/storytold/craft-libs?rev=fccc0082711b8ae4e19824dd20339a8473d47309)",
"craft-idml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=fccc0082711b8ae4e19824dd20339a8473d47309)",
"craft-svg 0.1.0 (git+https://github.com/storytold/craft-libs?rev=fccc0082711b8ae4e19824dd20339a8473d47309)",
"craft-zip 0.1.0 (git+https://github.com/storytold/craft-libs?rev=fccc0082711b8ae4e19824dd20339a8473d47309)",
"craft-eps 0.1.0 (git+https://github.com/storytold/craft-libs?rev=71337f6772b57a61e0f171c941f695822eea19a5)",
"craft-idml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=71337f6772b57a61e0f171c941f695822eea19a5)",
"craft-svg 0.1.0 (git+https://github.com/storytold/craft-libs?rev=71337f6772b57a61e0f171c941f695822eea19a5)",
"craft-zip 0.1.0 (git+https://github.com/storytold/craft-libs?rev=71337f6772b57a61e0f171c941f695822eea19a5)",
"serde",
"serde_json",
]
@@ -1213,20 +1213,20 @@ dependencies = [
[[package]]
name = "craft-idml"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=ba24fe2435adb3c81ad6057faf36365fbba736cf#ba24fe2435adb3c81ad6057faf36365fbba736cf"
source = "git+https://github.com/storytold/craft-libs?rev=71337f6772b57a61e0f171c941f695822eea19a5#71337f6772b57a61e0f171c941f695822eea19a5"
dependencies = [
"craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=ba24fe2435adb3c81ad6057faf36365fbba736cf)",
"craft-zip 0.1.0 (git+https://github.com/storytold/craft-libs?rev=ba24fe2435adb3c81ad6057faf36365fbba736cf)",
"craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=71337f6772b57a61e0f171c941f695822eea19a5)",
"craft-zip 0.1.0 (git+https://github.com/storytold/craft-libs?rev=71337f6772b57a61e0f171c941f695822eea19a5)",
"thiserror 2.0.21",
]
[[package]]
name = "craft-idml"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=fccc0082711b8ae4e19824dd20339a8473d47309#fccc0082711b8ae4e19824dd20339a8473d47309"
source = "git+https://github.com/storytold/craft-libs?rev=ba24fe2435adb3c81ad6057faf36365fbba736cf#ba24fe2435adb3c81ad6057faf36365fbba736cf"
dependencies = [
"craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=fccc0082711b8ae4e19824dd20339a8473d47309)",
"craft-zip 0.1.0 (git+https://github.com/storytold/craft-libs?rev=fccc0082711b8ae4e19824dd20339a8473d47309)",
"craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=ba24fe2435adb3c81ad6057faf36365fbba736cf)",
"craft-zip 0.1.0 (git+https://github.com/storytold/craft-libs?rev=ba24fe2435adb3c81ad6057faf36365fbba736cf)",
"thiserror 2.0.21",
]
@@ -1384,9 +1384,9 @@ source = "git+https://github.com/storytold/craft-libs?rev=ba24fe2435adb3c81ad605
[[package]]
name = "craft-svg"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=ba24fe2435adb3c81ad6057faf36365fbba736cf#ba24fe2435adb3c81ad6057faf36365fbba736cf"
source = "git+https://github.com/storytold/craft-libs?rev=71337f6772b57a61e0f171c941f695822eea19a5#71337f6772b57a61e0f171c941f695822eea19a5"
dependencies = [
"craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=ba24fe2435adb3c81ad6057faf36365fbba736cf)",
"craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=71337f6772b57a61e0f171c941f695822eea19a5)",
"flate2",
"kurbo",
"roxmltree 0.21.2",
@@ -1396,9 +1396,9 @@ dependencies = [
[[package]]
name = "craft-svg"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=fccc0082711b8ae4e19824dd20339a8473d47309#fccc0082711b8ae4e19824dd20339a8473d47309"
source = "git+https://github.com/storytold/craft-libs?rev=ba24fe2435adb3c81ad6057faf36365fbba736cf#ba24fe2435adb3c81ad6057faf36365fbba736cf"
dependencies = [
"craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=fccc0082711b8ae4e19824dd20339a8473d47309)",
"craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=ba24fe2435adb3c81ad6057faf36365fbba736cf)",
"flate2",
"kurbo",
"roxmltree 0.21.2",
@@ -1501,7 +1501,7 @@ dependencies = [
[[package]]
name = "craft-xml"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=ba24fe2435adb3c81ad6057faf36365fbba736cf#ba24fe2435adb3c81ad6057faf36365fbba736cf"
source = "git+https://github.com/storytold/craft-libs?rev=71337f6772b57a61e0f171c941f695822eea19a5#71337f6772b57a61e0f171c941f695822eea19a5"
dependencies = [
"quick-xml 0.41.0",
"thiserror 2.0.21",
@@ -1510,7 +1510,7 @@ dependencies = [
[[package]]
name = "craft-xml"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=fccc0082711b8ae4e19824dd20339a8473d47309#fccc0082711b8ae4e19824dd20339a8473d47309"
source = "git+https://github.com/storytold/craft-libs?rev=ba24fe2435adb3c81ad6057faf36365fbba736cf#ba24fe2435adb3c81ad6057faf36365fbba736cf"
dependencies = [
"quick-xml 0.41.0",
"thiserror 2.0.21",
@@ -1519,7 +1519,7 @@ dependencies = [
[[package]]
name = "craft-zip"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=ba24fe2435adb3c81ad6057faf36365fbba736cf#ba24fe2435adb3c81ad6057faf36365fbba736cf"
source = "git+https://github.com/storytold/craft-libs?rev=71337f6772b57a61e0f171c941f695822eea19a5#71337f6772b57a61e0f171c941f695822eea19a5"
dependencies = [
"flate2",
"thiserror 2.0.21",
@@ -1529,7 +1529,7 @@ dependencies = [
[[package]]
name = "craft-zip"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=fccc0082711b8ae4e19824dd20339a8473d47309#fccc0082711b8ae4e19824dd20339a8473d47309"
source = "git+https://github.com/storytold/craft-libs?rev=ba24fe2435adb3c81ad6057faf36365fbba736cf#ba24fe2435adb3c81ad6057faf36365fbba736cf"
dependencies = [
"flate2",
"thiserror 2.0.21",
+1 -1
View File
@@ -27,7 +27,7 @@ craft-wordmodel = { git = "https://github.com/storytold/craft-libs", rev = "ba24
craft-csv = { git = "https://github.com/storytold/craft-libs", rev = "47bf5650b0d503b97bfb5e841746c4957897d11f", version = "=0.1.0" }
craft-image-codecs = { git = "https://github.com/storytold/craft-libs", rev = "a47b78256c6acf3d7fdc4bc7cfbc25c373eac522", version = "=0.1.0" }
craft-psd = { git = "https://github.com/storytold/craft-libs", rev = "a47b78256c6acf3d7fdc4bc7cfbc25c373eac522", version = "=0.1.0" }
craft-file-formats = { git = "https://github.com/storytold/craft-libs", rev = "fccc0082711b8ae4e19824dd20339a8473d47309", version = "=0.1.0" }
craft-file-formats = { git = "https://github.com/storytold/craft-libs", rev = "71337f6772b57a61e0f171c941f695822eea19a5", version = "=0.1.0" }
# Shared keyboard bindings: chords, overrides, conflicts, egui dispatch, the Keyboard Shortcuts dialog.
craft-keymap = { git = "https://github.com/storytold/craft-libs", rev = "92d392cff132eaf53e13afff77f38b5c11b73aa0", version = "=0.1.0", features = ["egui", "ui"] }
# Separations, ink coverage and the ink manager; same revision as craft-pdf and the krilla patch.
+3 -3
View File
@@ -358,9 +358,9 @@ fn decode_utf8(bytes: &[u8], _name: &str) -> Result<String, String> {
}
fn sniff(name: &str, text: &str) -> Delimiter {
match extension(name).as_str() {
"tsv" | "tab" => return Delimiter::Tab,
"csv" => return Delimiter::Comma,
match craft_file_formats::detect(name, &[]) {
Some(craft_file_formats::Format::Tsv) => return Delimiter::Tab,
Some(craft_file_formats::Format::Csv) => return Delimiter::Comma,
_ => {}
}
match craft_csv::sniff_delimiter(text, '"') {