I've given up on Blogger (yes I did upgrade to Blogger Pro). It's just too buggy and inflexible for my needs. So, I've started writing my own code. I'll expand on this later and add all the automatic stuff I need, but for now it's just a sequentially numbered bunch of .dat files and a very simple program to create them.
#!/usr/bin/perl chdir "/usr/home/pcunix/www/data/blog"; #print "Content-TYPE: text/html\n\n<head>"; run("header.pl /Blog/index.html"); print "</head> <body bgcolor=\"#ffffff\">"; run("body.pl"); run("newad.pl"); print "<h2>APLAWRENCE.COM BLOG</h2>"; $x=0; while(<?.dat>) { $x++; }; while ($x) { $file="$x.dat"; open(X,"<$file") or $x=0; next if not $x; $date=<X>; @lines=<X>; print "<h4>$date</h4>\n"; print "<p><blockquote>@lines</blockquote>"; print "<hr>\n"; $x--; } print "</body></html>\n"; $now=time; ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime($now); @month=("January","February","March","April","May","June","July","August","September","October","November","December"); $year += 1900; $AM="AM"; $AM="PM" if $hour > 12; $hour -= 12 if $AM eq "PM"; $hms=sprintf("%.2d:%.2d:%.2d",$hour,$min,$sec); $update="$month[$mon] $mday, $year $hms $AM"; open(OUT,">/usr/home/pcunix/apl/Blog/blogger_rss.xml") or die $!; print OUT <<EOF; <?xml version="1.0"?> <rss version="0.91"> <channel> <title>APLawrence's Unix/Linux and Mac OS X BLOG</title> <link>https://aplawrence.com/Blog/index.html</link> <description>Unix, Linux and Mac OS X information</description> <lastBuildDate>$update</lastBuildDate> <language>en-us</language> </channel> </rss> EOF sub run { @lines=`/usr/home/pcunix/www/cgi-bin/$_[0]`; $lines[0]=""; print @lines; }
I need to do a lot more, but this gets me started and away from Blogger's difficulties and limitations.
Got something to add? Send me email.
More Articles by Tony Lawrence © 2012-06-26 Tony Lawrence
A common and not necessarily apocryphal example portrays a solo practitioner starved for business in a small town. A second lawyer then arrives, and they both prosper. (Deborah L. Rhode)
Printer Friendly Version
I've given up on Blogger Copyright © March 2003 Tony Lawrence
Have you tried Searching this site?
This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.
Contact us
Printer Friendly Version