Skip to content

Commit

Permalink
add experimental terminal user interface
Browse files Browse the repository at this point in the history
  • Loading branch information
keinsell committed Jan 24, 2025
1 parent 9ada68c commit 46cf46c
Show file tree
Hide file tree
Showing 81 changed files with 6,870 additions and 627 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -212,4 +212,5 @@ devenv.local.nix
/dev.db

# Enable persistance of database defs
!.idea/dataSources.xml
!.idea/dataSources.xml
/debug.log
30 changes: 17 additions & 13 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ version = "0.0.1-alpha.2"
edition = "2024"
repository = "https://github.com/keinsell/neuronek"
license-file = "LICENSE"
expand = ["sea-orm-migration/native"]

[[bin]]
name = "neuronek"
Expand All @@ -20,8 +21,8 @@ license = false
eula = false

[dependencies]
async-std = { version = "1.12.0", features = ["attributes", "async-global-executor", "async-process"] }
assert_cmd = "2.0.16"
async-std = { version = "1", features = ["attributes", "async-global-executor"] }
atty = "0.2.14"
chrono = { version = "0.4.39", features = ["std", "serde", "iana-time-zone", "rkyv"] }
chrono-english = "0.1.7"
Expand All @@ -34,7 +35,7 @@ delegate = "0.13.1"
derivative = "2.2.0"
directories = { version = "5.0.1" }
float-pretty-print = "0.1.1"
futures = "0.3.31"
futures = { version = "0.3.31", features = ["futures-executor", "thread-pool"] }
hashbrown = "0.15.2"
iso8601-duration = "0.2.0"
lazy_static = "1.5.0"
Expand All @@ -48,28 +49,31 @@ serde = { version = "1.0.216", features = ["derive", "std", "unstable"] }
tabled = { version = "0.17.0", features = ["std", "macros", "ansi", "derive", "tabled_derive"] }
typed-builder = "0.20.0"
sea-orm-migration = { version = "1.1.0", features = [
"runtime-async-std-rustls",
"sqlx-sqlite"
"sqlx-sqlite",
"runtime-async-std-rustls"
] }
serde_json = "1.0.134"
rstest = "0.24.0"
owo-colors = "4.1.0"
chrono-humanize = "0.2.3"
ratatui = { version = "0.26.0", features = ["all-widgets", "macros", "serde"] }
ratatui = { version = "0.26.1", features = ["all-widgets"] }
crossterm = "0.27.0"
async-trait = "0.1.85"
indicatif = "0.17.9"
tracing-subscriber = "0.3.19"
tracing-subscriber = "0.3.18"
tracing-indicatif = "0.3.8"
tracing = { version = "0.1.25", features = ["log", "std", "attributes", "valuable"] }
itertools = "0.13.0"
rayon = "1.10.0"
tracing = "0.1.40"
predicates = "3.1.3"
serde_with = "3.12.0"
serde_derive = "1.0.217"
thiserror = "2.0.11"
ratatui-textarea = "0.4.1"
regex = "1.11.1"
cached = {version = "0.54.0", features = ["disk_store", "async"]}
derive_more = {version = "1.0.0", features = ["full"]}
strum = "0.26.3"

[features]
# Enables the experimental TUI interface on `neuronek` binary.
experimental-tui = ["ratatui/all-widgets"]
default = ["tui"]
tui = []

[expand]
color = "always"
Expand Down
File renamed without changes.
14 changes: 14 additions & 0 deletions docs/reference/.widgets/area-chart.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Ingestion: Caffeine (Oral) - 200 mg - Started: 17:21 UTC

Cumulative Duration
| .
160| / \
| / \
120| / \
| / \
80| / \
| / \
40| / \
| / \
0 +-----+-----+----+-----+-------+
O C P CD A
8 changes: 8 additions & 0 deletions docs/reference/.widgets/horizontal-bar-chart.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Phase Durations (minutes):
Onset | █████ (5)
Come-up | ██████████ (10)
Peak | █████████████████████████████████████████ (45)
Comedown | ████████████████████████████████████ (39)
Afterglow | ████████████████████████████████████████████████████████████ (81)

Ingestion: Caffeine (Oral) - 200 mg - Started: 17:21 UTC
22 changes: 22 additions & 0 deletions docs/reference/.widgets/neuronek-welcome-screen.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
╭─────────────────────────────────────────────────────────────────────────╮
│ Home │ 2 Ingestions │ 0 Settings v0.0.1-alpha.2│
╰─────────────────────────────────────────────────────────────────────────╯
╭Home─────────────────────────────────────────────────────────────────────╮
│ │
│ │
│ │
│ ███▄ █ ▓█████ █ ██ ██▀███ ▒█████ ███▄ █ ▓█████ ██ ▄█ │
│ ██ ▀█ █ ▓█ ▀ ██ ▓██▒▓██ ▒ ██▒▒██▒ ██▒ ██ ▀█ █ ▓█ ▀ ██▄█▒ │
│ ▓██ ▀█ ██▒▒███ ▓██ ▒██░▓██ ░▄█ ▒▒██░ ██▒▓██ ▀█ ██▒▒███ ▓███▄░ │
│ ▓██▒ ▐▌██▒▒▓█ ▄ ▓▓█ ░██░▒██▀▀█▄ ▒██ ██░▓██▒ ▐▌██▒▒▓█ ▄ ▓██ █▄ │
│ ▒██░ ▓██░░▒████▒▒▒█████▓ ░██▓ ▒██▒░ ████▓▒░▒██░ ▓██░░▒████▒▒██▒ █ │
│ ░ ▒░ ▒ ▒ ░░ ▒░ ░░▒▓▒ ▒ ▒ ░ ▒▓ ░▒▓░░ ▒░▒░▒░ ░ ▒░ ▒ ▒ ░░ ▒░ ░▒ ▒▒ ▓ │
│ │
│ Press 2 to manage ingestions │
│ Press 0 to access settings │
│ Press ? for help │
│ │
│ │
│ │
│ │
╰─────────────────────────────────────────────────────────────────────────╯
15 changes: 15 additions & 0 deletions docs/reference/.widgets/oscilloscope.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Intensity
^
| High
| .
| / \__
| / \_______
| / \__
| / \
+-------------------------> Time
Onset Come-up Peak Comedown Afterglow

Current Phase: Peak
Intensity: █████▒░░░░ (Medium)
Overall Progress: [==============] 85%
Estimated End: 20:21 UTC
9 changes: 9 additions & 0 deletions docs/reference/.widgets/probabilistic-timeline.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Ingestion: Caffeine (Oral) - 200 mg - Started: 17:21 UTC

Phase Durations (Probabilistic):

Onset : [==--] (Most likely: Short)
Come-up : [--====-] (Most likely: Medium)
Peak : [-----======------] (Most likely: Around Average)
Comedown : [---=========------] (Most likely: Slightly Longer)
Afterglow : [-------===========---------] (Wide Range, Centered Around Average)
10 changes: 10 additions & 0 deletions docs/reference/.widgets/scatter-plot.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Ingestion: Caffeine (Oral) - 200 mg - Started: 17:21 UTC

Intensity
High ^
| *
|
Medium + *
|
Low +-----------> Time
Onset Come-up Peak Comedown Afterglow
Loading

0 comments on commit 46cf46c

Please sign in to comment.