Skip to content

Commit

Permalink
ODT/DOCX: Add keywords/author metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
johanneswilm committed Sep 19, 2024
1 parent 059287a commit 0e43afc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,11 @@ export class DOCXBookExporter {


getBaseMetadata() {
const authors = this.book.metadata.author.length ? [{institution: this.book.metadata.author}] : []
const keywords = this.book.metadata.keywords.length ? this.book.metadata.keywords.split(',').map(keyword => keyword.trim()) : []

Check failure on line 155 in fiduswriter/book/static/js/modules/books/exporter/docx/index.js

View workflow job for this annotation

GitHub Actions / Run tests

Strings must use doublequote
return {
authors: [],
keywords: [],
authors,
keywords,
title: this.book.title,
language: this.book.settings.language
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,11 @@ export class ODTBookExporter {


getBaseMetadata() {
const authors = this.book.metadata.author.length ? [{institution: this.book.metadata.author}] : []

Check failure on line 144 in fiduswriter/book/static/js/modules/books/exporter/odt/index.js

View workflow job for this annotation

GitHub Actions / Run tests

Expected indentation of 8 spaces but found 6
const keywords = this.book.metadata.keywords.length ? this.book.metadata.keywords.split(',').map(keyword => keyword.trim()) : []

Check failure on line 145 in fiduswriter/book/static/js/modules/books/exporter/odt/index.js

View workflow job for this annotation

GitHub Actions / Run tests

Expected indentation of 8 spaces but found 6

Check failure on line 145 in fiduswriter/book/static/js/modules/books/exporter/odt/index.js

View workflow job for this annotation

GitHub Actions / Run tests

Strings must use doublequote
return {
authors: [],
keywords: [],
authors,
keywords,
title: this.book.title,
language: this.book.settings.language
}
Expand All @@ -152,4 +154,4 @@ export class ODTBookExporter {
download(blob) {
return download(blob, createSlug(this.book.title) + ".odt", this.mimeType)
}
}
}

0 comments on commit 0e43afc

Please sign in to comment.