Attempts to coerce val to a boolean value. This is largely based off of paste.deploy.converters.asbool() with a few stylistic tweaks added.
Raises a ValueError if the specified value cannot be coerced to a True or False value.
Path to an index page (index.html, typically). This function will parse the results into an lxml tree, call remove_links() on the resulting tree, and then convert it back to an HTML page.
Parameters: | index_path – Absolute path to the index file. This MUST already be created, and must be a file. |
---|---|
Returns: | An lxml formatted HTML page as a string, containing the final, filtered version of the page. If the file could not be opened, a 404 exception will be raised. |
Controller used to serve up a package listing.
Parameters: | package_name – Name of the Python package to retrieve and filter the simple page for. Capitalization matters, depending on your operating system–i.e., on Linux, pylons != Pylons. |
---|---|
Returns: | The raw simple page if the package was whitelisted, or a filtered page if it was not. |
Predicate used to filter external download links. Currently, the only config value is allowed_extensions.
Parameters: |
|
---|---|
Returns: | True if the external download link should be included in the output, False otherwise. |
Predicate used to filter home pages.
Parameters: |
|
---|---|
Returns: | True if the home page link should be included in the output, False otherwise. |
Predicate used to filter internal download links. Currently, the only config value is allowed_extensions.
Parameters: |
|
---|---|
Returns: | True if the internal download link should be included in the output, False otherwise. |