mirror of
https://github.com/daniel-j/fimfic2epub.git
synced 2024-06-28 19:10:17 +12:00
Fix short_description when using cli
This commit is contained in:
parent
82d1f8ea31
commit
85316dbe8a
|
@ -33,6 +33,7 @@ if (outputStdout) {
|
||||||
// use a mock DOM so we can run mithril on the server
|
// use a mock DOM so we can run mithril on the server
|
||||||
require('mithril/test-utils/browserMock')(global)
|
require('mithril/test-utils/browserMock')(global)
|
||||||
|
|
||||||
|
const htmlToText = require('./utils').htmlToText
|
||||||
const FimFic2Epub = require('./FimFic2Epub').default
|
const FimFic2Epub = require('./FimFic2Epub').default
|
||||||
const fs = require('fs')
|
const fs = require('fs')
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
|
@ -61,6 +62,7 @@ ffc.fetchMetadata()
|
||||||
if (args.author) {
|
if (args.author) {
|
||||||
ffc.setAuthorName(args.author)
|
ffc.setAuthorName(args.author)
|
||||||
}
|
}
|
||||||
|
ffc.storyInfo.short_description = htmlToText(ffc.storyInfo.description)
|
||||||
})
|
})
|
||||||
.then(ffc.fetchAll.bind(ffc))
|
.then(ffc.fetchAll.bind(ffc))
|
||||||
.then(ffc.build.bind(ffc))
|
.then(ffc.build.bind(ffc))
|
||||||
|
|
Loading…
Reference in a new issue