Skip to content

Commit e1f015b

Browse files
committed
Flush out examples in readme
1 parent ad8e2be commit e1f015b

File tree

3 files changed

+18
-9
lines changed

3 files changed

+18
-9
lines changed

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,26 @@ if ! type pip &> /dev/null; then
77
opkg update
88
opkg install python3-pip
99
fi
10-
pip install --force-reinstall /tmp/liboxide-0.0.1-py3-none-any.whl
10+
pip install --force-reinstall /tmp/liboxide-0.1.0-py3-none-any.whl
1111
endef
1212
export SCRIPT
1313

14-
dist/liboxide-0.0.1.tar.gz: $(shell find liboxide -type f)
14+
dist/liboxide-0.1.0.tar.gz: $(shell find liboxide -type f)
1515
python -m build --sdist
1616

17-
dist/liboxide-0.0.1-py3-none-any.whl: $(shell find liboxide -type f)
17+
dist/liboxide-0.1.0-py3-none-any.whl: $(shell find liboxide -type f)
1818
python -m build --wheel
1919

2020
clean:
2121
git clean --force -dX
2222

23-
deploy: dist/liboxide-0.0.1-py3-none-any.whl
24-
rsync dist/liboxide-0.0.1-py3-none-any.whl [email protected]:/tmp
23+
deploy: dist/liboxide-0.1.0-py3-none-any.whl
24+
rsync dist/liboxide-0.1.0-py3-none-any.whl [email protected]:/tmp
2525

2626
install: deploy
2727
echo -e "$$SCRIPT" | ssh [email protected] bash -le
2828

2929
test: install
30-
cat test.py | ssh [email protected] /opt/bin/python
30+
cat test.py | ssh [email protected] /opt/bin/python -u
3131

3232
.PHONY: clean install test deploy

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,12 @@ liboxide.wifi.enable()
2121
print("Applications:")
2222
for name, app in liboxide.apps.applications.items():
2323
print(f" {name}: {app.bin}")
24+
25+
autoLock = liboxide.settings.get("autoLock")
26+
print("Automatically locking after {autoLock} minutes")
27+
28+
print(f"Battery level: {liboxide.power.batteryLevel}")
29+
while True:
30+
batteryLevel = liboxide.power.on.batteryLevelChanged()
31+
print(f"Battery level: {batteryLevel}")
2432
```

test.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
print(f"Lockscreen App: {app.displayName}")
1919
autoLock = liboxide.settings.get("autoLock")
2020
print(f"Automatic lock: {autoLock} minutes")
21-
liboxide.wifi.scan(False)
22-
bss = liboxide.wifi.on.bssFound()
23-
print(f"Found BSS for SSID: {bss.ssid}")
21+
print(f"Battery level: {liboxide.power.batteryLevel}")
22+
while True:
23+
batteryLevel = liboxide.power.on.batteryLevelChanged()
24+
print(f"Battery level: {batteryLevel}")

0 commit comments

Comments
 (0)