OpenRA / Orabot

A reincarnation of OpenRA's famous IRC bot, written in C# to service the OpenRA server on Discord.
3 stars 6 forks source link

Documentation Summary #52

Open Mailaender opened 2 years ago

Mailaender commented 2 years ago

https://github.com/OpenRA/Orabot/blob/7ab2fa092b127313d80547605a315c21eb4b708c/Orabot.Core/Modules/OpenRaTraitsModule.cs#L69

is not really helpful. Parse https://docs.openra.net/en/bleed/search/search_index.json instead.

penev92 commented 1 year ago

I solved this in #57 by parsing the HTML, then realized there was a json file available (which may be a better solution?) when I came here to mark this as done. 🤦

penev92 commented 1 year ago

Upon further investigation using HtmlAgilityPack to parse the HTML instead of the JSON file yields better result as I can actually target the trait/weapon/sequence/table description, while in the JSON those are mixed with all the other text content about the entity. So for the summary I will keep to parsing the HTML.

However, it would be interesting to investigate using the JSON to provide autocomplete suggestions for trait/weapon/sequence/table names when the user is invoking the commands.

Mailaender commented 1 year ago

I also noticed that the JSON search is incomplete and seems to cut off after a certain number of characters.