Activity

ValixT

This took way longer than I expected. I went back and fourth A LOT trying to figure out a somewhat viable of an approach to making the ui with ratatui.

As it turns, making TUI’s isn’t easy(yea, would’ve thought).

I had no idea where to start… in the end I ended up choosing “The Elm Architecture” and worked off the example code.

Tried making the actual ui… but found myself unable to use my knowledge/experience from webdev in ratatui(wdym I can’t have a block(sorta like div) auto-resize to fit content? and i can’t easily render those in a column with overflow-y: scroll type of thing either??????) Well, perhaps that’s just what’s known as a skill issue.

Mapping keyboard events to meaningful events based off the current application state i don’t like.

= Something meaningful starts here =

Overall, as I had no experience making tuis before, I wasted a lot of time figuring out the basics, after figuring out the basics, I found it difficult to adjust to those because of the lower level of development relative to webdev. I did end up bringing my tiny application to somewhat usable/useful of a state with a lot of features still lacking. A factor which imo has been holding me back is the unintuitive design of the proprietary api I was dealing with in the first place, as I see it, it’s an old api slightly modified to work with a different frontend.

There are a couple of features I’d like to implement before moving on.

On one hand projects like these are interesting, I get to learn a bunch of new stuff, but one the other hand(like 67 aaaaaaaaaaaah) I get quite frustrated for a number of reasons.

I hope I won’t abandon this project here, finishing it would be quite valuable and cool…

i hope that’s it for my slightly insane of a writing at 9:20 pm after apparently having worked on my project for about 4 hours today, i’m tired, thanks for reading this far, have a nice day!

Attachment
Attachment
0
ValixT

Refactored my single rust file into 3 rust files,
Implemented a feature I skipped from last time,
Finally moved my temporary test credentials into a .env file, and published my project on github

Attachment
0
ValixT

So I finally got the ‘diary’(schedule] parsing to work for the most part.
Now is likely the time for me to refactor my project which as of writing this has 560 lines of code in a single file. I will try to split into multiple files…

Attachment
0
ValixT

I finally understood how profile selection works on the api.

Despite a post request with a profile id being sent to a profile/switch endpoint, the profile selection actually is actually based on requests X-Profile-Id header. Figuring that out took way longer than expected.

Attachment
0
ValixT

added a working higher level GET method that checks for expired authentication and reauthenticates if needed. Had some trouble with responses being plain gibberish. It was that way because of the ‘Accept-Encoding’ header I had be the same as the one sent from a browser; removing that solved the problem

Attachment
0
ValixT

I have finally managed to implement authentication based on username/password. Took longer than expected.

Not sure what to attach, so here’s the current debug output of the program

Attachment
0