git.iko.soy/typeable/pandoc
on master help sign in
Add keywords metadata to docx document properties

Hi, I don't know haskell so possibly this is wrong, but DOCX stores keywords in cp:keywords in core.xml, and this should be easy to add from the pandoc metadata (I copy and paste the author code). As far as I can tell (no clear documentation, just a few refs), keywords should be separated with a comma.

commitb2fe1015d9d92cf001018781f2e047e637ed9a54 authorIan <iandol@users.noreply.github.com> dateFri 2 Jun 2017, 10:47 (9 years ago) parenteb6fb62
1 file changed+1
src/Text/Pandoc/Writers/Docx.hs+1
src/Text/Pandoc/Writers/Docx.hs+1
@@ -505,6 +505,7 @@ writeDocx opts doc@(Pandoc meta _) = do
505505 ,("xmlns:xsi","http://www.w3.org/2001/XMLSchema-instance")]
506506 $ mknode "dc:title" [] (stringify $ docTitle meta)
507507 : mknode "dc:creator" [] (intercalate "; " (map stringify $ docAuthors meta))
508+ : mknode "cp:keywords" [] (intercalate ", " (map stringify $ docKeywords meta))
508509 : (\x -> [ mknode "dcterms:created" [("xsi:type","dcterms:W3CDTF")] x
509510 , mknode "dcterms:modified" [("xsi:type","dcterms:W3CDTF")] x
510511 ]) (formatTime defaultTimeLocale "%FT%XZ" utctime)