Open ProLoser opened 9 years ago
Maybe another repo for generic feed reader, this is specially for github. See that there is some special description parsing which only effects with GitHub.
Although generic one should be fairly easy to do. Personally I like one purpose plugins, not too generic because then those will usually get bloated.
I actually find that the specific ones are not as useful for irc, and I'm not saying one plugin must do everything in just saying I like the plug-ins to be versatile, even if they do have one task they are designed for.
For instance you could make a parser plugin and have a folder of responseDecorators or something and leave the hard-coded parsing unique to github in that file. Then as time goes by you only have to add more decorators if you want to handle sites in a special way but you still allow a fallback to undecorated for everyone else. On Jan 5, 2015 2:26 PM, "Tarmo Leppänen" notifications@github.com wrote:
Maybe another repo for generic feed reader, this is specially for github. See that there is some special description parsing which only effects with GitHub.
Although generic one should be fairly easy to do. Personally I like one purpose plugins, not too generic because then those will usually get bloated.
— Reply to this email directly or view it on GitHub https://github.com/UniBot/unibot-ghFeed/issues/1#issuecomment-68793477.
Ok, so we've different opinion here. Specified ones are just great imho, eg. I have multiple plugins for our company IRC channel to show some local information (lunches, events on different local places, etc.) Imho too generic ones makes stuff that really matters just hard to complish.
Luckily UniBot plugins are easy to write, so I don't really see any problems to have multiple plugins that does one thing. Although if someone makes "ultimate" plugin that handles all it is just awesome, but I don't think that will happen :D
If this is not something that you want under UniBot repository, just say and then I move this elsewhere. Or better, make pull request that will contain all features + those that you want.
I was actually thinking about doing something like this, except instead of just hardcoding the url you are reading from you could program any url and it would just digest and return the feed.
Similar to how the commands plugin is designed. If we work with configuration objects, the key would be the command or feed keyword and the value would be a url with :tokens or something.
In fact we don't need to pass a config object, we can just add config commands like "!parse gh github.com/:tokens.atom" or we could have the existing commands plugin detect atom urls and add parsing automatically.
This pertains to things like if you want to link to a github issue right now you can do !# 32 and it returns a url but it will not tell you the title of the issue. Or for spitting out commit names.