Soooo… Fltk uses @ symbol in strings to apply effects to text, now wonder I’ve been having issues with the timeline.. https://www.fltk.org/doc-2.0/html/group__symbols.html
@ is used for mentions and all that stuff, so well - it just breaks the strings in the labels.
A lot of more work needs to be done, but at least now I got the basic timeline stuff done, took a good while to figure out how to solve it, but now I know. The reason why the statuses are cut short on some is because of html tags and stuff like that - c++ is a bit picky with strings and stuff like that. but I’ll get that sorted as well.
At least I can show the first screenshot. Keep in mind the GUI is not at all finished, I’m working on the basics first, implement all the features, then I work on finishing touches.
I will work more on it this weekend. I hope to tidy it up enough for a screenshot 😀
This one did the trick:
std::regex tags("<[^<]*>");
std::regex_replace(std::back_inserter(outputString), inputString.begin(), inputString.end(), tags, "");
Okay, so was easier to solve (for now) then what I initially thought.
First thing I found was this:
https://stackoverflow.com/questions/49333136/removing-html-tags-from-a-string-of-text
Okay, so it seems like the label\text I use for statuses does not like the strings from posts.
Especially if they contain html tags and such (which the often do), it just breaks the text.
I wonder what I can do with that.. I kinda want to not have html tags in the json reply.
Have to think a bit about how to solve it. Took a while to figure it out, the text was just garbled.
I created some long example strings with regular letters and such, to see if X number of posts would show up, and they did, but when I then replace my test strings with text from json - it goes all wrong again.
@prologic Ouch, does not sound good..
Hope you get better soon!
How are you all doing today?
@carsten@yarn.zn80.net amazing view!
Working some more on timeline, trying to create a group widget and add label child widgets, those labels should then show the text for each status.
Brrr, we had -12c this morning. But no clouds and sun is out. Nice day!
Did some more work on the timeline stuff today, now I have added parsing of each status, so that I can get the data I need from each status (user, image url, text, links - all that stuff I need).
Created the function that grabs the timeline.
Now I have to plan a bit to make the actual gui for it, I think I might try and create my own custom fltk widget that I can feed with the json reply, and then it will set itself up based on that.
Or maybe something simple at first - not sure yet.
Next up is grabbing and showing the timeline, then all the other stuff needed. :)
Was fast to get this up and running, and nice to end the weekend with this working.
Posting from c++, fltk GUI.