docstring/util/browse,cat
This commit is contained in:
parent
87b39b4486
commit
42166a2c4e
1 changed files with 2 additions and 0 deletions
|
@ -14,6 +14,7 @@ def add_url_path(url: str, extra_path: str) -> str:
|
||||||
|
|
||||||
|
|
||||||
def browse(root: str) -> None:
|
def browse(root: str) -> None:
|
||||||
|
"""Frame the browsing of a root directory in the log output."""
|
||||||
paths = []
|
paths = []
|
||||||
for directory, _, files in os.walk(root):
|
for directory, _, files in os.walk(root):
|
||||||
for file in files:
|
for file in files:
|
||||||
|
@ -27,6 +28,7 @@ def browse(root: str) -> None:
|
||||||
|
|
||||||
|
|
||||||
def cat(file: str) -> None:
|
def cat(file: str) -> None:
|
||||||
|
"""Frame the content of a file in the log output."""
|
||||||
frame(file)
|
frame(file)
|
||||||
log.info(fs.read_file_text(file).rstrip())
|
log.info(fs.read_file_text(file).rstrip())
|
||||||
shut(file)
|
shut(file)
|
||||||
|
|
Loading…
Reference in a new issue