Permalink
Browse files

it works!

  • Loading branch information...
1 parent 21c1f30 commit 58e1479c9e70ba8acd3a14024323373533d928d4 @sergot committed May 9, 2013
Showing with 21 additions and 17 deletions.
  1. +6 −0 cronjobs
  2. +7 −5 web/build.p6
  3. +6 −10 web/mkjson.p6
  4. +2 −2 web/module.mojo
View
@@ -0,0 +1,6 @@
+0 0 * * * wget http://feather.perl6.nl:3000/projects.json -O /home/sergot/emmentaler/projects.list
+5 0 * * * /home/p6eval/star/bin/perl6 /home/sergot/emmentaler/smoker /home/sergot/emmentaler/projects.list > /home/sergot/public_html/modules/err1 2>&1
+0 * * * * /home/p6eval/star/bin/perl6 /home/sergot/ecosystem/remake.p6 > /home/sergot/ecosystem/modules.list
+20 * * * * /home/p6eval/star/bin/perl6 /home/sergot/modules.perl6.org/web/mkjson.p6 > /home/sergot/public_html/modules/err2 2>&1
+40 * * * * /home/p6eval/star/bin/perl6 /home/sergot/modules.perl6.org/web/build.p6 > /home/sergot/public_html/modules/err3 2>&1
+
View
@@ -2,8 +2,8 @@ use v6;
use JSON::Tiny;
use Template::Mojo;
-my $site_dir = '/home/user/public_html/modules';
-my $fullpath = '/home/user/perl6/modules.perl6.org';
+my $site_dir = '/home/sergot/public_html/modules';
+my $fullpath = '/home/sergot/modules.perl6.org';
my $last_update = DateTime.now.Str;
my $tmpl = slurp "$fullpath/web/index.mojo";
@@ -16,7 +16,9 @@ $index.close;
$tmpl = slurp "$fullpath/web/module.mojo";
for $projects.list -> $p {
- my $m = open "$site_dir/module/{$p<name>}.html", :w;
- $m.say: Template::Mojo.new($tmpl).render($p);
- $m.close;
+ if $p {
+ my $m = open "$site_dir/module/{$p<name>}.html", :w;
+ $m.say: Template::Mojo.new($tmpl).render($p);
+ $m.close;
+ }
}
View
@@ -1,11 +1,11 @@
use v6;
use JSON::Tiny;
-my $download_dir = '.';
-my $emmentaler_dir = '..';
-my $site_dir = '/home/user/public_html/modules';
-my $fullpath = '/home/user/perl6/modules.perl6.org';
-my $ecosystem_dir = "$fullpath/web";
+my $download_dir = '/home/sergot/modules.perl6.org/web';
+my $emmentaler_dir = '/home/sergot/emmentaler';
+my $site_dir = '/home/sergot/public_html/modules';
+my $fullpath = '/home/sergot/modules.perl6.org';
+my $ecosystem_dir = "/home/sergot/ecosystem";
class Project {
has $.URL = die "Every project needs an URL";
@@ -61,9 +61,8 @@ class Project {
}
sub readme_file(Str $path) {
- for "", ".md", ".markdown", ".mkd" {
return "README$_" if "$path/README$_".IO.e for "", ".md", ".markdown", ".mkd", ".mkdn", ".pod";
- }
+ return Mu
}
method to_hash {
@@ -113,6 +112,3 @@ my %all;
%all.push(.gitname => .to_hash) for $projects.list;
$json.say: to-json(%all);
$json.close;
-
-# generating single module page
-# TODO
View
@@ -85,14 +85,14 @@ dl.table-display {
<img class="project-logo" alt="<%= $m<name> %> logo"
src="<%= $m<logo> %>">
% }
- <%= $m<name> %>
+ <a href="<%= $m<URL> %>" target="_blank"><%= $m<name> %></a>
</h2>
<h3> <%= $m<description> %> </h2>
</div>
<div id="content">
<p>
<%= $m<name> %> on Github:
- <a href="<%= $m<URL> %>"><%= $m<URL> %></a>
+ <a href="<%= $m<URL> %>" target="_blank"><%= $m<URL> %></a>
<p>
<h3> Readme </h3>
<p>

0 comments on commit 58e1479

Please sign in to comment.