liara.cmdline

Module Contents

Classes

Environment

The command line environment.

Functions

cli

main

build

Build a site.

validate_links

Validate links.

list_tags

List all tags.

find_by_tag

Find pages by tag.

create

Create a document.

create_config

Create a default configuration.

quickstart

Create a quickstart project.

list_content

List all content.

serve

Run a local development server.

cache

Modify or inspect the cache.

Data

API

class liara.cmdline.Environment

The command line environment.

This provides access to global variables that are useful for command line commands, as well as a global liara instance.

Initialization

property liara: liara.Liara
liara.cmdline.pass_environment = 'make_pass_decorator(...)'
liara.cmdline.cli(env, debug: bool, verbose: bool, config, date: str)
liara.cmdline.main()
liara.cmdline.build(env, profile, profile_file, cache: bool, parallel: bool)

Build a site.

Validate links.

Checks all internal/external links for validity. For internal links, a check is performed if the link target exists. For external links, a web request is made to the link target. If the request returns an error code, the link is considered invalid.

liara.cmdline.list_tags(env)

List all tags.

This uses a metadata field named ‘tags’ and returns the union of all tags, as well as the count how often each tag is used.

liara.cmdline.find_by_tag(env, tags)

Find pages by tag.

This searches the metadata for a ‘tags’ field, which is assumed to be a list of tags.

liara.cmdline.create(env, object_type)

Create a document.

liara.cmdline.create_config(output)

Create a default configuration.

liara.cmdline.quickstart(template_backend)

Create a quickstart project.

liara.cmdline.list_content(env, format, content_type)

List all content.

If format is set to tree, this will print the content as a tree. If format is set to list, this will produce a flat list instead. JSON will print a JSON structure with information for each node.

liara.cmdline.serve(env, browser, port, cache)

Run a local development server.

liara.cmdline.cache(env, action)

Modify or inspect the cache.