Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

render some columns

  • Loading branch information...
commit 8d7b49f28f1394bf9c5dfd8938769742ce5d57a7 1 parent 0977868
@flores flores authored
View
0  getpaths.js → scripts/getpaths.js
File renamed without changes
View
10 makemesomejson.rb → scripts/makemesomejson.rb
@@ -8,15 +8,17 @@
data = Hash.new
# find is faster than like everything
-repos = `find tool-repos -iname 'readme*'`;
+repos = `find ~/hub/tool-repos -iname 'readme*'`;
repos.split("\n").each do |r|
p = r.split('/')
- name = p[1]
- git = File.file?("tool-repos/#{name}/repo")
+ name = p[5]
+ git = `grep -A2 "#{name}/repo" ~/hub/tool-repos/.gitmodules |awk '/url/ {print $3}'`.strip
+
+ readme = File.open(r, "r").read
data[name] = {
- "readme" => r,
+ "readme" => readme,
"git" => git
}
end
View
13 server.js
@@ -4,19 +4,12 @@ var util = require('util'),
var app = require('express').createServer();
app.register('.html', require('jade'));
+var md = require("node-markdown").Markdown;
-var repos = [];
-repos = exec('find /root/monitoringsucks/ -iname "readme*"', function(err, stdout, stderr) {
- var file_list = [];
- file_list = stdout.split("\n");
- return file_list;
- /* now you've got a list with full path file names */
-});
+var repos = require('./tool-repos.json');
app.get('/', function(req, res){
- var file_list = [];
- file_list = repos;
- res.send('pie');
+ res.render('index.html', { repos: repos.data, md: md })
});
app.listen(process.env.PORT || 8001);
View
16 views/index.html
@@ -0,0 +1,16 @@
+h1 Monitoring Sucks
+h2 tool-repos
+table
+ thead
+ tr
+ th project
+ th info
+ th git
+ tbody
+ - each key,value in repos
+ tr
+ td #{value}
+ td= md(key["readme"])
+ td #{key["git"]}
+
+h3 pie
View
7 views/layout.html
@@ -0,0 +1,7 @@
+!!!
+html
+ head
+ title = "Monitoring Sucks"
+ body
+ center
+ != body
Please sign in to comment.
Something went wrong with that request. Please try again.