Activity

DETALEX

What is new

Tui

better colors

colors are naw better and same in all terminals

If your window is too small TuiWeather will tell you so

if error show up program will shutdown propellery

Attachment
0
DETALEX

What is new

Tui

I almost finished making user interface (colors are steel bad)

Main widget with weather shows more information

created better wind widget and widget witch arrow that shows wind direction

Settings

added settings in witch you can change units of measurement

added to AUR

if you are on Arch based distribution of gnu/linux
you can download not complited version of my application from Arch user repository

bug fix

now my app won’t crush if you dont have internet connection

Attachment
0
DETALEX

What is new

Tui

My app finale have usear interface ( note: Colors are placecholders)

Popups

i created popups for typing in location and exiting

Battery

i created battery level indicator ( in response to Adam Duda question)

Hints

My app have some note that is suppose to help users

What next

better collors

I will change collors to 1) better looking 2) same acros all terminals

Settings

i will add popup in witch you will be able to change for example units like °C

Attachment
0
DETALEX

What is new

naw my app is usable.

i added location search mechanism.

pub fn get_location(path: PathBuf, query: &str, ) -> Result<Option<Location>, Box<dyn std:![error](https://images.weserv.nl/?url=https%3A%2F%2Femoji.slack-edge.com%2FT09V59WQY1E%2Ferror%2F85050940284426fe.gif&w=30&h=30&fit=contain&n=-1):Error>> {
    let mut rdr = csv::ReaderBuilder::new().from_path(path)?;
    for result in rdr.deserialize() {
        let record: Record = result?;
        if record.city == query {
            return Ok(Some(Location {
                latitude: record.lat,
                longitude: record.lng,
            }));
        }
    }

    Ok(None)
}

Changelog

Attachment
0
DETALEX

What is new

i found way to check to find lokacion of citi

Made function that downloads csv file with names and lokacions of citis

and this is this somthing
and this is this somthing

pub async  fn downloading_data(path:PathBuf) -> Result<(),String> {
    //dbg!(&path);
    let reqs = reqwest::Client::new().get("https://raw.githubusercontent.com/Detalexpl/TuiWeather/refs/heads/master/worldcities.csv")
        .send().await.map_err(|e| e.to_string())?.text().await.map_err(|e| e.to_string())?;

    create_dir(&path).await.map_err(|e| e.to_string())?;
    let mut out = File::create(path.join("cities.csv")).map_err(|e| e.to_string())?;
    out.write_all(reqs.as_bytes()).map_err(|e| e.to_string())?;
    
    Ok(())
}

parsing json is naw in separate file

Changelog

Attachment
0