NTDJHZEDMSCQEO5YHDPJP6ZABXWNASFND7UFQE5BXQEIQMQ35U3AC
J4QXG3NCNCHLF2Z7FERKXPBZKL45MPMZQ2XLKPLURAOIRGHGF7IQC
SV5ID4TDECS35D2F4XYBVEFIIVOZYCHV6BTZBS7QYTOTJRDBGCIAC
DOPKLXQZP3TDISHODQNI6GZ57EYE42NG225WHSZMQ3L355YVYPNAC
XQBYALGEDBGQIHMEI4FFDGMQCMOPE4SJLBDROYF5YVMU7H5IKV6AC
DRHZBHR7G5UEXWJNZ4FWF63YCUIYMIM3B7JEUL5CC4ZY2UKE3CJAC
44NEK2567V735JWLV2XABNGNW43WOIB5HSPVQJ6672TAP3K5VZZQC
M54PYKIOETT3UT4N6HHTAENU4D5HB7MNEFEXM5CX6PJ4FTQIRAAAC
NOKOPRVXR4V57S3FQGD4JZEZWN4APFH2BNPKNX7B364I23NYD36AC
2Z6NDCF6FFB7GMSSSNBDRBADERI4AQSANOVA76EECCRLUKUEECKQC
]
in DiffR $ line [unDiffR content, entry]
insert card content =
let mappedCategories =
Map.foldrWithKey
( \key category acc ->
Text.intercalate
" "
[Text.pack . show . toNumber @Int $ category ^. copies, quote key]
: acc
)
[]
$ card ^. categories
entry =
Text.intercalate
" "
[ "A"
, quote . toText $ card ^. Deck.name
, Text.cons '[' . flip Text.snoc ']' $ Text.intercalate ", " mappedCategories