Skip to content

Commit

Permalink
correctly use user config
Browse files Browse the repository at this point in the history
  • Loading branch information
scottrblock committed Apr 30, 2022
1 parent e5c0ceb commit f5f44a2
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions logseq-opml-drummer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,18 @@ const saveOpmlFile = async (
};

const opmlFromParentPageName = async (
parentPageName: string
parentPageName: string,
userConfig: { [key: string]: any } = { ...baseConfig }
): Promise<OPML> => {
// TODO this should be userConfig, not baseConfig
let outline = helpers.setupOpmlHead(
{
opml: {
head: {},
body: {},
},
},
baseConfig
userConfig
);

// #TODO optionally only fetch n days back
Expand Down Expand Up @@ -154,8 +156,13 @@ function main(baseInfo: LSPluginBaseInfo) {
const userConfig = baseInfo?.settings;
const fullConfig = { ...baseConfig, ...userConfig };

console.log("baseConfig", baseConfig);
console.log("userConfig", userConfig);
console.log("fullConfig", fullConfig);

const opmlFromBlocks = await opmlFromParentPageName(
fullConfig.parentBlogTag
fullConfig.parentBlogTag,
fullConfig
);

if (fullConfig.saveOpmlFile) {
Expand Down

0 comments on commit f5f44a2

Please sign in to comment.