mirror of
https://github.com/10h30/wordpress-export-to-markdown.git
synced 2026-06-05 15:09:59 +09:00
Remove output option
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
import path from 'path';
|
||||
import process from 'process';
|
||||
import * as parser from './src/parser.js';
|
||||
import * as settings from './src/settings.js';
|
||||
import * as wizard from './src/wizard.js';
|
||||
import * as writer from './src/writer.js';
|
||||
|
||||
@@ -18,7 +19,7 @@ import * as writer from './src/writer.js';
|
||||
|
||||
// happy goodbye
|
||||
console.log('\nAll done!');
|
||||
console.log('Look for your output files in: ' + path.resolve(config.output));
|
||||
console.log('Look for your output files in: ' + path.resolve(settings.output_directory));
|
||||
})().catch(ex => {
|
||||
// sad goodbye
|
||||
console.log('\nSomething went wrong, execution halted early.');
|
||||
|
||||
@@ -49,3 +49,6 @@ export const filter_post_types = [
|
||||
'wp_global_styles',
|
||||
'wp_navigation'
|
||||
];
|
||||
|
||||
// Output directory.
|
||||
export const output_directory = 'output';
|
||||
|
||||
@@ -19,12 +19,6 @@ const options = [
|
||||
description: 'Path to WordPress export file',
|
||||
default: 'export.xml'
|
||||
},
|
||||
{
|
||||
name: 'output',
|
||||
type: 'folder',
|
||||
description: 'Path to output folder',
|
||||
default: 'output'
|
||||
},
|
||||
{
|
||||
name: 'year-folders',
|
||||
type: 'boolean',
|
||||
|
||||
+1
-1
@@ -180,7 +180,7 @@ function getPostPath(post, config) {
|
||||
}
|
||||
|
||||
// start with base output dir and post type
|
||||
const pathSegments = [config.output, post.meta.type];
|
||||
const pathSegments = [settings.output_directory, post.meta.type];
|
||||
|
||||
if (config.yearFolders) {
|
||||
pathSegments.push(dt.toFormat('yyyy'));
|
||||
|
||||
Reference in New Issue
Block a user