mirror of
https://github.com/10h30/wordpress-export-to-markdown.git
synced 2026-07-11 18:56:14 +09:00
21 lines
454 B
JavaScript
21 lines
454 B
JavaScript
const wizard = require('./src/wizard');
|
|
const parser = require('./src/parser');
|
|
const writer = require('./src/writer');
|
|
|
|
// global so various functions can access arguments
|
|
let config;
|
|
|
|
async function init() {
|
|
try {
|
|
config = wizard.getConfig();
|
|
let posts = await parser.parseFilePromise(config)
|
|
writer.writeFiles(posts, config);
|
|
} catch (ex) {
|
|
// appease the UnhandledPromiseRejectionWarning
|
|
console.error(ex);
|
|
}
|
|
}
|
|
|
|
// it's go time!
|
|
init();
|