这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@BrandonStudio
Copy link
Contributor

What does this PR do?

This PR introduces a new chinaso_news_source config for the ChinaSo engine, allowing filtering news results by source (CENTRAL, LOCAL, BUSINESS, EPAPER, or all)

Why is this change important?

  • Added support for configurable news sources for ChinaSo engine

How to test this PR locally?

Author's checklist

I'm a new contributor, please kindly point out any issue I might have brought in.

Related issues

None

* filtering ChinaSo-News results by source, option ``chinaso_news_source``
* add ChinaSo engine to the online docs https://docs.searxng.org/dev/engines/online/chinaso.html
* fix SearXNG categories in the settings.yml
* deactivate ChinaSo engines ``inactive: true`` until [1] is fixed
* configure network of the ChinaSo engines

[1] searxng#4694

Signed-off-by: @BrandonStudio
Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
Copy link
Member

@return42 return42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a new contributor, please kindly point out any issue I might have brought in.

very good work 👍 .. I tried to improve the ChinaSo engines a little, see diff for the details / mainly:

  • add ChinaSo engine to the online docs
  • fix SearXNG categories in the settings.yml
  • deactivate ChinaSo engines inactive: true until #4694 is fixed
  • configure network of the ChinaSo engines

Further I recommend to have a look at our Development Quickstart guide .. make format.python will format your code and make test helps to find issues before commit.

@BrandonStudio can you please verify my modifications do work for you / if so, I think we can merge this PR.

@BrandonStudio
Copy link
Contributor Author

Clould you please wait a while?🙏🏻
I shall look into these in one day or two

@BrandonStudio
Copy link
Contributor Author

I tried to improve the ChinaSo engines a little, see diff for the details / mainly:

Just of curiousity, what do these two lines do? https://github.com/searxng/searxng/compare/bacf5228dc019dec66e740c3a639410b56841a4c..4e51863a16562a0465382a13324a0eb5c3de16d0#diff-d0b48c4954b3d6f3c85f76f5ac246d6d7b699e7876a27ad7ce66ad282b077034R151-R152

Further I recommend to have a look at our Development Quickstart guide .. make format.python will format your code and make test helps to find issues before commit.

Sure. I will run format check before commit next time (if there is).

can you please verify my modifications do work for you / if so, I think we can merge this PR.

It looks good to me, please merge it ❤

@return42 return42 merged commit d47cf9d into searxng:master May 2, 2025
9 checks passed
@BrandonStudio BrandonStudio deleted the dev/chinaso branch May 2, 2025 12:24
@return42
Copy link
Member

return42 commented May 2, 2025

Just of curiousity, what do these two lines do? https://github.com/searxng/searxng/compare/bacf5228dc019dec66e740c3a639410b56841a4c..4e51863a16562a0465382a13324a0eb5c3de16d0#diff-d0b48c4954b3d6f3c85f76f5ac246d6d7b699e7876a27ad7ce66ad282b077034R151-R152

In the python ecosystem, the standard (plain text) markup is reStructuredText (reST) [PEP-287].

The first line is an anchor in the reST markup and the empty line indicates the end of a directive in the reST markup (in this case the directive is the anchor).

We refer to the engine network anchor here .. :ref:`network <engine network>`

In the example below, all three ChinaSO engines are using the :ref:`network
<engine network>` from the ``chinaso news`` engine.

You can see the result in the online docs .. click to follow the link under the word "network".


The reST markup is much more expressive than you may know from Markdown and other plain-text markups .. but to make it easy for all developers to get started, we have written a reST primer.

Related: searxng/searxng-docker#417 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants