diff options
author | Agustín Martín Barbero <agusmbaterra@gmail.com> | 2019-01-26 16:14:35 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2019-01-26 16:14:35 -0800 |
commit | 9894d05fe3fd239247f755c60dc22247360be958 (patch) | |
tree | 92f5d6240edfd3bf72cc3c30295d18bef76a4077 /test/pptx | |
parent | ff0aaa549d51384ef3cdcb063706dee4f6143444 (diff) | |
download | pandoc-9894d05fe3fd239247f755c60dc22247360be958.tar.gz |
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
Diffstat (limited to 'test/pptx')
34 files changed, 4 insertions, 0 deletions
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") "<i>",Str "description",RawInline (Format "html") "</i>",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 Binary files differnew file mode 100644 index 000000000..7f5ef2704 --- /dev/null +++ b/test/pptx/document-properties-short-desc.pptx diff --git a/test/pptx/document-properties-short-desc_templated.pptx b/test/pptx/document-properties-short-desc_templated.pptx Binary files differnew file mode 100644 index 000000000..527b65004 --- /dev/null +++ b/test/pptx/document-properties-short-desc_templated.pptx 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") "<i>",Str "asdf",RawInline (Format "html") "</i>"]),("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") "<i>",Str "line",RawInline (Format "html") "</i>",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 Binary files differnew file mode 100644 index 000000000..b35ff771e --- /dev/null +++ b/test/pptx/document-properties.pptx diff --git a/test/pptx/document-properties_templated.pptx b/test/pptx/document-properties_templated.pptx Binary files differnew file mode 100644 index 000000000..89a048592 --- /dev/null +++ b/test/pptx/document-properties_templated.pptx diff --git a/test/pptx/endnotes.pptx b/test/pptx/endnotes.pptx Binary files differindex f9bb17937..49209b21c 100644 --- a/test/pptx/endnotes.pptx +++ b/test/pptx/endnotes.pptx diff --git a/test/pptx/endnotes_templated.pptx b/test/pptx/endnotes_templated.pptx Binary files differindex 4e99c22e1..5972d61cf 100644 --- a/test/pptx/endnotes_templated.pptx +++ b/test/pptx/endnotes_templated.pptx diff --git a/test/pptx/endnotes_toc.pptx b/test/pptx/endnotes_toc.pptx Binary files differindex ec09e6f9d..5429f5e9a 100644 --- a/test/pptx/endnotes_toc.pptx +++ b/test/pptx/endnotes_toc.pptx diff --git a/test/pptx/endnotes_toc_templated.pptx b/test/pptx/endnotes_toc_templated.pptx Binary files differindex e6896a7d5..30b9a8326 100644 --- a/test/pptx/endnotes_toc_templated.pptx +++ b/test/pptx/endnotes_toc_templated.pptx diff --git a/test/pptx/images.pptx b/test/pptx/images.pptx Binary files differindex c9798422f..46d6747aa 100644 --- a/test/pptx/images.pptx +++ b/test/pptx/images.pptx diff --git a/test/pptx/images_templated.pptx b/test/pptx/images_templated.pptx Binary files differindex d9c93731c..cecd4d60f 100644 --- a/test/pptx/images_templated.pptx +++ b/test/pptx/images_templated.pptx diff --git a/test/pptx/inline_formatting.pptx b/test/pptx/inline_formatting.pptx Binary files differindex 3a69400ff..0598d6344 100644 --- a/test/pptx/inline_formatting.pptx +++ b/test/pptx/inline_formatting.pptx diff --git a/test/pptx/inline_formatting_templated.pptx b/test/pptx/inline_formatting_templated.pptx Binary files differindex ca44d82e6..32efe34bd 100644 --- a/test/pptx/inline_formatting_templated.pptx +++ b/test/pptx/inline_formatting_templated.pptx diff --git a/test/pptx/lists.pptx b/test/pptx/lists.pptx Binary files differindex c28e840f1..807b634db 100644 --- a/test/pptx/lists.pptx +++ b/test/pptx/lists.pptx diff --git a/test/pptx/lists_templated.pptx b/test/pptx/lists_templated.pptx Binary files differindex 74505454e..176afd554 100644 --- a/test/pptx/lists_templated.pptx +++ b/test/pptx/lists_templated.pptx diff --git a/test/pptx/raw_ooxml.pptx b/test/pptx/raw_ooxml.pptx Binary files differindex e71fb2f01..eb6bf6c36 100644 --- a/test/pptx/raw_ooxml.pptx +++ b/test/pptx/raw_ooxml.pptx diff --git a/test/pptx/raw_ooxml_templated.pptx b/test/pptx/raw_ooxml_templated.pptx Binary files differindex c0e72ca10..808b83b70 100644 --- a/test/pptx/raw_ooxml_templated.pptx +++ b/test/pptx/raw_ooxml_templated.pptx diff --git a/test/pptx/remove_empty_slides.pptx b/test/pptx/remove_empty_slides.pptx Binary files differindex 3b4843aa6..edda16a06 100644 --- a/test/pptx/remove_empty_slides.pptx +++ b/test/pptx/remove_empty_slides.pptx diff --git a/test/pptx/remove_empty_slides_templated.pptx b/test/pptx/remove_empty_slides_templated.pptx Binary files differindex 1efe33212..d5e026da0 100644 --- a/test/pptx/remove_empty_slides_templated.pptx +++ b/test/pptx/remove_empty_slides_templated.pptx diff --git a/test/pptx/slide_breaks.pptx b/test/pptx/slide_breaks.pptx Binary files differindex dabb58117..5e0a89129 100644 --- a/test/pptx/slide_breaks.pptx +++ b/test/pptx/slide_breaks.pptx diff --git a/test/pptx/slide_breaks_slide_level_1.pptx b/test/pptx/slide_breaks_slide_level_1.pptx Binary files differindex 65a44737d..566ac57ea 100644 --- a/test/pptx/slide_breaks_slide_level_1.pptx +++ b/test/pptx/slide_breaks_slide_level_1.pptx diff --git a/test/pptx/slide_breaks_slide_level_1_templated.pptx b/test/pptx/slide_breaks_slide_level_1_templated.pptx Binary files differindex 9770a5da0..5b971a6cc 100644 --- a/test/pptx/slide_breaks_slide_level_1_templated.pptx +++ b/test/pptx/slide_breaks_slide_level_1_templated.pptx diff --git a/test/pptx/slide_breaks_templated.pptx b/test/pptx/slide_breaks_templated.pptx Binary files differindex 25d199d3b..434af5bcb 100644 --- a/test/pptx/slide_breaks_templated.pptx +++ b/test/pptx/slide_breaks_templated.pptx diff --git a/test/pptx/slide_breaks_toc.pptx b/test/pptx/slide_breaks_toc.pptx Binary files differindex b51e94fbd..3f4fe1500 100644 --- a/test/pptx/slide_breaks_toc.pptx +++ b/test/pptx/slide_breaks_toc.pptx diff --git a/test/pptx/slide_breaks_toc_templated.pptx b/test/pptx/slide_breaks_toc_templated.pptx Binary files differindex 3d65242bb..7cb134f1b 100644 --- a/test/pptx/slide_breaks_toc_templated.pptx +++ b/test/pptx/slide_breaks_toc_templated.pptx diff --git a/test/pptx/speaker_notes.pptx b/test/pptx/speaker_notes.pptx Binary files differindex a9fad5ae4..51a156883 100644 --- a/test/pptx/speaker_notes.pptx +++ b/test/pptx/speaker_notes.pptx diff --git a/test/pptx/speaker_notes_afterseps.pptx b/test/pptx/speaker_notes_afterseps.pptx Binary files differindex a7ba1c0d4..8dbebdd96 100644 --- a/test/pptx/speaker_notes_afterseps.pptx +++ b/test/pptx/speaker_notes_afterseps.pptx diff --git a/test/pptx/speaker_notes_afterseps_templated.pptx b/test/pptx/speaker_notes_afterseps_templated.pptx Binary files differindex 73a142d1c..e90fb5672 100644 --- a/test/pptx/speaker_notes_afterseps_templated.pptx +++ b/test/pptx/speaker_notes_afterseps_templated.pptx diff --git a/test/pptx/speaker_notes_templated.pptx b/test/pptx/speaker_notes_templated.pptx Binary files differindex 9ae8ea1db..4fe6f284e 100644 --- a/test/pptx/speaker_notes_templated.pptx +++ b/test/pptx/speaker_notes_templated.pptx diff --git a/test/pptx/tables.pptx b/test/pptx/tables.pptx Binary files differindex c3e215a30..3b393393a 100644 --- a/test/pptx/tables.pptx +++ b/test/pptx/tables.pptx diff --git a/test/pptx/tables_templated.pptx b/test/pptx/tables_templated.pptx Binary files differindex 53de9b886..349792dc1 100644 --- a/test/pptx/tables_templated.pptx +++ b/test/pptx/tables_templated.pptx diff --git a/test/pptx/two_column.pptx b/test/pptx/two_column.pptx Binary files differindex 68b390bb7..343700084 100644 --- a/test/pptx/two_column.pptx +++ b/test/pptx/two_column.pptx diff --git a/test/pptx/two_column_templated.pptx b/test/pptx/two_column_templated.pptx Binary files differindex f74be1956..03eb598af 100644 --- a/test/pptx/two_column_templated.pptx +++ b/test/pptx/two_column_templated.pptx |