td-octopus 0.1.3 → 0.1.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/cmds/download.js +3 -5
- package/package.json +3 -3
package/cmds/download.js
CHANGED
|
@@ -3,20 +3,18 @@ const axios = require('axios');
|
|
|
3
3
|
const XLSX = require('xlsx');
|
|
4
4
|
const path = require('path');
|
|
5
5
|
|
|
6
|
-
const { isString } = require('lodash');
|
|
7
|
-
const { extractAll } = require('../src/resource/extract');
|
|
8
6
|
const { getProjectConfig } = require('../src/utils');
|
|
9
7
|
const { convertJsonToXlsx } = require('../src/download');
|
|
10
8
|
const { OCTOPUS_CONFIG_FILE } = require('../src/utils/const')
|
|
11
9
|
|
|
12
10
|
exports.command = 'download';
|
|
13
11
|
|
|
14
|
-
exports.describe = 'download';
|
|
12
|
+
exports.describe = 'download 正确配置downloadUrl里的code与projectId后执行,可以从司南下载翻译文档xls到本地目录';
|
|
15
13
|
|
|
16
14
|
exports.handler = async (argv) => {
|
|
17
15
|
const config = getProjectConfig();
|
|
18
|
-
const otpPath = path.resolve(process.cwd(),
|
|
19
|
-
const url =
|
|
16
|
+
const otpPath = path.resolve(process.cwd(), config.otpDir);
|
|
17
|
+
const url = config.downloadUrl
|
|
20
18
|
let lang = "en-US"
|
|
21
19
|
if (!url) {
|
|
22
20
|
console.log(`请配置${OCTOPUS_CONFIG_FILE}里面的downloadUrl`)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "td-octopus",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "I18N tool",
|
|
5
5
|
"author": "Anthony Li",
|
|
6
6
|
"bin": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"typescript": "^3.2.2",
|
|
27
27
|
"update-notifier": "^4.1.0",
|
|
28
28
|
"vue-template-compiler": "^2.6.14",
|
|
29
|
-
"xlsx": "0.
|
|
29
|
+
"xlsx": "0.16.9",
|
|
30
30
|
"yargs": "^15.3.1"
|
|
31
31
|
},
|
|
32
32
|
"keywords": [
|
|
@@ -37,4 +37,4 @@
|
|
|
37
37
|
"type": "git",
|
|
38
38
|
"url": "git@github.com:TDFE/octopus.git"
|
|
39
39
|
}
|
|
40
|
-
}
|
|
40
|
+
}
|