mirror of
https://github.com/10h30/wordpress-export-to-markdown.git
synced 2026-06-05 15:09:59 +09:00
Rename index to app, update deps, tweak config
This commit is contained in:
+1
-1
@@ -11,7 +11,7 @@ import * as writer from './src/writer.js';
|
||||
(async () => {
|
||||
// configure command line help output
|
||||
commander.program
|
||||
.name('node index.js')
|
||||
.name('npx wordpress-export-to-markdown')
|
||||
.helpOption('-h, --help', 'See the thing you\'re looking at right now')
|
||||
.addHelpText('after', '\nMore documentation is at https://github.com/lonekorean/wordpress-export-to-markdown')
|
||||
.configureHelp({
|
||||
Generated
+7
-7
@@ -10,16 +10,16 @@
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@guyplusplus/turndown-plugin-gfm": "^1.0.7",
|
||||
"@inquirer/prompts": "^7.2.3",
|
||||
"axios": "^1.7.9",
|
||||
"@inquirer/prompts": "^7.3.2",
|
||||
"axios": "^1.8.2",
|
||||
"chalk": "^5.4.1",
|
||||
"commander": "^13.0.0",
|
||||
"commander": "^13.1.0",
|
||||
"luxon": "^3.5.0",
|
||||
"turndown": "^7.2.0",
|
||||
"xml2js": "^0.6.2"
|
||||
},
|
||||
"bin": {
|
||||
"wordpress-export-to-markdown": "index.js"
|
||||
"wordpress-export-to-markdown": "app.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 18.0.0"
|
||||
@@ -370,9 +370,9 @@
|
||||
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
|
||||
},
|
||||
"node_modules/axios": {
|
||||
"version": "1.8.1",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-1.8.1.tgz",
|
||||
"integrity": "sha512-NN+fvwH/kV01dYUQ3PTOZns4LWtWhOFCAhQ/pHb88WQ1hNe5V/dvFwc4VJcDL11LT9xSX0QtsR8sWUuyOuOq7g==",
|
||||
"version": "1.8.2",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-1.8.2.tgz",
|
||||
"integrity": "sha512-ls4GYBm5aig9vWx8AWDSGLpnpDQRtWAfrjU+EuytuODrFBkqesN2RkOQCBzrA1RQNHw1SmRMSDDDSwzNAYQ6Rg==",
|
||||
"dependencies": {
|
||||
"follow-redirects": "^1.15.6",
|
||||
"form-data": "^4.0.0",
|
||||
|
||||
+5
-8
@@ -2,7 +2,7 @@
|
||||
"name": "wordpress-export-to-markdown",
|
||||
"version": "2.4.2",
|
||||
"description": "Converts a WordPress export XML file into Markdown files.",
|
||||
"main": "index.js",
|
||||
"main": "app.js",
|
||||
"repository": "https://github.com/lonekorean/wordpress-export-to-markdown.git",
|
||||
"keywords": [
|
||||
"blog",
|
||||
@@ -11,9 +11,6 @@
|
||||
"markdown",
|
||||
"wordpress"
|
||||
],
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": "Will Boyd <will@codersblock.com> (https://codersblock.com)",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -22,15 +19,15 @@
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"@guyplusplus/turndown-plugin-gfm": "^1.0.7",
|
||||
"@inquirer/prompts": "^7.2.3",
|
||||
"axios": "^1.7.9",
|
||||
"@inquirer/prompts": "^7.3.2",
|
||||
"axios": "^1.8.2",
|
||||
"chalk": "^5.4.1",
|
||||
"commander": "^13.0.0",
|
||||
"commander": "^13.1.0",
|
||||
"luxon": "^3.5.0",
|
||||
"turndown": "^7.2.0",
|
||||
"xml2js": "^0.6.2"
|
||||
},
|
||||
"bin": {
|
||||
"wordpress-export-to-markdown": "./index.js"
|
||||
"wordpress-export-to-markdown": "./app.js"
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -56,7 +56,7 @@ export function load() {
|
||||
{
|
||||
name: 'date-folders',
|
||||
type: 'choice',
|
||||
description: 'Organize posts into folders by date',
|
||||
description: 'Organize posts into date folders',
|
||||
default: 'none',
|
||||
choices: [
|
||||
{
|
||||
@@ -113,13 +113,13 @@ export function load() {
|
||||
default: 'title,date,categories,tags,coverImage,draft'
|
||||
},
|
||||
{
|
||||
name: 'image-file-request-delay',
|
||||
name: 'request-delay',
|
||||
type: 'integer',
|
||||
description: 'Delay between image file requests',
|
||||
default: 500
|
||||
},
|
||||
{
|
||||
name: 'markdown-file-write-delay',
|
||||
name: 'write-delay',
|
||||
type: 'integer',
|
||||
description: 'Delay between writing markdown files',
|
||||
default: 10
|
||||
@@ -131,7 +131,7 @@ export function load() {
|
||||
default: 'utc'
|
||||
},
|
||||
{
|
||||
name: 'include-time-with-date',
|
||||
name: 'include-time',
|
||||
type: 'boolean',
|
||||
description: 'Include time with frontmatter date',
|
||||
default: false
|
||||
|
||||
+3
-3
@@ -59,7 +59,7 @@ async function writeMarkdownFilesPromise(posts) {
|
||||
destinationPath,
|
||||
delay
|
||||
};
|
||||
delay += shared.config.markdownFileWriteDelay;
|
||||
delay += shared.config.writeDelay;
|
||||
return [payload];
|
||||
}
|
||||
});
|
||||
@@ -90,7 +90,7 @@ async function loadMarkdownFilePromise(post) {
|
||||
if (shared.config.dateFormat) {
|
||||
outputValue = value.toFormat(shared.config.dateFormat);
|
||||
} else {
|
||||
outputValue = shared.config.includeTimeWithDate ? value.toISO() : value.toISODate();
|
||||
outputValue = shared.config.includeTime ? value.toISO() : value.toISODate();
|
||||
}
|
||||
|
||||
if (shared.config.quoteDate) {
|
||||
@@ -138,7 +138,7 @@ async function writeImageFilesPromise(posts) {
|
||||
destinationPath,
|
||||
delay
|
||||
};
|
||||
delay += shared.config.imageFileRequestDelay;
|
||||
delay += shared.config.requestDelay;
|
||||
return [payload];
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user