From 86bbebde4a4816424cb00ea852dc35185253de43 Mon Sep 17 00:00:00 2001 From: Mohamed El Mouctar HAIDARA Date: Wed, 24 Apr 2024 01:24:30 +0200 Subject: [PATCH] fix: Only display mermaid live editor URL with -vv --- CHANGELOG.md | 6 +++++- ansibleplaybookgrapher/__init__.py | 2 +- ansibleplaybookgrapher/renderer/mermaid.py | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e9e564c5..885d0c22 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 2.2.1 (2024-04-24) + +fix: Only display mermaid live editor URL with the flag -vv + # 2.2.0 (2024-04-21) ## What's Changed @@ -5,7 +9,7 @@ * feat: Add support for hiding empty plays and plays without roles https://github.com/haidaraM/ansible-playbook-grapher/pull/177. * Add a new flag `--hide-empty-plays` to not show in the graph the plays that end up being empty after applying the filters. * Add a new flag `--hide-plays-without-roles` to not show in the graph the plays that end up with no roles. Only roles at the play level and include_role as tasks are considered (no import_role). -* Add support for viewing mermaid graphs in the browse with `--view --renderer mermaid-flowchart` in https://github.com/haidaraM/ansible-playbook-grapher/pull/181 +* Add support for viewing mermaid graphs in the browser with `--view --renderer mermaid-flowchart` in https://github.com/haidaraM/ansible-playbook-grapher/pull/181 * refactor(internal): `PlaybookNode.plays` is now a method instead of property. * refactor(internal): Do not access the `_compositions` in the child classes: use method from the CompositeNode. * chore(deps): update black requirement from ~=24.1 to ~=24.2 by @dependabot in https://github.com/haidaraM/ansible-playbook-grapher/pull/175 diff --git a/ansibleplaybookgrapher/__init__.py b/ansibleplaybookgrapher/__init__.py index 0bdfa4f7..0db80256 100644 --- a/ansibleplaybookgrapher/__init__.py +++ b/ansibleplaybookgrapher/__init__.py @@ -1,2 +1,2 @@ -__version__ = "2.2.0" +__version__ = "2.2.1" __prog__ = "ansible-playbook-grapher" diff --git a/ansibleplaybookgrapher/renderer/mermaid.py b/ansibleplaybookgrapher/renderer/mermaid.py index cfed1432..1d1fef2f 100644 --- a/ansibleplaybookgrapher/renderer/mermaid.py +++ b/ansibleplaybookgrapher/renderer/mermaid.py @@ -145,7 +145,7 @@ def view(mermaid_code: str): url_path = f'pako:{urlsafe_b64encode(compressed).decode("utf-8")}' url = f"https://mermaid.live/edit#{url_path}" - display.display(f"Mermaid live editor URL: {url}") + display.vvv(f"Mermaid live editor URL: {url}") # Display url using the default browser in a new tag webbrowser.open(url, new=2)