File tree 2 files changed +22
-4
lines changed
2 files changed +22
-4
lines changed Original file line number Diff line number Diff line change 22
22
### 1.1. Requirements
23
23
24
24
- Raspberry Pi (ARM64)
25
+ - Python 3.8+
25
26
26
27
You should access the Raspberry Pi (ARM64) to run the following commands.
27
28
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
29
41
``` sh
30
42
docker run -it ghcr.io/jyje/pifanctl:latest python main.py --help
31
43
```
@@ -45,7 +57,7 @@ Currently, `--privileged` is required to access and control the GPIO pins.
45
57
We will try to find a better solution in the future.
46
58
47
59
48
- ### 1.3 . Run using Source Code
60
+ ### 1.4 . Run using Source Code
49
61
``` sh
50
62
git clone https://github.com/jyje/pifanctl ~ /.pifanctl
51
63
cd ~ /.pifanctl/sources
Original file line number Diff line number Diff line change @@ -23,8 +23,8 @@ def get_usage(self, ctx: typer.Context) -> str:
23
23
context_settings = {"help_option_names" : ["-h" , "--help" ]},
24
24
help = """
25
25
🥧 pifanctl: A CLI for PWM Fan Controlling of Raspberry Pi
26
- \n
27
- \n Project Page: https://github.com/jyje/pifanctl
26
+
27
+ Project Page: https://github.com/jyje/pifanctl
28
28
"""
29
29
)
30
30
@@ -104,13 +104,15 @@ def common_callback(
104
104
105
105
106
106
@app .command (
107
+ cls = TyperGroup ,
107
108
help = "Show current status"
108
109
)
109
110
def status (ctx : typer .Context ):
110
111
router .status (state )
111
112
112
113
113
114
@app .command (
115
+ cls = TyperGroup ,
114
116
help = "Start fan control"
115
117
)
116
118
def start (
@@ -178,27 +180,31 @@ def start(
178
180
179
181
180
182
@app .command (
183
+ cls = TyperGroup ,
181
184
help = "Stop fan control"
182
185
)
183
186
def stop (ctx : typer .Context ):
184
187
router .stop (state )
185
188
186
189
187
190
@app .command (
191
+ cls = TyperGroup ,
188
192
help = "Set and enable fan control in system service"
189
193
)
190
194
def enable (ctx : typer .Context ):
191
195
router .enable (state )
192
196
193
197
194
198
@app .command (
199
+ cls = TyperGroup ,
195
200
help = "Disable fan control from system service"
196
201
)
197
202
def disable (ctx : typer .Context ):
198
203
router .disable (state )
199
204
200
205
201
206
@app .command (
207
+ cls = TyperGroup ,
202
208
help = "Manage a configuration of fan control"
203
209
)
204
210
def config (ctx : typer .Context ):
You can’t perform that action at this time.
0 commit comments