Compare commits
2 commits
0f894f930a
...
996a9ab6d8
Author | SHA1 | Date | |
---|---|---|---|
996a9ab6d8 | |||
0edaa8da08 |
5 changed files with 18 additions and 2 deletions
|
@ -1,7 +1,12 @@
|
||||||
[package]
|
[package]
|
||||||
name = "meowlog"
|
name = "meowlog"
|
||||||
|
authors = ["xqtc"]
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
|
license = "MIT"
|
||||||
|
repository = "https://git.heroin.trade/xqtc/meowlog"
|
||||||
|
[package]
|
||||||
|
exclude = ["assets/", ".*"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
inquire = { version="0.7.5", features = ["date"] }
|
inquire = { version="0.7.5", features = ["date"] }
|
||||||
|
|
11
README.md
Normal file
11
README.md
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|

|
||||||
|
|
||||||
|
# meowlog
|
||||||
|
---
|
||||||
|
|
||||||
|
> Huge thanks to the people of [TripSit](https://tripsit.me) for letting me use their database on drugs. Go check them out. They're doing great things for harm reduction.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
BIN
assets/img.png
Normal file
BIN
assets/img.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 12 KiB |
BIN
ingestions.db
BIN
ingestions.db
Binary file not shown.
|
@ -329,7 +329,7 @@ pub fn edit_ingestion_entry(conn: &sqlite::Connection) -> Result<(), Box<dyn Err
|
||||||
let substance_data = &substances[&substance];
|
let substance_data = &substances[&substance];
|
||||||
|
|
||||||
// Extract routes of administration
|
// Extract routes of administration
|
||||||
let mut routes = Vec::new();
|
let routes: Vec<String>;
|
||||||
if let Some(formatted_dose) = substance_data["formatted_dose"].as_object() {
|
if let Some(formatted_dose) = substance_data["formatted_dose"].as_object() {
|
||||||
routes = formatted_dose.keys().map(|k| k.to_string()).collect();
|
routes = formatted_dose.keys().map(|k| k.to_string()).collect();
|
||||||
} else {
|
} else {
|
||||||
|
@ -371,7 +371,7 @@ pub fn edit_ingestion_entry(conn: &sqlite::Connection) -> Result<(), Box<dyn Err
|
||||||
.prompt()?;
|
.prompt()?;
|
||||||
|
|
||||||
// Ask for the ingestion time (default to the original)
|
// Ask for the ingestion time (default to the original)
|
||||||
let default_date = selected_entry.ingestion_time.date().naive_local();
|
let default_date = selected_entry.ingestion_time.date_naive();
|
||||||
let ingestion_date = DateSelect::new("Select ingestion date:")
|
let ingestion_date = DateSelect::new("Select ingestion date:")
|
||||||
.with_default(default_date)
|
.with_default(default_date)
|
||||||
.prompt()?;
|
.prompt()?;
|
||||||
|
|
Loading…
Add table
Reference in a new issue