]> iEval git - gruntmaster-page.git/commitdiff
Add gensrc
authorMarius Gavrilescu <marius@ieval.ro>
Sun, 26 Jan 2014 07:20:07 +0000 (09:20 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Sun, 26 Jan 2014 07:21:15 +0000 (09:21 +0200)
gruntmaster-paged
lib/Gruntmaster/Page.pm

index 0bb9653d34d0743cebad249df1ee9b3e3224591d..5e7bd576231b8b64a89958110ee2a1229403bba1 100755 (executable)
@@ -5,6 +5,8 @@ use Gruntmaster::Data qw/SUBSCRIBE WAIT_FOR_MESSAGES/;
 use Gruntmaster::Page;
 
 SUBSCRIBE 'genpage', \&Gruntmaster::Page::generate;
+SUBSCRIBE 'gensrc', \&Gruntmaster::Page::gensrc;
+SUBSCRIBE 'genarticle', \&Gruntmaster::Page::genarticle;
 WAIT_FOR_MESSAGES 86400 while 1;
 
 1;
index e0086507d16027ecdd5100512b83cfcf5ebb797a..eedbec54e17d2e865b8ec4cfe6ddc96224d2ed03 100644 (file)
@@ -10,7 +10,7 @@ use File::Path qw/make_path/;
 use File::Slurp qw/write_file/;
 use IO::Compress::Gzip qw/gzip/;
 use IO::File;
-use Gruntmaster::Data qw/PUBLISH/;
+use Gruntmaster::Data;
 
 our $VERSION = '0.001';
 our @generators;
@@ -77,6 +77,17 @@ sub generate{
        close $typemap;
 }
 
+sub gensrc{
+       my ($job) = @_;
+       my $ext = job_extension $job;
+       make_path "log/src/";
+       write_file "log/src/$job.$ext", job_inmeta($job)->{files}{prog}{content};
+}
+
+sub genarticle{
+       
+}
+
 1;
 __END__
 # Below is stub documentation for your module. You'd better edit it!
This page took 0.022822 seconds and 4 git commands to generate.