liara.cmdline
¶
Module Contents¶
Classes¶
The command line environment. |
Functions¶
Build a site. |
|
Validate links. |
|
List all tags. |
|
Find pages by tag. |
|
Create a document. |
|
Create a default configuration. |
|
Create a quickstart project. |
|
List all content. |
|
Run a local development server. |
|
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.
- liara.cmdline.validate_links(env, link_type)¶
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 totree
, this will print the content as a tree. Ifformat
is set tolist
, 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.