diff options
author | Jesse Rosenthal <jrosenthal@jhu.edu> | 2018-01-18 09:41:16 -0500 |
---|---|---|
committer | Jesse Rosenthal <jrosenthal@jhu.edu> | 2018-01-18 10:15:17 -0500 |
commit | eae790485325ba6993b29d7b3ad638fefb1d21ee (patch) | |
tree | c0fc942b0c714532737c482e6bb622973fa0e6c1 /src/Text/Pandoc/Writers/Powerpoint/Presentation.hs | |
parent | bfef2cbbf33ac1ebc2a1b90a78a9598b3bc76169 (diff) | |
download | pandoc-eae790485325ba6993b29d7b3ad638fefb1d21ee.tar.gz |
Powerpoint writer: Make our own docProps/core.xml file.
This allows us to set document metadata properties from pandoc metadata.
Diffstat (limited to 'src/Text/Pandoc/Writers/Powerpoint/Presentation.hs')
-rw-r--r-- | src/Text/Pandoc/Writers/Powerpoint/Presentation.hs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Writers/Powerpoint/Presentation.hs b/src/Text/Pandoc/Writers/Powerpoint/Presentation.hs index 1300bbe39..e1192745f 100644 --- a/src/Text/Pandoc/Writers/Powerpoint/Presentation.hs +++ b/src/Text/Pandoc/Writers/Powerpoint/Presentation.hs @@ -34,6 +34,7 @@ Presentation. module Text.Pandoc.Writers.Powerpoint.Presentation ( documentToPresentation , Presentation(..) + , DocProps(..) , Slide(..) , Layout(..) , Notes(..) @@ -852,13 +853,13 @@ metaToDocProps meta = Just (MetaList xs) -> Just $ map Shared.stringify xs _ -> Nothing - authors = case lookupMeta "author" meta of - Just (MetaList xs) -> Just $ map Shared.stringify xs - _ -> Nothing + authors = case map Shared.stringify $ docAuthors meta of + [] -> Nothing + ss -> Just $ intercalate ";" ss in DocProps{ dcTitle = Shared.stringify <$> lookupMeta "title" meta , dcSubject = Shared.stringify <$> lookupMeta "subject" meta - , dcCreator = (intercalate "; ") <$> authors + , dcCreator = authors , dcKeywords = keywords , dcCreated = Nothing } |