From acde5d43f662d17231702f746986349e845550c3 Mon Sep 17 00:00:00 2001 From: "David P. Chassin" Date: Wed, 2 Oct 2024 10:25:24 -0700 Subject: [PATCH 1/3] Update pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 35c1e89..b7a1525 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ py-modules = [] [project] name = "qdox" -version = "0.0.0a0" +version = "0.0.0a1" description = "Generate quick documentation for a Python project on GitHub" authors = [ {name = "David P. Chassin "}, From 89f4ffa2cce7eed8b0d350946f659de931d4b847 Mon Sep 17 00:00:00 2001 From: "David P. Chassin" Date: Wed, 2 Oct 2024 10:25:33 -0700 Subject: [PATCH 2/3] Delete read.py --- read.py | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 read.py diff --git a/read.py b/read.py deleted file mode 100644 index e0fd684..0000000 --- a/read.py +++ /dev/null @@ -1,19 +0,0 @@ -import sys -import requests -import json - -def get_json(*args,**kwargs): - try: - with requests.get(*args,**kwargs) as res: - if res.status_code == 200: - return json.loads(res.text) - return dict(error="request failed",message=f"StatusCode:{res.status_code}") - except: - e_type, e_name, _ = sys.exc_info() - return dict(error="request failed",message=f"{e_type.__name__}={e_name}") - -# print(get_json("https://api.github.com/users/eudoxys")) - -print("\n".join([f"{x} --> {repr(y)}" for x,y in get_json("https://api.github.com/users/dchassin").items()])) - - From c68767f5bed1d7f14ea2382a8ba4e1f9533235ff Mon Sep 17 00:00:00 2001 From: "David P. Chassin" Date: Wed, 2 Oct 2024 10:30:10 -0700 Subject: [PATCH 3/3] Fix issue #2 --- docs/index.html | 6 +++--- qdox.py | 9 +++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/index.html b/docs/index.html index 10fb59e..173ead6 100644 --- a/docs/index.html +++ b/docs/index.html @@ -106,11 +106,11 @@

Returns

Properties

  • DEBUG (bool): enable debugging traceback on exception
  • -
  • WITHCSS (str): enable copying CSS file to `docs/`
  • +
  • WITHCSS (str): enable copying CSS file to docs/

Exceptions

-
  • Exception: exceptions are only raised if `DEBUG` is `True`.
  • +
    • Exception: exceptions are only raised if DEBUG is True.
    • FileNotFoundError: exception raised when an input file is not found.
    • QdoxError: exception raised when an invalid command argument is encountered.
    • @@ -120,7 +120,7 @@

      Python Constants

      E_ERROR = 1

      Package Metadata

      - + diff --git a/qdox.py b/qdox.py index 922109d..284151a 100644 --- a/qdox.py +++ b/qdox.py @@ -372,17 +372,18 @@ def get_mode(): write_html("

      ") elif line.startswith(" ") and line.strip().endswith(":"): set_mode(None) - write_html(f"""

      {line.strip()[:-1]}

      \n""") + write_html(f"""

      {line.strip()[:-1]}

      """,nl=True) elif line.startswith(" "): set_mode("ul") part = line.strip().split(":",1) if len(part) == 2: - write_html(f"
    • {part[0]}: {part[1]}
    • \n",md=False) + write_html(f"
    • {part[0]}: ",md=False,nl=False) + write_html(f"{part[1]}
    • ",nl=True) else: - write_html(f"
    • {part[0]}
    • \n",md=False) + write_html(f"
    • {part[0]}
    • ",md=True,nl=True) else: set_mode(None) - write_html(f"{line}\n") + write_html(f"{line}",md=True,nl=True) else: print(f"WARNING: function '{name}' has no __doc__") set_mode(None)
      Name:qdox
      Version:0.0.0a0
      Version:0.0.0a1
      Description:Generate quick documentation for a Python project on GitHub
      Authors:David P. Chassin
      Maintainers:David P. Chassin