Improve importer documentation.

This commit is contained in:
Simon 2012-12-18 14:03:05 +01:00 committed by Bruno Binet
commit 688dee2dca

View file

@ -4,54 +4,56 @@
Import from other blog software Import from other blog software
================================= =================================
Description Description
=========== ===========
``pelican-import`` is a command line tool for converting articles from other ``pelican-import`` is a command-line tool for converting articles from other
software to ReStructuredText. The supported formats are: software to ReStructuredText or Markdown. The supported import formats are:
- WordPress XML export - WordPress XML export
- Dotclear export - Dotclear export
- RSS/Atom feed - RSS/Atom feed
The conversion from HTML to reStructuredText relies on `pandoc The conversion from HTML to reStructuredText or Markdown relies on `Pandoc`_.
<http://johnmacfarlane.net/pandoc/>`_. For Dotclear, if the source posts are For Dotclear, if the source posts are written with Markdown syntax, they will
written with Markdown syntax, they will not be converted (as Pelican also not be converted (as Pelican also supports Markdown).
supports Markdown).
Dependencies Dependencies
"""""""""""" ============
``pelican-import`` has two dependencies not required by the rest of pelican: ``pelican-import`` has some dependencies not required by the rest of pelican:
- Beautiful Soup - *BeautifulSoup*, for WordPress and Dotclear import. Can be installed like
- pandoc any other Python package (``pip install BeautifulSoup``).
- *Feedparser*, for feed import (``pip install feedparser``).
- *Pandoc*, see the `Pandoc site`_ for installation instructions on your
operating system.
Beautiful Soup can be installed like any other Python package:: .. _Pandoc: http://johnmacfarlane.net/pandoc/
.. _Pandoc site: http://johnmacfarlane.net/pandoc/installing.html
$ pip install BeautifulSoup
For pandoc, install a package for your operating system from the
`pandoc site <http://johnmacfarlane.net/pandoc/installing.html>`_.
Usage Usage
""""" =====
| pelican-import [-h] [--wpfile] [--dotclear] [--feed] [-o OUTPUT] ::
| [-m MARKUP] [--dir-cat] [--strip-raw] [--disable-slugs]
| input pelican-import [-h] [--wpfile] [--dotclear] [--feed] [-o OUTPUT]
[-m MARKUP] [--dir-cat] [--strip-raw] [--disable-slugs]
input
Positional arguments Positional arguments
==================== --------------------
input The input file to read input The input file to read
Optional arguments Optional arguments
"""""""""""""""""" ------------------
-h, --help show this help message and exit -h, --help Show this help message and exit
--wpfile Wordpress XML export (default: False) --wpfile WordPress XML export (default: False)
--dotclear Dotclear export (default: False) --dotclear Dotclear export (default: False)
--feed Feed to parse (default: False) --feed Feed to parse (default: False)
-o OUTPUT, --output OUTPUT -o OUTPUT, --output OUTPUT
@ -69,6 +71,7 @@ Optional arguments
be consistent with your original posts. (default: be consistent with your original posts. (default:
False) False)
Examples Examples
======== ========
@ -80,10 +83,11 @@ For Dotclear::
$ pelican-import --dotclear -o ~/output ~/backup.txt $ pelican-import --dotclear -o ~/output ~/backup.txt
Tests Tests
===== =====
To test the module, one can use sample files: To test the module, one can use sample files:
- for Wordpress: http://wpcandy.com/made/the-sample-post-collection - for WordPress: http://wpcandy.com/made/the-sample-post-collection
- for Dotclear: http://themes.dotaddict.org/files/public/downloads/lorem-backup.txt - for Dotclear: http://themes.dotaddict.org/files/public/downloads/lorem-backup.txt