Skip to content

Commit

Permalink
Merge pull request #38 from kmlbgn/master
Browse files Browse the repository at this point in the history
feat: default slug from title or name of page + small refactor
  • Loading branch information
kmlbgn authored May 16, 2024
2 parents 6da0a26 + 784c8cc commit 5136256
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 40 deletions.
13 changes: 0 additions & 13 deletions src/pull.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,19 +158,6 @@ async function getTabs(
allTabsPages[currentTab.nameOrTitle.toLowerCase()] = currentTabPages;
endGroup();
}

// TODO: links to tabs.
// for (const linkPageInfo of pageInfo.linksPageIdsAndOrder) {
// // Get tabs page metadata
// const Tabs = await fromPageId(
// options,
// incomingContext,
// parentId,
// pageId,
// pageOrder,
// true,
// false
// );
}

// getPagesRecursively navigates the root page and iterates over each page within it,
Expand Down
27 changes: 0 additions & 27 deletions src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,33 +87,6 @@ export async function run(): Promise<void> {
path.join(program.opts().cssOutputDirectory, "docu-notion-styles.css")
);

// TODO: delete if confirmed useless
// async function moveTmpContents() {
// const destTmpPath = "src/pages";
// const srcTmpPath = path.join(options.markdownOutputPath.replace(/\/+$/, "")+ '/tmp');
// fs.ensureDirSync(destTmpPath);

// const tmpFiles = fs.readdirSync(srcTmpPath);
// for (const file of tmpFiles) {
// const destFilePath = path.join(destTmpPath, file);
// const srcFilePath = path.join(srcTmpPath, file);

// if (fs.existsSync(destFilePath)) {
// // Prompt user for overwriting
// const overwrite = await promptUserForOverwrite(file, options.yes);
// if (!overwrite) {
// console.log(`Skipping overwrite of '${file}'`);
// continue;
// } else {
// console.log(`Overwriting '${file}'`);
// }
// }

// fs.moveSync(srcFilePath, destFilePath, { overwrite: true });
// }
// // After moving all files, delete the tmp folder
// fs.removeSync(srcTmpPath);
// }

// Pull tabs and their respective page tree structure
await notionPull(program.opts());
Expand Down

0 comments on commit 5136256

Please sign in to comment.