searxng/dev/engines/online/discourse.html
2024-12-01 14:05:55 +00:00

277 lines
No EOL
22 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Discourse Forums &#8212; SearXNG Documentation (2024.12.1+0245e82bd)</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../../_static/autodoc_pydantic.css" />
<script src="../../../_static/documentation_options.js?v=bc5460cb"></script>
<script src="../../../_static/doctools.js?v=9a2dae69"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script data-project="searxng" data-version="2024.12.1+0245e82bd" src="../../../_static/describe_version.js?v=fa7f30d0"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="DuckDuckGo Engines" href="duckduckgo.html" />
<link rel="prev" title="Dailymotion" href="dailymotion.html" />
</head><body>
<div class="related" role="navigation" aria-label="Related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="duckduckgo.html" title="DuckDuckGo Engines"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="dailymotion.html" title="Dailymotion"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2024.12.1+0245e82bd)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Discourse Forums</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="module-searx.engines.discourse">
<span id="discourse-forums"></span><span id="discourse-engine"></span><h1>Discourse Forums<a class="headerlink" href="#module-searx.engines.discourse" title="Link to this heading"></a></h1>
<aside class="sidebar">
<p class="sidebar-title">info</p>
<ul class="simple">
<li><p><a class="reference external" href="https://trends.builtwith.com/websitelist/Discourse">builtwith.com Discourse</a></p></li>
</ul>
</aside>
<p>Discourse is an open source Internet forum system. To search in a forum this
engine offers some additional settings:</p>
<ul class="simple">
<li><p><a class="reference internal" href="#searx.engines.discourse.base_url" title="searx.engines.discourse.base_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">base_url</span></code></a></p></li>
<li><p><a class="reference internal" href="#searx.engines.discourse.api_order" title="searx.engines.discourse.api_order"><code class="xref py py-obj docutils literal notranslate"><span class="pre">api_order</span></code></a></p></li>
<li><p><a class="reference internal" href="#searx.engines.discourse.search_endpoint" title="searx.engines.discourse.search_endpoint"><code class="xref py py-obj docutils literal notranslate"><span class="pre">search_endpoint</span></code></a></p></li>
<li><p><a class="reference internal" href="#searx.engines.discourse.show_avatar" title="searx.engines.discourse.show_avatar"><code class="xref py py-obj docutils literal notranslate"><span class="pre">show_avatar</span></code></a></p></li>
<li><p><a class="reference internal" href="#searx.engines.discourse.api_key" title="searx.engines.discourse.api_key"><code class="xref py py-obj docutils literal notranslate"><span class="pre">api_key</span></code></a></p></li>
<li><p><a class="reference internal" href="#searx.engines.discourse.api_username" title="searx.engines.discourse.api_username"><code class="xref py py-obj docutils literal notranslate"><span class="pre">api_username</span></code></a></p></li>
</ul>
<section id="example">
<h2>Example<a class="headerlink" href="#example" title="Link to this heading"></a></h2>
<p>To search in your favorite Discourse forum, add a configuration like shown here
for the <code class="docutils literal notranslate"><span class="pre">paddling.com</span></code> forum:</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">paddling</span>
<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">discourse</span>
<span class="w"> </span><span class="nt">shortcut</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">paddle</span>
<span class="w"> </span><span class="nt">base_url</span><span class="p">:</span><span class="w"> </span><span class="s">&#39;https://forums.paddling.com/&#39;</span>
<span class="w"> </span><span class="nt">api_order</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">views</span>
<span class="w"> </span><span class="nt">categories</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="s">&#39;social</span><span class="nv"> </span><span class="s">media&#39;</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="s">&#39;sports&#39;</span><span class="p p-Indicator">]</span>
<span class="w"> </span><span class="nt">show_avatar</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
</pre></div>
</div>
<p>If the forum is private, you need to add an API key and username for the search:</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">paddling</span>
<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">discourse</span>
<span class="w"> </span><span class="nt">shortcut</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">paddle</span>
<span class="w"> </span><span class="nt">base_url</span><span class="p">:</span><span class="w"> </span><span class="s">&#39;https://forums.paddling.com/&#39;</span>
<span class="w"> </span><span class="nt">api_order</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">views</span>
<span class="w"> </span><span class="nt">categories</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="s">&#39;social</span><span class="nv"> </span><span class="s">media&#39;</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="s">&#39;sports&#39;</span><span class="p p-Indicator">]</span>
<span class="w"> </span><span class="nt">show_avatar</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
<span class="w"> </span><span class="nt">api_key</span><span class="p">:</span><span class="w"> </span><span class="s">&#39;&lt;KEY&gt;&#39;</span>
<span class="w"> </span><span class="nt">api_username</span><span class="p">:</span><span class="w"> </span><span class="s">&#39;system&#39;</span>
</pre></div>
</div>
</section>
<section id="implementations">
<h2>Implementations<a class="headerlink" href="#implementations" title="Link to this heading"></a></h2>
</section>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.discourse.api_key">
<span class="sig-prename descclassname"><span class="pre">searx.engines.discourse.</span></span><span class="sig-name descname"><span class="pre">api_key</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#searx.engines.discourse.api_key" title="Link to this definition"></a></dt>
<dd><p>API key of the Discourse forum.</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.discourse.api_order">
<span class="sig-prename descclassname"><span class="pre">searx.engines.discourse.</span></span><span class="sig-name descname"><span class="pre">api_order</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'likes'</span></em><a class="headerlink" href="#searx.engines.discourse.api_order" title="Link to this definition"></a></dt>
<dd><p>Order method, valid values are: <code class="docutils literal notranslate"><span class="pre">latest</span></code>, <code class="docutils literal notranslate"><span class="pre">likes</span></code>, <code class="docutils literal notranslate"><span class="pre">views</span></code>, <code class="docutils literal notranslate"><span class="pre">latest_topic</span></code></p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.discourse.api_username">
<span class="sig-prename descclassname"><span class="pre">searx.engines.discourse.</span></span><span class="sig-name descname"><span class="pre">api_username</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#searx.engines.discourse.api_username" title="Link to this definition"></a></dt>
<dd><p>API username of the Discourse forum.</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.discourse.base_url">
<span class="sig-prename descclassname"><span class="pre">searx.engines.discourse.</span></span><span class="sig-name descname"><span class="pre">base_url</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">None</span></em><a class="headerlink" href="#searx.engines.discourse.base_url" title="Link to this definition"></a></dt>
<dd><p>URL of the Discourse forum.</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.discourse.search_endpoint">
<span class="sig-prename descclassname"><span class="pre">searx.engines.discourse.</span></span><span class="sig-name descname"><span class="pre">search_endpoint</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'/search.json'</span></em><a class="headerlink" href="#searx.engines.discourse.search_endpoint" title="Link to this definition"></a></dt>
<dd><p>URL path of the <a class="reference external" href="https://docs.discourse.org/#tag/Search">search endpoint</a>.</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.discourse.show_avatar">
<span class="sig-prename descclassname"><span class="pre">searx.engines.discourse.</span></span><span class="sig-name descname"><span class="pre">show_avatar</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">False</span></em><a class="headerlink" href="#searx.engines.discourse.show_avatar" title="Link to this definition"></a></dt>
<dd><p>Show avatar of the user who send the post.</p>
</dd></dl>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="Main">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../../index.html">
<img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/>
</a></p>
<h3><a href="../../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNGs engines loader</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current">
<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="adobe_stock.html">Adobe Stock</a></li>
<li class="toctree-l5"><a class="reference internal" href="alpinelinux.html">Alpine Linux Packages</a></li>
<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Annas Archive</a></li>
<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li>
<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li>
<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li>
<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li>
<li class="toctree-l5 current"><a class="current reference internal" href="#">Discourse Forums</a></li>
<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="geizhals.html">Geizhals</a></li>
<li class="toctree-l5"><a class="reference internal" href="gitea.html">Gitea</a></li>
<li class="toctree-l5"><a class="reference internal" href="gitlab.html">GitLab</a></li>
<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li>
<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li>
<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li>
<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li>
<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li>
<li class="toctree-l5"><a class="reference internal" href="mullvad_leta.html">Mullvad-Leta</a></li>
<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li>
<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li>
<li class="toctree-l5"><a class="reference internal" href="presearch.html">Presearch Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li>
<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li>
<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li>
<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li>
<li class="toctree-l5"><a class="reference internal" href="void.html">Void Linux binary packages</a></li>
<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li>
<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li>
<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li>
<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../../index.html">Overview</a>
<ul>
<li><a href="../../index.html">Developer documentation</a>
<ul>
<li><a href="../index.html">Engine Implementations</a>
<ul>
<li>Previous: <a href="dailymotion.html" title="previous chapter">Dailymotion</a>
<li>Next: <a href="duckduckgo.html" title="next chapter">DuckDuckGo Engines</a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<search id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/dev/engines/online/discourse.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
</body>
</html>