add field for cw but not using it yet

This commit is contained in:
Rhiannon Morris 2020-07-14 06:52:23 +02:00
parent 94bd16504c
commit 5a5127a78c

View file

@ -22,6 +22,7 @@ data Info =
date :: !Day, date :: !Day,
title :: !(Maybe Text), title :: !(Maybe Text),
artist :: !(Maybe Artist), -- nothing = me, obv artist :: !(Maybe Artist), -- nothing = me, obv
warning :: !(Maybe Text),
tags :: ![Text], tags :: ![Text],
nsfwTags :: ![Text], nsfwTags :: ![Text],
description :: !(Maybe Text), description :: !(Maybe Text),
@ -65,6 +66,7 @@ instance FromYAML Info where
Info <$> m .: "date" Info <$> m .: "date"
<*> m .:? "title" <*> m .:? "title"
<*> m .:? "artist" <*> m .:? "artist"
<*> m .:? "warning"
<*> m .:? "tags" .!= [] <*> m .:? "tags" .!= []
<*> m .:? "nsfwTags" .!= [] <*> m .:? "nsfwTags" .!= []
<*> m .:? "description" <*> m .:? "description"