Showing
5 changed files
with
38 additions
and
2 deletions
.vscode/launch.json
0 → 100644
1 | +{ | ||
2 | + // Use IntelliSense to learn about possible attributes. | ||
3 | + // Hover to view descriptions of existing attributes. | ||
4 | + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
5 | + "version": "0.2.0", | ||
6 | + "configurations": [ | ||
7 | + { | ||
8 | + "type": "node", | ||
9 | + "request": "launch", | ||
10 | + "name": "Launch Program", | ||
11 | + "skipFiles": [ | ||
12 | + "<node_internals>/**" | ||
13 | + ], | ||
14 | + "program": "${workspaceFolder}\\test.js" | ||
15 | + } | ||
16 | + ] | ||
17 | +} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
No preview for this file type
... | @@ -5,7 +5,7 @@ import datetime | ... | @@ -5,7 +5,7 @@ import datetime |
5 | 5 | ||
6 | # coding = utf-8 | 6 | # coding = utf-8 |
7 | 7 | ||
8 | -filename = "C://area_code.xlsx" # area_code.xlsx | 8 | +filename = "area_code.xlsx" # area_code.xlsx |
9 | book = openpyxl.load_workbook(filename) | 9 | book = openpyxl.load_workbook(filename) |
10 | 10 | ||
11 | sheet = book.worksheets[0] | 11 | sheet = book.worksheets[0] |
... | @@ -14,7 +14,8 @@ code = [] | ... | @@ -14,7 +14,8 @@ code = [] |
14 | for cell in sheet['E']: | 14 | for cell in sheet['E']: |
15 | code.append(cell.value) | 15 | code.append(cell.value) |
16 | 16 | ||
17 | -area = input("읍/면/동을 입력(띄어쓰기 없이 입력 - 예:영통3동)\n") | 17 | +area = input() |
18 | +print(area) | ||
18 | col = code.index(area) | 19 | col = code.index(area) |
19 | area_code_index = 'B' + str(col+1) | 20 | area_code_index = 'B' + str(col+1) |
20 | area_code = sheet[area_code_index].value | 21 | area_code = sheet[area_code_index].value | ... | ... |
test.js
0 → 100644
1 | +const {PythonShell} = require('python-shell'); | ||
2 | +let iconv = require('iconv-lite'); | ||
3 | +let fs = require('fs'); | ||
4 | + | ||
5 | +var options = { | ||
6 | + mode: 'text', | ||
7 | + pythonOptions: ['-u'], | ||
8 | + scriptPath: '', | ||
9 | + args: ["영통1동"], | ||
10 | + pythonPath: '' | ||
11 | +}; | ||
12 | + | ||
13 | +var test = new PythonShell('recommend_clothes.py', options); | ||
14 | +var data='"영통1동"'; | ||
15 | +test.send(data); | ||
16 | +test.on('message',function(message){ | ||
17 | + console.log(message); | ||
18 | +}) | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
~$area_code.xlsx
0 → 100644
No preview for this file type
-
Please register or login to post a comment