Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
keeleliin
keeleliin-wrapper
Commits
e3de7032
Commit
e3de7032
authored
Jul 28, 2015
by
taivo
Browse files
KEEL-58: updated other services output.
parent
ee362eec
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/service/sessionService.js
View file @
e3de7032
...
...
@@ -187,7 +187,7 @@ function SessionService() {
for
(
var
i
in
session
.
outputFiles
){
filesList
.
push
({
key
:
i
,
type
:
'
output
'
,
type
:
session
.
outputFiles
[
i
].
type
,
fileName
:
session
.
outputFiles
[
i
].
fileName
,
contentType
:
session
.
outputFiles
[
i
].
contentType
});
...
...
wrapper/archiveExtractor.js
View file @
e3de7032
...
...
@@ -146,6 +146,7 @@ function ArchiveExtractor() {
session
.
addOutputFile
(
uniqid
,
{
filePath
:
filePath
,
fileName
:
fileName
,
type
:
'
output
'
,
contentType
:
mime
.
lookup
(
filePath
)
// getting the original file mime type
});
}
...
...
wrapper/contentTokenizer.js
View file @
e3de7032
...
...
@@ -6,6 +6,8 @@ var SessionService = require('./../src/service/sessionService');
var
async
=
require
(
'
async
'
);
var
CommandModel
=
require
(
'
../src/mapper/commandModel
'
);
var
fs
=
require
(
'
fs
'
);
var
mime
=
require
(
'
mime
'
);
var
path
=
require
(
'
path
'
);
function
ContentTokenizer
(){
...
...
@@ -68,8 +70,19 @@ function ContentTokenizer(){
var
mapping
=
JSON
.
stringify
(
tokens
);
logger
.
debug
(
'
Failide mappimine on lõpetatud
'
);
SessionService
.
storeToFile
(
session
.
id
,
mapping
,
function
(
error
,
mappingPath
)
{
session
.
addOutputFile
(
'
output
'
,
model
.
outputPaths
.
outputPath1
);
session
.
addOutputFile
(
'
mapping
'
,
mappingPath
);
session
.
addOutputFile
(
'
output
'
,
{
type
:
'
output
'
,
fileName
:
path
.
basename
(
model
.
outputPaths
.
outputPath1
),
filePath
:
model
.
outputPaths
.
outputPath1
,
contentType
:
mime
.
lookup
(
model
.
outputPaths
.
outputPath1
)
});
session
.
addOutputFile
(
'
mapping
'
,
{
type
:
'
mapping
'
,
fileName
:
path
.
basename
(
mappingPath
),
filePath
:
mappingPath
,
contentType
:
mime
.
lookup
(
mappingPath
)
});
return
callback
(
error
,
session
);
});
...
...
wrapper/morfyhestaja.js
View file @
e3de7032
...
...
@@ -4,6 +4,8 @@ var localExecutor = require('./../src/service/executor/localExecutor');
var
Session
=
require
(
'
../src/model/session
'
);
var
CommandModel
=
require
(
'
../src/mapper/commandModel
'
);
var
fs
=
require
(
'
fs
'
);
var
mime
=
require
(
'
mime
'
);
var
path
=
require
(
'
path
'
);
function
ContentTokenizer
(){
...
...
@@ -25,7 +27,13 @@ function ContentTokenizer(){
session
.
setErrors
(
response
.
errors
);
}
session
.
addOutputFile
(
'
output
'
,
response
.
stdOutPath
);
session
.
addOutputFile
(
'
output
'
,
{
type
:
'
output
'
,
fileName
:
path
.
basename
(
response
.
stdOutPath
),
filePath
:
response
.
stdOutPath
,
contentType
:
mime
.
lookup
(
response
.
stdOutPath
)
});
return
callback
(
err
,
session
);
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment