This is a multi-part message in MIME format. --------------010404060104000605080102 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Xiaofan Chen wrote: > Up to today, I am only using the default web client from Blogger/Blogspot. > I will say it sucks. It seems to me that an offline client may be a good idea. > > Then I found the following two web pages. > http://help.blogger.com/bin/answer.py?answer=42347&topic=12453 > http://www.thetechandcents.com/2007/11/linux-blogging-sucks.html > > Of the three clients listed in the Blogger.com help, only drivel seems to > work but the feature set seems to be quite limited. Sometimes I > could not even connect to the server. > > Any other recommendations? > > Xiaofan > http://mcuee.blogspot.com I just write my blog as text (with HTML) and email it (using sendmail), I only use the default interface when I need to correct an existing page. I have a Perl script I use to help set up the file for sending. It's Open Source so I've attached it. The more complicated part was setting up sendmail. My editor of choice is emacs. I've included the script and a sample blog entry (my last one). One thing to note, on really long blog entries something adds a space (I'm guessing either around 1k, 2k or 4k). This can mess up a URL. Also don't put a new line inside the title section of an acronym. That's an HTML limitation. -- Linux Home Automation Neil Cherry ncherry@linuxha.com http://www.linuxha.com/ Main site http://linuxha.blogspot.com/ My HA Blog Author of: Linux Smart Homes For Dummies --------------010404060104000605080102 Content-Type: application/x-perl; name="lhablog.pl" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="lhablog.pl" #!/usr/bin/perl # # =[ Comments ]=============================================================== # 05/23/2005 njc It appears that Blogspot has made a few changes that change # the BLOG's appearance. First

is now

