1 //<Script type="text/javascript">
8 JSDOC = imports['JSDOC.js'].JSDOC;
9 console = imports['console.js'].console;
10 Roo = imports['Roo.js'].Roo;
12 Introspect = imports['JSDOC/Introspect.js'].Introspect;
16 //var outputdir = '/home2/www/devel/seed';
17 var outputdir = '/var/www/seed';
20 //var ns_list = [ 'GIRepository' ];
22 var ns_list = JSDOC.Introspect.namespaces().sort();
23 //console.dump(ns_list);
24 // ns_list = [ 'Gio' ];
25 //ns_list = [ 'Gtk' ];
37 var cls_template = new JSDOC.Template(__script_path__ + '/docs/class.html');
38 var cls_ix_template = new JSDOC.Template(__script_path__ + '/docs/class_ix.tmpl');
39 var reference_template = new JSDOC.Template(__script_path__ + '/docs/references.html');
41 Roo.each(ns_list, function(ns_name) {
43 //if (ns_name == 'Epiphany') {
46 if (ns_name == 'GnomeGamesSupport') { // on gnome dev cd stuff.
51 core = imports.gi[ns_name];
53 // Seed.print("SKIP (no import): "+ ns_name + ": " + e);
57 Seed.print("START:" + ns_name);
58 // ones that cause problems.
63 var ns = Introspect.ns(ns_name);
65 Gio.simple_write(outputdir + '/'+ ns_name + '.shtml', cls_template.process(ns));
70 // left bar index of elements in namespace...
71 Gio.simple_write(outputdir + '/_ix_'+ ns_name + '.shtml', cls_ix_template.process(ns));
76 Roo.each(ns.objects, function(n) {
79 Gio.simple_write(outputdir + '/'+ ns_name + '.' + n + '.shtml',
80 cls_template.process( Introspect.factory('Class', ns_name, n)));
82 Seed.print(ns_name + '.' +n);
84 Roo.each(ns.interfaces, function(n) {
87 Gio.simple_write(outputdir + '/'+ ns_name + '.' + n + '.shtml',
88 cls_template.process( Introspect.factory('Interface', ns_name, n)));
90 Seed.print(ns_name + '.' +n);
92 Roo.each(ns.structs, function(n) {
95 Gio.simple_write(outputdir + '/'+ ns_name + '.' + n + '.shtml',
96 cls_template.process( Introspect.factory('Struct', ns_name, n)));
99 Seed.print(ns_name + '.' +n);
102 Roo.each(ns.unions, function(n) {
105 Gio.simple_write(outputdir + '/'+ ns_name + '.' + n + '.shtml',
106 cls_template.process( Introspect.factory('Union', ns_name, n)));
109 Seed.print(ns_name + '.' +n);
112 Roo.each(ns.enums, function(n) {
115 Gio.simple_write(outputdir + '/'+ ns_name + '.' + n + '.shtml',
116 cls_template.process( Introspect.factory('Enum', ns_name, n)));
119 Seed.print(ns_name + '.' +n);
124 for (var i in Introspect.references) {
126 console.log("REFERENCE: " + i + ' : ' + Introspect.references[i].length);
127 Gio.simple_write(outputdir + '/references.'+ i + '.html',
128 reference_template.process( Introspect.references[i] ));
132 var ix_template = new JSDOC.Template(__script_path__ + '/docs/index.tmpl');
133 Gio.simple_write(outputdir + '/index.shtml', ix_template.process(ns_list));