dcsan / gitterbot

GitterBot / gitter chatbot with Wiki integration, and more!
https://gitter.im/dcsan/gitterbot
61 stars 83 forks source link

glossary feature #47

Open dcsan opened 9 years ago

dcsan commented 9 years ago

allows users to type in [keywords] like this to have an auto glossary come out scan the user input for words surrounded by [ ] lookup in the KBase a response emit back just the first line of that entry and use an indent > before the bot reply to make it indented

user:

You should read up on [undefined] some more.

bot:

>  **undefined** A primitive value automatically assigned to variables that have just been declared or to formal arguments for which there are no actual arguments.  [more info](https://github.com/freecodecamp/freecodecamp/wiki/undefined)

this will show up like

image

SaintPeter commented 9 years ago

Is it possible to have namespaces on the Github Wiki?

I could see potential collisions on the /wiki/ top level. I'm thinking: wiki/Glossary/undefined wiki/Glossary/immutable

Essentially - How do you differentiate between a short, succinct definition and a longer explanation. I could see needing both for something like [ immutable ].

dcsan commented 9 years ago

unfortunately not, everything just gets dumped with filenames based on the wiki entry title. thats why i was using js immutable and putting a tag in the beginning of the name.

you also cant use / or other nasty symbols. i think _ is maybe OK but that gets hard to read.

everything after the first H2 gets cut off in the chat. so the summary goes above that.

https://github.com/freecodecamp/freecodecamp/wiki/example