diff options
Diffstat (limited to 'tools/example_gallery/main.py')
-rw-r--r-- | tools/example_gallery/main.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/example_gallery/main.py b/tools/example_gallery/main.py index 291514ab0..3dab597f2 100644 --- a/tools/example_gallery/main.py +++ b/tools/example_gallery/main.py @@ -180,10 +180,10 @@ def get_code_tabs(files, project_dir): def get_header_title(example_dir): - _title = str(example_dir) _index = example_dir.parts.index("examples") - url_name = "/".join(example_dir.parts[_index + 1:]) - url = f"{BASE_URL}/{url_name}" + rel_path = "/".join(example_dir.parts[_index:]) + _title = rel_path + url = f"{BASE_URL}/{rel_path}" return ( "..\n This file was auto-generated by the 'examples_gallery' " "script.\n Any change will be lost!\n\n" @@ -198,7 +198,7 @@ if __name__ == "__main__": DIR = Path(__file__).parent EXAMPLES_DOC = Path(f"{DIR}/../../sources/pyside6/doc/examples").resolve() EXAMPLES_DIR = Path(f"{DIR}/../../examples/").resolve() - BASE_URL = "https://code.qt.io/cgit/pyside/pyside-setup.git/tree/examples" + BASE_URL = "https://code.qt.io/cgit/pyside/pyside-setup.git/tree" columns = 5 gallery = "" |