Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > System > Monitoring

    wp-md 0.1

    Download button

    No screenshots available
    Downloads: 109  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Brandon W Maister | More programs
    MIT/X Consortium Lic... / FREE
    May 19th, 2012, 07:59 GMT
    ROOT / System / Monitoring

     Read user reviews (0)  Refer to a friend  Subscribe

    wp-md description

    Move WordPress pseudo-html into a couple markdown formats

    wp-md is a Python script that converts blog posts from WordPress's XML formats to one of various markdown-using static-site generator formats.

    What that means is that you get a more human-readable version of your WordPress blogs if you run the wordpress export file through wp-md.

    Why?

    I want to leave WordPress, primarily because it's friggin' impossible to provide code samples within it.

    But I want syntax-highlighted code, so I need to export all my existing posts to something reasonable and none of the existing HTML->markdown converters seem to do a good job with both WordPress' pseudo-html and getting the code blocks to be syntax-aware.

    This does.

    It's also pretty bad at it's job, so it's fairly fast. (Much faster than pandoc, anyway.)

    The main thing that this does not do is any conversion of nested elements: < ol >, < blockquote > and their ilk are just passed through to the final file. This works fine because HTML is valid Markdown.

    wpmd also works with WordPress' eXtended RSS or PHPMyAdmin database xml format, so it doesn't need a database layer, or a database.

    Installation

    To put the script on your path do:

    python setup.py install

    or:

    pip install wp-md

    Otherwise, just substitue wpmd.py for wp-md as the name of the program in this document, it'll work.

    Usage

    Go to WordPress' export page in the admin and download your-blog.xml, then:

    wp-md your-blog.xml blog-files

    will put a whole bunch of files in the directory blog-files, creating it if it doesn't exist.

    You can run wp-md with the --output-format flag to choose which static-site generator format you want your posts to be exported as:

    - Nikola
    - Mynt
    - Pelican

    The current default is Pelican because it puts the most metadata into the file, and doesn't require the date to be in the filename. If you want the date to be part of the filename, use the Mynt format.

    If you happen to have a PHPMyAdmin export of your database, you can use the --input-format flag to choose pma_xml.

    Notes

    This is a semi-useful hack that I wrote so that I could play around with static site generators. I don't know that it will work for you, but if it's missing a feature that you want let me know and I might oblige.


    Product's homepage

    Requirements:

    · Python

      


    TAGS:

    static-site generator | blog converter | blog posts | static-site | generator | WordPress

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM