{ "info": { "author": "Gabor Laszlo Hajba", "author_email": "gabor.hajba@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python" ], "description": "This is a simple module meant to convert Markdown files to XML (XHTML) and send them to WordPress.com via XML-RPC.\n\nThe idea behind this all is to make the base of an open-source offline WordPress.com blog entry editor.\n\nThe first part converts the text written in a specific MarkDown language to XML (or XHTML).\nBecause I write currently my books for LeanPub I align the main conversion to the LeanPub MarkDown.\nHowever MD to XML conversion is a bit bothersome and there are many libraries which do this, I'll stick to Markdown a Python library for converting MarkDown files to X(HT)ML.\n\nThe mdxml.conf file contains custom configuration which is not available in markdown. For example the [sourcecode] block for WordPress. For this behavior I skip the markdown conversion for these lines of code.\nCurrently language and other options cannot be added for source codes.\n\nIf you have other configuration extensions (for example if you want to override the ~~~~~~~~ for source-codes, you can define it in your own conversion file and provide it as an argument to the application.\n\nEach configuration element has a starting and ending tag (although currently I am thinking about another way to solve this problem because XML files should be valid in the end...).\n\nOne problem with Markdown is, that you have to parse the whole text if you have multi-line elements (for example lists). If you do not do this, you'll end up with a bunch of lists.\n\nFeel free to create issues and change requests.\n\nThe application looks for the configuration file (containing wordpress endpoint, username, password and optional proxy configuration) in your home folder under the name *wpedit.conf*. Optionally you can provide it per commandline argument.\n\n\n
\n wpedit.py [-h] [-c CONFIG] [-m MDCONF] [-l] [-n NUMBER] [-U] [-V] post_file\n\npositional arguments:\n post_file The full path of the input file to send to WordPress.\n If used with the '-l' option it is the full path of\n the folder to save the drafts from WordPress.\n\noptional arguments:\n -h, --help show this help message and exit\n -c CONFIG, --config CONFIG\n The full path of the configuration file storing the\n XML-RPC endpoint, username and password. Per default\n the application looks at your home folder and searches\n for wpedit.conf\n -m MDCONF, --mdconf MDCONF\n The full path of the md-to-xml conversion-extension\n file\n -l, --load Loads all draft posts into the folder where the\n 'post_file' resides. The 'post_file' will not be sent\n to WordPress.\n -n NUMBER, --number NUMBER\n The number of draft posts to load. Works only in\n combination with the '-l' argument.\n -U, --update Forces update of every draft loaded, the check for\n local modifications is disabled. Works only in\n combination with the '-l' argument.\n -V, --verify Enables verification of tags. If the blog post\n contains tags which are not defined, the article will\n not be sent to WordPress.\n\n