Skip to content

Commit 4c0be6d

Browse files
authored
Merge pull request #13 from jyje/develop
alpha5
2 parents fb5678e + 07d678e commit 4c0be6d

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

README.md

+14-2
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,22 @@
2222
### 1.1. Requirements
2323

2424
- Raspberry Pi (ARM64)
25+
- Python 3.8+
2526

2627
You should access the Raspberry Pi (ARM64) to run the following commands.
2728

28-
### 1.2. Run using Docker
29+
### 1.2. Install
30+
31+
```sh
32+
curl -fsSL https://raw.githubusercontent.com/jyje/pifanctl/main/install.sh -o install-pifanctl.sh
33+
chmod +x install-pifanctl.sh
34+
./install-pifanctl.sh
35+
rm install-pifanctl.sh
36+
```
37+
38+
After installation, you can use the following command to control the fan, `pifanctl --help`
39+
40+
### 1.3. Run using Docker
2941
```sh
3042
docker run -it ghcr.io/jyje/pifanctl:latest python main.py --help
3143
```
@@ -45,7 +57,7 @@ Currently, `--privileged` is required to access and control the GPIO pins.
4557
We will try to find a better solution in the future.
4658

4759

48-
### 1.3. Run using Source Code
60+
### 1.4. Run using Source Code
4961
```sh
5062
git clone https://github.com/jyje/pifanctl ~/.pifanctl
5163
cd ~/.pifanctl/sources

sources/main.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ def get_usage(self, ctx: typer.Context) -> str:
2323
context_settings = {"help_option_names": ["-h", "--help"]},
2424
help = """
2525
🥧 pifanctl: A CLI for PWM Fan Controlling of Raspberry Pi
26-
\n
27-
\nProject Page: https://github.com/jyje/pifanctl
26+
27+
Project Page: https://github.com/jyje/pifanctl
2828
"""
2929
)
3030

@@ -104,13 +104,15 @@ def common_callback(
104104

105105

106106
@app.command(
107+
cls = TyperGroup,
107108
help = "Show current status"
108109
)
109110
def status(ctx: typer.Context):
110111
router.status(state)
111112

112113

113114
@app.command(
115+
cls = TyperGroup,
114116
help = "Start fan control"
115117
)
116118
def start(
@@ -178,27 +180,31 @@ def start(
178180

179181

180182
@app.command(
183+
cls = TyperGroup,
181184
help = "Stop fan control"
182185
)
183186
def stop(ctx: typer.Context):
184187
router.stop(state)
185188

186189

187190
@app.command(
191+
cls = TyperGroup,
188192
help = "Set and enable fan control in system service"
189193
)
190194
def enable(ctx: typer.Context):
191195
router.enable(state)
192196

193197

194198
@app.command(
199+
cls = TyperGroup,
195200
help = "Disable fan control from system service"
196201
)
197202
def disable(ctx: typer.Context):
198203
router.disable(state)
199204

200205

201206
@app.command(
207+
cls = TyperGroup,
202208
help = "Manage a configuration of fan control"
203209
)
204210
def config(ctx: typer.Context):

0 commit comments

Comments
 (0)