Skip to content
Browse files
  • Loading branch information
ralsina committed May 9, 2015
1 parent 94ed9f7 commit 597732df06714176c1e54a7692829aac4b8f9e64
Showing 3 changed files with 13 additions and 6 deletions.
@@ -1358,8 +1358,8 @@ def scan_posts(self):
# Why doesn't getPluginByName work????
if self._scanned:
p = [p for p in self.plugin_manager.getPluginsOfCategory('Task') if == 'scan_posts'][0]
for p in self.plugin_manager.getPluginsOfCategory('PostScanner'):

def generic_page_renderer(self, lang, post, filters):
"""Render post fragments to final HTML pages."""
@@ -79,6 +79,13 @@ def inject_dependency(self, target, dependency):
"""Add 'dependency' to the target task's task_deps"""[target].append(dependency)

class PostScanner(BasePlugin):
"""The scan method of these plugins is called by Nikola.scan_posts."""

def scan(self):
"""Load posts into the timeline."""
raise NotImplementedError()

class Command(BasePlugin, DoitCommand):
"""These plugins are exposed via the command line.
@@ -32,17 +32,17 @@

from blinker import signal

from nikola.plugin_categories import Task
from nikola.plugin_categories import PostScanner
from nikola import utils
from import Post

class ScanPosts(Task):
class ScanPosts(PostScanner):
"""Render pages into output."""

name = "scan_posts"

def gen_tasks(self):
def scan(self):
"""Build final pages from metadata and HTML fragments."""
kw = {
@@ -73,7 +73,7 @@ def gen_tasks(self):
if not
print(".", end='', file=sys.stderr)
dirname = os.path.dirname(wildcard)
for dirpath, _, _ in os.walk(dirname, followlinks=True):
for dirpath, _, _ in os.walk(dirname, followlinks=True ):
dest_dir = os.path.normpath(os.path.join(destination,
os.path.relpath(dirpath, dirname))) # output/destination/foo/
# Get all the untranslated paths

0 comments on commit 597732d

Please sign in to comment.