Latest Posts

2.27.2010

Export from Wordpress blog and Import to Blogger

This script exports your posts and categories from your locally hosted Wordpress blog and imports them into a new Blogger blog online. The script is based on the Blogger examples for working with PHP and blog data.

Code to export from hosted Wordpress blog and import to Blogger at github

You need to have the Zend Framework up and running on your system as it contains all the GData libraries for working with Google data in PHP. This script doesn't use any of the MVC, so you just need to have the files somewhere that you can require them. More on Zend Framework here.

You need to edit line 8 to point to the path of your Zend Framework. You also need to update the database connection variables right below that to match your wordpress blog.

Some caveats:

  • Blogger can only import 50 blog posts per day before tripping some anti-spam protection. So the SQL "limit" clause around line 322 will need to be adjusted. It is set to get the first 50 posts and publish them.
  • Wordpress "categories" become Blogger "labels"
  • Blogger forces any imported comments to the blog posts to originate from you, the author, of the blog.  So I have omitted these from my script, figuring it would look crazy to be talking to myself.  You could hack this script to add those back in.  

What's great about Blogger is that you can create a new test blog and run this script, which allows you to select which Blogger blog you wish to update and go from there.

The usage is:

php xfer_to_blogger.php --user=email@email.com --pass=password

The email and password here are the ones you used in setting up your Blogger account.

Let me know how you make out and if you have any suggestions for the code.
read more...

9.13.2009

Thinking of moving this blog to blogger.com or wordpress.com

Haven't decided yet, but here's a nice summary of the features involved in blogger.com vs wordpress.com.  I wonder if tumblr or posterous are more relevant now?  I've got a ton of this old stuff to port over.  Looks like I won't be able to show comments made by their rightful authors for old posts no matter which site I use.  Decisions decisions.
read more...

7.23.2009

Hiring PHP5 Programmers

My company has placed an ad looking for more PHP5 programmers to work mostly in the social networking area.  We have a coding test that we give to everyone whose resume passes muster.  It's a basic test, includes some CRUD database functions as well as creating a basic Facebook app.  We specify PHP5 all over the place.

But no one who takes the test ever uses any of PHP5's attributes.  Not one test app has come back using classes of any kind other then the Facebook reference.

Am I being too hard on people for this?  Maybe we need to specify that creating classes is recommended if not mandatory?  I don't  know what the answer is, but I know that upon receiving several recent test apps in "PHP5" that have include files that contain only functions, I'm a little depressed.  And yes, I used the quotes around php5 on purpose.

.
read more...

7.08.2009

Ubuntu Add/Remove Program List Empty

For future personal reference (and maybe others as well), installing Adobe Air tends to break the Add Remove app in Ubuntu.  Here's the solution, in a terminal, if you will.




Code:

sudo apt-get --reinstall install gnome-app-install

read more...