Commit | Line | Data |
12a0f9d3 |
1 | package Gitalist::Controller::OPML; |
2 | |
3 | use Moose; |
4 | use Moose::Autobox; |
f539912a |
5 | use DateTime; |
12a0f9d3 |
6 | use Sys::Hostname qw/hostname/; |
12a0f9d3 |
7 | |
8 | use namespace::autoclean; |
9 | |
10 | BEGIN { extends 'Gitalist::Controller' } |
11 | |
8f419e38 |
12 | sub opml : Chained('/base') Args(0) { |
12a0f9d3 |
13 | my ($self, $c) = @_; |
14 | |
f539912a |
15 | $c->stash( |
16 | title => lc(hostname()) . ' - ' . blessed($c)->config->{name}, |
17 | Repositories => $c->model()->repositories, |
18 | now => DateTime->now, |
19 | template => 'opml.tt2', |
20 | no_wrapper => 1, |
21 | ); |
12a0f9d3 |
22 | |
12a0f9d3 |
23 | $c->response->content_type('application/rss'); |
24 | } |
25 | |
26 | __PACKAGE__->meta->make_immutable; |