Commit 0974a8c6 authored by Jan Koniarik's avatar Jan Koniarik
Browse files

fixed bom rendering

parent 0c4d5417
Pipeline #70528 passed with stage
in 6 minutes and 28 seconds
......@@ -683,7 +683,10 @@ generateBOM walker pconf = do
let filename = "out/bom/summary.csv"
createDirectoryIfMissing True $ takeDirectory filename
BSL.writeFile filename (CSV.encode $ parts_to_CSV parts)
parts_to_CSV :: [ExtrPart] -> [(Int, String, Maybe Filename)]
parts_to_CSV iparts =
(\x -> (length x, ex_name $ head x, (\x -> x ++ ".stl") <$> (ex_print_file $ head x))) <$> (group $ sort iparts)
parts_to_CSV iparts = (\((_,name,file):xs) -> (length xs + 1, name, file)) <$> group raw
where
raw :: [(Int,String,Maybe Filename)]
raw = sort $ (\x -> (1, ex_name x, (\x -> x ++ ".stl") <$> (ex_print_file x))) <$> iparts
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment