nikola.plugins package

Subpackages

Submodules

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 = [{'default': 'new_site', 'help': 'Location to write imported content.', 'long': 'output-folder', 'name': 'output_folder', 'short': 'o'}]
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_base_site()

Generate a base Nikola site.

classmethod get_channel_from_file(filename)

Get channel from XML file.

get_configuration_output_path()

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.

nikola.plugins.basic_import.replacer(dst)

Replace links.

Module contents

Plugins for Nikola.