Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding quotes associated with certain words/strings #10

Closed
KDercksen opened this issue Oct 8, 2017 · 1 comment
Closed

Adding quotes associated with certain words/strings #10

KDercksen opened this issue Oct 8, 2017 · 1 comment

Comments

@KDercksen
Copy link
Owner

This would be a pretty cool addition. Imagine the following:

user | ~qadd topic=What do you think about QuotePlugin?
qbot | [quote] quote added to 'topic'
user | ~qshow topic
qbot | [quote] topic: What do you think about QuotePlugin?
user | ~qrm topic=What do you think about QuotePlugin?
qbot | [quote] quote removed from 'topic'
user | ~qsearch topic=QuotePlugin
qbot | [quote] topic (quoteplugin): What do you think about QuotePlugin? [1 result]

This could be implemented in the same basic way as the karma plugin using the shelve module.

A basic API with those four functions would be sufficient I think. There are some implementation details that are discussable though:

  • Should the qrm function also work with partial quotes (i.e. deleting the best match for the quote entered by the user)?
  • I think the quote keys ('topic' in this example) should be case-insensitive, any disadvantages?
  • qsearch queries should probably be case-insensitive too for ease of use. Imagine typing ~qsearch topic=quoteplugin and not getting results because the quotes say 'QuotePlugin' instead of 'quoteplugin', I would think that to be pretty annoying.
@KDercksen
Copy link
Owner Author

Gonna close this as it's functional enough so far. Any bugs deserve their own issues.. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant