Functions for reading a complexity.yml configuration file and doing various configuration-related things.
Given a configuration dict, returns the list of templates that were specified as unexpanded.
Reads and parses the complexity.yml configuration file from a directory, if one is present. :param directory: Directory to look for a complexity.yml file. :returns: A conf dict, or False if no complexity.yml is present.
All exceptions used in the Complexity code base are defined here.
Base exception class. All Complexity-specific exceptions subclass ComplexityException.
Raised when a project is missing a templates/ subdirectory.
Raised when a project’s templates/ directory contains a non-HTML file.
Functions for preparing a Complexity project for static site generation, before it actually happens.
Asks if it’s okay to delete output_dir/. If so, go ahead and delete it.
Parameters: output_dir (directory) – The Complexity output directory, e.g. www/.
Helper functions used throughout Complexity.
Ensures that a directory exists.
Parameters: path – A directory path.
Ask a yes/no question via raw_input() and return their answer.
- question – A string that is presented to the user.
- default – The presumed answer if the user just hits <Enter>. It must be “yes” (the default), “no” or None (meaning an answer is required of the user).
The “answer” return value is one of “yes” or “no”.
unicode_open(filename, *args, **kwargs)¶
Opens a file as usual on Python 3, and with UTF-8 encoding on Python 2.
Parameters: filename – Name of file to open.