line
stmt
bran
cond
sub
pod
time
code
1
2
2
164540
use strict;
2
4
2
109
2
2
2
11
use warnings;
2
6
2
121
3
4
package App::PM::Website;
5
{
6
$App::PM::Website::VERSION = '0.131611';
7
}
8
#use App::Cmd::Setup -app;
9
2
2
12
use base 'App::Cmd';
2
10
2
2123
10
11
1;
12
13
14
=pod
15
16
=head1 NAME
17
18
App::PM::Website
19
20
=head1 VERSION
21
22
version 0.131611
23
24
=head1 SYNOPSIS
25
26
# create and initialize configuration file:
27
pm-website init --build-dir website \
28
--template-dir template \
29
--config-file config/pm-website.yaml \
30
--username your_username \
31
--groupname monger_long_city_name
32
33
# manually update configfile to list new meeting
34
vim config/pm-website.yaml
35
36
# create template directory and templates
37
mkdir template/
38
cp examples/template/index.in template/
39
vim templates/index.in
40
41
# copy cacert for pm.org from examples:
42
cp examples/cacert.pem ./
43
44
# render website locally to website/ dir
45
pm-website build
46
47
... view changes locally ...
48
49
# upload website/index file to pm.org
50
pm-website upload
51
52
=head1 DESCRIPTION
53
54
Use C to render and maintain an up-to-date info page
55
for your Perl Monger group!
56
57
L provides free hosting for perl monger groups.
58
Pages must be updated with webDAV and server-side scripts are not
59
allowed. C will update and install a static, template-driven
60
page via webDAV with minimal effort. Spend less time while creating a
61
more useful front page. Everyone wins!
62
63
=head1 COMMANDS
64
65
=over
66
67
=item C
68
69
Initialize a configuration yaml file with the necessary keys
70
71
=item C
72
73
Builds the index file (F) by rendering the
74
template (F) with TemplateToolkit. The template
75
is passed models describing the next meeting and location, past
76
meetings, presenters and locations. See L.
77
78
=item C
79
80
Uploads F via webDAV to F<< groups.pm.org/groups/I<$groupname> >>, which corresponds to L<< http://I<$groupname>.pm.org/ >>
81
82
I and I are read from the configuration file
83
and password is read from the C entry in F<$HOME/.netrc>
84
if the files exists and is not readable by others.
85
86
#netrc example
87
machine groups.pm.org
88
login USERNAME
89
password PASSWORD
90
91
=back
92
93
=head1 Model
94
95
The template will be provided with models derived from the configuration file. Any information added to the presenter, location and meetings configuration keys will be presented in the model.
96
97
=over
98
99
=item C
100
101
A hash describing the next meeting.
102
103
Meetings have additional date keys added from the C or C field.
104
105
=over
106
107
=item * C
108
109
event time in epoch unix seconds. Created from C if missing.
110
111
=item * C
112
113
a DateTime object created from C
114
115
=item * C
116
117
C rendered using strp pattern '%Y-%b-%d'.
118
119
=item * C
120
121
C rendered using strp pattern '%A %B %e, %Y'.
122
123
=item * C
124
125
C rendered using strp pattern '%A the %e' and then munged by Lingua::EN::Numbers::Ordinate to produce strings like "Friday the 13th" or "Thursday the 23rd"
126
127
=back
128
129
=item C
130
131
An array of hashes describing past meetings. The array is reverse sorted by meeting start date. Each hash describes a meeting. The next meeting C is not included in the list of meetings.
132
133
=item C
134
135
The location information for the next meeting.
136
137
=item C
138
139
hash of location information keyed by location key.
140
141
=item C
142
143
hash of presenter information keyed by presenter id.
144
145
=back
146
147
=head1 SEE ALSO
148
149
=over
150
151
=item * L
152
153
=item * la.pm.org: example L L
154
155
=item * L
156
157
=item * L
158
159
=back
160
161
=head1 AUTHOR
162
163
Andrew Grangaard
164
165
=head1 COPYRIGHT AND LICENSE
166
167
This software is copyright (c) 2012 by Andrew Grangaard.
168
169
This is free software; you can redistribute it and/or modify it under
170
the same terms as the Perl 5 programming language system itself.
171
172
=cut
173
174
175
__END__