From a69ec74cfdf17ce04af3b7301c1070a5a12ccf64 Mon Sep 17 00:00:00 2001 From: KokoTheBest <81335306+KokoTheBest@users.noreply.github.com> Date: Thu, 22 Jul 2021 11:11:08 -0400 Subject: [PATCH 01/35] Make replit install all requirements first (#378) * Make replit install all requirements first This should install all requirements from requirements.txt. It makes this a one click experience, without the user having to run `pip install -r requirements.txt` and then tap the run button. I myself had to first run that command in my repl, so I have made this change so others don't have to do the same. repl.it also runs on linux based systems, so `&&` is the correct bash syntax. * Running in Bash I applied the same change I made on onBoot to the run variable, and made the language bash as the syntax `./` and `&&` belong to bash. --- .replit | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.replit b/.replit index 33aa5ff..a02e438 100644 --- a/.replit +++ b/.replit @@ -1,3 +1,3 @@ -language = "python3" -run = "./run" -onBoot = "./run" +language = "bash" +run = "pip install -r requirements.txt && ./run" +onBoot = "pip install -r requirements.txt && ./run" From 8e9156460075f0e191eef1557bf22283c3550eb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=B7=83=E0=B6=BA=E0=B7=94=E0=B6=BB=E0=B7=92=20=7C=20Sayu?= =?UTF-8?q?ri?= <85907926+sayuri-gi@users.noreply.github.com> Date: Thu, 22 Jul 2021 22:13:09 +0700 Subject: [PATCH 02/35] Update translations (#373) --- app/static/settings/translations.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/static/settings/translations.json b/app/static/settings/translations.json index b27f279..442da89 100644 --- a/app/static/settings/translations.json +++ b/app/static/settings/translations.json @@ -233,10 +233,10 @@ "lang_si": { "search": "සොයන්න", "config": "වින්‍යාසය", - "config-country": "රට අනුව ප්‍රතිඵල පෙරහන් කරන්න", + "config-country": "රට අනුව ප්‍රතිඵල පෙරන්න", "config-country-help": "සටහන: සබල කර ඇත්නම්, වියමන අඩවියක් සෙවුම් ප්‍රතිඵලවල දිස්වන්නේ එය තෝරාගත් රටෙහි සිට *සත්කාරකත්වය* දරන්නේ නම් පමණි.", "config-lang": "අතුරු මුහුණතෙහි භාෂාව", - "config-lang-search": "භාෂාව සොයන්න", + "config-lang-search": "සෙවුම් භාෂාව", "config-near": "ආසන්න", "config-near-help": "නගරයේ නම", "config-block": "අවහිර", @@ -244,11 +244,11 @@ "config-theme": "තේමාව", "config-nojs": "නෝජේඑස් සබැඳි පෙන්වන්න", "config-dark": "අඳුරු ආකාරය", - "config-safe": "ආරක්ෂිත සෙවීම", + "config-safe": "ආරක්ෂිත සෙවුම", "config-alts": "සමාජ මාධ්‍ය සබැඳි ප්‍රතිස්ථාපනය කරන්න", "config-alts-help": "ට්විටර්/යූ ටියුබ්/ඉන්ස්ටග්‍රෑම් ආදී සබැඳි පෞද්ගලිකත්වයට ගරු කරන විකල්ප සමඟ ප්‍රතිස්ථාපනය කරයි.", "config-new-tab": "නව තීරුවකින් සබැඳි විවෘත කරන්න", - "config-images": "සම්පූර්ණ ප්‍රමාණයේ රූප සෙවීම", + "config-images": "පූර්ණ ප්‍රමාණයේ රූප සෙවීම", "config-images-help": "(පර්යේෂණාත්මක) මේස පරිගණකවල රූප සෙවීමට 'රූපය බලන්න' විකල්පය එකතු කරයි. මෙය රූප ප්‍රතිඵල සංක්ෂිප්තවල අඩු විභේදනයක් ඇති කිරීමට හේතු වේ.", "config-tor": "ටෝර් භාවිතා කරන්න", "config-get-only": "ඉල්ලීම් පමණක් ලබා ගන්න", @@ -261,6 +261,6 @@ "translate": "පරිවර්තනය කරන්න", "light": "දීප්තිමත්", "dark": "අඳුරු", - "system": "පද්ධති සැකසුම" + "system": "පද්ධතිය" } } From 1a3790c7b16404ff03219638767039e040779dc0 Mon Sep 17 00:00:00 2001 From: Laurent le Beau-Martin <1180863+laurentlbm@users.noreply.github.com> Date: Tue, 24 Aug 2021 11:06:41 -0400 Subject: [PATCH 03/35] Only open external links in a new tab (#380) --- app/filter.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/filter.py b/app/filter.py index 87d00a2..b5fbfbd 100644 --- a/app/filter.py +++ b/app/filter.py @@ -255,8 +255,6 @@ class Filter: # Temporarily removing all links to that tab for now. link.decompose() return - elif self.new_tab: - link['target'] = '_blank' result_link = urlparse.urlparse(href) q = extract_q(result_link.query, href) @@ -286,6 +284,9 @@ class Filter: # Add no-js option if self.nojs: append_nojs(link) + + if self.new_tab: + link['target'] = '_blank' else: if href.startswith(MAPS_URL): # Maps links don't work if a site filter is applied From 8d24f8abdd9d6b808a456a83bedd0073f0a78f64 Mon Sep 17 00:00:00 2001 From: gripped Date: Tue, 24 Aug 2021 16:07:34 +0100 Subject: [PATCH 04/35] Fix white background on dropdown for result selectors, time etc (#384) --- app/static/css/dark-theme.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/static/css/dark-theme.css b/app/static/css/dark-theme.css index 9b5f8ff..6ac9bc8 100644 --- a/app/static/css/dark-theme.css +++ b/app/static/css/dark-theme.css @@ -89,6 +89,10 @@ select { border-color: var(--whoogle-dark-element-bg) !important; } +.sa1toc { + background: var(--whoogle-dark-element-bg) !important; +} + #search-bar { border-color: var(--whoogle-dark-element-bg) !important; color: var(--whoogle-dark-text) !important; From 14a5e63ad90f054c6da18e6f9e3f265b67cf3e99 Mon Sep 17 00:00:00 2001 From: alefvanoon <53198048+alefvanoon@users.noreply.github.com> Date: Tue, 24 Aug 2021 17:10:38 +0200 Subject: [PATCH 05/35] Remove dead instance, add new public instance (#387) https://s.alefvanboon.xyz --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index feba333..b635433 100644 --- a/README.md +++ b/README.md @@ -481,13 +481,13 @@ A lot of the app currently piggybacks on Google's existing support for fetching *Note: Use public instances at your own discretion. Maintainers of Whoogle do not personally validate the integrity of these instances, and popular public instances are more likely to be rate-limited or blocked.* - [https://whoogle.sdf.org](https://whoogle.sdf.org) -- [https://whoogle.himiko.cloud](https://whoogle.himiko.cloud) - [https://whoogle.kavin.rocks](https://whoogle.kavin.rocks) or [http://whoogledq5f5wly5p4i2ohnvjwlihnlg4oajjum2oeddfwqdwupbuhqd.onion](http://whoogledq5f5wly5p4i2ohnvjwlihnlg4oajjum2oeddfwqdwupbuhqd.onion) - [https://search.garudalinux.org](https://search.garudalinux.org) -- [https://whooglesearch.net/](https://whooglesearch.net/) -- [https://search.flawcra.cc/](https://search.flawcra.cc/) -- [https://search.exonip.de/](https://search.exonip.de/) -- [https://whoogle.silkky.cloud/](https://whoogle.silkky.cloud/) +- [https://whooglesearch.net](https://whooglesearch.net) +- [https://search.flawcra.cc](https://search.flawcra.cc) +- [https://search.exonip.de](https://search.exonip.de) +- [https://whoogle.silkky.cloud](https://whoogle.silkky.cloud) +- [https://s.alefvanboon.xyz](https://s.alefvanboon.xyz) ## Screenshots #### Desktop ![Whoogle Desktop](docs/screenshot_desktop.jpg) From 4f5ed37c0a7536b1fd7bace08e1b0d64b2fb1d65 Mon Sep 17 00:00:00 2001 From: Darkempire <50015928+Darkempire78@users.noreply.github.com> Date: Tue, 24 Aug 2021 17:12:34 +0200 Subject: [PATCH 06/35] Add French translation (#391) --- app/static/settings/translations.json | 33 +++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/app/static/settings/translations.json b/app/static/settings/translations.json index 442da89..3617d6c 100644 --- a/app/static/settings/translations.json +++ b/app/static/settings/translations.json @@ -262,5 +262,38 @@ "light": "දීප්තිමත්", "dark": "අඳුරු", "system": "පද්ධතිය" + }, + "lang_fr": { + "search": "Chercher", + "config": "Configuration", + "config-country": "Filter les Résultats par Pays", + "config-country-help": "Note : Si activé, un site web va uniquement apparaitre dans les résultat de la recherche si il est *hébérgé* dans le pays sélectionné.", + "config-lang": "Langage de l'Interface", + "config-lang-search": "Langage de Recherche", + "config-near": "Proche", + "config-near-help": "Nom de ville", + "config-block": "Bloquer", + "config-block-help": "Liste de sites séparés pas des virgules", + "config-theme": "Theme", + "config-nojs": "Montrer les liens NoJS", + "config-dark": "Mode Sombre", + "config-safe": "Recherche sécurisée", + "config-alts": "Remplacer les liens des réseaux sociaux", + "config-alts-help": "Remplacer les liens Twitter/YouTube/Instagram/etc avec leurs alternatives respectueuses de la vie privée.", + "config-new-tab": "Ouvrir les Liens dans un Nouveau Onglet", + "config-images": "Recherche d'image en plein écran", + "config-images-help": "(Expérimental) Ajouter l'option 'Voir Image' aux recherches d'images sur ordinateur. Les vignettes des résultats d'image seront de plus faible résolution.", + "config-tor": "Utiliser Tor", + "config-get-only": "Requêtes GET seulement", + "config-url": "URL de la racine", + "config-css": "CSS Personalisé", + "load": "Charger", + "apply": "Appliquer", + "save-as": "Sauvegarder comme...", + "github-link": "Voir sur GitHub", + "translate": "Traduire", + "light": "clair", + "dark": "sombre", + "system": "système" } } From b44762d157ac1949ad934d239cb18588f17673a6 Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Tue, 24 Aug 2021 09:38:35 -0600 Subject: [PATCH 07/35] Split buildx action into main and dev builds Since Docker Hub no longer allows automated builds for free tier users, the build process for new images needs to be moved to GitHub Actions. The existing buildx workflow has worked pretty well for the most part, but was only enabled for the develop branch and only pushed the buildx-experimental tag. This addition allows pushes to the main branch to build updates for the "latest" tag as well, which is more commonly used I think. --- .../workflows/{buildx.yml => buildx-dev.yml} | 0 .github/workflows/buildx-main.yml | 28 +++++++++++++++++++ 2 files changed, 28 insertions(+) rename .github/workflows/{buildx.yml => buildx-dev.yml} (100%) create mode 100644 .github/workflows/buildx-main.yml diff --git a/.github/workflows/buildx.yml b/.github/workflows/buildx-dev.yml similarity index 100% rename from .github/workflows/buildx.yml rename to .github/workflows/buildx-dev.yml diff --git a/.github/workflows/buildx-main.yml b/.github/workflows/buildx-main.yml new file mode 100644 index 0000000..0bfd5c4 --- /dev/null +++ b/.github/workflows/buildx-main.yml @@ -0,0 +1,28 @@ +name: buildx + +on: + push: + branches: main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: checkout code + uses: actions/checkout@v2 + - name: install buildx + id: buildx + uses: crazy-max/ghaction-docker-buildx@v1 + with: + version: latest + - name: log in to docker hub + run: | + echo "${{ secrets.DOCKER_PASSWORD }}" | \ + docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin + - name: build and push the image + run: | + docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + docker buildx ls + docker buildx build --push \ + --tag benbusby/whoogle-search:latest \ + --platform linux/amd64,linux/arm/v7,linux/arm64 . From f34490d4f1969e2f9b99290dd9bd97d508144d15 Mon Sep 17 00:00:00 2001 From: Trottel Date: Tue, 31 Aug 2021 00:05:19 +0200 Subject: [PATCH 08/35] Add Czech translation (#397) --- app/static/settings/translations.json | 33 +++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/app/static/settings/translations.json b/app/static/settings/translations.json index 3617d6c..45514bb 100644 --- a/app/static/settings/translations.json +++ b/app/static/settings/translations.json @@ -295,5 +295,38 @@ "light": "clair", "dark": "sombre", "system": "système" + }, + "lang_cs": { + "search": "Hledat", + "config": "Konfigurace", + "config-country": "Filtrovat výsledky podle země", + "config-country-help": "Poznámka: Pokud je povoleno, webová stránka se objeví ve výsledcích vyhledávání, pouze pokud je *hostována* ve vybrané zemi.", + "config-lang": "Jazyk rozhraní", + "config-lang-search": "Jazyk vyhledávání", + "config-near": "Poblíž", + "config-near-help": "Název města", + "config-block": "Blokovat", + "config-block-help": "Čárkami oddělený seznam stránek", + "config-theme": "Motiv", + "config-nojs": "Zobrazit NoJS odkazy", + "config-dark": "Tmavý motiv", + "config-safe": "Bezpečné vyhledávání", + "config-alts": "Nahradit odkazy na sociální média", + "config-alts-help": "Nahradí odkazy na Twitter, YouTube, Instagram atd. alternativami respektujícími soukromí.", + "config-new-tab": "Otevírat odkazy na novém listu", + "config-images": "Vyhledávání obrázků v plné velikosti", + "config-images-help": "(Experimentální) Přidá volbu ‚Zobrazit obrázek‘ do vyhledávání obrázků na ploše. Způsobí to, že náhledy výsledků vyhledávání obrázků budou mít nižší rozlišení.", + "config-tor": "Používat Tor", + "config-get-only": "Pouze požadavky GET", + "config-url": "Kořenová adresa URL", + "config-css": "Vlastní CSS", + "load": "Načíst", + "apply": "Použít", + "save-as": "Uložit jako...", + "github-link": "Zobrazit na GitHub", + "translate": "Přeložit", + "light": "Světlý", + "dark": "Tmavý", + "system": "Systémový" } } From 388f51cfb76f548e931075853caface0ae41c65a Mon Sep 17 00:00:00 2001 From: alefvanoon <53198048+alefvanoon@users.noreply.github.com> Date: Tue, 31 Aug 2021 00:07:23 +0200 Subject: [PATCH 09/35] Add table for public instances (#398) Includes new "Country" and "Cloudflare" columns --- README.md | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index b635433..1cb4594 100644 --- a/README.md +++ b/README.md @@ -480,14 +480,20 @@ A lot of the app currently piggybacks on Google's existing support for fetching *Note: Use public instances at your own discretion. Maintainers of Whoogle do not personally validate the integrity of these instances, and popular public instances are more likely to be rate-limited or blocked.* -- [https://whoogle.sdf.org](https://whoogle.sdf.org) -- [https://whoogle.kavin.rocks](https://whoogle.kavin.rocks) or [http://whoogledq5f5wly5p4i2ohnvjwlihnlg4oajjum2oeddfwqdwupbuhqd.onion](http://whoogledq5f5wly5p4i2ohnvjwlihnlg4oajjum2oeddfwqdwupbuhqd.onion) -- [https://search.garudalinux.org](https://search.garudalinux.org) -- [https://whooglesearch.net](https://whooglesearch.net) -- [https://search.flawcra.cc](https://search.flawcra.cc) -- [https://search.exonip.de](https://search.exonip.de) -- [https://whoogle.silkky.cloud](https://whoogle.silkky.cloud) -- [https://s.alefvanboon.xyz](https://s.alefvanboon.xyz) +| Website | Country | Cloudflare | +|-|-|-| +| [https://whoogle.sdf.org](https://whoogle.sdf.org) | 🇺🇸 US | +| [https://whoogle.kavin.rocks](https://whoogle.kavin.rocks) | 🇮🇳 IN | ✅ | +| [https://search.garudalinux.org](https://search.garudalinux.org) | 🇩🇪 DE | | +| [https://whooglesearch.net](https://whooglesearch.net) | 🇺🇸 US | | +| [https://search.flawcra.cc](https://search.flawcra.cc) | | ✅ | +| [https://search.exonip.de](https://search.exonip.de) | 🇳🇱 NL | | +| [https://whoogle.silkky.cloud](https://whoogle.silkky.cloud) | 🇫🇮 FI | | +| [https://s.alefvanoon.xyz](https://s.alefvanoon.xyz) | 🇺🇸 US | ✅ | +| [http://whoogledq5f5wly5p4i2ohnvjwlihnlg4oajjum2oeddfwqdwupbuhqd.onion](http://whoogledq5f5wly5p4i2ohnvjwlihnlg4oajjum2oeddfwqdwupbuhqd.onion) | 🇮🇳 IN | | + +* A checkmark in the "Cloudflare" category here refers to the use of the reverse proxy, [Cloudflare](https://cloudflare). The checkmark will not be listed for a site which uses Cloudflare DNS but rather the proxying service which grants Cloudflare the ability to monitor traffic to the website. + ## Screenshots #### Desktop ![Whoogle Desktop](docs/screenshot_desktop.jpg) From be3714f074c0807983148c6ffa51f1287e5f465d Mon Sep 17 00:00:00 2001 From: alefvanoon <53198048+alefvanoon@users.noreply.github.com> Date: Tue, 31 Aug 2021 00:10:07 +0200 Subject: [PATCH 10/35] Fix rtl lang problem in search box (#399) Adds auto dir to index, search and header input html --- app/templates/header.html | 6 ++++-- app/templates/index.html | 3 ++- app/templates/search.html | 3 ++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/templates/header.html b/app/templates/header.html index a3d596a..a59f619 100644 --- a/app/templates/header.html +++ b/app/templates/header.html @@ -19,7 +19,8 @@ class="noHIxc" name="q" type="text" - value="{{ clean_query(query) }}"> + value="{{ clean_query(query) }}" + dir="auto"> @@ -51,7 +52,8 @@ name="q" spellcheck="false" type="text" - value="{{ clean_query(query) }}"> + value="{{ clean_query(query) }}" + dir="auto">
diff --git a/app/templates/index.html b/app/templates/index.html index 64e1650..f528723 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -62,7 +62,8 @@ autocapitalize="none" spellcheck="false" autocorrect="off" - autocomplete="off"> + autocomplete="off" + dir="auto"> diff --git a/app/templates/search.html b/app/templates/search.html index 67674a1..4695291 100644 --- a/app/templates/search.html +++ b/app/templates/search.html @@ -8,6 +8,7 @@ spellcheck="false" autocorrect="off" placeholder="Whoogle Search" - autocomplete="off"> + autocomplete="off" + dir="auto"> From 71070ee921643b45991027646f7227d6a3b81fa6 Mon Sep 17 00:00:00 2001 From: davidfrickert Date: Mon, 30 Aug 2021 23:11:32 +0100 Subject: [PATCH 11/35] Fix portuguese translations (#405) --- app/static/settings/languages.json | 2 +- app/static/settings/translations.json | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/static/settings/languages.json b/app/static/settings/languages.json index 700363a..e872766 100644 --- a/app/static/settings/languages.json +++ b/app/static/settings/languages.json @@ -33,7 +33,7 @@ {"name": "Norwegian (Norwegian)", "value": "lang_no"}, {"name": "Persian (فارسی)", "value": "lang_fa"}, {"name": "Polish (Polskie)", "value": "lang_pl"}, - {"name": "Portugese (Português)", "value": "lang_pt"}, + {"name": "Portuguese (Português)", "value": "lang_pt"}, {"name": "Romanian (Română)", "value": "lang_ro"}, {"name": "Russian (русский)", "value": "lang_ru"}, {"name": "Serbian (Српски)", "value": "lang_sr"}, diff --git a/app/static/settings/translations.json b/app/static/settings/translations.json index 45514bb..0d2f48e 100644 --- a/app/static/settings/translations.json +++ b/app/static/settings/translations.json @@ -164,13 +164,13 @@ "dark": "notte", "system": "impostazioni di sistema" }, - "lang_pt": { - "search": "Buscar", + "lang_pt": { + "search": "Pesquisar", "config": "Configuração", "config-country": "Filtrar Resultados por País", "config-country-help": "Observação: Se ativado, um site só aparecerá nos resultados da pesquisa se estiver *hospedado* no país selecionado.", "config-lang": "Idioma da Interface", - "config-lang-search": "Idioma da Busca", + "config-lang-search": "Idioma da Pesquisa", "config-near": "Perto", "config-near-help": "Nome da Cidade", "config-block": "Bloquear", @@ -178,19 +178,19 @@ "config-theme": "Tema", "config-nojs": "Mostrar Links NoJS", "config-dark": "Modo Escuro", - "config-safe": "Busca Segura", + "config-safe": "Pesquisa Segura", "config-alts": "Substituir Links de Redes Sociais", "config-alts-help": "Substitui os links do Twitter/YouTube/Instagram/etc. por alternativas que respeitam sua privacidade.", "config-new-tab": "Abrir Links em Nova Aba", - "config-images": "Busca de Imagem em Tamanho Real", - "config-images-help": "(Experimental) Adiciona a opção 'Exibir Imagem' às buscas de imagens no modo 'para computador'. Isso fará com que as miniaturas do resultado da imagem sejam de menor resolução.", + "config-images": "Pesquisa de Imagem em Tamanho Real", + "config-images-help": "(Experimental) Adiciona a opção 'Mostrar Imagem' às pesquisas de imagens no modo 'para computador'. Isso fará com que as miniaturas do resultado da imagem sejam de menor resolução.", "config-tor": "Usar Tor", - "config-get-only": "Apenas Solicitações GET", + "config-get-only": "Apenas Pedidos GET", "config-url": "URL Fonte", "config-css": "CSS Personalizado", "load": "Carregar", "apply": "Aplicar", - "save-as": "Salvar Como...", + "save-as": "Guardar Como...", "github-link": "Ver no GitHub", "translate": "traduzir", "light": "brilhante", From 981c7d28f8391a8595f9f00b83a431a5ac4f3dfb Mon Sep 17 00:00:00 2001 From: alefvanoon <53198048+alefvanoon@users.noreply.github.com> Date: Tue, 31 Aug 2021 00:17:14 +0200 Subject: [PATCH 12/35] Add persian (farsi) translation (#400) --- app/static/settings/translations.json | 33 +++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/app/static/settings/translations.json b/app/static/settings/translations.json index 0d2f48e..3c58cfd 100644 --- a/app/static/settings/translations.json +++ b/app/static/settings/translations.json @@ -296,6 +296,39 @@ "dark": "sombre", "system": "système" }, + "lang_fa": { + "search": "جستجو", + "config": "پیکربندی", + "config-country": "فیلتر نتایج بر اساس کشور", + "config-country-help": "توجه: در صورت فعال بودن، وبسایت تنها در صورتی نمایش داده می‌شود که *در کشور انتخابی میزبانی شده باشد*.", + "config-lang": "زبان رابط کاربری", + "config-lang-search": "زبان جستجو", + "config-near": "نزدیک", + "config-near-help": "نام شهر", + "config-block": "مسدود کردن", + "config-block-help": "لیست سایت‌ها با ویرگول جدا می‌شود.", + "config-theme": "پوسته", + "config-nojs": "نمایش پیوند‌های بدون جاوا اسکیریپت", + "config-dark": "حالت تاریک", + "config-safe": "جستجوی امن", + "config-alts": "جایگزینی پیوند‌های شبکه‌های اجتماعی", + "config-alts-help": "لینک‌های توییتر، یوتیوب، اینستاگرام و... را با جایگزین‌هایی که به حریم خصوصی احترام می‌گذارند جایگزین می‌کند.", + "config-new-tab": "باز کردن پیوند‌ها در تب جدید", + "config-images": "جستجوی تصویر در اندازه‌ی کامل", + "config-images-help": "(تجربی) گزینه‌ی \"مشاهده‌ی تصویر\" را به جستجو‌های تصویر میزکار اضافه می‌کند. این باعث می‌شود تصاویر کوچک وضوح و حجم کمتری داشته باشند.", + "config-tor": "استفاده از تور", + "config-get-only": "فقط درخواست‌های GET", + "config-url": "آدرس ریشه‌ی سایت", + "config-css": "CSS دلخواه", + "load": "بارگذاری", + "apply": "تایید", + "save-as": "ذخیره به عنوان...", + "github-link": "نمایش در گیت‌هاب", + "translate": "ترجمه", + "light": "روشن", + "dark": "تیره", + "system": "سیستم" + }, "lang_cs": { "search": "Hledat", "config": "Konfigurace", From 648a540126cf31a262f9178ab014ce57b33f4690 Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Mon, 30 Aug 2021 16:39:52 -0600 Subject: [PATCH 13/35] Move all testing to github actions The Travis CI folks are updating stuff and broke my tests, so I'm moving over to github actions instead since that is (hopefully) less likely to change moving forward. Will need to move PyPi deployment to github actions as well. --- .github/workflows/tests.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..62bfd57 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,18 @@ +name: tests + +on: + push + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Install dependencies + run: pip install -r requirements.txt + - name: Run tests + run: ./run test From 9320d8e230759f23ce8d9f4b568c3758a3f7c8bf Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Mon, 30 Aug 2021 16:47:49 -0600 Subject: [PATCH 14/35] Remove travis yml, update readme test badge --- .travis.yml | 15 --------------- README.md | 2 +- 2 files changed, 1 insertion(+), 16 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 110c0ea..0000000 --- a/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -language: python -python: 3.6 -before_install: - - sudo apt-get -y install libgnutls28-dev -install: - - pip install -r requirements.txt -script: - - "./run test" -deploy: - provider: pypi - user: __token__ - password: - secure: WNEH2Gg84MZF/AZEberFDGPPWb4cYyHAeD/XV8En94QRSI9Aznz6qiDKOvV4eVgjMAIEW5uB3TL1LHf6KU+Hrg6SmhF7JquqP1gsBOCDNFPTljO+k2Hc53uDdSnhi/HLgY7cnFNX4lc2nNrbyxZxMHuSA2oNz/tosyNGBEeyU+JA5va7uX0albGsLiNjimO4aeau83fsI0Hn2eN6ag68pewUMXNxzpyTeO2bRcCd5d5iILs07jMVwFoC2j7W11oNqrVuSWAs8CPe4+kwvNvXWxljUGiBGppNZ7RAsKNLwi6U6kGGUTWjQm09rY/2JBpJ2WEGmIWGIrno75iiFRbjnRp3mnXPvtVTyWhh+hQIUd7bJOVKM34i9eHotYTrkMJObgW1gnRzvI9VYldtgL/iP/Isn2Pv2EeMX8V+C9/8pxv0jkQkZMnFhE6gGlzpz37zTl04B2J7xyV5znM35Lx2Pn3zxdcmdCvD3yT8I4MuBbKqq2/v4emYCfPfOmfwnS0BEVSqr9lbx4xfUZV76tcvLcj4n86DJbx77pA2Ch8FRprpOOBcf0WuqTbZp8c3mb8prFp2EupUknXu7+C2VQ6sqrnzNuDeTGm/nyjjRQ81rlvlD4tqkwsEGEDDO44FF2eUTc5D2MvoHs4cnz095FWjy63gn5IxUjhMi31b5tGRz2Q= - on: - tags: true diff --git a/README.md b/README.md index 1cb4594..c3668d8 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Latest Release](https://img.shields.io/github/v/release/benbusby/whoogle-search)](https://github.com/benbusby/shoogle/releases) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) -[![Build Status](https://travis-ci.com/benbusby/whoogle-search.svg?branch=master)](https://travis-ci.com/benbusby/whoogle-search) +[![tests](https://github.com/benbusby/whoogle-search/actions/workflows/tests.yml/badge.svg)](https://github.com/benbusby/whoogle-search/actions/workflows/tests.yml) [![pep8](https://github.com/benbusby/whoogle-search/workflows/pep8/badge.svg)](https://github.com/benbusby/whoogle-search/actions?query=workflow%3Apep8) [![codebeat badge](https://codebeat.co/badges/e96cada2-fb6f-4528-8285-7d72abd74e8d)](https://codebeat.co/projects/github-com-benbusby-shoogle-master) [![Docker Pulls](https://img.shields.io/docker/pulls/benbusby/whoogle-search)](https://hub.docker.com/r/benbusby/whoogle-search) From ad2b2554c16290e00dcfb12faf4081c21763f478 Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Mon, 30 Aug 2021 17:23:19 -0600 Subject: [PATCH 15/35] Use UTF-8 encoding when loading languages json Fixes #371 --- app/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/__init__.py b/app/__init__.py index 294053c..0c8a7e3 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -35,7 +35,8 @@ app.config['BUILD_FOLDER'] = os.path.join( app.config['STATIC_FOLDER'], 'build') app.config['CACHE_BUSTING_MAP'] = {} app.config['LANGUAGES'] = json.load(open( - os.path.join(app.config['STATIC_FOLDER'], 'settings/languages.json'))) + os.path.join(app.config['STATIC_FOLDER'], 'settings/languages.json'), + encoding='utf-8')) app.config['COUNTRIES'] = json.load(open( os.path.join(app.config['STATIC_FOLDER'], 'settings/countries.json'))) app.config['TRANSLATIONS'] = json.load(open( From 9f84a8ad832a130690f6a9524558522665e0c7b8 Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Tue, 31 Aug 2021 07:57:50 -0600 Subject: [PATCH 16/35] Remove form action from csp Restricting form-action to 'self' in the content security policy prevented Chrome (and likely other browsers) from using !bangs on the home page. Fixes #408 --- app/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/__init__.py b/app/__init__.py index 0c8a7e3..a22eaa4 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -75,8 +75,7 @@ app.config['CSP'] = 'default-src \'none\';' \ 'style-src \'self\' \'unsafe-inline\';' \ 'script-src \'self\';' \ 'media-src \'self\';' \ - 'connect-src \'self\';' \ - 'form-action \'self\';' + 'connect-src \'self\';' if not os.path.exists(app.config['CONFIG_PATH']): os.makedirs(app.config['CONFIG_PATH']) From 4ad4ed5ff78ddb842b54a31a239c83908f725b47 Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Tue, 31 Aug 2021 08:00:04 -0600 Subject: [PATCH 17/35] Publish to PyPI using GitHub Actions Regular commits are all built and publish to TestPyPI, tagged commits are published to PyPI. This should finish the process of moving away from Travis CI, now that both testing and PyPI deployments are handled in github actions. --- .github/workflows/pypi.yml | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/pypi.yml diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml new file mode 100644 index 0000000..9b3a63f --- /dev/null +++ b/.github/workflows/pypi.yml @@ -0,0 +1,39 @@ +name: pypi + +on: push + +jobs: + build-and-publish: + name: Build and publish to PyPI and TestPyPI + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.9 + uses: actions/setup-python@v1 + with: + python-version: 3.9 + - name: Install pypa/build + run: >- + python -m + pip install + build + --user + - name: Build binary wheel and source tarball + run: >- + python -m + build + --sdist + --wheel + --outdir dist/ + . + - name: Publish distribution to TestPyPI + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{ secrets.TEST_PYPI_API_TOKEN }} + repository_url: https://test.pypi.org/legacy/ + - name: Publish distribution to PyPI + if: startsWith(github.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{ secrets.PYPI_API_TOKEN }} + From 118c9da81326f6cf6e10e11d1622f7a16105c7c9 Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Tue, 31 Aug 2021 08:15:28 -0600 Subject: [PATCH 18/35] Remove ARM specific Docker tag note from readme ARM devices can now use the `latest` tag, so the `buildx-experimental` tag is no longer necessary. --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index c3668d8..4c4fb66 100644 --- a/README.md +++ b/README.md @@ -223,8 +223,6 @@ sudo systemctl start whoogle #### Docker CLI -***Note:** For ARM machines, use the `buildx-experimental` Docker tag.* - Through Docker Hub: ```bash docker pull benbusby/whoogle-search From 5d86326ae63a2ae5fbea6999b3a066278e09fdca Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Tue, 31 Aug 2021 09:00:55 -0600 Subject: [PATCH 19/35] Append timestamp to TestPyPI build versions This should allow the same "version" to be uploaded for each commit. --- .github/workflows/pypi.yml | 2 ++ setup.py | 10 ++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 9b3a63f..decd4d5 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -31,6 +31,8 @@ jobs: with: password: ${{ secrets.TEST_PYPI_API_TOKEN }} repository_url: https://test.pypi.org/legacy/ + env: + DEV_BUILD: 1 - name: Publish distribution to PyPI if: startsWith(github.ref, 'refs/tags') uses: pypa/gh-action-pypi-publish@master diff --git a/setup.py b/setup.py index ce994c7..e9cbf88 100644 --- a/setup.py +++ b/setup.py @@ -1,14 +1,20 @@ +import os import setuptools +import time long_description = open('README.md', 'r').read() requirements = list(open('requirements.txt', 'r')) +optional_dev_tag = '' +if os.getenv('DEV_BUILD'): + optional_dev_tag = '.dev' + str(int(time.time())) + setuptools.setup( author='Ben Busby', - author_email='benbusby@protonmail.com', + author_email='contact@benbusby.com', name='whoogle-search', - version='0.5.4', + version='0.5.4' + optional_dev_tag, include_package_data=True, install_requires=requirements, description='Self-hosted, ad-free, privacy-respecting metasearch engine', From c298b8447cc78443432e580738be5654eaa353bb Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Tue, 31 Aug 2021 09:18:07 -0600 Subject: [PATCH 20/35] Split PyPI action into separate jobs --- .github/workflows/pypi.yml | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index decd4d5..c0d398f 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -3,8 +3,8 @@ name: pypi on: push jobs: - build-and-publish: - name: Build and publish to PyPI and TestPyPI + publish-test: + name: Build and publish to TestPyPI runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -26,13 +26,36 @@ jobs: --wheel --outdir dist/ . + env: + DEV_BUILD: 1 - name: Publish distribution to TestPyPI uses: pypa/gh-action-pypi-publish@master with: password: ${{ secrets.TEST_PYPI_API_TOKEN }} repository_url: https://test.pypi.org/legacy/ - env: - DEV_BUILD: 1 + publish: + name: Build and publish to PyPI + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.9 + uses: actions/setup-python@v1 + with: + python-version: 3.9 + - name: Install pypa/build + run: >- + python -m + pip install + build + --user + - name: Build binary wheel and source tarball + run: >- + python -m + build + --sdist + --wheel + --outdir dist/ + . - name: Publish distribution to PyPI if: startsWith(github.ref, 'refs/tags') uses: pypa/gh-action-pypi-publish@master From d1e0a06ebd0b15d0c03619a98d565e8ddfdcf7c6 Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Tue, 31 Aug 2021 09:34:28 -0600 Subject: [PATCH 21/35] Move timestamp for dev builds into build process --- .github/workflows/pypi.yml | 4 ++-- setup.py | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index c0d398f..44f4bcf 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -18,6 +18,8 @@ jobs: pip install build --user + - name: Set dev timestamp + run: echo "DEV_BUILD=$(date +%s)" >> $GITHUB_ENV - name: Build binary wheel and source tarball run: >- python -m @@ -26,8 +28,6 @@ jobs: --wheel --outdir dist/ . - env: - DEV_BUILD: 1 - name: Publish distribution to TestPyPI uses: pypa/gh-action-pypi-publish@master with: diff --git a/setup.py b/setup.py index e9cbf88..0d9e9fa 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,5 @@ import os import setuptools -import time long_description = open('README.md', 'r').read() @@ -8,7 +7,7 @@ requirements = list(open('requirements.txt', 'r')) optional_dev_tag = '' if os.getenv('DEV_BUILD'): - optional_dev_tag = '.dev' + str(int(time.time())) + optional_dev_tag = '.dev' + os.getenv('DEV_BUILD') setuptools.setup( author='Ben Busby', From f093fd26c1a99b56a49f9d74e13d9fbd975048b6 Mon Sep 17 00:00:00 2001 From: Flux Industries <88303769+FluxIndustries@users.noreply.github.com> Date: Wed, 15 Sep 2021 23:25:00 +0200 Subject: [PATCH 22/35] Add public instance to readme (#423) search.flux.industries --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 4c4fb66..a1d3208 100644 --- a/README.md +++ b/README.md @@ -488,6 +488,7 @@ A lot of the app currently piggybacks on Google's existing support for fetching | [https://search.exonip.de](https://search.exonip.de) | 🇳🇱 NL | | | [https://whoogle.silkky.cloud](https://whoogle.silkky.cloud) | 🇫🇮 FI | | | [https://s.alefvanoon.xyz](https://s.alefvanoon.xyz) | 🇺🇸 US | ✅ | +| [https://search.flux.industries](https://search.flux.industries) | 🇩🇪 DE | ✅ | | [http://whoogledq5f5wly5p4i2ohnvjwlihnlg4oajjum2oeddfwqdwupbuhqd.onion](http://whoogledq5f5wly5p4i2ohnvjwlihnlg4oajjum2oeddfwqdwupbuhqd.onion) | 🇮🇳 IN | | * A checkmark in the "Cloudflare" category here refers to the use of the reverse proxy, [Cloudflare](https://cloudflare). The checkmark will not be listed for a site which uses Cloudflare DNS but rather the proxying service which grants Cloudflare the ability to monitor traffic to the website. From 598b58a43d3eaac4d085419dfd5c4334c6516d21 Mon Sep 17 00:00:00 2001 From: FlawCra Date: Wed, 15 Sep 2021 23:25:51 +0200 Subject: [PATCH 23/35] Update location of public instance (#425) https://search.flawcra.cc -> DE --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a1d3208..372b398 100644 --- a/README.md +++ b/README.md @@ -484,7 +484,7 @@ A lot of the app currently piggybacks on Google's existing support for fetching | [https://whoogle.kavin.rocks](https://whoogle.kavin.rocks) | 🇮🇳 IN | ✅ | | [https://search.garudalinux.org](https://search.garudalinux.org) | 🇩🇪 DE | | | [https://whooglesearch.net](https://whooglesearch.net) | 🇺🇸 US | | -| [https://search.flawcra.cc](https://search.flawcra.cc) | | ✅ | +| [https://search.flawcra.cc](https://search.flawcra.cc) | 🇩🇪 DE | ✅ | | [https://search.exonip.de](https://search.exonip.de) | 🇳🇱 NL | | | [https://whoogle.silkky.cloud](https://whoogle.silkky.cloud) | 🇫🇮 FI | | | [https://s.alefvanoon.xyz](https://s.alefvanoon.xyz) | 🇺🇸 US | ✅ | From b4e2add14696e60966b34876115ec8a6ba620b63 Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Wed, 15 Sep 2021 15:27:11 -0600 Subject: [PATCH 24/35] Run GH action tests on PRs --- .github/workflows/tests.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 62bfd57..0fd7a52 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,7 +1,6 @@ name: tests -on: - push +on: [push, pull_request] jobs: test: From ed963933d9c0a921b30ee605c3bfb724a2f3a7b7 Mon Sep 17 00:00:00 2001 From: Peter Dave Hello Date: Thu, 16 Sep 2021 05:27:50 +0800 Subject: [PATCH 25/35] Add ini highlighting to readme (#426) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 372b398..8ac4914 100644 --- a/README.md +++ b/README.md @@ -173,7 +173,7 @@ See the [available environment variables](#environment-variables) for additional #### systemd Configuration After building the virtual environment, you can add the following to `/lib/systemd/system/whoogle.service` to set up a Whoogle Search systemd service: -``` +```ini [Unit] Description=Whoogle From 5289b4ceb326153987acf0522feabd39202d6f19 Mon Sep 17 00:00:00 2001 From: Kang-min Liu Date: Thu, 16 Sep 2021 06:30:53 +0900 Subject: [PATCH 26/35] Add zh-TW translations (#428) There are a few conventional choices but this one should be friendly and generally accepted by local reader. Previous version is still comprehensible but lesser users (perhaps used in Japanese documents) and may give local users a pause. --- app/static/settings/languages.json | 2 +- app/static/settings/translations.json | 33 +++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/app/static/settings/languages.json b/app/static/settings/languages.json index e872766..3bf750a 100644 --- a/app/static/settings/languages.json +++ b/app/static/settings/languages.json @@ -8,7 +8,7 @@ {"name": "Bulgarian (български)", "value": "lang_bg"}, {"name": "Catalan (Català)", "value": "lang_ca"}, {"name": "Chinese, Simplified (简体中文)", "value": "lang_zh-CN"}, - {"name": "Chinese, Traditional (繁体中文)", "value": "lang_zh-TW"}, + {"name": "Chinese, Traditional (正體中文)", "value": "lang_zh-TW"}, {"name": "Croatian (Hrvatski)", "value": "lang_hr"}, {"name": "Czech (čeština)", "value": "lang_cs"}, {"name": "Danish (Dansk)", "value": "lang_da"}, diff --git a/app/static/settings/translations.json b/app/static/settings/translations.json index 3c58cfd..6bb31b9 100644 --- a/app/static/settings/translations.json +++ b/app/static/settings/translations.json @@ -361,5 +361,38 @@ "light": "Světlý", "dark": "Tmavý", "system": "Systémový" + }, + "lang_zh-TW": { + "search": "搜尋", + "config": "設定", + "config-country": "依國家過濾結果", + "config-country-help": "注意:一經套用,只有在部署在指定國家內的網站會出現在搜尋結果中。", + "config-lang": "界面語言", + "config-lang-search": "搜尋語言", + "config-near": "接近", + "config-near-help": "城市名", + "config-block": "排除", + "config-block-help": "網址列表,以逗號分隔", + "config-theme": "主題", + "config-nojs": "顯示 NoJS 連結", + "config-dark": "深色模式", + "config-safe": "安全搜尋", + "config-alts": "將社群網站連結換掉", + "config-alts-help": "將 Twitter/YouTube/Instagram 等網站的連結替換為尊重隱私的第三方網站。", + "config-new-tab": "以新分頁開啟連結", + "config-images": "完整尺寸圖片搜尋", + "config-images-help": "(實驗性)在桌面版圖片搜尋中增加「查看圖片」選項。這會使搜尋結果圖片解析度降低", + "config-tor": "使用 Tor", + "config-get-only": "僅限於 GET 要求", + "config-url": "首頁網址", + "config-css": "自定 CSS", + "load": "載入", + "apply": "套用", + "save-as": "另存為...", + "github-link": "在 GitHub 上查看", + "translate": "翻譯", + "light": "明亮的", + "dark": "黑暗的", + "system": "依系統" } } From 817b51eb481e44878084b9d8b88fae826071a24f Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Wed, 15 Sep 2021 16:00:36 -0600 Subject: [PATCH 27/35] Document WHOOGLE_CONFIG_NEAR env var Fixes #406 --- README.md | 1 + app.json | 5 +++++ whoogle.env | 3 +++ 3 files changed, 9 insertions(+) diff --git a/README.md b/README.md index 8ac4914..8601241 100644 --- a/README.md +++ b/README.md @@ -325,6 +325,7 @@ These environment variables allow setting default config values, but can be over | WHOOGLE_CONFIG_THEME | Set theme mode (light, dark, or system) | | WHOOGLE_CONFIG_SAFE | Enable safe searches | | WHOOGLE_CONFIG_ALTS | Use social media site alternatives (nitter, invidious, etc) | +| WHOOGLE_CONFIG_NEAR | Restrict results to only those near a particular city | | WHOOGLE_CONFIG_TOR | Use Tor routing (if available) | | WHOOGLE_CONFIG_NEW_TAB | Always open results in new tab | | WHOOGLE_CONFIG_VIEW_IMAGE | Enable View Image option | diff --git a/app.json b/app.json index 2962451..791cba4 100644 --- a/app.json +++ b/app.json @@ -110,6 +110,11 @@ "value": "", "required": false }, + "WHOOGLE_CONFIG_NEAR": { + "description": "[CONFIG] Restrict results to only those near a particular city", + "value": "", + "required": false + }, "WHOOGLE_CONFIG_TOR": { "description": "[CONFIG] Use Tor, if available (set to 1 or leave blank)", "value": "", diff --git a/whoogle.env b/whoogle.env index f32fb39..b7c8652 100644 --- a/whoogle.env +++ b/whoogle.env @@ -17,6 +17,9 @@ #WHOOGLE_PROXY_LOC="" #HTTPS_ONLY=1 +# Restrict results to only those near a particular city +#WHOOGLE_CONFIG_NEAR=denver + # See app/static/settings/countries.json for values #WHOOGLE_CONFIG_COUNTRY=countryUK From c3fd84b9424af159c3d6a2da047a54b48ab58b61 Mon Sep 17 00:00:00 2001 From: Kang-min Liu Date: Fri, 17 Sep 2021 07:22:44 +0900 Subject: [PATCH 28/35] Update name of "Taiwan" in country list (#429) --- app/static/settings/countries.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/static/settings/countries.json b/app/static/settings/countries.json index da5ce2f..061b524 100644 --- a/app/static/settings/countries.json +++ b/app/static/settings/countries.json @@ -213,7 +213,7 @@ {"name": "Sweden", "value": "countrySE"}, {"name": "Switzerland", "value": "countryCH"}, {"name": "Syrian Arab Republic", "value": "countrySY"}, - {"name": "Taiwan, Province of China", "value": "countryTW"}, + {"name": "Taiwan", "value": "countryTW"}, {"name": "Tajikistan", "value": "countryTJ"}, {"name": "Tanzania, United Republic of", "value": "countryTZ"}, {"name": "Thailand", "value": "countryTH"}, From 46da74fe8a4584abec0f79c6bbb32f915b8779f1 Mon Sep 17 00:00:00 2001 From: drugal <81636567+drugal@users.noreply.github.com> Date: Fri, 17 Sep 2021 00:30:56 +0200 Subject: [PATCH 29/35] Add search language to public instances table (#431) --- README.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 8601241..72eb6cb 100644 --- a/README.md +++ b/README.md @@ -478,19 +478,19 @@ A lot of the app currently piggybacks on Google's existing support for fetching ## Public Instances *Note: Use public instances at your own discretion. Maintainers of Whoogle do not personally validate the integrity of these instances, and popular public instances are more likely to be rate-limited or blocked.* - -| Website | Country | Cloudflare | -|-|-|-| -| [https://whoogle.sdf.org](https://whoogle.sdf.org) | 🇺🇸 US | -| [https://whoogle.kavin.rocks](https://whoogle.kavin.rocks) | 🇮🇳 IN | ✅ | -| [https://search.garudalinux.org](https://search.garudalinux.org) | 🇩🇪 DE | | -| [https://whooglesearch.net](https://whooglesearch.net) | 🇺🇸 US | | -| [https://search.flawcra.cc](https://search.flawcra.cc) | 🇩🇪 DE | ✅ | -| [https://search.exonip.de](https://search.exonip.de) | 🇳🇱 NL | | -| [https://whoogle.silkky.cloud](https://whoogle.silkky.cloud) | 🇫🇮 FI | | -| [https://s.alefvanoon.xyz](https://s.alefvanoon.xyz) | 🇺🇸 US | ✅ | -| [https://search.flux.industries](https://search.flux.industries) | 🇩🇪 DE | ✅ | -| [http://whoogledq5f5wly5p4i2ohnvjwlihnlg4oajjum2oeddfwqdwupbuhqd.onion](http://whoogledq5f5wly5p4i2ohnvjwlihnlg4oajjum2oeddfwqdwupbuhqd.onion) | 🇮🇳 IN | | + +| Website | Country | Language | Cloudflare | +|-|-|-|-| +| [https://whoogle.sdf.org](https://whoogle.sdf.org) | 🇺🇸 US | Multi-choice | +| [https://whoogle.kavin.rocks](https://whoogle.kavin.rocks) | 🇮🇳 IN | Unknown | ✅ | +| [https://search.garudalinux.org](https://search.garudalinux.org) | 🇩🇪 DE | Multi-choice | | +| [https://whooglesearch.net](https://whooglesearch.net) | 🇩🇪 DE | Spanish | | +| [https://search.flawcra.cc](https://search.flawcra.cc) |🇩🇪 DE | Unknown | ✅ | +| [https://search.exonip.de](https://search.exonip.de) | 🇳🇱 NL | Multi-choice | | +| [https://whoogle.silkky.cloud](https://whoogle.silkky.cloud) | 🇫🇮 FI | English | | +| [https://s.alefvanoon.xyz](https://s.alefvanoon.xyz) | 🇺🇸 US | English | ✅ | +| [https://search.flux.industries](https://search.flux.industries) | 🇩🇪 DE | German | ✅ | +| [http://whoogledq5f5wly5p4i2ohnvjwlihnlg4oajjum2oeddfwqdwupbuhqd.onion](http://whoogledq5f5wly5p4i2ohnvjwlihnlg4oajjum2oeddfwqdwupbuhqd.onion) | 🇮🇳 IN | Unknown | | * A checkmark in the "Cloudflare" category here refers to the use of the reverse proxy, [Cloudflare](https://cloudflare). The checkmark will not be listed for a site which uses Cloudflare DNS but rather the proxying service which grants Cloudflare the ability to monitor traffic to the website. From 27d978f232be43039e3020802acaecf3e21cb954 Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Sat, 18 Sep 2021 21:19:05 -0600 Subject: [PATCH 30/35] Hide overflow on all result divs Mostly addresses the small amount of visible overflow on sections like "Top Stories". --- app/static/css/dark-theme.css | 1 + app/static/css/light-theme.css | 1 + 2 files changed, 2 insertions(+) diff --git a/app/static/css/dark-theme.css b/app/static/css/dark-theme.css index 6ac9bc8..d0a42c8 100644 --- a/app/static/css/dark-theme.css +++ b/app/static/css/dark-theme.css @@ -58,6 +58,7 @@ select { } .ZINbbc { + overflow: hidden; background-color: var(--whoogle-dark-result-bg) !important; } diff --git a/app/static/css/light-theme.css b/app/static/css/light-theme.css index f9c4dea..a083f73 100644 --- a/app/static/css/light-theme.css +++ b/app/static/css/light-theme.css @@ -33,6 +33,7 @@ select { } .ZINbbc { + overflow: hidden; background-color: var(--whoogle-result-bg) !important; } From f12b0e62c571e9b4e42292af28e97ae56254fe91 Mon Sep 17 00:00:00 2001 From: BlissOWL <87573965+BlissOwl@users.noreply.github.com> Date: Tue, 28 Sep 2021 07:09:58 +0530 Subject: [PATCH 31/35] Make bang searches case insensitive (#438) Bang searches now ignore the capitalization of the operator Co-authored-by: Ben Busby --- app/utils/bangs.py | 2 ++ test/test_routes.py | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/app/utils/bangs.py b/app/utils/bangs.py index 56daf4f..8661850 100644 --- a/app/utils/bangs.py +++ b/app/utils/bangs.py @@ -51,6 +51,8 @@ def resolve_bang(query: str, bangs_dict: dict) -> str: wasn't a match or didn't contain a bang operator """ + # Ensure bang search is case insensitive + query = query.lower() split_query = query.split(' ') for operator in bangs_dict.keys(): if operator not in split_query: diff --git a/test/test_routes.py b/test/test_routes.py index 12cdda3..b894c75 100644 --- a/test/test_routes.py +++ b/test/test_routes.py @@ -36,6 +36,11 @@ def test_ddg_bang(client): assert rv._status_code == 302 assert rv.headers.get('Location').startswith('https://www.reddit.com') + # Ensure bang is case insensitive + rv = client.get('/search?q=!GH%20whoogle') + assert rv._status_code == 302 + assert rv.headers.get('Location').startswith('https://github.com') + def test_config(client): rv = client.post('/config', data=demo_config) From 10b60d9373881060cf8d063057d529e5fb3fac17 Mon Sep 17 00:00:00 2001 From: BorislavGeorgiev <91078886+BorislavGeorgiev@users.noreply.github.com> Date: Tue, 28 Sep 2021 05:39:38 +0300 Subject: [PATCH 32/35] Add Bulgarian translation (#440) --- app/static/settings/translations.json | 33 +++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/app/static/settings/translations.json b/app/static/settings/translations.json index 6bb31b9..315c11a 100644 --- a/app/static/settings/translations.json +++ b/app/static/settings/translations.json @@ -394,5 +394,38 @@ "light": "明亮的", "dark": "黑暗的", "system": "依系統" + }, + "lang_bg": { + "search": "Търсене", + "config": "Конфигурация", + "config-country": "Филтрирай резултатите по държави", + "config-country-help": "Забележка: Ако това е разрешено, уебсайтoвете ще се показват в резултатите от търсенето, само ако са * хоствани * в избраната държава.", + "config-lang": "Език на интерфейса", + "config-lang-search": "Език за търсене", + "config-near": "Близо до", + "config-near-help": "Име на град", + "config-block": "Блокирани сайтове", + "config-block-help": "Списък сайтове, разделени със запетая", + "config-theme": "Стил", + "config-nojs": "Показване на връзки без JS", + "config-dark": "Тъмен режим", + "config-safe": "Безопасно търсене", + "config-alts": "Заменете връзките към социалните медии", + "config-alts-help": "Заменя връзките на Twitter/YouTube/Instagram и т.н. с защитени алтернативни поверителни връзки.", + "config-new-tab": "Отваряне на връзките в нов раздел", + "config-images": "Търсене на изображения в пълен размер", + "config-images-help": "(Експериментално) Добавя опцията „Преглед на изображение“ към резултатите от търсене на изображения през работния плот на компютъра. Това ще доведе до по-ниска разделителна способност на миниатюрите, в резултатите от търсене на изображения.", + "config-tor": "Използвайте Tor", + "config-get-only": "Само GET заявки", + "config-url": "Основен URL адрес", + "config-css": "Персонализиран CSS", + "load": "Зареди", + "apply": "Приложи", + "save-as": "Запис като...", + "github-link": "Вижте в GitHub", + "translate": "превод", + "light": "светла", + "dark": "тъмна", + "system": "системна" } } From 1729324fbd81372c7c7756becd9ba5d91e08f3b2 Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Mon, 27 Sep 2021 20:40:51 -0600 Subject: [PATCH 33/35] Run pep8 check on PRs --- .github/workflows/pep8.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pep8.yml b/.github/workflows/pep8.yml index 26bcc20..944bdcb 100644 --- a/.github/workflows/pep8.yml +++ b/.github/workflows/pep8.yml @@ -1,7 +1,6 @@ name: pep8 -on: - push +on: [push, pull_request] jobs: test: From 57a7bf6e95aabd7f0f46a3774d588f71142d8dca Mon Sep 17 00:00:00 2001 From: Oscar Date: Thu, 30 Sep 2021 02:33:50 +0000 Subject: [PATCH 34/35] Remove whoogle.silkky.cloud public instance (#443) --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 72eb6cb..baf4952 100644 --- a/README.md +++ b/README.md @@ -487,7 +487,6 @@ A lot of the app currently piggybacks on Google's existing support for fetching | [https://whooglesearch.net](https://whooglesearch.net) | 🇩🇪 DE | Spanish | | | [https://search.flawcra.cc](https://search.flawcra.cc) |🇩🇪 DE | Unknown | ✅ | | [https://search.exonip.de](https://search.exonip.de) | 🇳🇱 NL | Multi-choice | | -| [https://whoogle.silkky.cloud](https://whoogle.silkky.cloud) | 🇫🇮 FI | English | | | [https://s.alefvanoon.xyz](https://s.alefvanoon.xyz) | 🇺🇸 US | English | ✅ | | [https://search.flux.industries](https://search.flux.industries) | 🇩🇪 DE | German | ✅ | | [http://whoogledq5f5wly5p4i2ohnvjwlihnlg4oajjum2oeddfwqdwupbuhqd.onion](http://whoogledq5f5wly5p4i2ohnvjwlihnlg4oajjum2oeddfwqdwupbuhqd.onion) | 🇮🇳 IN | Unknown | | From b189ea3963befc68caa9056fa6191c467a6188af Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Wed, 29 Sep 2021 20:40:10 -0600 Subject: [PATCH 35/35] Fix hardcoded search method in header template Should use GET if user has configured "GET only" in their config Closes #446 --- app/templates/header.html | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/templates/header.html b/app/templates/header.html index a59f619..3a23f54 100644 --- a/app/templates/header.html +++ b/app/templates/header.html @@ -1,7 +1,9 @@ {% if mobile %}