added datetime integration
This commit is contained in:
@@ -46,6 +46,10 @@ Exported functions:
|
||||
- `reflow(text)`: split text into a list of lines not exceeding terminal width
|
||||
- `print_paged(text)`: reflow and print the text in a paginated manned, prompting for Enter presses to move to the next page
|
||||
|
||||
### `deck.time`
|
||||
|
||||
A wrapper for standard Python `date`, `time` and `datetime` modules. Just run `from deck.time import *` to activate.
|
||||
|
||||
### `deck.chat`
|
||||
|
||||
A generic chat UI helper library. Exports a single class called `DeckChat` with the following parameters:
|
||||
@@ -251,10 +255,10 @@ The foundational module set is going to at least include high-level capabilities
|
||||
- exposing low-level socket and HTTP APIs (done),
|
||||
- high-level HTTP APIs,
|
||||
- high-level LLM APIs (partially done),
|
||||
- date and time informaion,
|
||||
- date and time informaion (done),
|
||||
- file system manipulation (done),
|
||||
- text viewing and editing (done),
|
||||
- device information collection,
|
||||
- device information collection (partially done),
|
||||
- chat UI creation (done).
|
||||
|
||||
After all this is implemented, future phases may also include device-specific features like GPS, graphics, sound and touchscreen input.
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# Datetime wrapper for T-DeckARD
|
||||
# Usage: from deck.time import *
|
||||
# Created by Luxferre in 2025, released into public domain
|
||||
|
||||
try:
|
||||
from adafruit_datetime import datetime, date, time
|
||||
except:
|
||||
import datetime, date, time
|
||||
@@ -1,3 +1,4 @@
|
||||
adafruit_connection_manager>=3.1.6
|
||||
adafruit_requests>=4.1.15
|
||||
adafruit_bus_device>=5.2.14
|
||||
adafruit_datetime>=1.4.4
|
||||
|
||||
@@ -7,6 +7,7 @@ from deck.fs import unlock_rootfs, lock_rootfs, mount_sd, umount_sd, env, rnd
|
||||
from deck.fs import du, df, sep, pwd, ls, md, cd, rd, rm, mv, cp, sync
|
||||
from deck.input import input, input_multi
|
||||
from deck.pager import print_paged, term_size
|
||||
from deck.time import *
|
||||
from deck.hwinfo import board_id, battery_v
|
||||
from app.ed import edit, view
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user