Compare commits

...

2 commits

Author SHA1 Message Date
996a9ab6d8
Metadata for publishing 2025-04-03 17:51:13 +02:00
0edaa8da08
eliminate warnings 2025-04-03 17:44:26 +02:00
5 changed files with 18 additions and 2 deletions

View file

@ -1,7 +1,12 @@
[package]
name = "meowlog"
authors = ["xqtc"]
version = "0.1.0"
edition = "2024"
license = "MIT"
repository = "https://git.heroin.trade/xqtc/meowlog"
[package]
exclude = ["assets/", ".*"]
[dependencies]
inquire = { version="0.7.5", features = ["date"] }

11
README.md Normal file
View file

@ -0,0 +1,11 @@
![img.png](assets/img.png)
# 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

Binary file not shown.

After

(image error) Size: 12 KiB

Binary file not shown.

View file

@ -329,7 +329,7 @@ pub fn edit_ingestion_entry(conn: &sqlite::Connection) -> Result<(), Box<dyn Err
let substance_data = &substances[&substance];
// Extract routes of administration
let mut routes = Vec::new();
let routes: Vec<String>;
if let Some(formatted_dose) = substance_data["formatted_dose"].as_object() {
routes = formatted_dose.keys().map(|k| k.to_string()).collect();
} else {
@ -371,7 +371,7 @@ pub fn edit_ingestion_entry(conn: &sqlite::Connection) -> Result<(), Box<dyn Err
.prompt()?;
// 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:")
.with_default(default_date)
.prompt()?;