-
Notifications
You must be signed in to change notification settings - Fork 240
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
Motivational Quotes feature in main branch and Quotes API improvement #457
Comments
For Chrome web store, we have had to remove the search engine selector feature to comply with it's policies. |
Ah, I see. I found that it misses a Czech translation, so I wanted to try the feature on my place and translate missing strings. Btw, do you fetch quotes based on language? |
Only English for now, APIs are problem |
I understand. I think this should be prefatched, as it doesn't need to be pulled regularly, as it doesn't rely on freshness like weather. I think if you get somewhere (legally) let's say about 30 quotes per language (maybe more for English) and display them randomly, it would be just great. Of course 365/366 quotes per language, where for each day would be one quote, would be another level. However, I think it's not necessary. It'd be pretty hard to get that number of quotes and it'd take a little more disk space, too. |
Yeah same for me. |
I don't know but what about get around 15 quotes, save it in indexed db or local storage, and refresh whenever it reaches 0 quotes? |
Hey @prem-k-r I think you should look at this -> https://github.com/public-apis/public-apis?tab=readme-ov-file Probably, you might get a no auth multi language free api. |
It sounds like a valid solution, at least at the first view. I know there are pretty significant problems with API keys for weather, so if we won't be able to find free keyless API, I don't think it's a good idea to go this way. |
@prem-k-r, I found that WikiQuotes should fit our requirements. There is an API for it: https://en.wikiquote.org/w/api.php. Some libraries are using it, e.g., this for Python: https://github.com/FranDepascuali/wikiquotes-python-api. You can get quotes for many languages by changing EN for the code of the target language (e.g., https://cs.wikiquote.org/w/api.php for Czech). |
I browsed this list. I found these APIs are working and don't need an API key: The problem is they are just for English. |
Zenquotes blocks the quotes and tells to use their apis for the quotes. |
And the quotesgarden is a npm package quotes. We don't use any package so no use. |
Quotesondesign... Ig we don't need that for now. |
@itz-rj-here, I think you should look at the WikiQuotes, it looks promising. |
+1 |
It's kind of wikipedia. But they doesn't have any api's :( |
Or maybe. Wait a min... |
@prem-k-r what you think about it? |
Damn thats good. |
Looks usable. It supports many languages, as I mentioned before (just replace |
I can see it require us to select a author's name of the quotes to show the quotes. |
Its the only downside, but I think you can put some good authors names like 30 or less or more probably. If we put that aside, its the best among all the api's. Idk, but is there any api to get some good authors names? (maybe there is, or no, but if there is one, we can chain them together) |
That's what we were doing.. but currently switched to an api which cannot give multiple quotes at once. |
Dummyjson api, if I am not mistaken. |
You can use this endpoint to get a random page ID: https://en.wikiquote.org/w/api.php?action=query&list=random&format=json. More information is here: https://en.wikiquote.org/w/api.php?action=help&modules=query%2Brandom. |
I looked at it a bit. As there is even a library for extracting random quotes from WikiQuotes, it's based on selection of random content page from WikiQuotes and extraction of potential quotes from there. As there are a lot of content pages without quotes, it quite often produces nonsense outputs. So, the option is to first select random author and after use your existing script for selecting his/her/their random quote. Alternatively we can just make a static list as you proposed. What do you think? |
First of all. I think for now we will stick to the current quote api. We can add the wikiquotes later. As I'm already sick for 2 days. Also we are currently working on the responsiveness of the extention. So we might need time. |
If we do fixed list, then we probably need add a settings option to add more authors. But, the problem is that they won't get outside of them. Or, if we do random selection, then we need to implement multiple quotes at once, as there isn't a fixed chance that that page has a quote. Edit: I am thinking this way. Your implementation might vary. @itz-rj-here Anything you thought? I am just reading through their massive api. |
I already saw that... If we had a perfect quotes api like zenquotes we could continue. But cause of there is no free quotes system, we can't continue. Almost most of the free quotes got discontinued after 2022. |
Seems reasonable to me. I'd keep this issue open for updated information about possible future solutions. |
Wikiquotes will continue for many years, its maintained by mediawiki, they also maintain wikipedia so no worries! Edit: I am making a cli tool named getquotes, written in rust. Because of that, I am everyday chugging up the api. Maybe you will get a pr from me ( I know web development also). |
It would be very helpful. Thank you so much in advance. Additionally, if you don't see me online you can mention @prem-k-r for assistance. I may not be able to contribute for some few days cause of sickness. |
Get well soon! 👍 |
Sorry But I am currently a bit busy. It would take a bit of time for the pr. Sorry. |
No worry. Take your time. I'm also going to the hospital for a checkup. Then i will again work to the extention. |
Sorry, was busy, my grandfather was ill. This week you will get a pr from me. |
Np. Take your time. |
Hi guys! I just realized I don't have a motivational quotes feature even though I'm synced with the
main
branch. The feature is there when I try to install the extension from the Chrome store. Do you know what could be wrong?I don't see a switch for this feature in the side menu, so I can't turn it on.
The text was updated successfully, but these errors were encountered: