From 9a304faa00b3aaddb79149845ec7e8a6af55946b Mon Sep 17 00:00:00 2001 From: fordg1 Date: Tue, 28 Apr 2026 11:27:47 -0400 Subject: [PATCH] docs: enhance getting started guide with example output and image reference --- docs/source/intro/getting_started.rst | 6 ++++++ src/ria_toolkit_oss/view/tools.py | 21 ++++++++++----------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/docs/source/intro/getting_started.rst b/docs/source/intro/getting_started.rst index 43b0724..b07f1a3 100644 --- a/docs/source/intro/getting_started.rst +++ b/docs/source/intro/getting_started.rst @@ -413,6 +413,12 @@ Device selection (``--device``) is optional if only one device is detected. Exac ria view capture.npy --type full --title "Test Capture" --format pdf ria view capture.npy --show --no-save ria view old.npy --legacy --type simple + ria view recordings\qam64_35.npy --type simple + +.. figure:: ../images/qam64_35.png + :alt: Example output of ria view recordings\qam64_35.npy --type simple + + Output of ``ria view recordings\qam64_35.npy --type simple`` .. _cmd-annotate: diff --git a/src/ria_toolkit_oss/view/tools.py b/src/ria_toolkit_oss/view/tools.py index 49ce451..974219a 100644 --- a/src/ria_toolkit_oss/view/tools.py +++ b/src/ria_toolkit_oss/view/tools.py @@ -32,16 +32,15 @@ def extract_metadata_fields(metadata): def set_path(output_path): - split_path = output_path.split("/") - - if len(split_path) == 1: - folder = "images" - file = split_path[0] - elif len(split_path) > 2: - file = split_path[-1] - folder = "/".join(split_path[:-1]) + path = pathlib.Path(output_path) + + # If only filename provided (no directory), use default 'images' folder + if len(path.parts) == 1: + folder = pathlib.Path("images") + file = path.name else: - folder, file = split_path + folder = path.parent + file = path.name split_file = file.split(".") if len(split_file) == 2: @@ -53,5 +52,5 @@ def set_path(output_path): extension = "png" file = file + ".png" - pathlib.Path(folder).mkdir(parents=True, exist_ok=True) - return "/".join([folder, file]), extension + folder.mkdir(parents=True, exist_ok=True) + return str(folder / file), extension