Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Jan Koniarik
schpin-robot
Commits
7e1e2f7f
Commit
7e1e2f7f
authored
Mar 17, 2021
by
Jan Koniarik
Browse files
fixed bom rendering
parent
4f566109
Changes
1
Hide whitespace changes
Inline
Side-by-side
schpin_koke/src/Parser.hs
View file @
7e1e2f7f
...
...
@@ -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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment