almanac.shortcuts

async back()int[source]

Change to the previous directory in the page navigation history.

async forward()int[source]

Change to the next directory in the page navigation history.

async help()int[source]

Print help text about the current page or a command.

async pwd()int[source]

Print the current directory.

async quit()int[source]

Quit the application.

async hook_BaseArgumentError(exc: almanac.errors.argument_errors.BaseArgumentError)[source]
async hook_BasePageError(exc: almanac.errors.page_errors.BasePageError)[source]
async hook_MissingArgumentsError(exc: almanac.errors.argument_errors.MissingArgumentsError)[source]
async hook_NoSuchArgumentError(exc: almanac.errors.argument_errors.NoSuchArgumentError)[source]
async hook_NoSuchCommandError(exc: almanac.errors.command_errors.NoSuchCommandError)[source]
async hook_TooManyPositionalArgumentsError(exc: almanac.errors.argument_errors.TooManyPositionalArgumentsError)[source]
async hook_UnknownArgumentBindingError(exc: almanac.errors.argument_errors.UnknownArgumentBindingError)[source]
promote_to_page_path(raw_path: Any)almanac.pages.page_path.PagePath[source]

Attempt to promote an argument into a page path.

This promoter will attempt to explode the specified argument into an absolute path. As such, any exceptions from PageNavigator.explode() can also be raised from this function.

make_standard_app(*, with_completion: bool = True, with_pages: bool = True, with_style: bool = True, style: prompt_toolkit.styles.style.Style = <prompt_toolkit.styles.style.Style object>, io_context_cls: Type[almanac.io.abstract_io_context.AbstractIoContext] = <class 'almanac.io.standard_console_io_context.StandardConsoleIoContext'>, propagate_runtime_exceptions: bool = False, print_all_exception_tracebacks: bool = False, print_unknown_exception_tracebacks: bool = True)almanac.core.application.Application[source]

Instantiate and configure a standard application.

When pages enabled, file-related commands will be registered on the returned Application instance. Otherwise, only a few barebones commands are registered (quit, help, etc.).