From ecccf02a02122431bf1bdb566c0b7645d95f9409 Mon Sep 17 00:00:00 2001 From: Alexandre FLAMENT Date: Wed, 29 Jun 2022 17:25:07 +0000 Subject: [PATCH 1/5] infopage: a .md file can be remove without crash An administrator might decide to remove some of the .md files. This commit make sure to not crash the application. --- searx/infopage/__init__.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/searx/infopage/__init__.py b/searx/infopage/__init__.py index 730d50a74..6b8fd9133 100644 --- a/searx/infopage/__init__.py +++ b/searx/infopage/__init__.py @@ -157,10 +157,9 @@ class InfoPageSet: # pylint: disable=too-few-public-methods return None cache_key = (pagename, locale) - page = self.CACHE.get(cache_key) - if page is not None: - return page + if cache_key in self.CACHE: + return self.CACHE[cache_key] # not yet instantiated @@ -183,4 +182,6 @@ class InfoPageSet: # pylint: disable=too-few-public-methods if fallback_to_default and page is None: page_locale = self.locale_default page = self.get_page(page_name, self.locale_default) - yield page_name, page_locale, page + if page is not None: + # page is None if the page was deleted by the administrator + yield page_name, page_locale, page From 0e503c990a074c27b5d29755e80e326de49022ae Mon Sep 17 00:00:00 2001 From: Alexandre FLAMENT Date: Wed, 29 Jun 2022 17:26:19 +0000 Subject: [PATCH 2/5] Move donation page to docs.searxng.org and link to it from instances Close #1378 --- README.rst | 6 ++++++ docs/donate.rst | 40 +++++++++++++++++++++++++++++++++++++ docs/index.rst | 1 + searx/infopage/en/donate.md | 21 ++----------------- 4 files changed, 49 insertions(+), 19 deletions(-) create mode 100644 docs/donate.rst diff --git a/README.rst b/README.rst index c5e6bfd96..472f98ab6 100644 --- a/README.rst +++ b/README.rst @@ -137,3 +137,9 @@ https://weblate.bubu1.eu/projects/searxng/searxng/ .. figure:: https://weblate.bubu1.eu/widgets/searxng/-/multi-auto.svg :target: https://weblate.bubu1.eu/projects/searxng/ + + +Make a donation +=============== + +Follow the `donate `_ link. diff --git a/docs/donate.rst b/docs/donate.rst new file mode 100644 index 000000000..c38011712 --- /dev/null +++ b/docs/donate.rst @@ -0,0 +1,40 @@ +Donate to searxng.org +===================== + +Why donating? +------------- + +If you want to support the SearXNG team you can make a donation. + +This will help us to pay the costs for: + +- the two VPS servers for searx.space +- the domain names (searxng.org and searx.space) +- the protonmail account + +If there is enough fund we can ask for a security audit or pay an UX designer. + +Payment methods +--------------- + +- Credit/debit card and bank transfer + + - `Liberapay`_ (recurrent donation) + - `Buy Me a Coffee`_ (one time donation) + +- Cryptocurrency + + - Bitcoin: `bc1qn3rw8t86h05cs3grx2kmwmptw9k4kt4hyzktqj`_ (Segwit + compatible) + - Bitcoin cash: `qpead2yu482e3h9amy5zk45l8qrfhk59jcpw3cth9e`_ + - Ethereum: `0xCf82c7eb915Ee70b5B69C1bBB5525e157F35FA43`_ + - Dogecoin: `DBCYS9issTt84pddXSsTHpQxyQDTFp1TE4`_ + - Litecoin: `ltc1q5j6x6f4f2htldhq570e353clc8fmw44ra5er5q`_ + +.. _Liberapay: https://liberapay.com/SearXNG/ +.. _Buy Me a Coffee: https://buymeacoffee.com/searxng +.. _bc1qn3rw8t86h05cs3grx2kmwmptw9k4kt4hyzktqj: bitcoin:bc1qn3rw8t86h05cs3grx2kmwmptw9k4kt4hyzktqj +.. _qpead2yu482e3h9amy5zk45l8qrfhk59jcpw3cth9e: bitcoincash:qpead2yu482e3h9amy5zk45l8qrfhk59jcpw3cth9e +.. _0xCf82c7eb915Ee70b5B69C1bBB5525e157F35FA43: ethereum:0xCf82c7eb915Ee70b5B69C1bBB5525e157F35FA43 +.. _DBCYS9issTt84pddXSsTHpQxyQDTFp1TE4: dogecoin:DBCYS9issTt84pddXSsTHpQxyQDTFp1TE4 +.. _ltc1q5j6x6f4f2htldhq570e353clc8fmw44ra5er5q: litecoin:ltc1q5j6x6f4f2htldhq570e353clc8fmw44ra5er5q diff --git a/docs/index.rst b/docs/index.rst index b836f4b4c..f331e3211 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -36,5 +36,6 @@ If you don't trust anyone, you can set up your own, see :ref:`installation`. dev/index utils/index src/index + donate .. _searx.space: https://searx.space diff --git a/searx/infopage/en/donate.md b/searx/infopage/en/donate.md index 97306a49a..35654f34b 100644 --- a/searx/infopage/en/donate.md +++ b/searx/infopage/en/donate.md @@ -1,20 +1,3 @@ -# Donate to SearXNG +# Donate to searxng.org -* Credit/debit card and bank transfer - * [Liberapay] (recurrent donation) - * [Buy Me a Coffee] (one time donation) - -* Cryptocurrency - * Bitcoin: [bc1qn3rw8t86h05cs3grx2kmwmptw9k4kt4hyzktqj] (Segwit compatible) - * Bitcoin cash: [qpead2yu482e3h9amy5zk45l8qrfhk59jcpw3cth9e] - * Ethereum: [0xCf82c7eb915Ee70b5B69C1bBB5525e157F35FA43] - * Dogecoin: [DBCYS9issTt84pddXSsTHpQxyQDTFp1TE4] - * Litecoin: [ltc1q5j6x6f4f2htldhq570e353clc8fmw44ra5er5q] - -[Liberapay]: https://liberapay.com/SearXNG/ -[Buy Me a Coffee]: https://buymeacoffee.com/searxng -[bc1qn3rw8t86h05cs3grx2kmwmptw9k4kt4hyzktqj]: bitcoin:bc1qn3rw8t86h05cs3grx2kmwmptw9k4kt4hyzktqj -[qpead2yu482e3h9amy5zk45l8qrfhk59jcpw3cth9e]: bitcoincash:qpead2yu482e3h9amy5zk45l8qrfhk59jcpw3cth9e -[0xCf82c7eb915Ee70b5B69C1bBB5525e157F35FA43]: ethereum:0xCf82c7eb915Ee70b5B69C1bBB5525e157F35FA43 -[DBCYS9issTt84pddXSsTHpQxyQDTFp1TE4]: dogecoin:DBCYS9issTt84pddXSsTHpQxyQDTFp1TE4 -[ltc1q5j6x6f4f2htldhq570e353clc8fmw44ra5er5q]: litecoin:ltc1q5j6x6f4f2htldhq570e353clc8fmw44ra5er5q +You can support the developpers of SearXNG following this [link](https://docs.searxng.org/donate.html) From c5cd5133674b757ab180b7749c9c8cd700ba38b5 Mon Sep 17 00:00:00 2001 From: Alexandre Flament Date: Wed, 29 Jun 2022 21:02:40 +0200 Subject: [PATCH 3/5] Update README.rst MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Émilien Devos --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 472f98ab6..2e0cd488b 100644 --- a/README.rst +++ b/README.rst @@ -142,4 +142,4 @@ https://weblate.bubu1.eu/projects/searxng/searxng/ Make a donation =============== -Follow the `donate `_ link. +You can support the SearXNG project by clicking on the donation page: `https://docs.searxng.org/donate.html `_ From 8c7235d5dbc1c34448ab34fd67765921a6e105cd Mon Sep 17 00:00:00 2001 From: Alexandre Flament Date: Wed, 29 Jun 2022 21:02:46 +0200 Subject: [PATCH 4/5] Update docs/donate.rst MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Émilien Devos --- docs/donate.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/donate.rst b/docs/donate.rst index c38011712..b68ed807b 100644 --- a/docs/donate.rst +++ b/docs/donate.rst @@ -12,7 +12,7 @@ This will help us to pay the costs for: - the domain names (searxng.org and searx.space) - the protonmail account -If there is enough fund we can ask for a security audit or pay an UX designer. +If there is enough fund we can ask for a security audit or pay an User Experience (UX) designer. Payment methods --------------- From 1617ef1e4104907e07b3d8938793687c80df9a42 Mon Sep 17 00:00:00 2001 From: Alexandre Flament Date: Wed, 29 Jun 2022 21:03:01 +0200 Subject: [PATCH 5/5] Update searx/infopage/en/donate.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Émilien Devos --- searx/infopage/en/donate.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/searx/infopage/en/donate.md b/searx/infopage/en/donate.md index 35654f34b..d2e0dbddb 100644 --- a/searx/infopage/en/donate.md +++ b/searx/infopage/en/donate.md @@ -1,3 +1,3 @@ # Donate to searxng.org -You can support the developpers of SearXNG following this [link](https://docs.searxng.org/donate.html) +You can support the SearXNG project by clicking on the donation page: [https://docs.searxng.org/donate.html](https://docs.searxng.org/donate.html)