Merge remote-tracking branch 'origin/main' into heroku-app
This commit is contained in:
commit
50b2e38980
28
.github/workflows/buildx-main.yml
vendored
Normal file
28
.github/workflows/buildx-main.yml
vendored
Normal file
|
@ -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 .
|
3
.github/workflows/pep8.yml
vendored
3
.github/workflows/pep8.yml
vendored
|
@ -1,7 +1,6 @@
|
|||
name: pep8
|
||||
|
||||
on:
|
||||
push
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
|
|
64
.github/workflows/pypi.yml
vendored
Normal file
64
.github/workflows/pypi.yml
vendored
Normal file
|
@ -0,0 +1,64 @@
|
|||
name: pypi
|
||||
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
publish-test:
|
||||
name: Build and publish to 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: Set dev timestamp
|
||||
run: echo "DEV_BUILD=$(date +%s)" >> $GITHUB_ENV
|
||||
- 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/
|
||||
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
|
||||
with:
|
||||
password: ${{ secrets.PYPI_API_TOKEN }}
|
||||
|
17
.github/workflows/tests.yml
vendored
Normal file
17
.github/workflows/tests.yml
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
name: tests
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
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
|
6
.replit
6
.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"
|
||||
|
|
15
.travis.yml
15
.travis.yml
|
@ -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
|
29
README.md
29
README.md
|
@ -2,7 +2,7 @@
|
|||
|
||||
[](https://github.com/benbusby/shoogle/releases)
|
||||
[](https://opensource.org/licenses/MIT)
|
||||
[](https://travis-ci.com/benbusby/whoogle-search)
|
||||
[](https://github.com/benbusby/whoogle-search/actions/workflows/tests.yml)
|
||||
[](https://github.com/benbusby/whoogle-search/actions?query=workflow%3Apep8)
|
||||
[](https://codebeat.co/projects/github-com-benbusby-shoogle-master)
|
||||
[](https://hub.docker.com/r/benbusby/whoogle-search)
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -327,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 |
|
||||
|
@ -480,14 +479,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.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/)
|
||||
| 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://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.
|
||||
|
||||
## Screenshots
|
||||
#### Desktop
|
||||

|
||||
|
|
5
app.json
5
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": "",
|
||||
|
|
|
@ -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(
|
||||
|
@ -74,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'])
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -58,6 +58,7 @@ select {
|
|||
}
|
||||
|
||||
.ZINbbc {
|
||||
overflow: hidden;
|
||||
background-color: var(--whoogle-dark-result-bg) !important;
|
||||
}
|
||||
|
||||
|
@ -89,6 +90,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;
|
||||
|
|
|
@ -33,6 +33,7 @@ select {
|
|||
}
|
||||
|
||||
.ZINbbc {
|
||||
overflow: hidden;
|
||||
background-color: var(--whoogle-result-bg) !important;
|
||||
}
|
||||
|
||||
|
|
|
@ -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"},
|
||||
|
|
|
@ -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"},
|
||||
|
@ -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"},
|
||||
|
|
|
@ -165,12 +165,12 @@
|
|||
"system": "impostazioni di sistema"
|
||||
},
|
||||
"lang_pt": {
|
||||
"search": "Buscar",
|
||||
"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",
|
||||
|
@ -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,171 @@
|
|||
"translate": "පරිවර්තනය කරන්න",
|
||||
"light": "දීප්තිමත්",
|
||||
"dark": "අඳුරු",
|
||||
"system": "පද්ධති සැකසුම"
|
||||
"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"
|
||||
},
|
||||
"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",
|
||||
"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ý"
|
||||
},
|
||||
"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": "依系統"
|
||||
},
|
||||
"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": "системна"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
{% if mobile %}
|
||||
<header>
|
||||
<div class="bz1lBb header-div">
|
||||
<form class="search-form Pg70bf" id="search-form" method="POST">
|
||||
<form class="search-form Pg70bf"
|
||||
id="search-form"
|
||||
method="{{ 'GET' if config.get_only else 'POST' }}">
|
||||
<a class="logo-link mobile-logo" href="/">
|
||||
<div id="mobile-header-logo">
|
||||
{{ logo|safe }}
|
||||
|
@ -19,7 +21,8 @@
|
|||
class="noHIxc"
|
||||
name="q"
|
||||
type="text"
|
||||
value="{{ clean_query(query) }}">
|
||||
value="{{ clean_query(query) }}"
|
||||
dir="auto">
|
||||
<input id="search-reset" type="reset" value="x">
|
||||
<input name="tbm" value="{{ search_type }}" style="display: none">
|
||||
<input type="submit" style="display: none;">
|
||||
|
@ -39,7 +42,10 @@
|
|||
</a>
|
||||
</div>
|
||||
<div class="search-div">
|
||||
<form id="search-form" class="search-form" id="sf" method="POST">
|
||||
<form id="search-form"
|
||||
class="search-form"
|
||||
id="sf"
|
||||
method="{{ 'GET' if config.get_only else 'POST' }}">
|
||||
<div class="autocomplete header-autocomplete">
|
||||
<div style="width: 100%; display: flex">
|
||||
<input
|
||||
|
@ -51,7 +57,8 @@
|
|||
name="q"
|
||||
spellcheck="false"
|
||||
type="text"
|
||||
value="{{ clean_query(query) }}">
|
||||
value="{{ clean_query(query) }}"
|
||||
dir="auto">
|
||||
<input name="tbm" value="{{ search_type }}" style="display: none">
|
||||
<input type="submit" style="display: none;">
|
||||
<div class="sc"></div>
|
||||
|
|
|
@ -62,7 +62,8 @@
|
|||
autocapitalize="none"
|
||||
spellcheck="false"
|
||||
autocorrect="off"
|
||||
autocomplete="off">
|
||||
autocomplete="off"
|
||||
dir="auto">
|
||||
</div>
|
||||
<input type="submit" id="search-submit" value="{{ translation['search'] }}">
|
||||
</div>
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
spellcheck="false"
|
||||
autocorrect="off"
|
||||
placeholder="Whoogle Search"
|
||||
autocomplete="off">
|
||||
autocomplete="off"
|
||||
dir="auto">
|
||||
<input type="submit" style="width: 9%" id="search-submit" value="Search">
|
||||
</form>
|
||||
|
|
|
@ -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:
|
||||
|
|
9
setup.py
9
setup.py
|
@ -1,14 +1,19 @@
|
|||
import os
|
||||
import setuptools
|
||||
|
||||
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' + os.getenv('DEV_BUILD')
|
||||
|
||||
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',
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user