pkgindex
Generate package indexes (meta-plugin)
To install, run nikola plugin -i pkgindex
Package Indexes
A set of Nikola plugins to facilitate creation of package indexes. This plugin
depends on pkgindex_compiler
, pkgindex_scan
and pkgindex_zip
, which
implement the real functionality.
Package indexes are sites like https://plugins.getnikola.com/. They provide both a human-friendly interface (website), and a computer-friendly interface (JSON file). The generated package indexes are compatible with Nikola’s plugin and theme install features; however, they can be modified to work with any other packaging system (with some Python code modification).
Users
- Nikola Plugins — uses default plugin set (source)
- Nikola Themes — uses default plugin set and a custom plugin for screenshots and demos (source)
Suggested Configuration:
# Directories to use for package indexes. This is a dictionary mapping input # directory to a tuple of (destination, template name) PKGINDEX_DIRS = { 'v7': ('v7', 'plugin.tmpl') } # Handlers for metadata. # Built-in handlers: # * dirname_as_title takes post title (package name) from directory name # * parse_plugin_file parse .plugin file and other Nikola-specific data # (used on plugins.getnikola.com) # * parse_theme_info parse files related to Nikola themes # (used on themes.getnikola.com) # * add_category add category meta data (useful with functools.partial) # You may add custom callables to those lists. PKGINDEX_HANDLERS = { 'v7': ['dirname_as_title', 'parse_plugin_file'] } # Configuration variables. They are used by handlers and plugins -- the default # Nikola set (parse_plugin_file) needs a list of versions that have plugins for them. # The 'extension' key is mandatory and is used to find pkgindex_compiler -- it # must be COMPILERS['pkgindex_compiler'][0]. PKGINDEX_CONFIG = { 'extension': '.plugin', 'versions_supported': [7], 'json_filename': 'plugins.json', } # Required supporting config. You may change `.plugin` to anything else. POSTS = ( ("posts/*.plugin", "posts", "post.tmpl"), ("posts/*.md", "posts", "post.tmpl"), ) COMPILERS = { "markdown": ('.md', '.mdown', '.markdown'), "pkgindex_compiler": ('.plugin',), }
Requirements:
- pkgindex_compiler (Nikola plugin)
- pkgindex_scan (Nikola plugin)
- pkgindex_zip (Nikola plugin)
Issues? Questions?
You can report issues with this plugin and request help via GitHub Issues.