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

Enhancing the cat command #26

Open
L0neGamer opened this issue Oct 9, 2021 · 1 comment
Open

Enhancing the cat command #26

L0neGamer opened this issue Oct 9, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@L0neGamer
Copy link
Collaborator

The cat api allows for searching cats by breed, file type, category, amongst some other options. These can be seen on the left side of this site: https://docs.thecatapi.com/

A useful extension/change to the cat command (found in src/Tablebot/Plugins/Cats.hs) would allow a user to optionally filter for cats.

Example usages may be $cat breed bengal, $cat type gif, or $cat breed Abyssinian type gif. Exact syntax is up to you.

The three types of image are known ahead of time, so as long as the user correctly selects one of the three the command should work. The type is then added to the search query.
To search for pictures of a particular breed of cat, the program first needs to request the breeds and the ids associated with each, and then locate the id of the breed requested, which can then be added to the search query.

Multiple search options can be combined in the API, but it may be worth implementing basic forms that only work with one type of search query.

Additional options for syntax:

  • $cat breed:"American Curl" type:"png"
  • $cat -b Bengal -t gif
@L0neGamer L0neGamer added enhancement New feature or request good first issue Good for newcomers and removed good first issue Good for newcomers labels Dec 2, 2021
@finnbar
Copy link
Collaborator

finnbar commented Jan 2, 2022

You may want to look at how .netrunner search works, as you'll be able to use the parsing from that!

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

No branches or pull requests

2 participants