Closed Sd-Shiivam closed 3 years ago
Can you pr to develop instead? CONTRIBUTING.md
Also, this isn't a scraper, so I don't know, should we add this?
And how do you invoke this?
It is a nice dice rolling function, but has little to do with tuxi. However, google has a way to roll dice and flip coins
If you can get them to be scrapped by tuxi it would be great. in the meantime, I advocate against merging this PR.
Yea, that's what I meant by the "Random" feature
I think it's time to decide should we keep tuxi only for scraping some google search results. or turn tuxi into a complete assistant? I have some ideas like using tuxi to manage todo list file (which will be a is a simple text file).
I don't think adding. . so much code just to roll a dice?
(i) Make each program do one thing well. To do a new job, build afresh rather than complicate old programs by adding new features.
Other programs do the todo list well, so Tuxi doesn't have to.
(i) Make each program do one thing well. To do a new job, build afresh rather than complicate old programs by adding new features.
LoL I was about to say that. We should keep tuxi only to get goodies from google search results. I think it's better that people add tuxi to create their own voice assistant with .. STT and TTS.
https://github.com/h4de5/tuxi/blob/python-port/tuxi.py
This has the div for flip a coin
# RANDOM
# query = "flip a coin" # <div jsname="DyVWtc" class="PmF7Ce" aria-hidden="true">Heads</div>
# query = "roll a dice" #
Myabe we could ask @h4de5 to implement this?
I think it's time to decide should we keep tuxi only for scraping some google search results. or turn tuxi into a complete assistant? I have some ideas like using tuxi to manage todo list file (which will be a is a simple text file).
tuxi should remain a linux cortana i say. Having unrelated stuff that isnt scrapping doesnt bring much benefit, these may aswell be separate scripts.
https://github.com/h4de5/tuxi/blob/python-port/tuxi.py
This has the div for flip a coin
# RANDOM # query = "flip a coin" # <div jsname="DyVWtc" class="PmF7Ce" aria-hidden="true">Heads</div> # query = "roll a dice" #
Myabe we could ask @h4de5 to implement this?
I can do it once develop
and main
are even.
roll a dice
query changes the element after ~4 seconds the page was loaded to give the number. When you load it initially it gives only 0 as response.
looks like such, maybe we should ditch anything that is animated like the coin flip and dice roll then?
Probably, I don't think pup
can load the animation/javascript, and then gives the response code after a few seconds..
i guess this PR can be closed then, until we figure a different way to scrap random dice / coin .
The code to get it currently (I made just to test out) is:
# Roll a dice, yes. ( eg: roll a dice )
dice="$(echo "$google_html" | pup 'div.qwCcde text{}' | recode html..ISO-8859-1)"
[ -n "$dice" ] && output "$dice" && exit 0
but it will only output 0 rigth?
Why we need to roll a dice?
but it will only output 0 rigth?
yes, just leaving it there if someone wants to try make it possible to roll a dice.
No need of doing unnecessary scraping. We should only scrape when We got something general. Which we get on search query.
No need of doing unnecessary scraping.
Agreed, then #55 needs to change.
I propose we remove random from #55 , as it isnt really something you would need scrapping for and we are trying to keep tuxi a scraper only.
Yes scraping google just to get random number is not a good idea.
Also closing this PR since. Tuxi is not going to roll a dice.
i hop you like it