nikola.plugins package



nikola.plugins.basic_import module

Mixin for importer plugins.

class nikola.plugins.basic_import.ImportMixin

Bases: :class:`object`

Mixin with common used methods.

cmd_options = [{'name': 'output_folder', 'short': 'o', 'default': 'new_site', 'help': 'Location to write imported content.', 'long': 'output-folder'}]
static configure_redirections(url_map, base_dir='')

Configure redirections from an url_map.

doc_purpose = 'import a dump from a different engine.'
doc_usage = '[options] export_file'

Generate a base Nikola site.

classmethod get_channel_from_file(filename)

Get channel from XML file.


Get path for the output configuration file.

name = 'import_mixin'
needs_config = False
static populate_context(channel)

Populate context with settings.

classmethod transform_content(content)

Transform content to a Nikola-friendly format.

static write_configuration(filename, rendered_template)

Write the configuration file.

classmethod write_content(filename, content, rewrite_html=True)

Write content to file.

write_metadata(filename, title, slug, post_date, description, tags, **kwargs)

Write metadata to meta file.

classmethod write_post(filename, content, headers, compiler, rewrite_html=True)

Ask the specified compiler to write the post to disk.

static write_urlmap_csv(output_file, url_map)

Write urlmap to csv file.


Replace links.

Module contents

Plugins for Nikola.