Post AMrGhEPfJPK4TCrVfU by donno@fosstodon.org
(DIR) More posts by donno@fosstodon.org
(DIR) Post #AMrGhEPfJPK4TCrVfU by donno@fosstodon.org
2022-08-24T16:15:45Z
0 likes, 3 repeats
If there's somebody with python experience that can help us out with this Arcticons issue, that would be greatly appreciated :)https://github.com/Donnnno/Arcticons/issues/1311#helpwanted #arcticons #python
(DIR) Post #AMrIebw7azVYSyvBUO by doctormo@mastodon.social
2022-08-24T16:37:34Z
0 likes, 0 repeats
@donno you can use a standard HTML to text conversion. There are modules for it which don't just strip tags, but use them as identifiers. So <br> becomes \n and end div and end p become \n\n and ol and up become more markup like text.
(DIR) Post #AMrJLVOPnh4UcjbpFg by CodingOtaku@fosstodon.org
2022-08-24T16:45:26Z
0 likes, 0 repeats
@donno I haven't gone through the code yet. But from the look of it, the mails are just rendered differently with more tags. Wouldn't it be better to parse the content as HTML with BeautifulSoup or some other library and get the text with something like element.get_text() instead? Then detecting the key-value pairs would be much easier.
(DIR) Post #AMrJc7P4FJbL91ptGi by fundevogel@freiburg.social
2022-08-24T16:48:24Z
0 likes, 0 repeats
@donno one of our guys could have a look, good luck!
(DIR) Post #AMrOp2DHLzIcaDIg0O by donno@fosstodon.org
2022-08-24T17:46:49Z
0 likes, 0 repeats
@doctormo that sounds handy, but I'm pretty dumb when it comes to code, haha.
(DIR) Post #AMrl3vZYWXNJK4E7M0 by BollerwagenPicard@mastodontech.de
2022-08-24T21:55:58Z
0 likes, 0 repeats
@donno ping me if you still need help in weekend
(DIR) Post #AMsFjbyMmbiNK2clCi by tw0shoes@fosstodon.org
2022-08-25T03:39:42Z
0 likes, 0 repeats
@donno I'd also recommend parsing with beautiful soup. I got quite far though just by doing.split("<br>")then doing a for loop through the result and checkingif item.__contains__(" : "):
(DIR) Post #AMzbGUHHs4s49oiATo by donno@fosstodon.org
2022-08-28T16:43:56Z
0 likes, 0 repeats
@BollerwagenPicard thanks! It's mostly fixed by now :)