From e5b2f8c8f275d72519480c4a2ce49f7729810761 Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Sun, 21 Apr 2013 05:06:26 +0000 Subject: [PATCH] Add list of authors; shrink tag sizes --- modules/project/pages.js | 16 +++++++++++++--- public/project.css | 1 + views/project/project.jade | 2 +- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/modules/project/pages.js b/modules/project/pages.js index 2adedc4..7d964de 100644 --- a/modules/project/pages.js +++ b/modules/project/pages.js @@ -4,16 +4,26 @@ var exec = require('child_process').exec, var pages = function(dbot) { var quoteCat = dbot.db.quoteArrs[dbot.config.name], - rev, diff, branch; + rev, diff, branch, credit, authors = []; + exec("git log --format='%cN¬' | sort -u | tr -d '\n'", function (error, stdout, sderr) { + var credit = stdout.split("¬"); // nobody uses ¬, do they? + for (var i = 0; i < credit.length; i++) { + if ((credit[i].split(" ").length) == 2){ + console.log(credit[i]); + authors.push(credit[i]); + } + } + }); exec("git rev-list --all | wc -l", function(error, stdout, stderr) { - rev = stdout + rev = stdout; }); exec("git rev-parse --abbrev-ref HEAD", function(error, stdout, stderr) { branch = stdout }); + exec("git log -1", function(error, stdout, stderr) { diff = stdout }); @@ -34,7 +44,7 @@ var pages = function(dbot) { res.render('project', { "configList": dbot.modules.project.api.configList(), - "authors": dbot.modules.project.api.getAuthors(), + "authors": authors, //dbot.modules.project.api.getAuthors(), "credits": dbot.t("credits"), "thanks": dbot.t("thanks"), "name": dbot.config.name, diff --git a/public/project.css b/public/project.css index 0659a28..6b36846 100644 --- a/public/project.css +++ b/public/project.css @@ -59,6 +59,7 @@ ul { text-align:center; margin-left:0; margin-bottom:5px; + font-size:80%; } li { background-image: linear-gradient(to bottom, #f5ebe2, #f5e6d8); diff --git a/views/project/project.jade b/views/project/project.jade index ddc04c5..9f5e3cd 100644 --- a/views/project/project.jade +++ b/views/project/project.jade @@ -50,7 +50,7 @@ html(lang='#{curr839}') #{credits} p.center #{thanks} - ul + ul#credits each author in authors li #{author} section#config