Showing posts with label CSV. Show all posts
Showing posts with label CSV. Show all posts

Saturday, July 22, 2023

Rust pop-answer: Stride LSD exchange rates with github burn-rates


./lsd.rs combines the @stride_zone REST API data with my burn rates uploaded to github as CSV, then extracted with the new ./parse_csv function.



WOOT! 🎉

Announcement: automated CSV parsing in Rust

 ðŸ¦€ðŸ¦€ðŸ¦€cRUSTaceans!🦀🦀🦀 

I've added a new fn to my csv_utils:

parse_csv<T>(skip: usize, f: Fn, lines: Lines)



  • skips <skip> lines (header
  • parses CSV with <f>
  • returns Vec<T> objects from CSV <lines>

This goes a long way towards automating CSV parsing for me.