vranki / siilihai-client

Siilihai web forum reader
http://www.siilihai.com/
GNU General Public License v3.0
18 stars 5 forks source link

Detect forum formatting? #1

Open Drakedude opened 9 years ago

Drakedude commented 9 years ago

Formatting links and text in posts varies from forum to forum, so i wonder if it's possible to detect and display each forum's setup.

vranki commented 9 years ago

Could you elaborate a bit? In parsed forums they are HTML and in TapaTalk they seem to be mostly standard markdown code. Can you give an example?

Drakedude commented 9 years ago

It may be an edge case come to think of it, but take Reddit's customised markdown formatting. You link with reddit! vs [url=http://reddit.com]reddit![/url], which is more elegant. If they do it, other's must.

vranki commented 9 years ago

I think reddit has more complex structure than a "normal" forum. Perhaps Reddit-specific reader code could be done and implemented in Siilihai some day.

Anyway, in TapaTalk forums the conversion is done here:

https://github.com/vranki/libsiilihai/blob/master/src/siilihai/tapatalk/tapatalkengine.cpp#L41

It converts the markup to basic html. If it's missing some elements, I can add them there.