+// let's try and load them, so we find out early what will fail.
+print("loading library to make sure it works.");
+ns_list_clean = [];
+ns_list.forEach(function(ns_name)
+{
+ try {
+
+ var core = imports.gi[ns_name];
+ ns_list_clean.push(ns_name);
+ } catch( e) {
+ print(e.toString());
+ }
+
+});
+
+
+
+// which languages do we want to output for.
+langs=[];
+File.list(__script_path__ + '/templates/').forEach(function(f) {
+ if (!File.isDirectory(__script_path__ + '/templates/' + f)) {
+ return;
+ }
+ if (f == 'resources') {
+ return;
+ }
+ langs.push({
+ name : f,
+ cls_template : new Template( {
+ templateFile : __script_path__ + '/templates/' + f + '/class.html',
+ Link : Link // links might be specific to languages..
+ }),
+ cls_ix_template : new Template( {
+ templateFile : __script_path__ + '/templates/' + f + '/class_ix.html',
+ Link : Link // links might be specific to languages..
+ }),
+ reference_template : new Template({
+ templateFile : __script_path__ + '/templates/' + f + '/references.html',
+ Link : Link // links might be specific to languages..
+ }),
+ });
+});
+
+
+/*
+var cls_template = new Template(__script_path__ + '/templates/class.html');
+var cls_ix_template = new Template(__script_path__ + '/templates/class_ix.html');
+var reference_template = new Template(__script_path__ + '/templates/references.html');
+*/