CLI - Searching Spain

tmux

We Needed Chairs

We needed chairs and other essential items for our new flat in Barcelona. The problem arises when you go to the department store website, or even google search “chair”; you get maybe half the results, all from the sites that go the extra-mile to add keywords in English. If you search the same results, but query ‘silla’ instead, truly better and ranked results near me show.

Google Translate in Browser

I have been using this like a crutch and it’s only provided a false sense of security. When I least expect it- the translated page will be missing a link critical to the pages function. Other than this odd edge case, it’s made it much easier to order a pizza or place a cart on one of these department stores. When it’s set to always translate, I open up the department stores page and forget myself; searching in English where I will get poor results returned.

The Script!

#!/usr/bin/zsh
# load aliases from .zshrc
 source ~/.zshrc

# this script will take $1 as a search term and evaluate it and pipe it to xc
query=$1
echo $(es "$query" -b) | xc

echo "$query" copied to clipboard in spainsh
Linux Spain CLI Tech
Published on 2023-12-10, last updated on 2024-03-07