Permalink
Browse files

Version 0.2.0 preview 1

The 'lib' folder now replacing the single 'officegen.js'

PLEASE REPORT ANY ISSUE THAT YOU WILL FIND!
  • Loading branch information...
Ziv-Barber committed Sep 18, 2013
1 parent 16f24df commit 26fbde5a422f2ecfdaa119ba279cd8e101ac0a26
View
@@ -0,0 +1,22 @@
+Copyright (c) 2013 Ziv Barber, contributors.
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
View
@@ -1,6 +1,6 @@
var fs = require('fs');
-var docx = require('../officegen.js').makegen ( { 'type': 'docx', 'onend': function ( written ) {
+var docx = require('../lib/index.js').makegen ( { 'type': 'docx', 'onend': function ( written ) {
console.log ( 'Finish to create Word file.\nTotal bytes created: ' + written + '\n' );
} } );
View
@@ -1,6 +1,6 @@
var fs = require('fs');
-var pptx = require('../officegen.js').makegen ( { 'type': 'ppsx', 'onend': function ( written ) {
+var pptx = require('../lib/index.js').makegen ( { 'type': 'ppsx', 'onend': function ( written ) {
console.log ( 'Finish to create a PowerPoint slideshow file.\nTotal bytes created: ' + written + '\n' );
} } );
@@ -9,8 +9,9 @@ pptx.setDocTitle ( 'Sample PPTX Document' );
slide = pptx.makeNewSlide ();
slide.name = 'The first slide!';
slide.back = 'ff0000';
-slide.addText ( 'Hello World!', { x: 600000, y: 10000, font_size: 56, cx: 10000000 } );
-slide.addText ( 'Office generator', { y: 850000, font_size: 48 } );
+slide.color = '000000';
+slide.addText ( 'Hello World!', { x: 60, y: 10, font_size: 56, cx: 1000 } );
+slide.addText ( 'Office generator', { y: 85, font_size: 48 } );
slide = pptx.makeNewSlide ();
slide.back = { type: 'solid', color: '00ff00' };
slide = pptx.makeNewSlide ();
View
@@ -1,7 +1,7 @@
var fs = require('fs');
var path = require('path');
-var pptx = require('../officegen.js').makegen ( { 'type': 'pptx', 'onend': function ( written ) {
+var pptx = require('../lib/index.js').makegen ( { 'type': 'pptx', 'onend': function ( written ) {
console.log ( 'Finish to create a PowerPoint file.\nTotal bytes created: ' + written + '\n' );
} } );
View
@@ -1,6 +1,6 @@
var fs = require('fs');
-var officegen = require('../officegen.js');
+var officegen = require('../lib/index.js');
var xlsx = officegen.makegen ( { 'type': 'xlsx', 'onend': function ( written ) {
console.log ( 'Finish to create an Excel file.\nTotal bytes created: ' + written + '\n' );
} } );
View
@@ -1,6 +1,8 @@
// Simple server that displaying form to ask the user name and then generate PowerPoint stream with the user's name
// without using real files on the server side.
+var officegen = require('../lib/index.js');
+
var fs = require('fs');
var http = require("http");
var querystring = require('querystring');
@@ -60,7 +62,7 @@ http.createServer ( function ( request, response ) {
// .xlam application/vnd.ms-excel.addin.macroEnabled.12
// .xlsb application/vnd.ms-excel.sheet.binary.macroEnabled.12
- var pptx = require('../officegen.js').makegen ( { 'type': 'pptx', 'onend': function ( written ) {
+ var pptx = officegen.makegen ( { 'type': 'pptx', 'onend': function ( written ) {
console.log ( 'Finish to create the surprise PowerPoint stream and send it to ' + response.post.name + '.\nTotal bytes created: ' + written + '\n' );
} } );
Oops, something went wrong.

0 comments on commit 26fbde5

Please sign in to comment.