lonekorean / wordpress-export-to-markdown

Converts a WordPress export XML file into Markdown files.
MIT License
1.14k stars 227 forks source link

Handling custom-post? #39

Closed FaheyAssociates closed 3 years ago

FaheyAssociates commented 4 years ago

Sorry for my naive question:

Does the script handle custom-posts somehow?

It doesn't look like it, I might be wrong or have skipped an argument. All my WP Knowledge Base is custom posts made. My XML export embeds these custom posts.

Here's the Script prompts/logs I have:

Starting wizard...
? Path to WordPress export file? /Users/manuel/Downloads/wordpress-export-to-markdown-ma
ster/export.xml
? Path to output folder? /Users/manuel/Documents/WP-KB-MD
? Create year folders? No
? Create month folders? No
? Create a folder for each post? No
? Prefix post folders/files with date? No
? Save images attached to posts? No
? Save images scraped from post body content? No

Parsing...
0 posts found.

Saving posts...
Done, got them all!

… no output as you can see.

codercatdev commented 3 years ago

Same this would be perfect if it would pull in custom post types :D

rfos commented 3 years ago

I'm changing the custom post name every time I need to export the content for example:

file: parser.js line: 40

const posts = getItemsOfType(data, 'YOURCUSTOMPOST')

them you can export to a specific folder for that custom post

lonekorean commented 3 years ago

Added an additional question to the wizard for this: "Include custom post types and pages?"