From 9894d05fe3fd239247f755c60dc22247360be958 Mon Sep 17 00:00:00 2001 From: Agustín Martín Barbero Date: Sat, 26 Jan 2019 16:14:35 -0800 Subject: Improve writing metadata for docx, pptx and odt (#5252) * docx writer: support custom properties. Solves the writer part of #3024. Also supports additional core properties: `subject`, `lang`, `category`, `description`. * odt writer: improve standard properties, including the following core properties: `generator` (Pandoc/VERSION), `description`, `subject`, `keywords`, `initial-creator` (from authors), `creation-date` (actual creation date). Also fix date. * pptx writer: support custom properties. Also supports additional core properties: `subject`, `category`, `description`. * Includes golden tests. * MANUAL: document metadata support for docx, odt, pptx writers --- test/pptx/document-properties-short-desc.native | 2 ++ test/pptx/document-properties-short-desc.pptx | Bin 0 -> 27002 bytes .../document-properties-short-desc_templated.pptx | Bin 0 -> 394321 bytes test/pptx/document-properties.native | 2 ++ test/pptx/document-properties.pptx | Bin 0 -> 27408 bytes test/pptx/document-properties_templated.pptx | Bin 0 -> 394725 bytes test/pptx/endnotes.pptx | Bin 26678 -> 26959 bytes test/pptx/endnotes_templated.pptx | Bin 394004 -> 394284 bytes test/pptx/endnotes_toc.pptx | Bin 27602 -> 27883 bytes test/pptx/endnotes_toc_templated.pptx | Bin 394927 -> 395207 bytes test/pptx/images.pptx | Bin 44338 -> 44618 bytes test/pptx/images_templated.pptx | Bin 411658 -> 411938 bytes test/pptx/inline_formatting.pptx | Bin 25842 -> 26123 bytes test/pptx/inline_formatting_templated.pptx | Bin 393163 -> 393444 bytes test/pptx/lists.pptx | Bin 26765 -> 27046 bytes test/pptx/lists_templated.pptx | Bin 394091 -> 394371 bytes test/pptx/raw_ooxml.pptx | Bin 26656 -> 26937 bytes test/pptx/raw_ooxml_templated.pptx | Bin 393982 -> 394263 bytes test/pptx/remove_empty_slides.pptx | Bin 43784 -> 44064 bytes test/pptx/remove_empty_slides_templated.pptx | Bin 411101 -> 411382 bytes test/pptx/slide_breaks.pptx | Bin 28290 -> 28571 bytes test/pptx/slide_breaks_slide_level_1.pptx | Bin 27461 -> 27742 bytes .../pptx/slide_breaks_slide_level_1_templated.pptx | Bin 394786 -> 395066 bytes test/pptx/slide_breaks_templated.pptx | Bin 395617 -> 395896 bytes test/pptx/slide_breaks_toc.pptx | Bin 29248 -> 29530 bytes test/pptx/slide_breaks_toc_templated.pptx | Bin 396575 -> 396855 bytes test/pptx/speaker_notes.pptx | Bin 35156 -> 35435 bytes test/pptx/speaker_notes_afterseps.pptx | Bin 51322 -> 51604 bytes test/pptx/speaker_notes_afterseps_templated.pptx | Bin 418642 -> 418927 bytes test/pptx/speaker_notes_templated.pptx | Bin 402475 -> 402759 bytes test/pptx/tables.pptx | Bin 27282 -> 27563 bytes test/pptx/tables_templated.pptx | Bin 394610 -> 394890 bytes test/pptx/two_column.pptx | Bin 25785 -> 26066 bytes test/pptx/two_column_templated.pptx | Bin 393106 -> 393387 bytes 34 files changed, 4 insertions(+) create mode 100644 test/pptx/document-properties-short-desc.native create mode 100644 test/pptx/document-properties-short-desc.pptx create mode 100644 test/pptx/document-properties-short-desc_templated.pptx create mode 100644 test/pptx/document-properties.native create mode 100644 test/pptx/document-properties.pptx create mode 100644 test/pptx/document-properties_templated.pptx (limited to 'test/pptx') diff --git a/test/pptx/document-properties-short-desc.native b/test/pptx/document-properties-short-desc.native new file mode 100644 index 000000000..fe3193dc1 --- /dev/null +++ b/test/pptx/document-properties-short-desc.native @@ -0,0 +1,2 @@ +Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "A.",Space,Str "M."]]),("description",MetaInlines [Str "Short",Space,RawInline (Format "html") "",Str "description",RawInline (Format "html") "",Space,Str "&."]),("keywords",MetaList [MetaInlines [Str "keyword",Space,Str "1"],MetaInlines [Str "keyword",Space,Str "2"]]),("subject",MetaInlines [Str "This",Space,Str "is",Space,Str "the",Space,Str "subject"]),("title",MetaInlines [Str "Testing",Space,Str "custom",Space,Str "properties"])]}) +[Para [Str "Testing",Space,Str "document",Space,Str "properties"]] diff --git a/test/pptx/document-properties-short-desc.pptx b/test/pptx/document-properties-short-desc.pptx new file mode 100644 index 000000000..7f5ef2704 Binary files /dev/null and b/test/pptx/document-properties-short-desc.pptx differ diff --git a/test/pptx/document-properties-short-desc_templated.pptx b/test/pptx/document-properties-short-desc_templated.pptx new file mode 100644 index 000000000..527b65004 Binary files /dev/null and b/test/pptx/document-properties-short-desc_templated.pptx differ diff --git a/test/pptx/document-properties.native b/test/pptx/document-properties.native new file mode 100644 index 000000000..59ca53f4d --- /dev/null +++ b/test/pptx/document-properties.native @@ -0,0 +1,2 @@ +Pandoc (Meta {unMeta = fromList [("Company",MetaInlines [Str "My",Space,Str "Company"]),("Second Custom Property",MetaInlines [Str "Second",Space,Str "custom",Space,Str "property",Space,Str "value"]),("abstract",MetaBlocks [Plain [Str "Quite",Space,Str "a",Space,Str "long",Space,Str "description",SoftBreak,Str "spanning",Space,Str "several",Space,Str "lines"]]),("author",MetaList [MetaInlines [Str "A.",Space,Str "M."]]),("category",MetaInlines [Str "My",Space,Str "Category"]),("custom1",MetaInlines [Str "First",Space,Str "custom",Space,Str "property",Space,Str "value"]),("custom3",MetaInlines [Str "Escaping",Space,Str "amp",Space,Str "&",Space,Str "."]),("custom4",MetaInlines [Str "Escaping",Space,Str "LT,GT",Space,Str "<",Space,Str "asdf",Space,Str ">",Space,Str "<"]),("custom5",MetaInlines [Str "Escaping",Space,Str "html",Space,RawInline (Format "html") "",Str "asdf",RawInline (Format "html") ""]),("custom6",MetaInlines [Str "Escaping",Space,Emph [Str "MD"],Space,Str "\225",Space,Str "a"]),("custom9",MetaInlines [Str "Extended",Space,Str "chars:",Space,Str "\8364",Space,Str "\225",Space,Str "\233",Space,Str "\237",Space,Str "\243",Space,Str "\250",Space,Str "$"]),("description",MetaBlocks [Para [Str "Long",Space,Str "description",Space,Str "spanning",SoftBreak,Str "several",Space,Str "lines."],Plain [Str "This",Space,Str "is",Space,Str "\225",Space,Str "second",Space,RawInline (Format "html") "",Str "line",RawInline (Format "html") "",Str "."]]),("keywords",MetaList [MetaInlines [Str "keyword",Space,Str "1"],MetaInlines [Str "keyword",Space,Str "2"]]),("lang",MetaInlines [Str "en-US"]),("nested-custom",MetaList [MetaMap (fromList [("custom 7",MetaInlines [Str "Nested",Space,Str "Custom",Space,Str "value",Space,Str "7"])]),MetaMap (fromList [("custom 8",MetaInlines [Str "Nested",Space,Str "Custom",Space,Str "value",Space,Str "8"])])]),("subject",MetaInlines [Str "This",Space,Str "is",Space,Str "the",Space,Str "subject"]),("subtitle",MetaInlines [Str "This",Space,Str "is",Space,Str "a",Space,Str "subtitle"]),("title",MetaInlines [Str "Testing",Space,Str "custom",Space,Str "properties"])]}) +[Para [Str "Testing",Space,Str "document",Space,Str "properties"]] diff --git a/test/pptx/document-properties.pptx b/test/pptx/document-properties.pptx new file mode 100644 index 000000000..b35ff771e Binary files /dev/null and b/test/pptx/document-properties.pptx differ diff --git a/test/pptx/document-properties_templated.pptx b/test/pptx/document-properties_templated.pptx new file mode 100644 index 000000000..89a048592 Binary files /dev/null and b/test/pptx/document-properties_templated.pptx differ diff --git a/test/pptx/endnotes.pptx b/test/pptx/endnotes.pptx index f9bb17937..49209b21c 100644 Binary files a/test/pptx/endnotes.pptx and b/test/pptx/endnotes.pptx differ diff --git a/test/pptx/endnotes_templated.pptx b/test/pptx/endnotes_templated.pptx index 4e99c22e1..5972d61cf 100644 Binary files a/test/pptx/endnotes_templated.pptx and b/test/pptx/endnotes_templated.pptx differ diff --git a/test/pptx/endnotes_toc.pptx b/test/pptx/endnotes_toc.pptx index ec09e6f9d..5429f5e9a 100644 Binary files a/test/pptx/endnotes_toc.pptx and b/test/pptx/endnotes_toc.pptx differ diff --git a/test/pptx/endnotes_toc_templated.pptx b/test/pptx/endnotes_toc_templated.pptx index e6896a7d5..30b9a8326 100644 Binary files a/test/pptx/endnotes_toc_templated.pptx and b/test/pptx/endnotes_toc_templated.pptx differ diff --git a/test/pptx/images.pptx b/test/pptx/images.pptx index c9798422f..46d6747aa 100644 Binary files a/test/pptx/images.pptx and b/test/pptx/images.pptx differ diff --git a/test/pptx/images_templated.pptx b/test/pptx/images_templated.pptx index d9c93731c..cecd4d60f 100644 Binary files a/test/pptx/images_templated.pptx and b/test/pptx/images_templated.pptx differ diff --git a/test/pptx/inline_formatting.pptx b/test/pptx/inline_formatting.pptx index 3a69400ff..0598d6344 100644 Binary files a/test/pptx/inline_formatting.pptx and b/test/pptx/inline_formatting.pptx differ diff --git a/test/pptx/inline_formatting_templated.pptx b/test/pptx/inline_formatting_templated.pptx index ca44d82e6..32efe34bd 100644 Binary files a/test/pptx/inline_formatting_templated.pptx and b/test/pptx/inline_formatting_templated.pptx differ diff --git a/test/pptx/lists.pptx b/test/pptx/lists.pptx index c28e840f1..807b634db 100644 Binary files a/test/pptx/lists.pptx and b/test/pptx/lists.pptx differ diff --git a/test/pptx/lists_templated.pptx b/test/pptx/lists_templated.pptx index 74505454e..176afd554 100644 Binary files a/test/pptx/lists_templated.pptx and b/test/pptx/lists_templated.pptx differ diff --git a/test/pptx/raw_ooxml.pptx b/test/pptx/raw_ooxml.pptx index e71fb2f01..eb6bf6c36 100644 Binary files a/test/pptx/raw_ooxml.pptx and b/test/pptx/raw_ooxml.pptx differ diff --git a/test/pptx/raw_ooxml_templated.pptx b/test/pptx/raw_ooxml_templated.pptx index c0e72ca10..808b83b70 100644 Binary files a/test/pptx/raw_ooxml_templated.pptx and b/test/pptx/raw_ooxml_templated.pptx differ diff --git a/test/pptx/remove_empty_slides.pptx b/test/pptx/remove_empty_slides.pptx index 3b4843aa6..edda16a06 100644 Binary files a/test/pptx/remove_empty_slides.pptx and b/test/pptx/remove_empty_slides.pptx differ diff --git a/test/pptx/remove_empty_slides_templated.pptx b/test/pptx/remove_empty_slides_templated.pptx index 1efe33212..d5e026da0 100644 Binary files a/test/pptx/remove_empty_slides_templated.pptx and b/test/pptx/remove_empty_slides_templated.pptx differ diff --git a/test/pptx/slide_breaks.pptx b/test/pptx/slide_breaks.pptx index dabb58117..5e0a89129 100644 Binary files a/test/pptx/slide_breaks.pptx and b/test/pptx/slide_breaks.pptx differ diff --git a/test/pptx/slide_breaks_slide_level_1.pptx b/test/pptx/slide_breaks_slide_level_1.pptx index 65a44737d..566ac57ea 100644 Binary files a/test/pptx/slide_breaks_slide_level_1.pptx and b/test/pptx/slide_breaks_slide_level_1.pptx differ diff --git a/test/pptx/slide_breaks_slide_level_1_templated.pptx b/test/pptx/slide_breaks_slide_level_1_templated.pptx index 9770a5da0..5b971a6cc 100644 Binary files a/test/pptx/slide_breaks_slide_level_1_templated.pptx and b/test/pptx/slide_breaks_slide_level_1_templated.pptx differ diff --git a/test/pptx/slide_breaks_templated.pptx b/test/pptx/slide_breaks_templated.pptx index 25d199d3b..434af5bcb 100644 Binary files a/test/pptx/slide_breaks_templated.pptx and b/test/pptx/slide_breaks_templated.pptx differ diff --git a/test/pptx/slide_breaks_toc.pptx b/test/pptx/slide_breaks_toc.pptx index b51e94fbd..3f4fe1500 100644 Binary files a/test/pptx/slide_breaks_toc.pptx and b/test/pptx/slide_breaks_toc.pptx differ diff --git a/test/pptx/slide_breaks_toc_templated.pptx b/test/pptx/slide_breaks_toc_templated.pptx index 3d65242bb..7cb134f1b 100644 Binary files a/test/pptx/slide_breaks_toc_templated.pptx and b/test/pptx/slide_breaks_toc_templated.pptx differ diff --git a/test/pptx/speaker_notes.pptx b/test/pptx/speaker_notes.pptx index a9fad5ae4..51a156883 100644 Binary files a/test/pptx/speaker_notes.pptx and b/test/pptx/speaker_notes.pptx differ diff --git a/test/pptx/speaker_notes_afterseps.pptx b/test/pptx/speaker_notes_afterseps.pptx index a7ba1c0d4..8dbebdd96 100644 Binary files a/test/pptx/speaker_notes_afterseps.pptx and b/test/pptx/speaker_notes_afterseps.pptx differ diff --git a/test/pptx/speaker_notes_afterseps_templated.pptx b/test/pptx/speaker_notes_afterseps_templated.pptx index 73a142d1c..e90fb5672 100644 Binary files a/test/pptx/speaker_notes_afterseps_templated.pptx and b/test/pptx/speaker_notes_afterseps_templated.pptx differ diff --git a/test/pptx/speaker_notes_templated.pptx b/test/pptx/speaker_notes_templated.pptx index 9ae8ea1db..4fe6f284e 100644 Binary files a/test/pptx/speaker_notes_templated.pptx and b/test/pptx/speaker_notes_templated.pptx differ diff --git a/test/pptx/tables.pptx b/test/pptx/tables.pptx index c3e215a30..3b393393a 100644 Binary files a/test/pptx/tables.pptx and b/test/pptx/tables.pptx differ diff --git a/test/pptx/tables_templated.pptx b/test/pptx/tables_templated.pptx index 53de9b886..349792dc1 100644 Binary files a/test/pptx/tables_templated.pptx and b/test/pptx/tables_templated.pptx differ diff --git a/test/pptx/two_column.pptx b/test/pptx/two_column.pptx index 68b390bb7..343700084 100644 Binary files a/test/pptx/two_column.pptx and b/test/pptx/two_column.pptx differ diff --git a/test/pptx/two_column_templated.pptx b/test/pptx/two_column_templated.pptx index f74be1956..03eb598af 100644 Binary files a/test/pptx/two_column_templated.pptx and b/test/pptx/two_column_templated.pptx differ -- cgit v1.2.3