Commit 145fcf79 authored by Alexey.Golubev's avatar Alexey.Golubev

Наработки по объединению документов на nodejs

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@47753 954022d7-b5bf-4e40-9824-e11837661b57
parent 477a9ed8
@echo on
echo Installation nodejs modules
call npm install node-gyp -g
call npm install jsdom
call npm install canvas
call npm install navigator
call npm install xmlhttprequest
pause
node merge.js document/editor.bin document/changes.json editor_modified.bin
pause
\ No newline at end of file
......@@ -9,8 +9,12 @@ var base_file = process.argv[2];
var changes_file = process.argv[3];
var output_file = process.argv[4];
try{
var sdk_all = require('../sdk-all.js');
setTimeout( main, 15000, base_file, changes_file, output_file);
function main(base_file, changes_file, output_file)
{
try{
var sdk_all = require('./sdk-all.js');
var editor = new sdk_all.asc_docs_api();
var fs = require('fs');
......@@ -22,7 +26,8 @@ try{
var changed_doc = editor.Save();
fs.writeFileSync(output_file, changed_doc, 'utf-8');
}
catch(err){
}
catch(err){
console.log("Error:", err);
}
}
- 32- nodejs
- Microsoft Visual C++ 2010 Express
- Python 2.7 C:\Python27 ( PATH)
- cairo GTK C:\GTK ( C:\GTK\bin PATH)
: https://npmjs.org/package/jsdom : https://github.com/LearnBoost/node-canvas/wiki/Installation---Windows
\ No newline at end of file
var window = {chrome:1};
var jsdom = require("jsdom").jsdom;
var document = jsdom(null, null/*, {
features: {
FetchExternalResources : ["script", "img", "css", "frame", "iframe", "link"]
}
}*/);
var window = document.createWindow();
var Image = window.Image;
var navigator = require('navigator');
var XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest;
/*var window = {chrome:1};
window.postMessage = function(){};
window.addEventListener = function(){};
function XMLHttpRequest()
{
return undefined;
}
function Image()
{
this.onload = null;
}
function FT_Memory()
{
this.Alloc = function(size)
......@@ -204,4 +223,4 @@ var FontStyle =
FontStyleBoldItalic: 3,
FontStyleUnderline: 4,
FontStyleStrikeout: 8
};
\ No newline at end of file
};*/
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment