Closed thomasrussellmurphy closed 8 years ago
@thomasrussellmurphy what is the problem with returning the full title? can't the adapter you are using in your hubot handle a too long message gracefully? I don't think it's up to hubot-url-title to be responsible for that.
But yes, I can see the use case that one would want to limit titles above a certain length, because long titles can be perceived as spammy.
Our hubot (lulu
) lives in IRC and I believe that the adapter will automatically split long messages into multiple, which is annoying. If a page title is extremely long, there's likely not much useful information. In that Vishay link, the extra stuff is a whole bunch of information about their executives, which is fairly superfluous relative to the earlier characters that are about the specific page.
Yeah, I can see that being annoying. PR implementing an optional (keeping the current behaviour if not used) configuration for this would be much appreciated.
Please assign this feature issue to me. I plan on preparing a PR tonight.
Some sites have extremely long
<title>
s that may exceed the message length of the chat medium that hubot is running on. For example: http://www.vishay.com/company/press/releases/2016/160721VLMU1610/Currently,
hubot-url-title
just spits back the processed title at https://github.com/dentarg/hubot-url-title/blob/master/src/scripts/hubot-url-title.coffee#L74Suggested enhancement: impose a configurable maximum character length on the message hubot responds with. For example, https://github.com/hacsoc/lulu/blob/f6b230922639c0fc017f062686a22bf2c5fea8a5/scripts/web.coffee, specifically the diff at https://github.com/hacsoc/lulu/commit/f6b230922639c0fc017f062686a22bf2c5fea8a5