From b509fe70cd90d077242223865b87612d845b851f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20HUBSCHER?= Date: Fri, 6 Apr 2012 09:55:15 +0200 Subject: [PATCH 01/19] Add rsync_upload --- pelican/tools/pelican_quickstart.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pelican/tools/pelican_quickstart.py b/pelican/tools/pelican_quickstart.py index 7ade62e9..43e2a537 100755 --- a/pelican/tools/pelican_quickstart.py +++ b/pelican/tools/pelican_quickstart.py @@ -52,6 +52,9 @@ clean: dropbox_upload: $$(OUTPUTDIR)/index.html \tcp -r $$(OUTPUTDIR)/* $$(DROPBOX_DIR) +rsync_upload: $$(OUTPUTDIR)/index.html +\trsync --delete -rvz -e ssh $(OUTPUTDIR)/* $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR) + ssh_upload: $$(OUTPUTDIR)/index.html \tscp -r $$(OUTPUTDIR)/* $$(SSH_USER)@$$(SSH_HOST):$$(SSH_TARGET_DIR) From ae97cbfb72ccb0c5e716cfe546eeb646ab15b3e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Raimbault?= Date: Sat, 7 Apr 2012 17:33:23 +0200 Subject: [PATCH 02/19] Fix misspelling of ssh_target_dir in quickstart --- pelican/tools/pelican_quickstart.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pelican/tools/pelican_quickstart.py b/pelican/tools/pelican_quickstart.py index 43e2a537..0365ca62 100755 --- a/pelican/tools/pelican_quickstart.py +++ b/pelican/tools/pelican_quickstart.py @@ -231,7 +231,7 @@ Please answer the following questions so this script can generate the files need if ask('Do you want to upload your website using SSH ?', answer=bool, default=False): CONF['ssh_host'] = ask('What is the hostname of your SSH server ?', str, CONF['ssh_host']) CONF['ssh_user'] = ask('What is your username on this server ?', str, CONF['ssh_user']) - CONF['ssh_traget_dir'] = ask('Where do you want to put your website on this server ?', str, CONF['ssh_target_dir']) + CONF['ssh_target_dir'] = ask('Where do you want to put your website on this server ?', str, CONF['ssh_target_dir']) if ask('Do you want to upload your website using Dropbox ?', answer=bool, default=False): CONF['dropbox_dir'] = ask('Where is your Dropbox directory ?', str, CONF['dropbox_dir']) From 28a1e0f432f5727aea672795b889c8955708a50e Mon Sep 17 00:00:00 2001 From: Dafydd Crosby Date: Sat, 7 Apr 2012 18:02:40 -0600 Subject: [PATCH 03/19] Fix some typos and grammar --- pelican/__init__.py | 7 ++++--- pelican/contents.py | 4 ++-- pelican/generators.py | 2 +- pelican/tools/pelican_quickstart.py | 4 ++-- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/pelican/__init__.py b/pelican/__init__.py index c2766646..9afbb6cc 100644 --- a/pelican/__init__.py +++ b/pelican/__init__.py @@ -61,8 +61,9 @@ class Pelican(object): def _handle_deprecation(self): if self.settings.get('CLEAN_URLS', False): - logger.warning('Found deprecated `CLEAN_URLS` in settings. Modifing' - ' the following settings for the same behaviour.') + logger.warning('Found deprecated `CLEAN_URLS` in settings. ' + ' Modifying the following settings for the + ' same behaviour.') self.settings['ARTICLE_URL'] = '{slug}/' self.settings['ARTICLE_LANG_URL'] = '{slug}-{lang}/' @@ -75,7 +76,7 @@ class Pelican(object): if self.settings.get('ARTICLE_PERMALINK_STRUCTURE', False): logger.warning('Found deprecated `ARTICLE_PERMALINK_STRUCTURE` in' - ' settings. Modifing the following settings for' + ' settings. Modifying the following settings for' ' the same behaviour.') structure = self.settings['ARTICLE_PERMALINK_STRUCTURE'] diff --git a/pelican/contents.py b/pelican/contents.py index 42de4560..593822a9 100644 --- a/pelican/contents.py +++ b/pelican/contents.py @@ -63,7 +63,7 @@ class Page(object): self.in_default_lang = (self.lang == default_lang) - # create the slug if not existing, fro mthe title + # create the slug if not existing, from the title if not hasattr(self, 'slug') and hasattr(self, 'title'): self.slug = slugify(self.title) @@ -135,7 +135,7 @@ class Page(object): def _get_summary(self): """Returns the summary of an article, based on the summary metadata - if it is set, else troncate the content.""" + if it is set, else truncate the content.""" if hasattr(self, '_summary'): return self._summary else: diff --git a/pelican/generators.py b/pelican/generators.py index d7ebb0b0..9f4de79b 100644 --- a/pelican/generators.py +++ b/pelican/generators.py @@ -351,7 +351,7 @@ class PagesGenerator(Generator): class StaticGenerator(Generator): - """copy static paths (what you want to cpy, like images, medias etc. + """copy static paths (what you want to copy, like images, medias etc. to output""" def _copy_paths(self, paths, source, destination, output_path, diff --git a/pelican/tools/pelican_quickstart.py b/pelican/tools/pelican_quickstart.py index 43e2a537..dffd4391 100755 --- a/pelican/tools/pelican_quickstart.py +++ b/pelican/tools/pelican_quickstart.py @@ -202,7 +202,7 @@ def main(): print('''Welcome to pelican-quickstart v{v}. -This script will help you creating a new Pelican based website. +This script will help you create a new Pelican-based website. Please answer the following questions so this script can generate the files needed by Pelican. @@ -211,7 +211,7 @@ Please answer the following questions so this script can generate the files need CONF['basedir'] = os.path.abspath(ask('Where do you want to create your new Web site ?', answer=str, default=args.path)) CONF['sitename'] = ask('How will you call your Web site ?', answer=str, default=args.title) CONF['author'] = ask('Who will be the author of this Web site ?', answer=str, default=args.author) - CONF['lang'] = ask('What will be the default language of this Web site ?', str, args.lang or CONF['lang'], 2) + CONF['lang'] = ask('What will be the default language of this Web site ?', str, args.lang or CONF['lang'], 2) CONF['with_pagination'] = ask('Do you want to enable article pagination ?', bool, bool(CONF['default_pagination'])) From 424cfe1b1ed5e7d841d160d019b99b3162badb11 Mon Sep 17 00:00:00 2001 From: Aldiantoro Nugroho Date: Tue, 10 Apr 2012 17:30:42 +0800 Subject: [PATCH 04/19] Fixed hardcoded category url in base.html. --- pelican/themes/notmyidea/templates/base.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pelican/themes/notmyidea/templates/base.html b/pelican/themes/notmyidea/templates/base.html index f0f745e4..c9f2c0c8 100644 --- a/pelican/themes/notmyidea/templates/base.html +++ b/pelican/themes/notmyidea/templates/base.html @@ -35,7 +35,7 @@ {% endfor %} {% endif %} {% for cat, null in categories %} -
  • {{ cat }}
  • +
  • {{ cat }}
  • {% endfor %} From 6888a046362316f98fb3aaf2982ca246ad724f30 Mon Sep 17 00:00:00 2001 From: Aaron Kavlie Date: Thu, 12 Apr 2012 19:38:59 -0700 Subject: [PATCH 05/19] Issue #311 Catch BeautifulSoup ImportError. --- pelican/tools/pelican_import.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/pelican/tools/pelican_import.py b/pelican/tools/pelican_import.py index 57c4fc22..a4d64c67 100755 --- a/pelican/tools/pelican_import.py +++ b/pelican/tools/pelican_import.py @@ -13,7 +13,12 @@ from pelican.utils import slugify def wp2fields(xml): """Opens a wordpress XML file, and yield pelican fields""" - from BeautifulSoup import BeautifulStoneSoup + try: + from BeautifulSoup import BeautifulStoneSoup + except ImportError: + error = 'Missing dependency ' + \ + '"BeautifulSoup" required to import Wordpress files.' + sys.exit(error) xmlfile = open(xml, encoding='utf-8').read() soup = BeautifulStoneSoup(xmlfile) @@ -40,7 +45,13 @@ def wp2fields(xml): def dc2fields(file): """Opens a Dotclear export file, and yield pelican fields""" - from BeautifulSoup import BeautifulStoneSoup + try: + from BeautifulSoup import BeautifulStoneSoup + except ImportError: + error = 'Missing dependency ' + \ + '"BeautifulSoup" required to import Dotclear files.' + sys.exit(error) + in_cat = False in_post = False From 23c05ad7dbd46e61d1cd1cfe193510601d7c2299 Mon Sep 17 00:00:00 2001 From: Aaron Kavlie Date: Thu, 12 Apr 2012 19:53:03 -0700 Subject: [PATCH 06/19] Issue #311, #312 Document BeautifulSoup & pandoc deps. --- docs/importer.rst | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/docs/importer.rst b/docs/importer.rst index 377820af..96e9e729 100644 --- a/docs/importer.rst +++ b/docs/importer.rst @@ -19,6 +19,23 @@ The conversion from HTML to reStructuredText relies on `pandoc written with Markdown syntax, they will not be converted (as Pelican also supports Markdown). +Dependencies +"""""""""""" + +``pelican-import`` has two additional dependencies not included with pelican +by default: + +- BeautifulSoup +- pandoc + +BeatifulSoup can be installed like any other Python package:: + + $ pip install BeautifulSoup + +For pandoc, install a package for your operating system from the +`pandoc site `_. + + Usage """"" @@ -26,8 +43,8 @@ Usage | [--dir-cat] | input -Optional arguments: -""""""""""""""""""" +Optional arguments +"""""""""""""""""" -h, --help show this help message and exit --wpfile Wordpress XML export From ac8f3fc6537d47d806adaa3cfa57dad836f072f3 Mon Sep 17 00:00:00 2001 From: Kyle Fuller Date: Sun, 15 Apr 2012 14:31:21 +0100 Subject: [PATCH 07/19] Fix misspelling of ftp_target_dir in quickstart --- pelican/tools/pelican_quickstart.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pelican/tools/pelican_quickstart.py b/pelican/tools/pelican_quickstart.py index 0365ca62..64288837 100755 --- a/pelican/tools/pelican_quickstart.py +++ b/pelican/tools/pelican_quickstart.py @@ -226,7 +226,7 @@ Please answer the following questions so this script can generate the files need if ask('Do you want to upload your website using FTP ?', answer=bool, default=False): CONF['ftp_host'] = ask('What is the hostname of your FTP server ?', str, CONF['ftp_host']) CONF['ftp_user'] = ask('What is your username on this server ?', str, CONF['ftp_user']) - CONF['ftp_traget_dir'] = ask('Where do you want to put your website on this server ?', str, CONF['ftp_target_dir']) + CONF['ftp_target_dir'] = ask('Where do you want to put your website on this server ?', str, CONF['ftp_target_dir']) if ask('Do you want to upload your website using SSH ?', answer=bool, default=False): CONF['ssh_host'] = ask('What is the hostname of your SSH server ?', str, CONF['ssh_host']) From 4c4c2a96040e99f93b7749057dad37a11b1a13d4 Mon Sep 17 00:00:00 2001 From: Kyle Fuller Date: Sun, 15 Apr 2012 14:40:10 +0100 Subject: [PATCH 08/19] Add a missing ' --- pelican/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pelican/__init__.py b/pelican/__init__.py index 9afbb6cc..59aef653 100644 --- a/pelican/__init__.py +++ b/pelican/__init__.py @@ -61,8 +61,8 @@ class Pelican(object): def _handle_deprecation(self): if self.settings.get('CLEAN_URLS', False): - logger.warning('Found deprecated `CLEAN_URLS` in settings. ' - ' Modifying the following settings for the + logger.warning('Found deprecated `CLEAN_URLS` in settings.' + ' Modifying the following settings for the' ' same behaviour.') self.settings['ARTICLE_URL'] = '{slug}/' From 597233c49b797d166553cd42348cc838b4e03f56 Mon Sep 17 00:00:00 2001 From: Kyle Fuller Date: Sun, 15 Apr 2012 15:01:03 +0100 Subject: [PATCH 09/19] Fix a broken link in the docs --- docs/settings.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/settings.rst b/docs/settings.rst index b7882075..7b43f183 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -361,8 +361,7 @@ By default, two themes are available. You can specify them using the `-t` option You can define your own theme too, and specify its placement in the same manner. (Be sure to specify the full absolute path to it.) -Here is `a guide on how to create your theme -`_ +Here is :doc:`a guide on how to create your theme ` You can find a list of themes at http://github.com/ametaireau/pelican-themes. From e694cdc2b36a6fb902f4b105e5315ec4a0a99bfd Mon Sep 17 00:00:00 2001 From: Kyle Fuller Date: Sun, 15 Apr 2012 15:08:06 +0100 Subject: [PATCH 10/19] docs: Fix some sphinx warnings, and correctly format the french FAQ --- docs/fr/faq.rst | 15 ++++++++++----- docs/settings.rst | 8 ++++---- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/docs/fr/faq.rst b/docs/fr/faq.rst index 8cbe0881..d945f447 100644 --- a/docs/fr/faq.rst +++ b/docs/fr/faq.rst @@ -1,8 +1,10 @@ -*Foire aux questions (FAQ)* +Foire aux questions (FAQ) +######################### Voici un résumé des questions fréquemment posées pour pelican. -*Est-il obligatoire d'avoir un fichier de configuration ?* +Est-il obligatoire d'avoir un fichier de configuration ? +======================================================== Non. Les fichiers de configuration sont juste un moyen facile de configurer pelican. Pour les opérations de base, il est possible de spécifier des @@ -11,17 +13,20 @@ en invoquant pelican avec la ligne de commande (voir pelican --help pour plus d'informations à ce sujet) -*Je crée mon propre thème, comment utiliser pygments?* +Je crée mon propre thème, comment utiliser pygments? +==================================================== Pygment ajoute quelques classes au contenu généré, de sorte qua colorisation de votre thème se fait grâce à un fichier css. Vous pouvez jeter un oeil à celui proposé par`sur le site du projet `_ -*Comment puis-je créer mon propre thèm* +Comment puis-je créer mon propre thèm +===================================== Vueillez vous référer à :ref:`theming-pelican-fr`. -*Comment puis-je aider?* +Comment puis-je aider? +====================== Vous avez plusieurs options pour aider. Tout d'abord, vous pouvez utiliser le diff --git a/docs/settings.rst b/docs/settings.rst index 7b43f183..427795c2 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -52,10 +52,10 @@ Setting name (default value) What does it do? supported extensions. `OUTPUT_PATH` (``'output/'``) Where to output the generated files. `PATH` (``None``) Path to look at for input files. -`PAGE_DIR' (``'pages'``) Directory to look at for pages. -`PAGE_EXCLUDES' (``()``) A list of directories to exclude when looking for pages. -`ARTICLE_DIR' (``''``) Directory to look at for articles. -`ARTICLE_EXCLUDES': (``('pages',)``) A list of directories to exclude when looking for articles. +`PAGE_DIR` (``'pages'``) Directory to look at for pages. +`PAGE_EXCLUDES` (``()``) A list of directories to exclude when looking for pages. +`ARTICLE_DIR` (``''``) Directory to look at for articles. +`ARTICLE_EXCLUDES`: (``('pages',)``) A list of directories to exclude when looking for articles. `PDF_GENERATOR` (``False``) Set to True if you want to have PDF versions of your documents. You will need to install `rst2pdf`. From e29b54e5e079594fb3516b276ce2e1553108bf9d Mon Sep 17 00:00:00 2001 From: Justin Mayer Date: Mon, 16 Apr 2012 09:10:20 -0700 Subject: [PATCH 11/19] Replace omitted slash in feed URL generation This slash was originally present, but I removed it at some point because it was causing double-slashes. I believe the reason is that I had a leading slash in my article URL pattern, which in retrospect should not have been there. Omitting the slash caused problems for other folks; I should have tested this better. This commit puts the slash back where it belongs. --- pelican/writers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pelican/writers.py b/pelican/writers.py index faca46bd..4dd04a2a 100644 --- a/pelican/writers.py +++ b/pelican/writers.py @@ -36,7 +36,7 @@ class Writer(object): feed.add_item( title=item.title, - link='%s%s' % (self.site_url, item.url), + link='%s/%s' % (self.site_url, item.url), unique_id='tag:%s,%s:%s' % (self.site_url.replace('http://', ''), item.date.date(), item.url), description=item.content, From a0d5596605fd62ebfd4c8419f2b1225b90dc6ceb Mon Sep 17 00:00:00 2001 From: Andrew Laski Date: Mon, 16 Apr 2012 20:39:41 -0400 Subject: [PATCH 12/19] Modifed question so that it's more clear --- pelican/tools/pelican_quickstart.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pelican/tools/pelican_quickstart.py b/pelican/tools/pelican_quickstart.py index 153bc3ec..8459870a 100755 --- a/pelican/tools/pelican_quickstart.py +++ b/pelican/tools/pelican_quickstart.py @@ -209,7 +209,7 @@ Please answer the following questions so this script can generate the files need '''.format(v=__version__)) CONF['basedir'] = os.path.abspath(ask('Where do you want to create your new Web site ?', answer=str, default=args.path)) - CONF['sitename'] = ask('How will you call your Web site ?', answer=str, default=args.title) + CONF['sitename'] = ask('What will be the title of this Web site ?', answer=str, default=args.title) CONF['author'] = ask('Who will be the author of this Web site ?', answer=str, default=args.author) CONF['lang'] = ask('What will be the default language of this Web site ?', str, args.lang or CONF['lang'], 2) From 6577efc8f466acf8f6e639528959e2915a7f9413 Mon Sep 17 00:00:00 2001 From: Aaron Kavlie Date: Wed, 18 Apr 2012 00:20:54 -0700 Subject: [PATCH 13/19] Wrap paragraphs in

    tags --- pelican/tools/pelican_import.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pelican/tools/pelican_import.py b/pelican/tools/pelican_import.py index a4d64c67..01253960 100755 --- a/pelican/tools/pelican_import.py +++ b/pelican/tools/pelican_import.py @@ -17,7 +17,7 @@ def wp2fields(xml): from BeautifulSoup import BeautifulStoneSoup except ImportError: error = 'Missing dependency ' + \ - '"BeautifulSoup" required to import Wordpress files.' + '"BeautifulSoup" required to import Wordpress XML files.' sys.exit(error) xmlfile = open(xml, encoding='utf-8').read() @@ -226,7 +226,10 @@ def fields2pelican(fields, out_markup, output_path, dircat=False): with open(html_filename, 'w', encoding='utf-8') as fp: # Replace simple newlines with
    +newline so that the HTML file # represents the original post more accurately - content = content.replace("\n", "
    \n") + paragraphs = content.split('\n\n') + paragraphs = ['

    %s

    ' % p for p in paragraphs] + new_content = ''.join(paragraphs) + fp.write(content) cmd = 'pandoc --normalize --reference-links --from=html --to={0} -o "{1}" "{2}"'.format( From 9491bb40d4127b29e2dc68d421d96aca3eb32e98 Mon Sep 17 00:00:00 2001 From: Aaron Kavlie Date: Wed, 18 Apr 2012 00:24:52 -0700 Subject: [PATCH 14/19] Add --no-wrap option to pandoc, fixing issue with long links names (another fix for issue #314) --- pelican/tools/pelican_import.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pelican/tools/pelican_import.py b/pelican/tools/pelican_import.py index 01253960..9a19f33c 100755 --- a/pelican/tools/pelican_import.py +++ b/pelican/tools/pelican_import.py @@ -232,7 +232,7 @@ def fields2pelican(fields, out_markup, output_path, dircat=False): fp.write(content) - cmd = 'pandoc --normalize --reference-links --from=html --to={0} -o "{1}" "{2}"'.format( + cmd = 'pandoc --normalize --no-wrap --reference-links --from=html --to={0} -o "{1}" "{2}"'.format( out_markup, out_filename, html_filename) try: From 602990b80e403ec2cb8021575aadae9c56370439 Mon Sep 17 00:00:00 2001 From: Justin Mayer Date: Wed, 18 Apr 2012 07:16:51 -0700 Subject: [PATCH 15/19] Use "endswith" to detect trailing slash on SITEURL --- pelican/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pelican/settings.py b/pelican/settings.py index c0e30815..7a30e56e 100644 --- a/pelican/settings.py +++ b/pelican/settings.py @@ -130,7 +130,7 @@ def configure_settings(settings, default_settings=None, filename=None): if ('SITEURL' in settings): # If SITEURL has a trailing slash, remove it and provide a warning siteurl = settings['SITEURL'] - if (siteurl[len(siteurl) - 1:] == '/'): + if (siteurl.endswith('/')): settings['SITEURL'] = siteurl[:-1] logger.warn("Removed extraneous trailing slash from SITEURL.") # If SITEURL is defined but FEED_DOMAIN isn't, set FEED_DOMAIN = SITEURL From cc30695b72772a5faab8bfccf217e2e1397b4f9f Mon Sep 17 00:00:00 2001 From: Aaron Kavlie Date: Wed, 18 Apr 2012 09:29:47 -0700 Subject: [PATCH 16/19] Correct comment; switch to new style string formatting. --- pelican/tools/pelican_import.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pelican/tools/pelican_import.py b/pelican/tools/pelican_import.py index 9a19f33c..b45d4fec 100755 --- a/pelican/tools/pelican_import.py +++ b/pelican/tools/pelican_import.py @@ -224,10 +224,10 @@ def fields2pelican(fields, out_markup, output_path, dircat=False): html_filename = os.path.join(output_path, filename+'.html') with open(html_filename, 'w', encoding='utf-8') as fp: - # Replace simple newlines with
    +newline so that the HTML file - # represents the original post more accurately + # Replace newlines with paragraphs wrapped with

    so + # HTML is valid before conversion paragraphs = content.split('\n\n') - paragraphs = ['

    %s

    ' % p for p in paragraphs] + paragraphs = ['

    {}

    '.format(p) for p in paragraphs] new_content = ''.join(paragraphs) fp.write(content) From 36a53442821fbdf379e45c309906fdf0a6f30193 Mon Sep 17 00:00:00 2001 From: Aaron Kavlie Date: Wed, 18 Apr 2012 22:14:53 -0700 Subject: [PATCH 17/19] Beautify two-line string concat. --- pelican/tools/pelican_import.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pelican/tools/pelican_import.py b/pelican/tools/pelican_import.py index b45d4fec..fdf28d14 100755 --- a/pelican/tools/pelican_import.py +++ b/pelican/tools/pelican_import.py @@ -16,8 +16,8 @@ def wp2fields(xml): try: from BeautifulSoup import BeautifulStoneSoup except ImportError: - error = 'Missing dependency ' + \ - '"BeautifulSoup" required to import Wordpress XML files.' + error = ('Missing dependency ' + '"BeautifulSoup" required to import Wordpress XML files.') sys.exit(error) xmlfile = open(xml, encoding='utf-8').read() @@ -48,8 +48,8 @@ def dc2fields(file): try: from BeautifulSoup import BeautifulStoneSoup except ImportError: - error = 'Missing dependency ' + \ - '"BeautifulSoup" required to import Dotclear files.' + error = ('Missing dependency ' + '"BeautifulSoup" required to import Dotclear files.') sys.exit(error) From 5cad4c46f06963c58d43dbaf6e2f5addbec663ea Mon Sep 17 00:00:00 2001 From: Aaron Kavlie Date: Wed, 18 Apr 2012 22:17:43 -0700 Subject: [PATCH 18/19] Improve wording of docs re: pelican-import deps. --- docs/importer.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/importer.rst b/docs/importer.rst index 96e9e729..0147f900 100644 --- a/docs/importer.rst +++ b/docs/importer.rst @@ -22,8 +22,7 @@ supports Markdown). Dependencies """""""""""" -``pelican-import`` has two additional dependencies not included with pelican -by default: +``pelican-import`` has two dependencies not required by the rest of pelican: - BeautifulSoup - pandoc From 5710dc771d6951519eea5209f388fe17b79b973c Mon Sep 17 00:00:00 2001 From: Aaron Kavlie Date: Wed, 18 Apr 2012 22:28:49 -0700 Subject: [PATCH 19/19] Remove --no-wrap; change para formatting to unicode string. --- pelican/tools/pelican_import.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pelican/tools/pelican_import.py b/pelican/tools/pelican_import.py index fdf28d14..050b1010 100755 --- a/pelican/tools/pelican_import.py +++ b/pelican/tools/pelican_import.py @@ -227,12 +227,12 @@ def fields2pelican(fields, out_markup, output_path, dircat=False): # Replace newlines with paragraphs wrapped with

    so # HTML is valid before conversion paragraphs = content.split('\n\n') - paragraphs = ['

    {}

    '.format(p) for p in paragraphs] + paragraphs = [u'

    {}

    '.format(p) for p in paragraphs] new_content = ''.join(paragraphs) fp.write(content) - cmd = 'pandoc --normalize --no-wrap --reference-links --from=html --to={0} -o "{1}" "{2}"'.format( + cmd = 'pandoc --normalize --reference-links --from=html --to={0} -o "{1}" "{2}"'.format( out_markup, out_filename, html_filename) try: