最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

Export All Posts and Media to XML andor Word

matteradmin5PV0评论

Would like to be able to export all posts and their embedded media into a well-formed XML document - or even better, a Word document. I need all posts in date order. Posts have pictures included from the media library; some posts use the [gallery] shortcode, so the export should be able to get those pictures also.

I have tried the standard WP Tools Export, of all data, and just of posts. That creates the XML file, but still need to get that into an editable Word document. I have also tried the WP All Export plugin, but it's XML output is not 'well-formed' (according to the WordPress2Doc program, which apparently handles only the standard WP Export XML format).

I have tried WordPress2Doc standalone program, but it is unable to handle [gallery] images properly. (Have communicated with the WordPress2Doc author, and provided a sample XML export, but his program cannot process the images properly.)

The ultimate intent is to get all posts into an editable Word document, with 'internal' pictures (not links to pictures), to produce a printed book.

I can build a bare-bones template that will use the WP Loop to output all posts/images to an HTML page, but that doesn't give me a standalone Word doc.

Have spent a lot of time asking the googles, to no avail.

How can I convert posts, including images, into an editable document?

Thanks.

Edit: crossposted in Stackoverflow, since the question is not entirely WordPress-based; a solution could be used for nonWP sites.

Would like to be able to export all posts and their embedded media into a well-formed XML document - or even better, a Word document. I need all posts in date order. Posts have pictures included from the media library; some posts use the [gallery] shortcode, so the export should be able to get those pictures also.

I have tried the standard WP Tools Export, of all data, and just of posts. That creates the XML file, but still need to get that into an editable Word document. I have also tried the WP All Export plugin, but it's XML output is not 'well-formed' (according to the WordPress2Doc program, which apparently handles only the standard WP Export XML format).

I have tried WordPress2Doc standalone program, but it is unable to handle [gallery] images properly. (Have communicated with the WordPress2Doc author, and provided a sample XML export, but his program cannot process the images properly.)

The ultimate intent is to get all posts into an editable Word document, with 'internal' pictures (not links to pictures), to produce a printed book.

I can build a bare-bones template that will use the WP Loop to output all posts/images to an HTML page, but that doesn't give me a standalone Word doc.

Have spent a lot of time asking the googles, to no avail.

How can I convert posts, including images, into an editable document?

Thanks.

Edit: crossposted in Stackoverflow, since the question is not entirely WordPress-based; a solution could be used for nonWP sites.

Share Improve this question edited Jul 20, 2017 at 17:44 Rick Hellewell asked Jul 19, 2017 at 21:28 Rick HellewellRick Hellewell 7,1612 gold badges23 silver badges41 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

For anyone that is lurking, I solved my issue. I wrote a plugin that allows you to export to a html file, or just show it on screen. It basically outputs all pages using minimal CSS (just H1/H2/H3) into an HTML file, or to the screen (or emails the file to you).

Another way, which I have also used, is to create a simple template that outputs the posts to the screen, again with minimal CSS, and no header/footer/sidebars. Images are placed in a table (for easier adjusting in Word). When I output the entire blog to screen (no pagination), then I do a Save As HTML in my browser. I open that in Word, save it as a DOCX, and then massage the DOCX into a format to be printed (I use Lulu to print the book).

All works well. A lot of editing required to make the printed copy look good, but the big part of exporting the WP posts is done with the process.

Articles related to this article

Post a comment

comment list (0)

  1. No comments so far