Added dark mode (#1447)

* Added dark mode

* Added docs
This commit is contained in:
Colin Delahunty
2022-03-08 05:00:55 -05:00
committed by GitHub
parent 0aa21d732c
commit 05370fc09f
6 changed files with 18 additions and 2 deletions

View File

@@ -98,6 +98,14 @@ def create_call(other_args: List[str], name: str, filename: str = None) -> None:
dest="input",
help="Skips confirmation to run server.",
)
parser.add_argument(
"-d",
"--dark",
action="store_true",
default=False,
dest="dark",
help="Whether to show voila in dark mode",
)
ns_parser = parse_known_args_and_warn(parser, other_args)
@@ -111,9 +119,12 @@ def create_call(other_args: List[str], name: str, filename: str = None) -> None:
f"Warning: opens a port on your computer to run a {cmd} server."
)
response = input("Would you like us to run the server for you? y/n\n")
args = ""
if ns_parser.dark and not ns_parser.jupyter:
args += "--theme=dark"
if ns_parser.input or response.lower() == "y":
subprocess.Popen(
f"{cmd} {file}",
f"{cmd} {file} {args}",
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
shell=True,

View File

@@ -7,6 +7,7 @@ Opens a voila dashboard showing option chain information for a given ticker and
```
optional arguments:
-j, --jupyter opens in jupyterlab instead of voila (default: False)
-d, --dark runs voila in dark mode (default: False)
-n, --no-input does not ask the user if it can open a server (default: False)
-h, --help show this help message
```

View File

@@ -7,6 +7,7 @@ Opens a voila dashboard showing the correlations between stocks
```
optional arguments:
-j, --jupyter opens in jupyterlab instead of voila (default: False)
-d, --dark runs voila in dark mode (default: False)
-n, --no-input does not ask the user if it can open a server (default: False)
-h, --help show this help message
```

View File

@@ -7,6 +7,7 @@ Shows shortdata dashboard
```
optional arguments:
-j, --jupyter opens in jupyterlab instead of voila (default: False)
-d, --dark runs voila in dark mode (default: False)
-n, --no-input does not ask the user if it can open a server (default: False)
-h, --help show this help message
-h, --help show this (help message
```

View File

@@ -7,6 +7,7 @@ Opens a voila dashboard showing historical data for stocks
```
optional arguments:
-j, --jupyter opens in jupyterlab instead of voila (default: False)
-d, --dark runs voila in dark mode (default: False)
-n, --no-input does not ask the user if it can open a server (default: False)
-h, --help show this help message
```

View File

@@ -7,6 +7,7 @@ Shows the volatility surface for options
```
optional arguments:
-j, --jupyter opens in jupyterlab instead of voila (default: False)
-d, --dark runs voila in dark mode (default: False)
-n, --no-input does not ask the user if it can open a server (default: False)
-h, --help show this help message
```