yuque-dl 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var cac = require('cac');
|
|
4
|
-
var index = require('./index-
|
|
4
|
+
var index = require('./index-4969d150.js');
|
|
5
5
|
require('node:fs/promises');
|
|
6
6
|
require('node:path');
|
|
7
7
|
require('axios');
|
|
@@ -10,7 +10,7 @@ require('progress');
|
|
|
10
10
|
require('rand-user-agent');
|
|
11
11
|
require('pull-md-img');
|
|
12
12
|
|
|
13
|
-
var version = "1.0.
|
|
13
|
+
var version = "1.0.3";
|
|
14
14
|
|
|
15
15
|
const cli = cac.cac('yuque-dl');
|
|
16
16
|
cli
|
|
@@ -171,6 +171,8 @@ async function main(url, options) {
|
|
|
171
171
|
});
|
|
172
172
|
}
|
|
173
173
|
const articleUrlPrefix = path.parse(url).dir;
|
|
174
|
+
let errArticleCount = 0;
|
|
175
|
+
let totalArticleCount = 0;
|
|
174
176
|
for (let i = 0; i < total; i++) {
|
|
175
177
|
const item = tocList[i];
|
|
176
178
|
if (typeof item.type !== 'string')
|
|
@@ -205,6 +207,7 @@ async function main(url, options) {
|
|
|
205
207
|
progress.updateProgress(progressItem);
|
|
206
208
|
}
|
|
207
209
|
else if (item.url) {
|
|
210
|
+
totalArticleCount += 1;
|
|
208
211
|
let preItem = {
|
|
209
212
|
path: '',
|
|
210
213
|
pathTitleList: [],
|
|
@@ -235,9 +238,13 @@ async function main(url, options) {
|
|
|
235
238
|
uuidMap.set(item.uuid, progressItem);
|
|
236
239
|
progress.updateProgress(progressItem);
|
|
237
240
|
}
|
|
241
|
+
else {
|
|
242
|
+
errArticleCount += 1;
|
|
243
|
+
}
|
|
238
244
|
}
|
|
239
245
|
}
|
|
240
246
|
await progress.completePromise;
|
|
247
|
+
logger.info(`总数${totalArticleCount}篇,✕ 失败${errArticleCount}篇`);
|
|
241
248
|
logger.info('生成目录 SUMMARY.md');
|
|
242
249
|
await genSummaryFile({
|
|
243
250
|
bookPath,
|
package/dist/cjs/index.js
CHANGED
package/dist/es/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cac } from 'cac';
|
|
2
|
-
import { m as main, l as logger } from './index-
|
|
2
|
+
import { m as main, l as logger } from './index-5cda90ca.js';
|
|
3
3
|
import 'node:fs/promises';
|
|
4
4
|
import 'node:path';
|
|
5
5
|
import 'axios';
|
|
@@ -8,7 +8,7 @@ import 'progress';
|
|
|
8
8
|
import 'rand-user-agent';
|
|
9
9
|
import 'pull-md-img';
|
|
10
10
|
|
|
11
|
-
var version = "1.0.
|
|
11
|
+
var version = "1.0.3";
|
|
12
12
|
|
|
13
13
|
const cli = cac('yuque-dl');
|
|
14
14
|
cli
|
|
@@ -169,6 +169,8 @@ async function main(url, options) {
|
|
|
169
169
|
});
|
|
170
170
|
}
|
|
171
171
|
const articleUrlPrefix = path.parse(url).dir;
|
|
172
|
+
let errArticleCount = 0;
|
|
173
|
+
let totalArticleCount = 0;
|
|
172
174
|
for (let i = 0; i < total; i++) {
|
|
173
175
|
const item = tocList[i];
|
|
174
176
|
if (typeof item.type !== 'string')
|
|
@@ -203,6 +205,7 @@ async function main(url, options) {
|
|
|
203
205
|
progress.updateProgress(progressItem);
|
|
204
206
|
}
|
|
205
207
|
else if (item.url) {
|
|
208
|
+
totalArticleCount += 1;
|
|
206
209
|
let preItem = {
|
|
207
210
|
path: '',
|
|
208
211
|
pathTitleList: [],
|
|
@@ -233,9 +236,13 @@ async function main(url, options) {
|
|
|
233
236
|
uuidMap.set(item.uuid, progressItem);
|
|
234
237
|
progress.updateProgress(progressItem);
|
|
235
238
|
}
|
|
239
|
+
else {
|
|
240
|
+
errArticleCount += 1;
|
|
241
|
+
}
|
|
236
242
|
}
|
|
237
243
|
}
|
|
238
244
|
await progress.completePromise;
|
|
245
|
+
logger.info(`总数${totalArticleCount}篇,✕ 失败${errArticleCount}篇`);
|
|
239
246
|
logger.info('生成目录 SUMMARY.md');
|
|
240
247
|
await genSummaryFile({
|
|
241
248
|
bookPath,
|
package/dist/es/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'node:fs/promises';
|
|
2
2
|
import 'node:path';
|
|
3
3
|
import 'axios';
|
|
4
|
-
export { g as getKnowledgeBaseInfo, m as main } from './index-
|
|
4
|
+
export { g as getKnowledgeBaseInfo, m as main } from './index-5cda90ca.js';
|
|
5
5
|
import 'pull-md-img';
|
|
6
6
|
import 'log4js';
|
|
7
7
|
import 'progress';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yuque-dl",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "yuque 知识库下载",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"axios": "^1.4.0",
|
|
51
51
|
"log4js": "^6.9.1",
|
|
52
52
|
"progress": "^2.0.3",
|
|
53
|
-
"pull-md-img": "^0.0.
|
|
53
|
+
"pull-md-img": "^0.0.19",
|
|
54
54
|
"rand-user-agent": "1.0.109",
|
|
55
55
|
"cac": "^6.7.14"
|
|
56
56
|
},
|