diff options
| author | Silvio Rhatto <rhatto@riseup.net> | 2026-02-26 18:31:50 -0300 |
|---|---|---|
| committer | Silvio Rhatto <rhatto@riseup.net> | 2026-02-26 18:31:50 -0300 |
| commit | 930dca5c3170e9c702bfea2b23ccb6dbda5470d4 (patch) | |
| tree | 91545bd4e89c5ea0e42c269daf9652e3825f0454 | |
| parent | d73011b1e0fa9b66e34e85cf83190a4ced5ced00 (diff) | |
| download | bookup-930dca5c3170e9c702bfea2b23ccb6dbda5470d4.tar.gz bookup-930dca5c3170e9c702bfea2b23ccb6dbda5470d4.tar.bz2 | |
Feat: initial support for ODT and DOCX outputs
| -rw-r--r-- | Makefile.bookup | 28 | ||||
| -rw-r--r-- | _changelog.yml | 1 | ||||
| -rw-r--r-- | _output.yml | 4 | ||||
| -rw-r--r-- | content/notes/00-changelog/changelog.md | 1 | ||||
| -rw-r--r-- | templates/_output.yml | 4 |
5 files changed, 37 insertions, 1 deletions
diff --git a/Makefile.bookup b/Makefile.bookup index c97d927..dc41399 100644 --- a/Makefile.bookup +++ b/Makefile.bookup @@ -30,6 +30,12 @@ PDF_STYLE ?= bookdown::tufte_book2 #HTML_STYLE ?= bookdown::html_book HTML_STYLE ?= bookdown::gitbook +# ODT style +ODT_STYLE ?= bookdown::odt_document2 + +# DOC style +DOCX_STYLE ?= bookdown::word_document2 + # # Exclusion patterns # @@ -188,7 +194,27 @@ bookdown_epub: @#rm _book/reference-keys.txt @#rmdir _book -bookdown: bookdown_clean bookdown_html bookdown_pdf bookdown_epub +bookdown_odt: + # Cleanup old builds + @rm -rf _book/_main.odt + + # Build + @Rscript -e 'bookdown::render_book("$(OUTPUT).md", "$(ODT_STYLE)")' + + # Move + @mv _book/_main.odt $(OUTPUT_FOLDER)/$(OUTPUT).odt + +bookdown_word: + # Cleanup old builds + @rm -rf _book/_main.docx + + # Build + @Rscript -e 'bookdown::render_book("$(OUTPUT).md", "$(DOCX_STYLE)")' + + # Move + @mv _book/_main.docx $(OUTPUT_FOLDER)/$(OUTPUT).docx + +bookdown: bookdown_clean bookdown_html bookdown_pdf bookdown_epub bookdown_odt bookdown_word # # Build the book diff --git a/_changelog.yml b/_changelog.yml index 3fe9309..2f2cfdd 100644 --- a/_changelog.yml +++ b/_changelog.yml @@ -16,6 +16,7 @@ versions: summary: | * Initial support for Debian trixie. * Improved TOC, LOF e LOT alignment. + * Initial support for ODT and DOCX outputs. - id: 0.6.1 date_atom: 2026-01-31T14:06:00-03:00 diff --git a/_output.yml b/_output.yml index c8ab9f1..a9e7475 100644 --- a/_output.yml +++ b/_output.yml @@ -116,3 +116,7 @@ bookdown::tufte_book2: # It conflicts with bibliographical citations # Check ChangeLog entry from 2024-03-24 on the `ensaios` repository md_extensions: -example_lists + +bookdown::word_document2: default + +bookdown::odt_document2: default diff --git a/content/notes/00-changelog/changelog.md b/content/notes/00-changelog/changelog.md index 9c84da2..0c9b391 100644 --- a/content/notes/00-changelog/changelog.md +++ b/content/notes/00-changelog/changelog.md @@ -9,6 +9,7 @@ This section can be used to register changes in the text versions. * Initial support for Debian trixie. * Improved TOC, LOF e LOT alignment. +* Initial support for ODT and DOCX outputs. ## Version 0.6.1 - 2026-01-31 {#v0.6.1 .unnumbered} diff --git a/templates/_output.yml b/templates/_output.yml index 832d7df..c2d1866 100644 --- a/templates/_output.yml +++ b/templates/_output.yml @@ -116,3 +116,7 @@ bookdown::tufte_book2: # It conflicts with bibliographical citations # Check ChangeLog entry from 2024-03-24 on the `ensaios` repository md_extensions: -example_lists + +bookdown::word_document2: default + +bookdown::odt_document2: default |
