I would like to make a micro-sized lightweight forum-browser style client for directly interfacing with the ReST of a server-side forum.
Among the requirements are that the format not be ordinary HTML but XHTML, custom XML or JSON instead. In this way, I can use a simple library to parse the markup from the forum. Another less stringent requirement is that images be able to open on a full-screen display with only a shallow color-depth thumbnail to indicate its contents. CSS won’t be needed either because I will be replacing the customization with native GUI elements.
Will this require a plug-in? Is the Ruby on Rails portion of Discourse up to the task? Will I run into hard-coded limits?
One final note: I don’t have a Postgres SQL host right now so if I can’t do it I need to know so I can look at other ReST interfacing forum software that will work with my current host.
I’m not clear about exactly what you have in mind to do, but most Discourse pages can be output as RSS (maybe not exactly what you had in mind as XML, but it is a subset) or JSON.
For example https://meta.discourse.org/t/is-it-possible-to-write-a-custom-client-other-than-a-web-browser/51671.rss https://meta.discourse.org/t/is-it-possible-to-write-a-custom-client-other-than-a-web-browser/51671.json
SInce the RSS didn’t view the whole post by default in the RSS Feed Reader I tried, I’d still have to use a Web Browser to view the whole post. The JSON file looked more useful though. Is there documentation on the “cooked” field of each post? It appears to be HTML or XHTML but if it is a limited subset, that would be ideal!
Adding different hosting is not a deal breaker but having to implement HTML5 completely just for a forum browser would be. Are there any plans to export the posts as XHTML in the future?
XHTML 5 is very similar to HTML 5 and shouldn’t take much effort but I have another idea. If the cooked HTML5 uses only a subset of the HTML 5 tags I could formulate a mini-browser just for that subset. The only thing that scares me about HTML 5 is that it tries to be semantically rich with tag names like “sidebar” and “caption”. If it can be guaranteed that the posts returned by the server never use some of the uncommon tag names, I’d be happy with that for now.
No, you’d just need to do multiple requests to pull out all of the messages. As a rule, you get 20 posts at a time. Here is a Ruby program I wrote to download a topic (or all topics in a category) as text or HTML files.