- name : about
template : about.tt
outfile : about.html
+ data :
+ companies:
+ - name : "Yahoo!"
+ url : http://www.yahoo.com
+ - name : "Symatec"
+ url : http://www.symatec.com
+ - name : "Cisco"
+ url : http://www.cisco.com
+ - name : "IMDb"
+ url : http://www.imdb.com
+ - name : "Pobox"
+ url : http://www.pobox.com
+ - name : "Best Practical"
+ url : http://www.bestpractical.com
+ - name : "Infinity Interactive"
+ url : http://www.iinteractive.com
+ - name : "Shadowcat"
+ url : http://www.shadowcat.co.uk
+ - name : "ValueClick"
+ url : http://www.valueclick.com
+ - name : "Magazines.com"
+ url : http://www.magazines.com
+ - name : "Takkle.com"
+ url : http://www.takkle.com
+ - name : "BBC"
+ url : http://www.bbc.co.uk
+ - name : "Hearst Corporation"
+ url : ''
+ - name : "Omni Hotels"
+ url : http://www.omnihotels.com
+ - name : "SocialText"
+ url : http://www.socialtext.com
+ - name : "Napster"
+ url : ''
+ - name : "Open Data"
+ url : ''
+ - name : "Capitol Advantage"
+ url : ''
+ - name : "Tamarou"
+ url : http://www.tamarou.com
+ - name : "Cloudtone Studios"
+ url : ''
+ - name : "Endeworks"
+ url : ''
+ - name : "net-a-porter.com"
+ url : http://www.net-a-porter.com
+ - name : "Shopzilla / BizRate"
+ url : ''
+ - name : "SimplyClick"
+ url : ''
+ - name : "MedTouch"
+ url : ''
+ - name : "MusicBrainz"
+ url : ''
+ - name : "Current TV"
+ url : ''
+ - name : "The Genome Center at Washington University"
+ url : ''
+ - name : "Bioinformatics Group at University College London (UCL)"
+ url : ''
- name : download
template : download.tt
outfile : download.html
public : git://git.moose.perl.org/Moose.git
commiter : gitmo@git.moose.perl.org:Moose.git
web_view : http://git.shadowcat.co.uk/gitweb/gitweb.cgi
+- name : support
+ template : support.tt
+ outfile : support.html
+ data :
+ irc :
+ - '#moose@irc.perl.org'
+ - '#moose-dev@irc.perl.org'
+ mailing_list :
+ address : moose@perl.org
+ archive : http://news.gmane.org/gmane.comp.lang.perl.moose
+ training :
+ - name : Infinity Interactive
+ url : http://www.iinteractive.com/moose/training
+ - name : Shadowcat Systems
+ url : http://www.shadowcat.co.uk/training
+ - name : Dave Rolsky, Inc.
+ url : http://www.rolsky.com/training_the_moose
+ consulting :
+ - name : Infinity Interactive
+ url : http://www.iinteractive.com/moose/consulting
+ - name : Shadowcat Systems
+ url : http://www.shadowcat.co.uk/consulting
+ misc :
+ - name : textmate bundle
+ url : http://github.com/perigrin/perl-moose.tmbundle
+ - name : quickref card
+ url : http://users.ox.ac.uk/~oliver/data/files/moose-quick-ref.pdf
- name : articles
template : articles.tt
outfile : articles.html
- title : Moose 1.00 is Released
url : http://stevan-little.blogspot.com/2010/03/moose-100-is-released.html
- year : 2009
- articles : []
+ articles :
+ - title : David McLaughlin experiments with extending Moose for MooseX::ChainedAccessors
+ url : http://www.dmclaughlin.com/2009/05/15/chained-accessors-in-moose/
+ - title : Shawn M Moore explains parameterized roles
+ url : http://blog.sartak.org/2009/05/parameterized-roles.html
- year : 2008
- articles : []
+ articles :
+ - title : chomatic suggests Moose and Mouse in his Beginners Introduction to Object-Oriented Programming with Perl article
+ url : http://broadcast.oreilly.com/2008/11/beginners-introduction-to-obje.html
- year : 2007
- articles : []
+ articles :
+ - title : Max Kanat-Alexander (of Bugzilla fame) has some nice things to say about Moose
+ url : http://avatraxiom.livejournal.com/70947.html
- year : 2006
- articles : []
+ articles :
+ - title : Class::MOP Review (OnLAMP)
+ url : http://www.oreillynet.com/onlamp/blog/2006/06/cpan_module_review_classmop.html
+
+
+
+
+
+
+
+
+
+
+
+
+
use Moose;
use MooseX::Types::Path::Class;
+use Path::Class;
use Template;
use YAML::XS 'LoadFile';
use Moose::Website::I18N;
with 'MooseX::Getopt';
-has 'page_file' => (
+has 'outdir' => (
is => 'ro',
- isa => 'Path::Class::File',
+ isa => 'Path::Class::Dir',
coerce => 1,
required => 1,
);
-has 'outdir' => (
+has 'page_file' => (
is => 'ro',
- isa => 'Path::Class::Dir',
+ isa => 'Path::Class::File',
coerce => 1,
- required => 1,
+ default => sub {
+ file(__FILE__)->parent->parent->parent->file('data', 'pages.yml')
+ }
);
has 'template_root' => (
is => 'ro',
isa => 'Path::Class::Dir',
coerce => 1,
- required => 1,
-);
-
-has 'template_config' => (
- is => 'ro',
- isa => 'HashRef',
- lazy => 1,
- default => sub { +{} },
+ default => sub {
+ file(__FILE__)->parent->parent->parent->subdir('templates')
+ }
);
has 'locale' => (
}
);
+has 'template_config' => (
+ traits => [ 'NoGetopt' ],
+ is => 'ro',
+ isa => 'HashRef',
+ lazy => 1,
+ default => sub { +{} },
+);
+
sub log { shift; warn @_, "\n" }
sub run {
my $self = shift;
foreach my $page ( @{ $self->pages } ) {
+
+ my $outfile = $self->outdir->file( $page->{outfile} )->stringify;
+
+ $self->log( "Writing page " . $page->{name} . " to $outfile using template " . $page->{template} );
+
$self->tt->process(
$page->{template},
$self->build_template_params( current_page => $page ),
- $self->outdir->file( $page->{outfile} )->stringify
+ $outfile
) || confess $self->tt->error;
}
}
msgid "nav download"
msgstr "Download"
+msgid "nav support"
+msgstr "Support"
+
# about
-msgid "about title"
+msgid "about header"
msgstr "About Moose"
msgid "about body"
"<p>Moose is a postmodern object system for Perl 5 that takes the tedium out of writing object-oriented Perl. It borrows all the best features from Perl 6, CLOS (LISP), Smalltalk, Java, BETA, OCaml, Ruby and more, while still keeping true to its Perl 5 roots.</p>"
"<p>Moose is 100% production ready and in heavy use in a number of systems and growing every day. Try it today!</p>"
+msgid "about company list header"
+msgstr "Companies that use Moose"
+
+msgid "about company list body"
+msgstr "Moose is used by a large number of companies around the world, here are a few of them."
+
# articles
-msgid "articles title"
+msgid "articles header"
msgstr "Articles About Moose"
# download
-msgid "download title"
+msgid "download header"
msgstr "Download"
-msgid "cpan"
+msgid "download cpan header"
msgstr "CPAN"
-msgid "git"
+msgid "download cpan body"
+msgstr "Here are some CPAN modules related to Moose."
+
+msgid "download git header"
msgstr "Git"
-msgid "git public"
+msgid "download git body"
+msgstr "Here is the information about the Moose git repositories."
+
+msgid "download git public"
msgstr "Git Public Repo URL"
-msgid "git commiter"
+msgid "download git commiter"
msgstr "Git URL for Commiters"
-msgid "git web view"
+msgid "download git web view"
msgstr "Git Web View"
+# support
+
+msgid "support header"
+msgstr "Support"
+
+msgid "support irc header"
+msgstr "IRC Channels"
+
+msgid "support mailing list header"
+msgstr "Mailing List"
+
+msgid "support misc header"
+msgstr "Misc."
+
+msgid "support moose mailing list"
+msgstr "Moose mailing list"
+
+msgid "support moose mailing list archives"
+msgstr "Moose mailing list archives"
+
+msgid "support textmate bundle"
+msgstr "Moose TextMate Bundle"
+
+msgid "support quickref card"
+msgstr "Moose QuickRef Card"
+
+msgid "support training header"
+msgstr "Moose Training"
+
+msgid "support training body"
+msgstr "Several companies and individuals provide Moose training, here are a few."
+
+msgid "support consulting header"
+msgstr "Moose Consulting"
+
+msgid "support consulting body"
+msgstr "Several companies and individuals provide Moose consulting, here are a few."
+
+
+
[% WRAPPER 'wrapper/sub_page.tt' %]
- <h2>[% loc('about title') %]</h2>
- [% loc('about body') %]
+ <h2>[% loc('about header') %]</h2>
+ <p>[% loc('about body') %]</p>
+
+ <h3>[% loc('about company list header') %]</h3>
+ <p>[% loc('about company list body') %]</p>
+
+ <ul>
+ [% FOREACH company IN current_page.data.companies %]
+ <li><a href="[% company.url %]">[% company.name %]</a></li>
+ [% END %]
+ </ul>
[% END %]
\ No newline at end of file
[% WRAPPER 'wrapper/sub_page.tt' %]
- <h2>[% loc('articles title') %]</h2>
+ <h2>[% loc('articles header') %]</h2>
<ul>
[% FOREACH item IN current_page.data %]
[% WRAPPER 'wrapper/sub_page.tt' %]
- <h2>[% loc('download title') %]</h2>
+ <h2>[% loc('download header') %]</h2>
- <h3>[% loc('cpan') %]<h3>
+ <h3>[% loc('download cpan header') %]<h3>
+
+ <p>[% loc('downlaod cpan body') %]<p>
<ul>
[% FOREACH module IN current_page.data.CPAN %]
[% END %]
</ul>
- <h3>[% loc('git') %]<h3>
+ <h3>[% loc('download git header') %]<h3>
+
+ <p>[% loc('downlaod git body') %]<p>
<ul>
- <li>[% loc('git public') %] — [% current_page.data.git.public %]</li>
+ <li>[% loc('download git public') %] — [% current_page.data.git.public %]</li>
- <li>[% loc('git commiter') %] — [% current_page.data.git.commiter %]</li>
+ <li>[% loc('download git commiter') %] — [% current_page.data.git.commiter %]</li>
- <li><a href="[% current_page.data.git.web_view %]">[% loc('git web view') %]</a></li>
+ <li><a href="[% current_page.data.git.web_view %]">[% loc('download git web view') %]</a></li>
</ul>
--- /dev/null
+[% WRAPPER 'wrapper/sub_page.tt' %]
+
+ <h2>[% loc('support header') %]</h2>
+
+ <h3>[% loc('support irc header') %]</h3>
+ <ul>
+ [% FOREACH channel IN current_page.data.irc %]
+ <li>[% channel %]</li>
+ [% END %]
+ </ul>
+
+ <h3>[% loc('support mailing list header') %]</h3>
+ <a href="mailto:[% current_page.data.mailing_list.address %]">[% loc('support moose mailing list') %]</a>
+ <br/>
+ <a href="[% current_page.data.mailing_list.archives %]">[% loc('support moose mailing list archives') %]</a>
+
+ <h3>[% loc('support training header') %]</h3>
+ <p>[% loc('support training body') %]</p>
+ <ul>
+ [% FOREACH item IN current_page.data.training %]
+ <li><a href="[% item.url %]">[% item.name %]</a></li>
+ [% END %]
+ </ul>
+
+ <h3>[% loc('support consulting header') %]</h3>
+ <p>[% loc('support consulting body') %]</p>
+ <ul>
+ [% FOREACH item IN current_page.data.consulting %]
+ <li><a href="[% item.url %]">[% item.name %]</a></li>
+ [% END %]
+ </ul>
+
+ <h3>[% loc('support misc header') %]</h3>
+ <ul>
+ [% FOREACH item IN current_page.data.misc %]
+ <li><a href="[% item.url %]">[% loc('support ' _ item.name) %]</a></li>
+ [% END %]
+ </ul>
+
+[% END %]
\ No newline at end of file