-
-
Notifications
You must be signed in to change notification settings - Fork 531
Support "Google Now" type commands #97
Comments
Sorry, no plans at the time. We don't intend to bring all of Google's services to the cli. |
So no need to make a PR if I get something working? |
We have the ToDo list just for that. Are you interested in contributing to |
I saw it, but there was nothing linked to this issue. And I thought it would deserve its own issue to ease discussion on this.
Actually I had the idea of making Google Now features (not sure how to call them, the rectangle with parsed infos when you type some specific queries) available from the CLI. I looked up for similar script, and came across a very basic Ruby script, not updated anymore, and this Googler script which I did not know about. I thought it might be interesting to add such a feature, and was willing to write my own script. If I get something functional and you are interested in it, I was offering you to merge it in Googler. |
I'll leave it to you and @zmwangx. |
The box does many things. I don't think there's a generic way to parse it. Just to give you a concrete example: calculator and unit converter are two entirely different things and will need two entirely different handlers.
If you have something then please do raise a PR, but as you know, there's no guarantee that features will be merged — we really need to look at how well it works, how good the implementation is, etc. |
By the way, half related, WolframAlpha is much better for this purpose, and they have an API. I personally wouldn't recommend wasting time on this. |
Hmm, I have something which is working fine for calculations (calculations with or without units) and for unit conversion. It extracts weather as well, and it's just a matter of formatting to render it nicely (using lynx at the moment). It does not work yet for cities / countries / people. These are all the queries I can think of at the moment. I know about wolfram alpha, but it only works in English (whereas Google handles French as well) and results are not comparable with Google for weather forecasts for example. |
You could raise a PR with what you have actually. We could take a look at whether it could possibly end up in a mergeable state. If it doesn't then you might not want to waste your time; if it does then you can work from there. Thanks. |
I second this. Please share what you've got as a PR and we can discuss this further. |
Actually, I do agree on this particular point. But you have to query in English (
What I have at the moment is a quite dirty script, written in a couple of minutes and built around As stated above, it works with:
It does not work with people and places at the moment. |
@zmwangx has written a very well-documented parser. We must remove scrapy dependency to start with and extend
do scientific calculations work?
We don't need to bother about rendering in lynx (or any browser for that matter).
no problem. |
Sure about What are "scientific calculations"? Isn't it already covered by Concerning weather, I do not want to render in Lynx, I want to ncursify the HTML output. That is why there is this Lynx dependency at the moment. |
If it covers logarithmic/trigonometric ratios, then fine.
I guess there's cmdline a weather util to do just that. For |
Concerning weather, I do not see your point. For now, I have
My goal is to make it a bit more readable. |
Here we go, supporting people and places as well (output is made as Markdown at the moment): https://gist.github.com/Phyks/a9458568ef3b66590a860f0afcc4a59c. Plus it does support time:
I think we can scrape it further for the weather, but we have to find the correct xpaths to use. |
We should get rid of html2text too. We strive to keep our dependencies minimal... reduces external factors affecting the project in addition to other obvious benefits. @zmwangx, I think we are now in a position to take a call. IF the dependencies are gone, I believe calc, time and weather are good additions. What do you think? |
Shortcuts are nice, but I would rather do one thing and one thing well. @Phyks If your script works for you and you need that functionality often, good for you, just polish your script and make it a @jarun Your call, but I vote for nay. |
Reopening because it should be open at this point (before a decision is made). |
Guys, From the feedback I got it seems cmdline users prefer wcalc or speedcrunch as the calculator. And for weather the visual forecast seems quite important. It's either wego or a weather indicator or directly weather.com. So despite my personal inclination to have a @Phyks thanks for the suggestion and effort with the samples. Closing the request accordingly. |
Hi,
What about adding an option (say
--now
for instance) to fetch only the Google Now answers to some questions.For instance,
Same thing with capital, weather, people, etc.
Thanks!
The text was updated successfully, but these errors were encountered: