Bugswriter / tuxi
- пятница, 19 февраля 2021 г. в 00:27:10
Shell
Tuxi is a cli assistant. Get answers of your questions instantly.
A CLI tool that scrapes Google search results and SERPs that provides instant and concise answers
The script uses pup
to scrape Google search results and SERPs.
If the query returns several results, Tuxi will choose the most
relevant result on the basis of priority.
In addition to scraping, tuxi
also uses jq
, awk
and sed
to process and return results, and recode
to unescape html.
Watch this video for more info
Also checkout BugsWriter's YouTube channel for more scripts like this.
cURL tuxi to your $PATH and give execute permissions.
$ curl -sL "https://raw.githubusercontent.com/Bugswriter/tuxi/main/tuxi" -o $HOME/.local/bin/tuxi
$ chmod +x $HOME/.local/bin/tuxi
If you're on Arch, then Tuxi is available as the tuxi-git
package in the AUR.
$ yay -S tuxi-git
$ tuxi "Is Linux better than Windows?"
---
Linux has a reputation for being fast and smooth while
Windows 10 is known to become slow and slow over
time. Linux runs faster than Windows 8.1 and Windows 10
along with a modern desktop environment and qualities of the
operating system while windows are slow on older hardware.
---
tuxi linus torvalds birthday
.tuxi
.Use -h
to display the help message.
$ tuxi -h
Usage: tuxi [options] query
Options:
-h Show this help message and exit.
-r Raw search results.
(no pretty output, no colors)
-q Only output search results.
(silences "Did you mean?", greeting, usage)
Report bugs at https://github.com/Bugswriter/tuxi/issues.
Gives corrections
$ tuxi linux torvalds birthday
> Did you mean linus?
---
28 December 1969
---
When you know it's actually linux torvalds -q option
$ tuxi -q linux torvalds birthday
---
28 December 1969
---
Raw formatting for output (no colors) -r option
Useful for e.g scripting
notify-send
.
$ tuxi -r linux torvalds birthday
> Did you mean linus?
28 December 1969
Math operations
$ tuxi "log(30)"
---
1.4771212547196624
---
Translate
$ tuxi "I love you in japanese"
---
わたしは、あなたを愛しています
---
$ tuxi "わたしは、あなたを愛しています in english"
---
I love you
---
And much more (lyrics, weather, conversions...)
This project is licensed under GPL-3.0.
If you want to contribute, please see CONTRIBUTING.