App-Plog
view release on metacpan or search on metacpan
Install normally with cpan ...
The Plog installing will create the following configuration files in '/home/you/.plog'.
home/you/.plog/
|-- config.pl
`-- configuration_template
|-- config.pl
|-- elements
| |-- feed-icon-28x28.png
| |-- mini_plog.png
| |-- plog_4.png
| `-- sco.css
|-- entry_template.pod
|-- frame.html
`-- update_blog.pl
Here is how I would create a blog about plog:
The example is for my box, replace with your home directory and server directory as necessary
entails creating all the necessary files. Publishing it means make it accessible to other parties, most
often ona web site. Plog normally creates a temporary directory to generate all the files in. The directory
is normally erased after we publish the blog. since we are not going to publish the blog, we give the
--temporary_directory option to plog so it creates the necessary files in that directory and does not remove
the files automatically.
$> plog generate --temporary_directory tmp
$ tree tmp
tmp
|-- feed-icon-28x28.png
|-- mini_plog.png
|-- plog.html
|-- plog_4.png
|-- rss.xml
`-- sco.css
You can look at your blog with your web browser:
$> firefox tmp/plog.html
Of course this is tedious so I wrote a script that does all that for me. the script, plog_starter.pl, is installed when you
install plog. copy it and modify it to suit your needs. it runs under 2 seconds, well below our one and a half minute limit.
Todo.txt
INSTALL
scripts/plog
scripts/plog_starter.pl
lib/App/Plog.pm
configuration/config.pl
configuration/configuration_template/frame.html
configuration/configuration_template/elements/feed-icon-28x28.png
configuration/configuration_template/elements/sco.css
configuration/configuration_template/elements/mini_plog.png
configuration/configuration_template/elements/plog_4.png
configuration/configuration_template/config.pl
configuration/configuration_template/update_blog.pl
configuration/configuration_template/entry_template.pod
t/dot_plog/config.pl
t/dot_plog/perl/config.pl
t/dot_plog/perl/elements/feed-icon-28x28.png
t/dot_plog/perl/elements/mini_plog.png
t/dot_plog/perl/elements/plog_4.png
t/dot_plog/perl/elements/sco.css
t/dot_plog/perl/entry_template.pod
t/dot_plog/perl/frame.html
t/dot_plog/perl/update_blog.pl
t/001_load.t
t/002_test.t
t/test_template
xt/author/000_distribution.t
configuration/configuration_template/entry_template.pod view on Meta::CPAN
=item Tags: tag1 tag2
=back
blahh
blahhh
=begin html
<img src="mini_plog.png" align=center >
=end html
=head2 Code
dklfjldjf
dflmlk
dsfdf
dsfdf
configuration/configuration_template/frame.html view on Meta::CPAN
<title>Plog</title>
<link rel="stylesheet" href="sco.css" type="text/css" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
</head>
<body>
<div class=pod><p>
<img src="plog_4.png" align="center" >
<table border="0">
<tr>
<td valign="top">
<table style="word-wrap:break-word" width="640" border="0">
ENTRIES_TAG
</table>
</td>
<td width="50"> </td>
lib/App/Plog.pm view on Meta::CPAN
my ($self, $entries, $blog_directory, $temporary_directory) = @_ ;
my $html_entries = join "\n", map {$_->[0]{HTML}} values %{$entries};
my $frame = read_file "$blog_directory/$self->{template}" ;
if(exists $self->{feed_tag})
{
if (
$frame =~ s {$self->{feed_tag}}
{<a href="rss.xml"> <img src="feed-icon-28x28.png"> </a>}xsm
)
{
# replaced feed tag with feed
}
else
{
croak "Error: Couldn't find feed tag '$self->{feed_tag}' in template!\n" ;
}
}
scripts/plog view on Meta::CPAN
# list all the blog entries for the default blog in chronologic order
$> plog ls
# list all the blogs
$> plog ls_blogs
# list all the blog entries for your perl blog
$> plog ls --blog_id perl
# copy resources to the default plog
$> plog copy some_image.png
# generate default blog on standard output
$> plog generate
# generate and put the default blog online
$> plog update
# generate and put the specified blog online
$> plog update --blog_id perl
t/002_test.t view on Meta::CPAN
=item Tags: tag1 tag2
=back
blahh
blahhh
=begin html
<img src="mini_plog.png" align=center >
=end html
=head2 Code
dklfjldjf
dflmlk
dsfdf
dsfdf
t/dot_plog/perl/entry_template.pod view on Meta::CPAN
=item Tags: tag1 tag2
=back
blahh
blahhh
=begin html
<img src="mini_plog.png" align=center >
=end html
=head2 Code
dklfjldjf
dflmlk
dsfdf
dsfdf
t/dot_plog/perl/frame.html view on Meta::CPAN
<title>Plog</title>
<link rel="stylesheet" href="sco.css" type="text/css" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
</head>
<body>
<div class=pod><p>
<img src="plog_4.png" align="center" >
<table border="0">
<tr>
<td valign="top">
<table style="word-wrap:break-word" width="640" border="0">
ENTRIES_TAG
</table>
</td>
<td width="50"> </td>
( run in 1.297 second using v1.01-cache-2.11-cpan-df04353d9ac )