Skip to content

Commit 6cacc24

Browse files
authored
Merge pull request #197 from chughts/master
Fixed Codacy formatting errors
2 parents db13b4c + 789b4bb commit 6cacc24

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ Node-RED Watson Nodes for IBM Bluemix
77

88
<a href="https://cla-assistant.io/watson-developer-cloud/node-red-node-watson"><img src="https://cla-assistant.io/readme/badge/watson-developer-cloud/node-red-node-watson" alt="CLA assistant" /></a>
99

10+
### New in version 0.4.17
11+
- Fixed how Document Conversion node was handling docx files
12+
1013
### New in version 0.4.16
1114
- Oops! fix to Speech to Text Node
1215

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "node-red-node-watson",
3-
"version": "0.4.16",
3+
"version": "0.4.17",
44
"description": "A collection of Node-RED nodes for IBM Watson services",
55
"dependencies": {
66
"alchemy-api": "^1.3.0",
@@ -12,7 +12,8 @@
1212
"qs": "6.x",
1313
"image-type": "^2.0.2",
1414
"watson-developer-cloud": "^2.1.0",
15-
"kuromoji": "^0.0.5"
15+
"kuromoji": "^0.0.5",
16+
"is-docx": "^0.0.3"
1617
},
1718
"repository": {
1819
"type": "git",

services/document_conversion/v1.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,15 @@ module.exports = function(RED) {
103103
text: 'Invalid URI'
104104
});
105105
} else {
106-
stream_payload(info.path, msg.payload, function(format) {
106+
stream_payload(info.path, msg.payload, function(format) {
107107
if ('zip' === format) {
108108
var f = fs.readFileSync(info.path);
109109
if (isDocx(f)) {
110110
var newfilename = info.path + '.docx';
111111
fs.rename(info.path, newfilename, function(err){
112112
if (err) {
113113
node.warn('Unable to handle docx file.');
114-
node.status({
114+
node.status({
115115
fill: 'red',
116116
shape: 'dot',
117117
text: 'Error handling docx file'
@@ -126,7 +126,7 @@ module.exports = function(RED) {
126126
} else {
127127
node.performConversion(msg,info.path);
128128
}
129-
});
129+
});
130130
}
131131
});
132132
};

0 commit comments

Comments
 (0)