fault.format

Color formatting for file paths, URIs, and timestamps.

os
import

palette
import

route_colors
data

route_colors = {
	'filesystem-root': 0xfafafa,
	'warning': palette.colors['yellow'],

	'directory': palette.colors['blue'],
	'relatives': 0xff0000,
	'executable': palette.colors['green'],
	'data': 0xc6c6c6,

	'dot-file': palette.colors['gray'],
	'file-not-found': palette.colors['red'],

	'link': palette.colors['violet'],
	'device': 0xff5f00,
	'socket': 0xff5f00,
	'pipe': 0xff5f00,

	'path-separator': palette.colors['background-adjacent'],
	'path-directory': palette.colors['gray'],
	'path-link': palette.colors['violet'],

	None: None,
}

_f_route_path
function

_f_route_path(root, route)

f_route_path
function

f_route_path(root, route)

f_route_identifier
function

f_route_identifier(route)

f_route_absolute
function

f_route_absolute(route)

Format the absolute path of the given route.

f_route_absolute_colors
function

f_route_absolute_colors(route)