Skip to content

Commit 0ec654d

Browse files
committed
formatting issues
1 parent b2d8278 commit 0ec654d

2 files changed

Lines changed: 20 additions & 12 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ Inspired by [wttr.in](https://github.com/chubin/wttr.in)
1717

1818
[Documentation](https://ryansurf.github.io/cli-surf/) | [Discord](https://discord.gg/He2UpxRuJP)
1919

20+
<p align="center">
21+
<img src="images/cli.gif" alt="cli-surf gif" style="width: 700px; height: auto;">
22+
</p>
23+
2024
## 💻 Usage
2125

2226
There are two ways to use cli-surf: install it as a CLI tool via pipx, or run the server and access it via API/browser.
@@ -33,10 +37,6 @@ surf --help
3337
surf --location scripps_pier --forecast 4
3438
```
3539

36-
<p align="center">
37-
<img src="images/cli.gif" alt="cli-surf gif" style="width: 700px; height: auto;">
38-
</p>
39-
4040
### Running the server and using via API
4141

4242
Start the server locally (see [Setup](#️-setup) below), then query it from your browser or CLI:

src/cli.py

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
Main module
33
"""
44

5+
import argparse
56
import logging
67
import sys
7-
import argparse
88

99
from src import api, helper, settings
1010
from src.db import operations
@@ -106,16 +106,22 @@ def _build_args_string(ns):
106106
if ns.imperial:
107107
tokens.append("imperial")
108108
flag_map = {
109-
"json": "json", "gpt": "gpt",
110-
"hide_wave": "hide_wave", "hide_uv": "hide_uv",
111-
"hide_height": "hide_height", "hide_direction": "hide_direction",
112-
"hide_period": "hide_period", "hide_location": "hide_location",
109+
"json": "json",
110+
"gpt": "gpt",
111+
"hide_wave": "hide_wave",
112+
"hide_uv": "hide_uv",
113+
"hide_height": "hide_height",
114+
"hide_direction": "hide_direction",
115+
"hide_period": "hide_period",
116+
"hide_location": "hide_location",
113117
"hide_date": "hide_date",
114-
"show_large_wave": "show_large_wave", "show_past_uv": "show_past_uv",
118+
"show_large_wave": "show_large_wave",
119+
"show_past_uv": "show_past_uv",
115120
"show_height_history": "show_height_history",
116121
"show_direction_history": "show_direction_history",
117122
"show_period_history": "show_period_history",
118-
"show_air_temp": "show_air_temp", "show_wind_speed": "show_wind_speed",
123+
"show_air_temp": "show_air_temp",
124+
"show_wind_speed": "show_wind_speed",
119125
"show_wind_direction": "show_wind_direction",
120126
"show_rain_sum": "show_rain_sum",
121127
"show_precipitation_prob": "show_precipitation_prob",
@@ -129,7 +135,9 @@ def _build_args_string(ns):
129135

130136

131137
def cli_main():
132-
parser = argparse.ArgumentParser(prog="surf", description="Get a surf report.")
138+
parser = argparse.ArgumentParser(
139+
prog="surf", description="Get a surf report."
140+
)
133141
parser.add_argument("--location", "--loc", metavar="LOCATION")
134142
parser.add_argument("--forecast", "--fc", type=int, metavar="DAYS")
135143
parser.add_argument("--decimal", "--dec", type=int, metavar="N")

0 commit comments

Comments
 (0)