Converting .pages to .docx with a little help from a VM

Apple pages for MacOS logo

In my last post, I discussed how I used LibreOffice and a bash script (co-authored with ChatGPT) to batch convert a bunch of my late professor’s .pages documents. I also noted that there were some files that could not be converted. Notably, more recent .pages files with underlying .iwa files. I decided that the next logical step was to try to install a MacOS VM and do it myself.

Step 1: The VM

Now, I am aware that there are projects like Sosumi that either install a MacOS VM as a Snap or in a Docker container. But I’m not a fan of containers. Even for VMs. So I decided to use quickemu, which has an Ubuntu package. Once installed, you can auto-download and initialize a VM with a single command:

quickget macos monterey

I actually first installed Mojave, but realized that I needed something a bit newer. Ventura is available, but I got a “Not supported” error, so I went with the next-latest: Monterey. The installation is similar to that of a Hackintosh, but because it’s in a KVM, I didn’t have to worry about other compatibilities. I also don’t need GPU or audio support, since I just want to run Apple Pages. Which brings me to the next part…

Step 2: Getting Apple Pages

You might be asking, “but Tyler… Why didn’t you just create an Apple ID and use the iCloud web interface for Apple Pages to do your conversion?” I’m two steps ahead of you… I did try to make an Apple ID and for some reason, Apple didn’t allow me to do it. Which is why I had to spend nearly 2.5 hours setting this VM up. πŸ™‚ πŸ™‚ πŸ™‚

Anyway, because I couldn’t make an Apple ID, I obviously couldn’t download Apple Pages from the App Store. So, I had to find a DMG to side-load. The Internet Archive had an iWorks 9.0, but it didn’t want to work with the newer version of Quicktime installed on Monterey, so that was out. Luckily, I found this repository of Apple Pages 8.0, which installed properly. Yay!

Step 3: Testing the conversion

I downloaded and installed FileZilla on my MacOS VM in order to slurp some files off of my host machine. quickemu doesn’t provide an easy file-sharing solution and SFTP from my Linux host to the VM didn’t work. Luckily, I was able to use FileZilla to SFTP into my host without an issue. I then grabbed a few of my professor’s files and opened them in Apple Pages:

So far so good. I then converted the documents one-by-one to .docx and sent them back to my host machine with FileZilla. Will LibreOffice open them?!

Indeed it does!

Step 4: But can they batch?

So, I know even less about MacOS than I do about bash scripting, but I have heard that there was an Automator and the like in MacOS and wondered whether options for Pages. Alas, there was not, but a user on discussions.apple.com named VikingOSX had a script that did the trick! (I don’t have shared clipboard and I don’t want to hunt down the post on my host machine, so I’m not giving a link. Have a screenshot instead)

This script auto-converts using Pages and places the converted files in their original directory, but within a newly-created “Word” directory, for safe-keeping. While, I’d be perfectly fine with having the docx and pdf side-by-side with the original, I get the appeal.

Success!

So, there. In order to free those papers from the walled garden, I had to enter the walled garden myself and, to poke fun at Audre Lorde, used the master’s tools to dismantle his house.

All of this could have been avoided had Apple Pages decided to implement default saving to either .docx, .rtf, or even .odt which is supposed to be an Open format. Do I recommend doing this? No. Probably any other sane person would have just asked their friend with a Mac to do it for them (assuming that particular Mac user would know how to use the Automator). But, I got to use a MacOS VM for a special purpose and now that that’s done, I can free up my disk space by deleting the .qcow2 file it lives in!

Add a Comment