From 496c5264342a39eccee5ffb0d16c4378ef4852b7 Mon Sep 17 00:00:00 2001 From: Marijn Doeve Date: Mon, 14 Feb 2022 19:20:34 +0100 Subject: [PATCH 1/4] wsl path --- check50/__main__.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/check50/__main__.py b/check50/__main__.py index 4af642d..bbd62c4 100644 --- a/check50/__main__.py +++ b/check50/__main__.py @@ -7,6 +7,7 @@ import itertools import logging import os +import platform import site from pathlib import Path import shutil @@ -18,6 +19,7 @@ import attr import lib50 +from matplotlib.pyplot import stem import requests import termcolor @@ -398,7 +400,13 @@ def main(): html = renderer.to_html(**results) with tempfile.NamedTemporaryFile(mode="w", delete=False, suffix=".html") as html_file: html_file.write(html) - url = f"file://{html_file.name}" + + if "microsoft-standard" in platform.uname().release: + stream = os.popen(f"wslpath -w {html_file.name}") + wsl_path = stream.read().strip() + url = f"file://{wsl_path}" + else: + url = f"file://{html_file.name}" else: url = f"https://submit.cs50.io/check50/{tag_hash}" From a5f01a3802e59a3319bf573ca5ab2434eb29b017 Mon Sep 17 00:00:00 2001 From: Marijn Doeve Date: Mon, 14 Feb 2022 19:28:15 +0100 Subject: [PATCH 2/4] Remove accidental import --- check50/__main__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/check50/__main__.py b/check50/__main__.py index bbd62c4..db7520f 100644 --- a/check50/__main__.py +++ b/check50/__main__.py @@ -19,7 +19,6 @@ import attr import lib50 -from matplotlib.pyplot import stem import requests import termcolor From 08d9a4e42d9105041f98cb4a03fa76f87fb107c5 Mon Sep 17 00:00:00 2001 From: Marijn Doeve Date: Mon, 14 Feb 2022 23:11:09 +0100 Subject: [PATCH 3/4] forward slash --- check50/__main__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check50/__main__.py b/check50/__main__.py index db7520f..7ee4092 100644 --- a/check50/__main__.py +++ b/check50/__main__.py @@ -401,7 +401,7 @@ def main(): html_file.write(html) if "microsoft-standard" in platform.uname().release: - stream = os.popen(f"wslpath -w {html_file.name}") + stream = os.popen(f"wslpath -m {html_file.name}") wsl_path = stream.read().strip() url = f"file://{wsl_path}" else: From 679598b49ac37676cf467e79833654d15d96b08e Mon Sep 17 00:00:00 2001 From: Rongxin Liu Date: Tue, 20 Sep 2022 23:07:49 -0400 Subject: [PATCH 4/4] bumped version number --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index be7eb33..5c05fb8 100644 --- a/setup.py +++ b/setup.py @@ -29,6 +29,6 @@ "console_scripts": ["check50=check50.__main__:main"] }, url="https://github.com/cs50/check50", - version="3.3.6", + version="3.3.7", include_package_data=True )