Ticket #3398 (new enhancement)

Opened 2 years ago

Last modified 1 month ago

import data from Geeklog

Reported by: justdave Assigned to: anonymous
Priority: normal Milestone: 2.6
Component: Administration Version:
Severity: normal Keywords: needs-patch, needs-sample-data
Cc:

Description

I recently converted my blog from geeklog to wordpress, and wound up converting the existing TextPattern? importer to be able to pull data directly from a Geeklog database and import it to Wordpress.

The importer is incomplete, but usable, and currently imports categories, users, posts, and comments. It pretty much does what I needed it to do, and I'm sure someone else can make use of it, and possibly clean it up better.

Attachments

article.php (403 bytes) - added by justdave on 01/16/07 17:45:00.
geeklog permalink redirects
geeklog.php (18.2 kB) - added by justdave on 01/16/07 17:45:37.
geeklog importer

Change History

11/28/06 05:37:20 changed by justdave

also worthy of note: I had to add these to my <VirtualHost?> block in my apache config to make it work right:

php_value max_execution_time 300 php_value memory_limit 16M

11/28/06 09:29:13 changed by Viper007Bond

Just add this to the script:

set_time_limit(300);
ini_set('memory_limit', '16M');

01/16/07 17:45:00 changed by justdave

  • attachment article.php added.

geeklog permalink redirects

01/16/07 17:45:37 changed by justdave

  • attachment geeklog.php added.

geeklog importer

01/16/07 17:47:30 changed by justdave

The new geeklog.php adds the time and memory limits to the code, and also inserts the story ID from geeklog into a _gl_sid key in the postmeta table. The story ID is then used by article.php to do lookups and redirect to wordpress' permalink when someone accesses the old geeklog-style permalink.

01/16/07 20:38:18 changed by foolswisdom

justdave is this tested against WordPress 2.0.x or 2.1 (beta)?

01/17/07 02:47:58 changed by justdave

2.0.4 through 2.0.6

05/24/07 03:56:38 changed by justdave

"PeterR" posted on my blog (http://www.justdave.net/dave/2007/01/16/geeklog-to-wordpress-converter/) on May 12th:

"worked on geeklog 1.4.x and wordpress 2.1.3 for those interested."

07/15/07 17:44:10 changed by Nazgul

  • milestone set to 2.4 (future).

08/09/07 05:58:30 changed by justdave

"Benjamin" posted today:

"For the record, I migrated a Geeklog 1.3.11 install to Wordpress 2.2.2 using your script. This was running on MySQL 4.1.20 and PHP 5.0.4 on a CentOS 4.5 system. Everything just worked!"

08/14/07 23:04:26 changed by matt

Let's get this into core.

08/20/07 21:18:59 changed by foolswisdom

  • milestone changed from 2.4 (future) to 2.3 (trunk).

09/05/07 19:54:57 changed by foolswisdom

  • keywords set to has-patch.

09/05/07 19:58:49 changed by foolswisdom

justdave, do you have some sample import files? Could you attach it to the ticket?

(My guess is that these need to be updated to use the taxonomy system)

09/12/07 22:25:29 changed by markjaquith

  • milestone changed from 2.3 to 2.4.

A little late to the game. Needs to be updated to use taxonomy.

(follow-up: ↓ 16 ) 12/15/07 18:08:46 changed by justdave

I apparently missed the notification mail when the questions were asked of me back in September... I just happened to poke in here to check on it today. :)

I no longer have any of the old Geeklog stuff around (well, I might in a backup somewhere, I could go digging I suppose), so don't really have a way to test this anymore. It did it's job when I needed it. :)

What do you mean by "sample import files"? Do you mean like a mysqldump of a Geeklog database or something? OK, was just poking around, and I do have backups of the Geeklog setup from December 2006, including a dump of the database.

Was the TextPattern? importer updated to use the taxonomy system? This thing was heavily based on that, so whatever was done to that could probably also be done to this to make it work.

02/07/08 15:46:23 changed by darkdragon

This can be a plugin and distributed by wordpress extend plugin.

(in reply to: ↑ 14 ) 02/07/08 19:02:39 changed by lloydbudd

  • keywords changed from has-patch to needs-patch, needs-sample-data.
  • milestone changed from 2.5 to 2.6.

Replying to darkdragon:

This can be a plugin and distributed by wordpress extend plugin.

Generally, I think the decision is to ship importers with WordPress to give the easiest experience getting started.

05/24/08 16:14:17 changed by ribbo

I've played with this more extensively today (I was the PeterR that reported on justdave's blog).

The import works with both wordpress 2.3.1 and 2.5.1 but the major problem I had was if there was a single quote (') in a post's title (Like Peter's new blog) it would screw up as the import script wasn't escaping them so you end up losing the post title (or part of it).

Also the import script doesn't handle single quotes well in the categories either (it actually leaves the escape chars in so "Peter's travel" became "Peter\'s travel". This one is a whole lot easier to fix though as you could just rename it after import.

I suspect these would be easily fixed by either a function that's used by other imports or copying the equivalent bit over from another import script.