diff --git a/.gitignore b/.gitignore index a49c313..2b664c9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,10 @@ # Ignore the user config files -./config.json - -# Ignore the user database +config.json db.json + +# ignore npm +node_modules/ + +# ignore assets +public/bootstrap/ +public/d3/ diff --git a/modules/project/config.json b/modules/project/config.json index f31a1c9..0725dea 100644 --- a/modules/project/config.json +++ b/modules/project/config.json @@ -1,4 +1,3 @@ { - "quotecat":"depressionbot", "dependencies": ["web", "quotes", "github"] } diff --git a/modules/project/pages.js b/modules/project/pages.js index e2dfd3c..a724636 100644 --- a/modules/project/pages.js +++ b/modules/project/pages.js @@ -2,12 +2,15 @@ var exec = require('child_process').exec, request = require('request'); var pages = function(dbot) { - var depression = dbot.db.quoteArrs[dbot.config.project.quotecat]; + var quoteCat = dbot.db.quoteArrs[dbot.config.name], + rev, diff; - var rev; - exec("git rev-list --all | wc -l", function(a,b,c){rev = b}); - var diff; - exec("git log -1", function(a, b, c){diff = b}); + exec("git rev-list --all | wc -l", function(a, b, c) { + rev = b + }); + exec("git log -1", function(a, b, c) { + diff = b + }); /* TODO: merge back into github module */ var milestones; @@ -18,6 +21,11 @@ var pages = function(dbot) { return { '/project': function(req, res) { + var quote = dbot.config.name; + if(quoteCat) { + quote = quoteCat[Math.floor(Math.random()*quoteCat.length)]; + } + res.render('project', { "name": dbot.config.name, "intro": dbot.t("dbotintro", { @@ -47,7 +55,7 @@ var pages = function(dbot) { "openmilestone": dbot.t("openmilestone"), "closedmilestone": dbot.t("closedmilestone"), "development": dbot.t("development"), - "dquote": depression[Math.floor(Math.random()*depression.length)], + "dquote": quote, "diff": diff, "pagetitle": dbot.t("pagetitle", { "botname": dbot.config.name diff --git a/modules/project/project.js b/modules/project/project.js index 7f4c498..25e3e35 100644 --- a/modules/project/project.js +++ b/modules/project/project.js @@ -1,14 +1,13 @@ /** - * Module Name: imgur - * Description: Various imgur functionality + * Module Name: Project + * Description: Web page which shows git status and other various stats about + * the dbot. */ -var _ = require('underscore')._, - request = require('request'); - var project = function(dbot) { - // nothing to see here go away love zuzak + // Nothing to see here go away love zuzak } + exports.fetch = function(dbot) { return new project(dbot); } diff --git a/views/imgur/imgurr.jade b/views/imgur/imgurr.jade index fd7d7d0..a5f4f4d 100644 --- a/views/imgur/imgurr.jade +++ b/views/imgur/imgurr.jade @@ -10,8 +10,10 @@ html(lang='en') function giveMessage(msg) { $('