Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Html output debug #37

Merged
merged 2 commits into from
Jul 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## Unreleased

### Feat

- Add console size as args

## v0.9.3 (2023-05-15)

### Fix
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ hardeneks [OPTIONS]
* `--export-html TEXT`: Export the report in html format
* `--export-json TEXT`: Export the report in json format
* `--insecure-skip-tls-verify`: Skip TLS verification
* `--width`: Width of the output (defaults to terminal size)
* `--height`: Height of the output (defaults to terminal size)
* `--help`: Show this message and exit.


Expand Down
14 changes: 14 additions & 0 deletions hardeneks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,13 @@ def run_hardeneks(
False,
"--insecure-skip-tls-verify",
),
width: int = typer.Option(
default=None, help="Width of the console (defaults to terminal width)"
),
height: int = typer.Option(
default=None,
help="Height of the console (defaults to terminal height)",
),
):
"""
Main entry point to hardeneks.
Expand All @@ -183,6 +190,8 @@ def run_hardeneks(
export-html (str): Export the report in html format
export-json (str): Export the report in json format
insecure-skip-tls-verify (str): Skip tls verification
width (int): Output width
height (int): Output height

Returns:
None
Expand All @@ -194,6 +203,11 @@ def run_hardeneks(
# should pass in config file
kubernetes.config.load_kube_config(context=context)

if width:
console.width = width
if height:
console.height = height

context = _get_current_context(context)

if not cluster:
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "hardeneks"
version = "0.9.3"
version = "0.10.0"
description = ""
authors = ["Doruk Ozturk <[email protected]>"]
readme = "README.md"
Expand Down Expand Up @@ -41,7 +41,7 @@ exclude = '''

[tool.commitizen]
name = "cz_conventional_commits"
version = "0.9.3"
version = "0.10.0"
version_files = [
"pyproject.toml:[tool.commitizen]\nversion",
"pyproject.toml:[tool.poetry]\nname = \"commitizen\"\nversion",
Expand Down