Skip to content

Commit b4a97c6

Browse files
author
Duncan Rance
committed
a debugging option
1 parent bd379a2 commit b4a97c6

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

cli/confluence.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ export default {
6262
boolean: true,
6363
hidden: true
6464
})
65+
.option('treedebug', {
66+
boolean: true,
67+
hidden: true
68+
})
6569
.option('lookup', {
6670
type: 'boolean',
6771
default: false,

cli/extract/confluence/pages.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,12 @@ export async function confluencePages (db, argv) {
308308
return true
309309
})
310310

311+
if (argv.treedebug) {
312+
// hidden option for just printing the tree
313+
root.walk((n) => console.log(catalog.fromNode(n)))
314+
return
315+
}
316+
311317
function getPageInfo (catalog, _, node) {
312318
// this read-only version populates the Nugget key versus URL lookup
313319
const nugget = catalog.fromNode(node)

0 commit comments

Comments
 (0)