rokde / wordpress-to-markdown
A cli application to convert wordpress backup xml into markdown files for posts and pages
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Type:project
Requires
- php: ^7.1.3
- ext-simplexml: *
- laravel-zero/framework: 5.6.*
- league/html-to-markdown: ^4.7
Requires (Dev)
- phpunit/phpunit: ^7.1
This package is auto-updated.
Last update: 2023-06-23 04:17:48 UTC
README
This application is based on Laravel Zero, a version of laravel optimized for command line usage.
Documentation
This is a command line tool for converting a wordpress backup xml file into a bunch of markdown files for posts and pages (and other types).
Installation
You have two options. Install it globally into your system and make sure the
binary wordpress-to-markdown
is within your $PATH
variable.
The other way is to install it as your project dependency (like phpunit for example).
composer require rokde/wordpress-to-markdown
Then you can run vendor/bin/wordpress-to-markdown
within your
project.
Usage
Give your wordpress source xml file and the target folder the converter shall store the converted files.
wordpress-to-markdown convert path/to/your/wordpress.xml path/to/store/markdown/
You can force the writing process with the flag --force
.
Modifying the file extension of your created files is also supported with the option --extension
. Default is md
.
Changing the date format or make more folders then th default behaviour does is supported too. Give your date format with the option --format
and give one of the possible values. You can also use /
to make directories. Default is Y-m-d
.
This setting will only be used for blog posts. Pages and other types do not use any date formatted string in their resulting filename.
That´s it.
License
Wordpress to Markdown Converter is an open-source software licensed under the MIT license.