aboutsummaryrefslogtreecommitdiffstats
path: root/nikola/plugins/command/import_feed.py
diff options
context:
space:
mode:
authorLibravatarAgustin Henze <tin@sluc.org.ar>2014-03-09 03:14:40 +0100
committerLibravatarAgustin Henze <tin@sluc.org.ar>2014-03-09 03:14:40 +0100
commitfa50632a9d87c3989566fed3e49c160a132e0d14 (patch)
tree81f58cc0dcfbb34710856b59c034bc47c53d91dc /nikola/plugins/command/import_feed.py
parent2828399ba5cbb14502b023d4de1ba02f13dd5055 (diff)
Imported Upstream version 6.4.0upstream/6.4.0
Diffstat (limited to 'nikola/plugins/command/import_feed.py')
-rw-r--r--nikola/plugins/command/import_feed.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/nikola/plugins/command/import_feed.py b/nikola/plugins/command/import_feed.py
index 70a5cd5..ee59277 100644
--- a/nikola/plugins/command/import_feed.py
+++ b/nikola/plugins/command/import_feed.py
@@ -43,6 +43,7 @@ from nikola.plugin_categories import Command
from nikola import utils
from nikola.utils import req_missing
from nikola.plugins.basic_import import ImportMixin
+from nikola.plugins.command.init import SAMPLE_CONF, prepare_config
LOGGER = utils.get_logger('import_feed', utils.STDERR_HANDLER)
@@ -82,7 +83,7 @@ class CommandImportFeed(Command, ImportMixin):
self.import_posts(channel)
self.write_configuration(self.get_configuration_output_path(
- ), conf_template.render(**self.context))
+ ), conf_template.render(**prepare_config(self.context)))
@classmethod
def get_channel_from_file(cls, filename):
@@ -90,7 +91,7 @@ class CommandImportFeed(Command, ImportMixin):
@staticmethod
def populate_context(channel):
- context = {}
+ context = SAMPLE_CONF.copy()
context['DEFAULT_LANG'] = channel.feed.title_detail.language \
if channel.feed.title_detail.language else 'en'
context['BLOG_TITLE'] = channel.feed.title
@@ -100,9 +101,11 @@ class CommandImportFeed(Command, ImportMixin):
context['BLOG_EMAIL'] = channel.feed.author_detail.get('email', '') if 'author_detail' in channel.feed else ''
context['BLOG_AUTHOR'] = channel.feed.author_detail.get('name', '') if 'author_detail' in channel.feed else ''
- context['POST_PAGES'] = '''(
- ("posts/*.html", "posts", "post.tmpl", True),
- ("stories/*.html", "stories", "story.tmpl", False),
+ context['POSTS'] = '''(
+ ("posts/*.html", "posts", "post.tmpl"),
+ )'''
+ context['PAGES'] = '''(
+ ("stories/*.html", "stories", "story.tmpl"),
)'''
context['COMPILERS'] = '''{
"rest": ('.txt', '.rst'),