All about that wizard

This commit is contained in:
Will Boyd
2020-01-12 09:03:32 -05:00
parent 362c188aff
commit 579b34bb41
7 changed files with 417 additions and 52 deletions
+4 -4
View File
@@ -13,13 +13,13 @@ async function parseFilePromise(config) {
tagNameProcessors: [xml2js.processors.stripPrefix]
});
let posts = collectPosts(data);
let posts = collectPosts(data, config);
let images = [];
if (config.saveattachedimages) {
if (config.saveAttachedImages) {
images.push(...collectAttachedImages(data));
}
if (config.savescrapedimages) {
if (config.saveScrapedImages) {
images.push(...collectScrapedImages(data));
}
@@ -32,7 +32,7 @@ function getItemsOfType(data, type) {
return data.rss.channel[0].item.filter(item => item.post_type[0] === type);
}
function collectPosts(data) {
function collectPosts(data, config) {
// this is passed into getPostContent() for the markdown conversion
turndownService = translator.initTurndownService();