├── .gitignore ├── package.json ├── server.js └── static └── index.html /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "documentor-homepage", 3 | "description": "Documentation parsing homepage", 4 | "version": "0.1.0", 5 | "author" : "Andris Reinman", 6 | "maintainers":[ 7 | { 8 | "name":"andris", 9 | "email":"andris@node.ee" 10 | } 11 | ], 12 | "homepage": "http://github.com/andris9/documentor-homepage", 13 | "repository" : { 14 | "type" : "git", 15 | "url" : "http://github.com/andris9/documentor-homepage.git" 16 | }, 17 | "scripts":{ 18 | "test": "nodeunit test/" 19 | }, 20 | "main" : "./lib/documentor-homepage", 21 | "licenses" : [ 22 | { 23 | "type": "MIT", 24 | "url": "http://github.com/andris9/documentor-homepage/blob/master/LICENSE" 25 | } 26 | ], 27 | "dependencies": { 28 | "node-gearman": "*", 29 | "express": "*", 30 | "socket.io": "*" 31 | }, 32 | "devDependencies": { 33 | "nodeunit": "*" 34 | }, 35 | "engine": { 36 | "node": ">=0.6" 37 | }, 38 | "keywords": ["documentation"] 39 | } -------------------------------------------------------------------------------- /server.js: -------------------------------------------------------------------------------- 1 | var app = require('express').createServer(), 2 | io = require('socket.io').listen(app), 3 | Gearman = require("node-gearman"), 4 | gearman = new Gearman(); 5 | 6 | app.listen(80); 7 | 8 | app.get('/', function (req, res) { 9 | res.sendfile(__dirname + '/static/index.html'); 10 | }); 11 | 12 | io.sockets.on('connection', function (socket) { 13 | socket.emit('news', { hello: 'world' }); 14 | socket.on('documentor', function (data) { 15 | console.log(data); 16 | 17 | var job = gearman.submitJob("documentor", JSON.stringify(data)); 18 | 19 | job.on("data", function(data){ 20 | socket.emit('log', { html: data.toString("utf-8") }); 21 | }); 22 | 23 | job.on("end", function(){ 24 | socket.emit('log', { ready: true }); 25 | }); 26 | 27 | job.on("error", function(error){ 28 | socket.emit('log', { error: error.message }); 29 | }); 30 | 31 | job.setTimeout(16*60*1000, function(){ 32 | socket.emit('log', { error: "Timeout exceeded" }); 33 | }); 34 | 35 | }); 36 | }); -------------------------------------------------------------------------------- /static/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Documentor 6 | 7 | 62 | 63 | 64 | 96 | 97 | 98 | 99 |
100 |
101 | 102 |

Generate documentation from source

103 | 104 | 105 | 106 | 107 | 109 | 110 | 111 | 112 | 114 | 115 | 116 | 117 | 126 | 127 | 128 | 129 | 134 | 135 | 136 | 137 | 138 | 139 |
Repo URL (Git / SVN / ZIP / TAR.GZ):
108 | Repo type is derived from the URL, if ends with ".git", it is a GIT repo, etc.
Source directory:
113 | Enter the directory for parsing where the source files are, "/" is source root
Documentation engine: 118 |
124 | Should be self-explanatory 125 |
Optional params (JSON)
133 | Define command line params with {"--key":"value"}, if value is an array, it is repeated with the key.
NB! not all params are allowed
140 | 141 |
142 |
143 | 144 |
145 | 146 | 147 | --------------------------------------------------------------------------------