ba-sachsen-pica/bibliotheca/config/main/template.txt

93 lines
1.3 KiB
Plaintext

{{
with(
[
'2199',
'0100',
'0110',
'0500',
'0501a',
'0501b',
'0502a',
'0502b',
'0503a',
'0503b',
'0999',
'1100a',
'1100b',
'1100n',
'1131',
'1140',
'1500',
'2000',
'2009',
'2010',
'2020',
'2201',
'2240',
'4000a',
'4000d',
'4020a',
'4030n',
'4030p',
'4060a',
'7100j',
'7100f',
'7100a',
'7100d',
'8011',
'8100',
'8200',
'8515',
'8600',
'E0XX',
'E0XXb'
],
columns,
if(
row.index == 0,
forEach(
columns,
cn,
cn.escape('csv')
).join(',')
+ '\n'
+ with(
forEach(
columns,
cn,
forNonBlank(
cells[cn].value,
v,
v.escape('csv'),
'␀'
)
).join(',').replace('␀',''),
r,
if(
isNonBlank(r.split(',').join(',')),
r + '\n',
''
)
),
with(
forEach(
columns,
cn,
forNonBlank(
cells[cn].value,
v,
v.escape('csv'),
'␀'
)
).join(',').replace('␀',''),
r,
if(
isNonBlank(r.split(',').join(',')),
r + '\n',
''
)
)
)
)
}}