I was lying in bed last night and came up with a great idea for a blog posting. I didn't note it anywhere and now I have forgotten what it was. A few days ago I blogged that I was going to put up a poll for the new ELW worship book bur before I can do that I have to install some blog poll software.
Now that I have a blog that doesn't make me write posts two or three times I such have a pent up need to blog that I'll probably be posting like mad for the next while. Of course I said the same thing at Christmas and look what happened.
When I decided to install b2evolution I took the release candidate because it was the newest version and I didn't want to upgrade when it became the official release. Unfortunately the documentation hasn't been updated to reflect where things are, or I couldn't find the info easily. Here are my suggestions on what to do to get going.
When you install you get two sample blogs. Don't delete them right away, they have useful information. Assuming you are starting with onr blog turn off blog B instead of deleting it. To turn it off log in to the admin interface, click on blog settings, blog B, features tab. Uncheck include in public blog list. Then rename Blog A to make it your blog. Keep the sample post for later reference to do this deprecate them rather than delete them. If you click on the edit button for the post and click on deprecate instead of delete.
Want to add something to the menu under the blog title, where Home and About this system appear. Click on write on the toolbar, select the first blog, then select the expert tab in the compose post window. Change the type field from Post to Page. Write the text you want on your page and click save. The new page should appear in the top bar, in alphabetical order. The Home and Contact links are different widgets so your added item will appear between them. If you want the item to only be a link fill in the Link to url field and leave the body of the page empty.
My first impression is that b2evolution is very capable and full featured but has a steep learning curve.
To move your blog posts someplace else you first need to get them off of Yahoo 360. If you only have a few you can edit the posts and then copy and paste them into your new blog. If you have a bunch that may prove to be impractical. I'm going to tell you how I converted my blog posts to a Movable type import file which can be imported by many different types of blog software.
First thing is you need linux. Find out the permanent URL of your last blog posting and record it somewhere, then make a new directory and copy the following script into the directory. Name the script whatever you want but remember to set the execute bit, in my case I called it get.
Code
#!/bin/sh | |
# call as get "last blog post url" | |
wget "$1 " | |
i=$(echo "$1" | sed -n -e 's|http://*.360.yahoo.com/\(.*\)$|\1|p') | |
echo $i | |
while [ -n $i ] ; do | |
n=$(sed -n -e 's|<span>Previous Post: <a href="\(.*\)">.*$|\1|p' $i) | |
echo $n | |
wget $n | |
i=$(echo $n | sed -n -e 's|http.*\(blog.*\)|\1|p') | |
while [ ! -e $i ] ; do | |
wget $n | |
i=$(echo $n | sed -n -e 's|http.*\(blog.*\)|\1|p') | |
done | |
done |
When the script finishes you will have all your blog postings saved as HTML files in the directory you ran it from with names the same as the url minus the http and the domain, the posting shown as an example will become blog-hwLjH.Myfxxxx8RH6xCteD6OzzzzzrB?p=287.
Then I wrote this little program to take the output files and convert them to Movable Type format.
Code
#include <fstream> | |
#include <iostream> | |
#include <iomanip> | |
#include <sstream> | |
#include <string> | |
#include <cctype> | |
| |
using namespace std; | |
| |
int main(int argc,char *argv[]) | |
{ | |
cout << argv[1] << endl; | |
ifstream in; | |
ofstream out; | |
string iname = argv[1]; | |
string ofilename; | |
size_t found_begin, found_end; | |
found_begin = iname.find("p="); | |
ofilename="blog"; | |
ofilename+=iname.substr(found_begin+2); | |
ofilename+=".txt"; | |
cout << ofilename << endl; | |
in.open(argv[1]); | |
out.open(ofilename.c_str()); | |
stringstream data; | |
string d; | |
bool titlef = false; | |
bool bodyf = false; | |
bool datef = false; | |
string title; | |
string body; | |
string hold; | |
string date; | |
string tag; | |
struct tm ttt; | |
if (!in.good() ) cout << "Couldn't open file" << endl; | |
out <<"AUTHOR: Wayne" << endl ; | |
while ( in.good() && !(titlef && bodyf && datef)) | |
{ | |
getline(in,d); | |
if (!titlef) | |
{ | |
found_begin = d.find("<dt class=\"post-head\">"); | |
if (found_begin!=string::npos) | |
{ | |
found_end= d.find("</dt>"); | |
if (found_end!=string::npos) | |
{ | |
title = d.substr(found_begin+22,found_end-found_begin-22); | |
cout <<"TITLE: " << title << endl ; | |
out <<"TITLE: " << title << endl << "STATUS: Publish" << endl << "ALLOW COMMENTS: 1"<<endl; | |
titlef = true; | |
} | |
} | |
} | |
if (!bodyf) | |
{ | |
found_begin = d.find("<div class=\"content-wrapper\">"); | |
if (found_begin!=string::npos) | |
{ | |
getline(in,d); | |
found_end= d.find("<div class=\"foot\">"); | |
while ( in.good() && (found_end==string::npos)) | |
{ | |
hold=hold+d; | |
getline(in,d); | |
found_end= d.find("<div class=\"foot\">"); | |
} | |
body = hold.substr(0,hold.length()-6); | |
cout << "-----" << endl << "BODY: " << endl << body << "-----" << endl ; | |
bodyf = true; | |
} | |
} | |
found_begin=d.find("\"?tag="); | |
if (found_begin!=string::npos) | |
{ | |
found_end=d.find("rel",found_begin)-2; | |
tag="CATEGORY: " + d.substr(found_begin+6,found_end-found_begin-6); | |
out << tag << endl; | |
cout << tag << endl; | |
found_begin=d.find("\"?tag=",found_end); | |
while (found_begin!=string::npos) | |
{ | |
found_end=d.find("rel",found_begin)-2; | |
tag=","; | |
tag="CATEGORY: " + d.substr(found_begin+6,found_end-found_begin-6); | |
out << tag << endl; | |
cout << tag << endl; | |
found_begin=d.find("\"?tag=",found_end); | |
} | |
} | |
if (!datef) | |
{ | |
found_end = d.find("(EDT)"); //change this to match the time zone of your articles | |
if (found_end==string::npos) found_end = d.find("(EST)");//change this to match the time zone of your articles | |
if (found_end!=string::npos) | |
{ | |
found_begin= d.find("<p>"); | |
if (found_begin!=string::npos) | |
{ | |
date = d.substr(found_begin+3,found_end-found_begin-3); | |
datef = true; | |
strptime(date.c_str(),"%a %b %d, %Y - %r", &ttt); | |
char datec[100]; | |
strftime(datec,99,"%m/%d/%Y %R:00",&ttt); | |
date = datec; | |
cout <<"DATE: " << date << endl ; | |
out <<"DATE: " << date << endl ; | |
out << "-----" << endl << "BODY: " << endl << body << endl <<"--------" << endl ; | |
} | |
} | |
} | |
| |
} | |
out.close(); | |
in.close(); | |
} |
Compile and run this code passing the name of the file you want to convert. You can take the files from the previous step and put them into one file with the command
cat blog* >> postings
If you call the program parse the command would be
./parse postings
You can then take the resulting .txt file and import it using the Movable Type import tool of your choice. This file has only been tested on b2evolution and if it doesn't work you have the source, fix it yourself.
Kudos to CBC for offering a streaming version of their new show jPod on their website. Unfortunately the code to launch the viewer doesn't work on Firefox version 1.5 on Centos 5. This piece of convoluted code,
javascript:Nodes.pauseAll();Jpod.toggleAudio("off");
myLightWindow.activateWindow({href:"http://www.cbc.ca
/jpod/videoPlayer.html?maven_playerId=jpodplayer", title:"", type:"external", params: "lightwindow_width=740,lightwindow_height=460"});
which does nothing, can be replaced with http://www.cbc.ca/jpod/videoPlayer.html?maven_playerId=jpodplayer which works fine.
Check out the show and tell me what you think.
updated April 19th 2009 with a link to the conversion article
updated April 20th 2009 fixed an error in the link to the conversion article
After being jerked around by Yahoo 360 I have finally bit the bullet and moved my blog away from that sinking ship. After a cursory inspection of the blogs available I picked b2evolution as the blogging software to install. It seems to be working out OK so far. I used a script to screen scrape my blog from Yahoo 360 and then wrote a little conversion program to take the saved HTML files and convert them to the Movable Type import format which b2evolution can handle. I've written a separate post on the conversion process for any other Yahoo 360 refugees who want to move their old blogs. If you aren't the DIY type, I was toying with the idea of offering to do the conversion for $20. Another option for 360 refugees is Multiply.com which has an import feature for Yahoo 360 blogs.