# and \n's are now thrown in and are interpreted. So now I need # to strip the \n out of the file. Currently I'm unsure if I # need to turn this into a full HTML document or not. # 05/30/2005 njc Found out why Blogspot doesn't get my Blog entry. It seems that # Comcast isn't sending them! I don't know why but I can now send # directly from my machine to linuxha.com (modified sendmail, so # I'll be using Comcast a lot less. # 07/12/2005 njc I ran the validator on my Blog web page and it caught a few # errors. One of those errors was the & I need to change the to # & this will be interesting. # http://validator.w3.org/check?uri=http://linuxha.blogspot.com/ # 01/20/2007 njc 1and1 is, again, having problems getting to blogger.com (the # blog entries don't show up (grrr!). So I've instead decided to # use comcast. # # These next 2 lines are 1 # cat blog | ssh u35781446@s93505428.onlinehome.us # mail -s " Another test " -a 'Content-Type: text/html; charset=ISO-8859-1' -a 'Content-Transfer-Encoding: 7bit' linuxha.buddhatigger@blogger.com # # The replacement # cat ../t.txt |/usr/sbin/sendmail -t -n # ============================================================================ use vars qw( $verbose=0 $testing=0 $options); # Note no commas needed my $header; my $footer; my $date; ### ### Make changes here ### my $secret = "your_secret_word"; my $from = "a_valid_from\@somedomain.com"; my $to = "blogger_id.${secret}\@blogger.com"; my $cc = ""; my $bcc = ""; my $testing = 0; my $verbose = 0; my $version = "Sendmail"; use Getopt::Long; sub HelpMessage { print "Sends current blog to the blogger_id.\@blogger.com blog via linuxha.com\n"; print "sendBlog.pl \n"; print " -t | --to send to this address\n"; print " -f | --from from address\n"; print " -c | --cc cc address\n"; print " -b | --bcc blind carbon copy address\n"; print " -s | --secret secret password"; print " -v | --verbose print out status messages\n"; print " -d | --debug stop before actually sending mail\n"; print " -h | -? | --help This help message\n"; exit 1; } # mail -a options # -a \"Content-Type: text/html; charset=ISO-8859-1" -a \"Content-Transfer-Encoding: 7bit\" $options = "-a \"Content-Type: text/html; charset=ISO-8859-1\" -a \"Content-Transfer-Encoding: 7bit\""; # Some GetOpt options # xxx! no arg, allows for --foo or --nofoo # xxx+ no arg, increments xxx by one each time it is seen # xxx=i int # xxx=s string # xxx=o extended int # xxx=f float GetOptions('help|?' => sub { HelpMessage() }, 'debug!' => \$testing, 'to=s' => \$address, "from=s" => \$from, "cc=s" => \$cc, "bss=s" => \$bcc, "secret=s" => \$secret, 'verbose!' => \$verbose ); ($file) = @ARGV; if(!defined($file)) { HelpMessage(); } if(defined($address)) { $to = $address; } print "Address to send to: $address\n" if ($verbose); print "Address to send to: $to\n" if ($verbose); #my ($sec, $min, $hr, $mday, $mon, $yr, $wday) = localtime(time); #$date = sprintf "%s, %02d %s %d %02d:%02d:%02d -0500", # (Sun,Mon,Tue,Wed,Thu,Fri,Sat)[$wday], # $mday, # (Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec)[$mon], # 1900+$yr, # $hr, $min, $sec; # check to see that the file exists # =[ Oops! ]================================================================== # OK, we have 2 problems here. We need to escape any CLI characters so they # don't get interpreted as something they're not ( -s " Something & Something") # and we need to keep the original intact for the HTML subject! # ============================================================================ # Cut the title out of the title header and use it as the subject # # Tivo HME SDK $upd_str =''; # delimiting string @title = (($body = qx(cat $file)) =~ m|$upd_str(.*)$upd_str|s); # match update $subject = join(" ", @title); $subject =~ s/\n//g; # OK here is where we need to filter the & to & We should probably work # on < & > also. #From - Mon May 23 11:33:57 2005 #Date: $date #From: ncherry\@comcast.net (Neil Cherry) #To: $address #Subject: $subject #User-Agent: Sendblog Perl script #X-Accept-Language: en-us, en #MIME-Version: 1.0 #Content-Type: text/html; charset=ISO-8859-1 #Content-Transfer-Encoding: 7bit # # $eheader ="To:$to "; if($cc) { $eheader .="CC:$cc "; } $eheader .= "From:$from Subject:$subject Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 "; $header = " $subject "; $footer = ' '; # if($verbose) { print "Adding Subject: $subject\n"; print "Removing comments\n"; } # ============================================================================ # OK, we now need to properly send html mail! # I think this means putting together the proper headers and building the # whole html message and not just a partial one like I've been building. Also # I need to remove all the extra spaces and properly quote any extraneous # &'s # ============================================================================ # ============================================================================ # From - Mon May 23 11:33:57 2005 # X-Mozilla-Status: 0001 # X-Mozilla-Status2: 00000000 # FCC: mailbox://root@pop.comcast.net/Sent # X-Identity-Key: id1 # X-Account-Key: account1 # Date: Mon, 23 May 2005 11:33:57 -0400 # From: none <""root\"@(none)"> # X-Mozilla-Draft-Info: internal/draft; vcard=0; receipt=0; uuencode=0 # User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317) # X-Accept-Language: en-us, en # MIME-Version: 1.0 # To: njc@comcast.net # Subject: Test # Content-Type: text/html; charset=ISO-8859-1 # Content-Transfer-Encoding: 7bit # # # # # # # # # I need to build an HTML message to be sent Blogspot.com
#
# # # ============================================================================ # Sample blog entry # # # # # Tivo HME SDK # #

Sorry for ignoring the BLOG, I had to study for mid-terms. I think I did $body =~ s|||gs; # grab the body only $body =~ s|\s+| |gs; # remove duplicate spaces & replace newlines with a space if($verbose) { print $eheader; print "Title: $subject\n"; print "$header\n"; print "$body\n"; print "$footer\n"; print "#end\n"; } # send file with sendmail # Worked with ssh and mail on 1and1 #my $cmd = "|ssh u35781446\@s93505428.onlinehome.us \"mail -s \\\"" . $subject . "\\\" -a 'Content-Type: text/html; charset=ISO-8859-1' -a 'Content-Transfer-Encoding: 7bit' ". $address . "\""; # Using sendmail on cookie.uucp sending via comcast.net my $cmd = "|/usr/sbin/sendmail -t -n"; print "Executing: $cmd\n"; if($testing) { exit 0; } #open(MESSAGE, "|mutt -s \"$subject\" $address"); open(MESSAGE, $cmd); print "Sending the message\n"; # Can we check for an error here? print MESSAGE $eheader; print MESSAGE $header; print MESSAGE $body; print MESSAGE $footer; print MESSAGE "\n#end\n"; # This makes sure nothing get tagged to the end of the blog entry close(MESSAGE); print "Done\n\n"; --------------010404060104000605080102 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist --------------010404060104000605080102--