Add transformation from WordPress output to post structure.

As always, there are things that could be refactored, but for the
moment, this works.