# # I've given up on Blogger
APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

I've removed advertising from most of this site and will eventually clean up the few pages where it remains.

While not terribly expensive to maintain, this does cost me something. If I don't get enough donations to cover that expense, I will be shutting the site down in early 2020.

If you found something useful today, please consider a small donation.



Some material is very old and may be incorrect today

© March 2003 Tony Lawrence

02/23/2003 10:14 AM Blogger

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>http://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.


If you found something useful today, please consider a small donation.



Got something to add? Send me email.





(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

->
-> I've given up on Blogger


Inexpensive and informative Apple related e-books:

Take Control of Automating Your Mac

Take Control of IOS 11

Photos for Mac: A Take Control Crash Course

Photos: A Take Control Crash Course

Take Control of OS X Server





More Articles by © Tony Lawrence





Printer Friendly Version

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





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)




Linux posts

Troubleshooting posts


This post tagged:

Code

Perl

SEO

Web/HTML



Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode