Category Archives: technology

Converting ghost cms output to csv for wordpress import

If you’re just coming here for the solution, and don’t want to read the backstory about how I came up with the solution, I understand. :)

Click here to skip to the solution.

The Problem

Recently I helped convert someone’s main blog from Ghost, back to WordPress.

While WordPress makes it easy to export in any format (so that you can easily import your entries into another blog engine), Ghost… does not.

While Ghost certainly does have an “export” tool, it exports in JSON format. JSON format is definitely preferable to XML, but no matter what, I could not find a way to import these entries into WordPress.

I searched through the plugin library–nothing was devoted to allowing an import through Ghost.

I furiously Googled–weirdly enough, any entries I could find about converting Ghost’s output to something that WordPress could import were all years old (and thus none of the solutions presented worked anymore, because I imagine Ghost’s export format had slightly changed.)

So, I decided to make my own.

The Solution

The solution is on Gitlab — just download the Powershell script (the .ps1 file) and run it on the command-line, passing one parameter of “jsonFile”, which is the path to the Ghost export.

Then, you’ll need a plugin to import the new CSV file to WordPress — I used the “WP All-Import” plugin. It seemed to be well maintained, and unlike many other plugins, it didn’t require you to pay for it.

That’s it! I built it in Powershell, because A) I can make quick scripts very quickly in Powershell, and I was frustrated by this point, B) Powershell has very good native CSV and file format conversion abilities, and C) Powershell can now run on any platform (Linux and MacOS included).

If you’re running this script on Windows, you already have Powershell installed, but if you’re running it on any other system, the link to install Powershell will also be below.

Future Enhancements

I only had posts with single tags to test against, so my script is only designed to get one tag for each post for the new CSV-formatted entries.

Ghost’s JSON format for tags was… bad. I don’t know why it was the way that it was. With every other type of metadata you’d need associated with a post, their JSON has that data in the “post” object, but with tags, they’re in a completely different other place, and only associated to posts through a series of IDs. It’s weird.

Either way, if you come up with a solution to that, feel free to fork the project! (Or just suggest a pull request.)

Also, I’d like to eventually re-code this into Python, just because more computers probably use it by now!


Kinect Hand Detection

I remember when Minority Report came out eight years ago, the talk was that we wouldn’t see this type of tech in our lifetime.

Now we do, only you don’t have to wear the silly fingertip thingies, and it’s made with a hacked-up video game peripheral.

Pattie Maes demos the Sixth Sense

Pattie Maes demos the Sixth Sense | Video on

I love hearing and reading about what goes on at the yearly TED (Technology, Entertainment, and Design) conference — it’s like a big symposium where people demo new technologies and products. You’ll see stuff demonstrated here 5 years or more before it possibly comes to the market (which it nearly always does). This is where I saw a technology strangely similiar to “Microsoft Surface” demonstrated years before Microsoft announced it (I still think they either stole it or bought the technology).

The video I linked here, while just a prototype, is what I keep telling people to look for in the next “big thing” — ubiquitous, nearly omnipotent meta-information, though more than likely in its end form, only the user will be able to see what he/she is manipulating (think video glasses).