gh-pages: updated

This commit is contained in:
Markus Heiser 2019-12-30 18:31:17 +01:00
parent 32fa4c0dd8
commit 56d2b50d2e
136 changed files with 18733 additions and 12067 deletions

1
404.html Normal file
View File

@ -0,0 +1 @@
<html><head><META http-equiv='refresh' content='0;URL=index.html'></head></html>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,3 @@
digraph foo {
"bar" -> "baz";
}

View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.40.1 (20161225.0304)
-->
<!-- Title: foo Pages: 1 -->
<svg width="62pt" height="116pt"
viewBox="0.00 0.00 62.00 116.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 112)">
<title>foo</title>
<polygon fill="#ffffff" stroke="transparent" points="-4,4 -4,-112 58,-112 58,4 -4,4"/>
<!-- bar -->
<g id="node1" class="node">
<title>bar</title>
<ellipse fill="none" stroke="#000000" cx="27" cy="-90" rx="27" ry="18"/>
<text text-anchor="middle" x="27" y="-86.3" font-family="Times,serif" font-size="14.00" fill="#000000">bar</text>
</g>
<!-- baz -->
<g id="node2" class="node">
<title>baz</title>
<ellipse fill="none" stroke="#000000" cx="27" cy="-18" rx="27" ry="18"/>
<text text-anchor="middle" x="27" y="-14.3" font-family="Times,serif" font-size="14.00" fill="#000000">baz</text>
</g>
<!-- bar&#45;&gt;baz -->
<g id="edge1" class="edge">
<title>bar&#45;&gt;baz</title>
<path fill="none" stroke="#000000" d="M27,-71.8314C27,-64.131 27,-54.9743 27,-46.4166"/>
<polygon fill="#000000" stroke="#000000" points="30.5001,-46.4132 27,-36.4133 23.5001,-46.4133 30.5001,-46.4132"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
baseProfile="full" width="70px" height="40px"
viewBox="0 0 700 400"
>
<line x1="180" y1="370"
x2="500" y2="50"
stroke="black" stroke-width="15px"
/>
<polygon points="585 0 525 25 585 50"
transform="rotate(135 525 25)"
/>
</svg>

After

Width:  |  Height:  |  Size: 385 B

33
_images/arch_public.dot Normal file
View File

@ -0,0 +1,33 @@
digraph G {
node [style=filled, shape=box, fillcolor="#ffffcc", fontname="Sans"];
edge [fontname="Sans"];
browser [label="Browser", shape=Mdiamond];
rp [label="Reverse Proxy", href="url to configure reverse proxy"];
filtron [label="Filtron", href="https://github.com/asciimoo/filtron"];
morty [label="Morty", href="https://github.com/asciimoo/morty"];
static [label="Static files", href="url to configure static files"];
uwsgi [label="uwsgi", href="url to configure uwsgi"]
searx1 [label="Searx #1"];
searx2 [label="Searx #2"];
searx3 [label="Searx #3"];
searx4 [label="Searx #4"];
browser -> rp [label="HTTPS"]
subgraph cluster_searx {
label = "Searx instance" fontname="Sans";
bgcolor="#fafafa";
{ rank=same; static rp };
rp -> morty [label="optional: images and HTML pages proxy"];
rp -> static [label="optional: reverse proxy serves directly static files"];
rp -> filtron [label="HTTP"];
filtron -> uwsgi [label="HTTP"];
uwsgi -> searx1;
uwsgi -> searx2;
uwsgi -> searx3;
uwsgi -> searx4;
}
}

156
_images/arch_public.svg Normal file
View File

@ -0,0 +1,156 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.40.1 (20161225.0304)
-->
<!-- Title: G Pages: 1 -->
<svg width="618pt" height="529pt"
viewBox="0.00 0.00 618.00 529.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 525)">
<title>G</title>
<polygon fill="#ffffff" stroke="transparent" points="-4,4 -4,-525 614,-525 614,4 -4,4"/>
<g id="clust1" class="cluster">
<title>cluster_searx</title>
<polygon fill="#fafafa" stroke="#000000" points="8,-8 8,-444 602,-444 602,-8 8,-8"/>
<text text-anchor="middle" x="305" y="-428.8" font-family="Sans" font-size="14.00" fill="#000000">Searx instance</text>
</g>
<!-- browser -->
<g id="node1" class="node">
<title>browser</title>
<polygon fill="#ffffcc" stroke="#000000" points="75,-521 5.2878,-503 75,-485 144.7122,-503 75,-521"/>
<polyline fill="none" stroke="#000000" points="16.9067,-506.0001 16.9067,-499.9999 "/>
<polyline fill="none" stroke="#000000" points="63.3811,-488.0001 86.6189,-488.0001 "/>
<polyline fill="none" stroke="#000000" points="133.0933,-499.9999 133.0933,-506.0001 "/>
<polyline fill="none" stroke="#000000" points="86.6189,-517.9999 63.3811,-517.9999 "/>
<text text-anchor="middle" x="75" y="-499.3" font-family="Sans" font-size="14.00" fill="#000000">Browser</text>
</g>
<!-- rp -->
<g id="node2" class="node">
<title>rp</title>
<g id="a_node2"><a xlink:href="url to configure reverse proxy" xlink:title="Reverse Proxy">
<polygon fill="#ffffcc" stroke="#000000" points="134,-413 16,-413 16,-377 134,-377 134,-413"/>
<text text-anchor="middle" x="75" y="-391.3" font-family="Sans" font-size="14.00" fill="#000000">Reverse Proxy</text>
</a>
</g>
</g>
<!-- browser&#45;&gt;rp -->
<g id="edge1" class="edge">
<title>browser&#45;&gt;rp</title>
<path fill="none" stroke="#000000" d="M75,-484.6793C75,-467.821 75,-442.5651 75,-423.147"/>
<polygon fill="#000000" stroke="#000000" points="78.5001,-423.0501 75,-413.0502 71.5001,-423.0502 78.5001,-423.0501"/>
<text text-anchor="middle" x="98" y="-455.8" font-family="Sans" font-size="14.00" fill="#000000">HTTPS</text>
</g>
<!-- filtron -->
<g id="node3" class="node">
<title>filtron</title>
<g id="a_node3"><a xlink:href="https://github.com/asciimoo/filtron" xlink:title="Filtron">
<polygon fill="#ffffcc" stroke="#000000" points="105.5,-288 44.5,-288 44.5,-252 105.5,-252 105.5,-288"/>
<text text-anchor="middle" x="75" y="-266.3" font-family="Sans" font-size="14.00" fill="#000000">Filtron</text>
</a>
</g>
</g>
<!-- rp&#45;&gt;filtron -->
<g id="edge4" class="edge">
<title>rp&#45;&gt;filtron</title>
<path fill="none" stroke="#000000" d="M75,-376.8239C75,-356.2723 75,-322.5472 75,-298.4893"/>
<polygon fill="#000000" stroke="#000000" points="78.5001,-298.198 75,-288.198 71.5001,-298.198 78.5001,-298.198"/>
<text text-anchor="middle" x="93.5" y="-328.8" font-family="Sans" font-size="14.00" fill="#000000">HTTP</text>
</g>
<!-- morty -->
<g id="node4" class="node">
<title>morty</title>
<g id="a_node4"><a xlink:href="https://github.com/asciimoo/morty" xlink:title="Morty">
<polygon fill="#ffffcc" stroke="#000000" points="180.5,-288 123.5,-288 123.5,-252 180.5,-252 180.5,-288"/>
<text text-anchor="middle" x="152" y="-266.3" font-family="Sans" font-size="14.00" fill="#000000">Morty</text>
</a>
</g>
</g>
<!-- rp&#45;&gt;morty -->
<g id="edge2" class="edge">
<title>rp&#45;&gt;morty</title>
<path fill="none" stroke="#000000" d="M89.8355,-376.705C98.0006,-366.2543 108.0569,-352.7317 116,-340 124.4983,-326.3785 132.7784,-310.5167 139.2508,-297.3397"/>
<polygon fill="#000000" stroke="#000000" points="142.4243,-298.8167 143.6215,-288.2897 136.1209,-295.7724 142.4243,-298.8167"/>
<text text-anchor="middle" x="268" y="-328.8" font-family="Sans" font-size="14.00" fill="#000000">optional: images and HTML pages proxy</text>
</g>
<!-- static -->
<g id="node5" class="node">
<title>static</title>
<g id="a_node5"><a xlink:href="url to configure static files" xlink:title="Static files">
<polygon fill="#ffffcc" stroke="#000000" points="594,-413 504,-413 504,-377 594,-377 594,-413"/>
<text text-anchor="middle" x="549" y="-391.3" font-family="Sans" font-size="14.00" fill="#000000">Static files</text>
</a>
</g>
</g>
<!-- rp&#45;&gt;static -->
<g id="edge3" class="edge">
<title>rp&#45;&gt;static</title>
<path fill="none" stroke="#000000" d="M134.074,-395C226.433,-395 403.7479,-395 493.718,-395"/>
<polygon fill="#000000" stroke="#000000" points="493.7212,-398.5001 503.7212,-395 493.7211,-391.5001 493.7212,-398.5001"/>
<text text-anchor="middle" x="319" y="-401.8" font-family="Sans" font-size="14.00" fill="#000000">optional: reverse proxy serves directly static files</text>
</g>
<!-- uwsgi -->
<g id="node6" class="node">
<title>uwsgi</title>
<g id="a_node6"><a xlink:href="url to configure uwsgi" xlink:title="uwsgi">
<polygon fill="#ffffcc" stroke="#000000" points="188,-163 130,-163 130,-127 188,-127 188,-163"/>
<text text-anchor="middle" x="159" y="-141.3" font-family="Sans" font-size="14.00" fill="#000000">uwsgi</text>
</a>
</g>
</g>
<!-- filtron&#45;&gt;uwsgi -->
<g id="edge5" class="edge">
<title>filtron&#45;&gt;uwsgi</title>
<path fill="none" stroke="#000000" d="M87.2143,-251.8239C101.3983,-230.7169 124.9198,-195.7146 141.1515,-171.5603"/>
<polygon fill="#000000" stroke="#000000" points="144.0983,-173.4502 146.7709,-163.198 138.2883,-169.5459 144.0983,-173.4502"/>
<text text-anchor="middle" x="139.5" y="-203.8" font-family="Sans" font-size="14.00" fill="#000000">HTTP</text>
</g>
<!-- searx1 -->
<g id="node7" class="node">
<title>searx1</title>
<polygon fill="#ffffcc" stroke="#000000" points="99.5,-52 16.5,-52 16.5,-16 99.5,-16 99.5,-52"/>
<text text-anchor="middle" x="58" y="-30.3" font-family="Sans" font-size="14.00" fill="#000000">Searx #1</text>
</g>
<!-- uwsgi&#45;&gt;searx1 -->
<g id="edge6" class="edge">
<title>uwsgi&#45;&gt;searx1</title>
<path fill="none" stroke="#000000" d="M142.3219,-126.6706C125.7281,-108.4339 100.1175,-80.2876 81.4738,-59.7979"/>
<polygon fill="#000000" stroke="#000000" points="84.0217,-57.3975 74.7029,-52.3566 78.8442,-62.1086 84.0217,-57.3975"/>
</g>
<!-- searx2 -->
<g id="node8" class="node">
<title>searx2</title>
<polygon fill="#ffffcc" stroke="#000000" points="200.5,-52 117.5,-52 117.5,-16 200.5,-16 200.5,-52"/>
<text text-anchor="middle" x="159" y="-30.3" font-family="Sans" font-size="14.00" fill="#000000">Searx #2</text>
</g>
<!-- uwsgi&#45;&gt;searx2 -->
<g id="edge7" class="edge">
<title>uwsgi&#45;&gt;searx2</title>
<path fill="none" stroke="#000000" d="M159,-126.6706C159,-109.2373 159,-82.7482 159,-62.5489"/>
<polygon fill="#000000" stroke="#000000" points="162.5001,-62.3566 159,-52.3566 155.5001,-62.3567 162.5001,-62.3566"/>
</g>
<!-- searx3 -->
<g id="node9" class="node">
<title>searx3</title>
<polygon fill="#ffffcc" stroke="#000000" points="301.5,-52 218.5,-52 218.5,-16 301.5,-16 301.5,-52"/>
<text text-anchor="middle" x="260" y="-30.3" font-family="Sans" font-size="14.00" fill="#000000">Searx #3</text>
</g>
<!-- uwsgi&#45;&gt;searx3 -->
<g id="edge8" class="edge">
<title>uwsgi&#45;&gt;searx3</title>
<path fill="none" stroke="#000000" d="M175.6781,-126.6706C192.2719,-108.4339 217.8825,-80.2876 236.5262,-59.7979"/>
<polygon fill="#000000" stroke="#000000" points="239.1558,-62.1086 243.2971,-52.3566 233.9783,-57.3975 239.1558,-62.1086"/>
</g>
<!-- searx4 -->
<g id="node10" class="node">
<title>searx4</title>
<polygon fill="#ffffcc" stroke="#000000" points="402.5,-52 319.5,-52 319.5,-16 402.5,-16 402.5,-52"/>
<text text-anchor="middle" x="361" y="-30.3" font-family="Sans" font-size="14.00" fill="#000000">Searx #4</text>
</g>
<!-- uwsgi&#45;&gt;searx4 -->
<g id="edge9" class="edge">
<title>uwsgi&#45;&gt;searx4</title>
<path fill="none" stroke="#000000" d="M188.3725,-128.8596C222.8149,-109.9334 280.1532,-78.4257 319.2181,-56.9594"/>
<polygon fill="#000000" stroke="#000000" points="321.1614,-59.8852 328.2399,-52.0018 317.7903,-53.7504 321.1614,-59.8852"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 8.0 KiB

3
_images/hello.dot Normal file
View File

@ -0,0 +1,3 @@
graph G {
Hello -- World
}

30
_images/hello.svg Normal file
View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.40.1 (20161225.0304)
-->
<!-- Title: G Pages: 1 -->
<svg width="76pt" height="116pt"
viewBox="0.00 0.00 75.59 116.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 112)">
<title>G</title>
<polygon fill="#ffffff" stroke="transparent" points="-4,4 -4,-112 71.594,-112 71.594,4 -4,4"/>
<!-- Hello -->
<g id="node1" class="node">
<title>Hello</title>
<ellipse fill="none" stroke="#000000" cx="33.797" cy="-90" rx="30.5947" ry="18"/>
<text text-anchor="middle" x="33.797" y="-86.3" font-family="Times,serif" font-size="14.00" fill="#000000">Hello</text>
</g>
<!-- World -->
<g id="node2" class="node">
<title>World</title>
<ellipse fill="none" stroke="#000000" cx="33.797" cy="-18" rx="33.5952" ry="18"/>
<text text-anchor="middle" x="33.797" y="-14.3" font-family="Times,serif" font-size="14.00" fill="#000000">World</text>
</g>
<!-- Hello&#45;&#45;World -->
<g id="edge1" class="edge">
<title>Hello&#45;&#45;World</title>
<path fill="none" stroke="#000000" d="M33.797,-71.8314C33.797,-61 33.797,-47.2876 33.797,-36.4133"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1,25 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- This file was generated by dvisvgm 2.6.1 -->
<svg height='48.422712pt' version='1.1' viewBox='57.608781 53.798251 36.523255 48.422712' width='36.523255pt' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'>
<defs>
<path d='M9.191532 -3.20797C9.428643 -3.20797 9.679701 -3.20797 9.679701 -3.486924S9.428643 -3.765878 9.191532 -3.765878H1.645828C1.408717 -3.765878 1.157659 -3.765878 1.157659 -3.486924S1.408717 -3.20797 1.645828 -3.20797H9.191532Z' id='g0-0'/>
<path d='M5.565131 -3.221918H9.414695C9.609963 -3.221918 9.861021 -3.221918 9.861021 -3.472976C9.861021 -3.737983 9.62391 -3.737983 9.414695 -3.737983H5.565131V-7.587547C5.565131 -7.782814 5.565131 -8.033873 5.314072 -8.033873C5.049066 -8.033873 5.049066 -7.796762 5.049066 -7.587547V-3.737983H1.199502C1.004234 -3.737983 0.753176 -3.737983 0.753176 -3.486924C0.753176 -3.221918 0.990286 -3.221918 1.199502 -3.221918H5.049066V0.627646C5.049066 0.822914 5.049066 1.073973 5.300125 1.073973C5.565131 1.073973 5.565131 0.836862 5.565131 0.627646V-3.221918Z' id='g2-43'/>
<path d='M4.016936 -8.940473C4.016936 -9.26127 4.016936 -9.275218 3.737983 -9.275218C3.403238 -8.89863 2.705853 -8.382565 1.26924 -8.382565V-7.978082C1.590037 -7.978082 2.287422 -7.978082 3.054545 -8.340722V-1.073973C3.054545 -0.571856 3.012702 -0.404483 1.785305 -0.404483H1.352927V0C1.729514 -0.027895 3.082441 -0.027895 3.542715 -0.027895S5.341968 -0.027895 5.718555 0V-0.404483H5.286177C4.05878 -0.404483 4.016936 -0.571856 4.016936 -1.073973V-8.940473Z' id='g2-49'/>
<path d='M6.611208 -5.69066C6.164882 -5.606974 5.997509 -5.272229 5.997509 -5.007223C5.997509 -4.672478 6.262516 -4.560897 6.457783 -4.560897C6.876214 -4.560897 7.169116 -4.923537 7.169116 -5.300125C7.169116 -5.885928 6.499626 -6.150934 5.913823 -6.150934C5.063014 -6.150934 4.588792 -5.314072 4.463263 -5.049066C4.142466 -6.095143 3.277709 -6.150934 3.02665 -6.150934C1.603985 -6.150934 0.850809 -4.323786 0.850809 -4.016936C0.850809 -3.961146 0.9066 -3.891407 1.004234 -3.891407C1.115816 -3.891407 1.143711 -3.975093 1.171606 -4.030884C1.645828 -5.579078 2.580324 -5.87198 2.984807 -5.87198C3.612453 -5.87198 3.737983 -5.286177 3.737983 -4.951432C3.737983 -4.644583 3.654296 -4.323786 3.486924 -3.654296L3.012702 -1.743462C2.803487 -0.9066 2.399004 -0.139477 1.659776 -0.139477C1.590037 -0.139477 1.241345 -0.139477 0.948443 -0.320797C1.45056 -0.418431 1.562142 -0.836862 1.562142 -1.004234C1.562142 -1.283188 1.352927 -1.45056 1.08792 -1.45056C0.753176 -1.45056 0.390535 -1.157659 0.390535 -0.711333C0.390535 -0.125529 1.046077 0.139477 1.645828 0.139477C2.315318 0.139477 2.789539 -0.390535 3.082441 -0.962391C3.305604 -0.139477 4.002989 0.139477 4.519054 0.139477C5.941719 0.139477 6.694894 -1.687671 6.694894 -1.994521C6.694894 -2.064259 6.639103 -2.12005 6.555417 -2.12005C6.429888 -2.12005 6.41594 -2.050311 6.374097 -1.93873C5.997509 -0.711333 5.188543 -0.139477 4.560897 -0.139477C4.072727 -0.139477 3.807721 -0.502117 3.807721 -1.073973C3.807721 -1.380822 3.863512 -1.603985 4.086675 -2.524533L4.574844 -4.42142C4.78406 -5.258281 5.258281 -5.87198 5.899875 -5.87198C5.927771 -5.87198 6.318306 -5.87198 6.611208 -5.69066Z' id='g1-120'/>
<path d='M3.668244 1.562142C3.291656 2.092154 2.747696 2.566376 2.064259 2.566376C1.896887 2.566376 1.227397 2.538481 1.018182 1.896887C1.060025 1.910834 1.129763 1.910834 1.157659 1.910834C1.57609 1.910834 1.855044 1.548194 1.855044 1.227397S1.590037 0.795019 1.380822 0.795019C1.157659 0.795019 0.669489 0.962391 0.669489 1.645828C0.669489 2.357161 1.26924 2.84533 2.064259 2.84533C3.459029 2.84533 4.867746 1.562142 5.258281 0.013948L6.625156 -5.425654C6.639103 -5.495392 6.666999 -5.579078 6.666999 -5.662765C6.666999 -5.87198 6.499626 -6.011457 6.290411 -6.011457C6.164882 -6.011457 5.87198 -5.955666 5.760399 -5.537235L4.728269 -1.436613C4.658531 -1.185554 4.658531 -1.157659 4.546949 -1.004234C4.267995 -0.613699 3.807721 -0.139477 3.138232 -0.139477C2.357161 -0.139477 2.287422 -0.9066 2.287422 -1.283188C2.287422 -2.078207 2.66401 -3.152179 3.040598 -4.156413C3.194022 -4.560897 3.277709 -4.756164 3.277709 -5.035118C3.277709 -5.620922 2.859278 -6.150934 2.175841 -6.150934C0.892653 -6.150934 0.376588 -4.128518 0.376588 -4.016936C0.376588 -3.961146 0.432379 -3.891407 0.530012 -3.891407C0.655542 -3.891407 0.669489 -3.947198 0.72528 -4.142466C1.060025 -5.314072 1.590037 -5.87198 2.133998 -5.87198C2.259527 -5.87198 2.496638 -5.87198 2.496638 -5.411706C2.496638 -5.049066 2.343213 -4.644583 2.133998 -4.11457C1.45056 -2.287422 1.45056 -1.827148 1.45056 -1.492403C1.45056 -0.167372 2.399004 0.139477 3.096389 0.139477C3.500872 0.139477 4.002989 0.013948 4.491158 -0.502117L4.505106 -0.488169C4.29589 0.334745 4.156413 0.878705 3.668244 1.562142Z' id='g1-121'/>
<path d='M1.771357 -1.129763C2.371108 -1.8132 2.859278 -2.245579 3.556663 -2.873225C4.393524 -3.598506 4.756164 -3.947198 4.951432 -4.156413C5.927771 -5.118804 6.41594 -5.927771 6.41594 -6.039352S6.304359 -6.150934 6.276463 -6.150934C6.178829 -6.150934 6.150934 -6.095143 6.081196 -5.997509C5.732503 -5.397758 5.397758 -5.104857 5.035118 -5.104857C4.742217 -5.104857 4.588792 -5.230386 4.323786 -5.565131C4.030884 -5.913823 3.793773 -6.150934 3.38929 -6.150934C2.371108 -6.150934 1.75741 -4.881694 1.75741 -4.588792C1.75741 -4.546949 1.771357 -4.463263 1.896887 -4.463263C2.008468 -4.463263 2.022416 -4.519054 2.064259 -4.616687C2.30137 -5.174595 2.970859 -5.272229 3.235866 -5.272229C3.528767 -5.272229 3.807721 -5.174595 4.100623 -5.049066C4.630635 -4.825903 4.853798 -4.825903 4.993275 -4.825903C5.090909 -4.825903 5.1467 -4.825903 5.216438 -4.839851C4.756164 -4.29589 4.002989 -3.626401 3.375342 -3.054545L1.966625 -1.75741C1.115816 -0.892653 0.599751 -0.069738 0.599751 0.027895C0.599751 0.111582 0.669489 0.139477 0.753176 0.139477S0.850809 0.125529 0.948443 -0.041843C1.171606 -0.390535 1.617933 -0.9066 2.133998 -0.9066C2.426899 -0.9066 2.566376 -0.808966 2.84533 -0.460274C3.110336 -0.153425 3.347447 0.139477 3.793773 0.139477C5.160648 0.139477 5.941719 -1.63188 5.941719 -1.952677C5.941719 -2.008468 5.927771 -2.092154 5.788294 -2.092154C5.676712 -2.092154 5.662765 -2.036364 5.620922 -1.896887C5.314072 -1.073973 4.491158 -0.739228 3.947198 -0.739228C3.654296 -0.739228 3.375342 -0.836862 3.082441 -0.962391C2.524533 -1.185554 2.371108 -1.185554 2.189788 -1.185554C2.050311 -1.185554 1.896887 -1.185554 1.771357 -1.129763Z' id='g1-122'/>
</defs>
<g id='page1'>
<use x='59.270442' xlink:href='#g2-49' y='62.786766'/>
<rect height='0.55789' width='7.760768' x='58.804295' y='68.456606'/>
<use x='58.804295' xlink:href='#g1-120' y='81.789907'/>
<use x='70.860038' xlink:href='#g2-43' y='72.222482'/>
<use x='85.942577' xlink:href='#g2-49' y='62.786766'/>
<rect height='0.55789' width='7.159416' x='85.777106' y='68.456606'/>
<use x='85.777106' xlink:href='#g1-121' y='81.789907'/>
<rect height='0.55789' width='36.523255' x='57.608781' y='86.175621'/>
<use x='60.284264' xlink:href='#g1-121' y='99.508922'/>
<use x='70.543155' xlink:href='#g0-0' y='99.508922'/>
<use x='84.490862' xlink:href='#g1-122' y='99.508922'/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 7.0 KiB

View File

@ -0,0 +1,25 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- This file was generated by dvisvgm 2.6.1 -->
<svg height='29.523663pt' version='1.1' viewBox='57.608781 53.79825 23.092891 29.523663' width='23.092891pt' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'>
<defs>
<path d='M6.434044 -2.245569C6.600021 -2.245569 6.775761 -2.245569 6.775761 -2.440836S6.600021 -2.636103 6.434044 -2.636103H1.152075C0.986098 -2.636103 0.810358 -2.636103 0.810358 -2.440836S0.986098 -2.245569 1.152075 -2.245569H6.434044Z' id='g0-0'/>
<path d='M3.993208 -2.245569H6.717181C6.853868 -2.245569 7.039372 -2.245569 7.039372 -2.440836S6.853868 -2.636103 6.717181 -2.636103H3.993208V-5.36984C3.993208 -5.506526 3.993208 -5.69203 3.797941 -5.69203S3.602674 -5.506526 3.602674 -5.36984V-2.636103H0.868938C0.732251 -2.636103 0.546747 -2.636103 0.546747 -2.440836S0.732251 -2.245569 0.868938 -2.245569H3.602674V0.488167C3.602674 0.624854 3.602674 0.810358 3.797941 0.810358S3.993208 0.624854 3.993208 0.488167V-2.245569Z' id='g2-43'/>
<path d='M2.870423 -6.248541C2.870423 -6.482861 2.870423 -6.502388 2.645866 -6.502388C2.040539 -5.877534 1.181365 -5.877534 0.868938 -5.877534V-5.57487C1.064205 -5.57487 1.640242 -5.57487 2.147936 -5.828717V-0.771304C2.147936 -0.419824 2.118646 -0.302664 1.239945 -0.302664H0.927518V0C1.269235 -0.02929 2.118646 -0.02929 2.50918 -0.02929S3.749124 -0.02929 4.090841 0V-0.302664H3.778414C2.899713 -0.302664 2.870423 -0.41006 2.870423 -0.771304V-6.248541Z' id='g2-49'/>
<path d='M3.260957 -2.94853C3.319537 -3.202377 3.544094 -4.100605 4.227528 -4.100605C4.276345 -4.100605 4.510665 -4.100605 4.715696 -3.973681C4.442322 -3.924865 4.247055 -3.680781 4.247055 -3.446461C4.247055 -3.290247 4.354452 -3.104744 4.618062 -3.104744C4.832856 -3.104744 5.145283 -3.280484 5.145283 -3.671018C5.145283 -4.178712 4.569245 -4.315398 4.237292 -4.315398C3.671018 -4.315398 3.329301 -3.797941 3.21214 -3.573384C2.968057 -4.217765 2.440836 -4.315398 2.157699 -4.315398C1.142311 -4.315398 0.585801 -3.055927 0.585801 -2.811843C0.585801 -2.71421 0.683434 -2.71421 0.702961 -2.71421C0.781068 -2.71421 0.810358 -2.733737 0.829884 -2.821607C1.161838 -3.856521 1.806219 -4.100605 2.138172 -4.100605C2.323676 -4.100605 2.665393 -4.012735 2.665393 -3.446461C2.665393 -3.143797 2.499416 -2.489653 2.138172 -1.122785C1.981959 -0.517457 1.640242 -0.107397 1.210655 -0.107397C1.152075 -0.107397 0.927518 -0.107397 0.722488 -0.23432C0.966571 -0.283137 1.181365 -0.488167 1.181365 -0.761541C1.181365 -1.025151 0.966571 -1.103258 0.820121 -1.103258C0.527221 -1.103258 0.283137 -0.849411 0.283137 -0.536984C0.283137 -0.08787 0.771304 0.107397 1.200891 0.107397C1.845272 0.107397 2.196753 -0.576037 2.226043 -0.634617C2.343203 -0.273374 2.694683 0.107397 3.280484 0.107397C4.286108 0.107397 4.842619 -1.152075 4.842619 -1.396158C4.842619 -1.493792 4.754749 -1.493792 4.725459 -1.493792C4.637589 -1.493792 4.618062 -1.454738 4.598535 -1.386395C4.276345 -0.341717 3.612438 -0.107397 3.300011 -0.107397C2.91924 -0.107397 2.763027 -0.419824 2.763027 -0.751778C2.763027 -0.966571 2.821607 -1.181365 2.929003 -1.610952L3.260957 -2.94853Z' id='g1-120'/>
<path d='M4.744986 -3.719834C4.784039 -3.856521 4.784039 -3.876048 4.784039 -3.944391C4.784039 -4.120131 4.647352 -4.208002 4.500902 -4.208002C4.403268 -4.208002 4.247055 -4.149422 4.159185 -4.002971C4.139658 -3.954155 4.061551 -3.651491 4.022498 -3.475751C3.954155 -3.221904 3.885811 -2.958293 3.827231 -2.694683L3.387881 -0.937281C3.348827 -0.790831 2.929003 -0.107397 2.284623 -0.107397C1.786692 -0.107397 1.679295 -0.536984 1.679295 -0.898228C1.679295 -1.347342 1.845272 -1.952669 2.177226 -2.811843C2.333439 -3.21214 2.372493 -3.319537 2.372493 -3.514804C2.372493 -3.954155 2.060066 -4.315398 1.571899 -4.315398C0.644381 -4.315398 0.283137 -2.899713 0.283137 -2.811843C0.283137 -2.71421 0.38077 -2.71421 0.400297 -2.71421C0.497931 -2.71421 0.507694 -2.733737 0.556511 -2.88995C0.820121 -3.807704 1.210655 -4.100605 1.542608 -4.100605C1.620715 -4.100605 1.786692 -4.100605 1.786692 -3.788178C1.786692 -3.544094 1.689059 -3.290247 1.620715 -3.104744C1.230181 -2.069829 1.054441 -1.513318 1.054441 -1.054441C1.054441 -0.185504 1.669532 0.107397 2.245569 0.107397C2.62634 0.107397 2.958293 -0.05858 3.231667 -0.331954C3.104744 0.17574 2.987583 0.654144 2.59705 1.171601C2.343203 1.503555 1.972196 1.786692 1.523082 1.786692C1.386395 1.786692 0.947044 1.757402 0.781068 1.376632C0.937281 1.376632 1.064205 1.376632 1.200891 1.259471C1.298525 1.171601 1.396158 1.044678 1.396158 0.859174C1.396158 0.556511 1.132548 0.517457 1.034915 0.517457C0.810358 0.517457 0.488167 0.673671 0.488167 1.152075C0.488167 1.640242 0.917754 2.001486 1.523082 2.001486C2.528706 2.001486 3.534331 1.113021 3.807704 0.009763L4.744986 -3.719834Z' id='g1-121'/>
<path d='M1.298525 -0.810358C1.825745 -1.376632 2.108882 -1.620715 2.460363 -1.923379C2.460363 -1.933142 3.06569 -2.4506 3.417171 -2.80208C4.344688 -3.710071 4.559482 -4.178712 4.559482 -4.217765C4.559482 -4.315398 4.471612 -4.315398 4.452085 -4.315398C4.383742 -4.315398 4.354452 -4.295872 4.305635 -4.208002C4.012735 -3.739361 3.807704 -3.583148 3.573384 -3.583148S3.221904 -3.729598 3.075454 -3.895575C2.88995 -4.120131 2.723973 -4.315398 2.401783 -4.315398C1.669532 -4.315398 1.220418 -3.407407 1.220418 -3.202377C1.220418 -3.15356 1.249708 -3.09498 1.337578 -3.09498S1.444975 -3.143797 1.464502 -3.202377C1.650005 -3.651491 2.216279 -3.661254 2.294386 -3.661254C2.499416 -3.661254 2.68492 -3.592911 2.909477 -3.514804C3.300011 -3.368354 3.407407 -3.368354 3.661254 -3.368354C3.309774 -2.94853 2.489653 -2.245569 2.304149 -2.089356L1.425448 -1.269235C0.761541 -0.615091 0.419824 -0.05858 0.419824 0.009763C0.419824 0.107397 0.517457 0.107397 0.536984 0.107397C0.615091 0.107397 0.634617 0.08787 0.693197 -0.019527C0.917754 -0.361244 1.210655 -0.624854 1.523082 -0.624854C1.747639 -0.624854 1.845272 -0.536984 2.089356 -0.253847C2.255333 -0.048817 2.431073 0.107397 2.71421 0.107397C3.680781 0.107397 4.247055 -1.132548 4.247055 -1.396158C4.247055 -1.444975 4.208002 -1.493792 4.129895 -1.493792C4.042025 -1.493792 4.022498 -1.435212 3.993208 -1.366868C3.768651 -0.732251 3.143797 -0.546747 2.821607 -0.546747C2.62634 -0.546747 2.4506 -0.605327 2.245569 -0.673671C1.913616 -0.800594 1.767165 -0.839648 1.562135 -0.839648C1.542608 -0.839648 1.386395 -0.839648 1.298525 -0.810358Z' id='g1-122'/>
</defs>
<g id='page1'>
<use x='59.153464' xlink:href='#g2-49' y='60.090183'/>
<rect height='0.55789' width='5.580027' x='58.804295' y='61.81595'/>
<use x='58.804295' xlink:href='#g1-120' y='70.391549'/>
<use x='65.579836' xlink:href='#g2-43' y='65.581827'/>
<use x='74.496784' xlink:href='#g2-49' y='60.090183'/>
<rect height='0.55789' width='5.137078' x='74.369089' y='61.81595'/>
<use x='74.369089' xlink:href='#g1-121' y='70.391549'/>
<rect height='0.55789' width='23.092891' x='57.608781' y='72.847884'/>
<use x='60.304908' xlink:href='#g1-121' y='81.423483'/>
<use x='65.441996' xlink:href='#g0-0' y='81.423483'/>
<use x='73.035735' xlink:href='#g1-122' y='81.423483'/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.9 KiB

View File

@ -0,0 +1,22 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- This file was generated by dvisvgm 2.6.1 -->
<svg height='12.418845pt' version='1.1' viewBox='56.413267 54.399982 69.686469 12.418845' width='69.686469pt' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'>
<defs>
<path d='M5.565131 -3.221918H9.414695C9.609963 -3.221918 9.861021 -3.221918 9.861021 -3.472976C9.861021 -3.737983 9.62391 -3.737983 9.414695 -3.737983H5.565131V-7.587547C5.565131 -7.782814 5.565131 -8.033873 5.314072 -8.033873C5.049066 -8.033873 5.049066 -7.796762 5.049066 -7.587547V-3.737983H1.199502C1.004234 -3.737983 0.753176 -3.737983 0.753176 -3.486924C0.753176 -3.221918 0.990286 -3.221918 1.199502 -3.221918H5.049066V0.627646C5.049066 0.822914 5.049066 1.073973 5.300125 1.073973C5.565131 1.073973 5.565131 0.836862 5.565131 0.627646V-3.221918Z' id='g2-43'/>
<path d='M9.414695 -4.519054C9.609963 -4.519054 9.861021 -4.519054 9.861021 -4.770112C9.861021 -5.035118 9.62391 -5.035118 9.414695 -5.035118H1.199502C1.004234 -5.035118 0.753176 -5.035118 0.753176 -4.78406C0.753176 -4.519054 0.990286 -4.519054 1.199502 -4.519054H9.414695ZM9.414695 -1.924782C9.609963 -1.924782 9.861021 -1.924782 9.861021 -2.175841C9.861021 -2.440847 9.62391 -2.440847 9.414695 -2.440847H1.199502C1.004234 -2.440847 0.753176 -2.440847 0.753176 -2.189788C0.753176 -1.924782 0.990286 -1.924782 1.199502 -1.924782H9.414695Z' id='g2-61'/>
<path d='M4.198257 -1.659776C4.128518 -1.422665 4.128518 -1.39477 3.93325 -1.129763C3.626401 -0.739228 3.012702 -0.139477 2.357161 -0.139477C1.785305 -0.139477 1.464508 -0.655542 1.464508 -1.478456C1.464508 -2.245579 1.896887 -3.807721 2.161893 -4.393524C2.636115 -5.369863 3.291656 -5.87198 3.835616 -5.87198C4.756164 -5.87198 4.937484 -4.728269 4.937484 -4.616687C4.937484 -4.60274 4.895641 -4.42142 4.881694 -4.393524L4.198257 -1.659776ZM5.090909 -5.230386C4.937484 -5.593026 4.560897 -6.150934 3.835616 -6.150934C2.259527 -6.150934 0.557908 -4.11457 0.557908 -2.050311C0.557908 -0.669489 1.366874 0.139477 2.315318 0.139477C3.082441 0.139477 3.737983 -0.460274 4.128518 -0.920548C4.267995 -0.097634 4.923537 0.139477 5.341968 0.139477S6.095143 -0.111582 6.346202 -0.613699C6.569365 -1.08792 6.764633 -1.93873 6.764633 -1.994521C6.764633 -2.064259 6.708842 -2.12005 6.625156 -2.12005C6.499626 -2.12005 6.485679 -2.050311 6.429888 -1.841096C6.220672 -1.018182 5.955666 -0.139477 5.383811 -0.139477C4.979328 -0.139477 4.951432 -0.502117 4.951432 -0.781071C4.951432 -1.101868 4.993275 -1.255293 5.118804 -1.799253C5.216438 -2.147945 5.286177 -2.454795 5.397758 -2.859278C5.913823 -4.951432 6.039352 -5.453549 6.039352 -5.537235C6.039352 -5.732503 5.885928 -5.885928 5.676712 -5.885928C5.230386 -5.885928 5.118804 -5.397758 5.090909 -5.230386Z' id='g0-97'/>
<path d='M3.221918 -9.331009C3.235866 -9.3868 3.263761 -9.470486 3.263761 -9.540224C3.263761 -9.679701 3.124284 -9.679701 3.096389 -9.679701C3.082441 -9.679701 2.580324 -9.637858 2.329265 -9.609963C2.092154 -9.596015 1.882939 -9.56812 1.63188 -9.554172C1.297136 -9.526276 1.199502 -9.512329 1.199502 -9.26127C1.199502 -9.121793 1.338979 -9.121793 1.478456 -9.121793C2.189788 -9.121793 2.189788 -8.996264 2.189788 -8.856787C2.189788 -8.759153 2.078207 -8.35467 2.022416 -8.103611L1.687671 -6.764633C1.548194 -6.206725 0.753176 -3.040598 0.697385 -2.789539C0.627646 -2.440847 0.627646 -2.203736 0.627646 -2.022416C0.627646 -0.599751 1.422665 0.139477 2.329265 0.139477C3.947198 0.139477 5.620922 -1.93873 5.620922 -3.961146C5.620922 -5.244334 4.895641 -6.150934 3.849564 -6.150934C3.124284 -6.150934 2.468742 -5.551183 2.203736 -5.272229L3.221918 -9.331009ZM2.343213 -0.139477C1.896887 -0.139477 1.408717 -0.474222 1.408717 -1.562142C1.408717 -2.022416 1.45056 -2.287422 1.701619 -3.263761C1.743462 -3.445081 1.966625 -4.337733 2.022416 -4.519054C2.050311 -4.630635 2.873225 -5.87198 3.821669 -5.87198C4.435367 -5.87198 4.714321 -5.258281 4.714321 -4.533001C4.714321 -3.863512 4.323786 -2.287422 3.975093 -1.562142C3.626401 -0.808966 2.984807 -0.139477 2.343213 -0.139477Z' id='g0-98'/>
<path d='M5.453549 -5.244334C5.188543 -5.244334 5.063014 -5.244334 4.867746 -5.076961C4.78406 -5.007223 4.630635 -4.798007 4.630635 -4.574844C4.630635 -4.29589 4.839851 -4.128518 5.104857 -4.128518C5.439601 -4.128518 5.816189 -4.407472 5.816189 -4.96538C5.816189 -5.634869 5.174595 -6.150934 4.212204 -6.150934C2.385056 -6.150934 0.557908 -4.156413 0.557908 -2.175841C0.557908 -0.962391 1.311083 0.139477 2.733748 0.139477C4.630635 0.139477 5.830137 -1.338979 5.830137 -1.520299C5.830137 -1.603985 5.746451 -1.673724 5.69066 -1.673724C5.648817 -1.673724 5.634869 -1.659776 5.50934 -1.534247C4.616687 -0.348692 3.291656 -0.139477 2.761644 -0.139477C1.799253 -0.139477 1.492403 -0.976339 1.492403 -1.673724C1.492403 -2.161893 1.729514 -3.514819 2.231631 -4.463263C2.594271 -5.118804 3.347447 -5.87198 4.226152 -5.87198C4.407472 -5.87198 5.174595 -5.844085 5.453549 -5.244334Z' id='g0-99'/>
<path d='M1.239945 -0.751778L2.274859 -1.757402C3.797941 -3.104744 4.383742 -3.631964 4.383742 -4.608299C4.383742 -5.72132 3.505041 -6.502388 2.313913 -6.502388C1.210655 -6.502388 0.488167 -5.60416 0.488167 -4.735222C0.488167 -4.188475 0.976334 -4.188475 1.005625 -4.188475C1.171601 -4.188475 1.513318 -4.305635 1.513318 -4.705932C1.513318 -4.959779 1.337578 -5.213626 0.995861 -5.213626C0.917754 -5.213626 0.898228 -5.213626 0.868938 -5.203863C1.093495 -5.83848 1.620715 -6.199724 2.186989 -6.199724C3.075454 -6.199724 3.495277 -5.408893 3.495277 -4.608299C3.495277 -3.827231 3.00711 -3.055927 2.470126 -2.4506L0.595564 -0.361244C0.488167 -0.253847 0.488167 -0.23432 0.488167 0H4.110368L4.383742 -1.698822H4.139658C4.090841 -1.405922 4.022498 -0.976334 3.924865 -0.829884C3.856521 -0.751778 3.21214 -0.751778 2.997347 -0.751778H1.239945Z' id='g1-50'/>
</defs>
<g id='page1'>
<use x='56.413267' xlink:href='#g0-97' y='65.753425'/>
<use x='63.582369' xlink:href='#g1-50' y='60.691915'/>
<use x='72.061649' xlink:href='#g2-43' y='65.753425'/>
<use x='85.783204' xlink:href='#g0-98' y='65.753425'/>
<use x='91.589827' xlink:href='#g1-50' y='60.691915'/>
<use x='100.843973' xlink:href='#g2-61' y='65.753425'/>
<use x='115.340392' xlink:href='#g0-99' y='65.753425'/>
<use x='121.218045' xlink:href='#g1-50' y='60.691915'/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@ -0,0 +1,43 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- This file was generated by dvisvgm 2.6.1 -->
<svg height='28.68903pt' version='1.1' viewBox='165.981071 78.308016 134.289458 28.68903' width='134.289458pt' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'>
<defs>
<path d='M3.807721 -3.249813C3.87746 -3.417186 3.87746 -3.445081 3.87746 -3.486924S3.87746 -3.556663 3.807721 -3.724035L1.366874 -10.139975C1.283188 -10.377086 1.199502 -10.460772 1.046077 -10.460772S0.767123 -10.335243 0.767123 -10.181818C0.767123 -10.139975 0.767123 -10.11208 0.836862 -9.958655L3.305604 -3.486924L0.836862 2.956912C0.767123 3.110336 0.767123 3.138232 0.767123 3.20797C0.767123 3.361395 0.892653 3.486924 1.046077 3.486924C1.227397 3.486924 1.283188 3.347447 1.338979 3.20797L3.807721 -3.249813Z' id='g1-105'/>
<path d='M2.217684 -9.958655C2.217684 -10.209714 2.217684 -10.460772 1.93873 -10.460772S1.659776 -10.209714 1.659776 -9.958655V2.984807C1.659776 3.235866 1.659776 3.486924 1.93873 3.486924S2.217684 3.235866 2.217684 2.984807V-9.958655Z' id='g1-106'/>
<path d='M6.555417 -9.344956C6.555417 -9.358904 6.611208 -9.540224 6.611208 -9.554172C6.611208 -9.679701 6.499626 -9.679701 6.457783 -9.679701C6.332254 -9.679701 6.318306 -9.609963 6.262516 -9.400747L3.961146 -0.167372C2.803487 -0.306849 2.371108 -0.892653 2.371108 -1.729514C2.371108 -2.036364 2.371108 -2.357161 3.02665 -4.086675C3.20797 -4.588792 3.277709 -4.770112 3.277709 -5.021171C3.277709 -5.648817 2.831382 -6.150934 2.175841 -6.150934C0.892653 -6.150934 0.376588 -4.128518 0.376588 -4.016936C0.376588 -3.961146 0.432379 -3.891407 0.530012 -3.891407C0.655542 -3.891407 0.669489 -3.947198 0.72528 -4.142466C1.060025 -5.355915 1.617933 -5.87198 2.133998 -5.87198C2.259527 -5.87198 2.496638 -5.858032 2.496638 -5.411706C2.496638 -5.355915 2.496638 -5.049066 2.259527 -4.435367C1.506351 -2.454795 1.506351 -2.147945 1.506351 -1.827148C1.506351 -0.488169 2.622167 0.027895 3.87746 0.125529C3.765878 0.557908 3.668244 1.004234 3.556663 1.436613C3.333499 2.273474 3.235866 2.66401 3.235866 2.719801C3.235866 2.84533 3.347447 2.84533 3.38929 2.84533C3.417186 2.84533 3.472976 2.84533 3.500872 2.789539C3.556663 2.733748 4.128518 0.390535 4.184309 0.139477C4.700374 0.139477 5.802242 0.139477 7.057534 -1.157659C7.517808 -1.659776 7.936239 -2.30137 8.17335 -2.901121C8.312827 -3.263761 8.647572 -4.505106 8.647572 -5.216438C8.647572 -6.0533 8.229141 -6.150934 8.089664 -6.150934C7.754919 -6.150934 7.44807 -5.816189 7.44807 -5.537235C7.44807 -5.369863 7.545704 -5.272229 7.601494 -5.216438C7.727024 -5.090909 8.103611 -4.714321 8.103611 -3.989041C8.103611 -3.486924 7.824658 -2.454795 6.932005 -1.45056C5.760399 -0.139477 4.686426 -0.139477 4.267995 -0.139477L6.555417 -9.344956Z' id='g2-32'/>
<path d='M2.566376 -0.669489C2.566376 -1.073973 2.231631 -1.352927 1.896887 -1.352927C1.492403 -1.352927 1.21345 -1.018182 1.21345 -0.683437C1.21345 -0.278954 1.548194 0 1.882939 0C2.287422 0 2.566376 -0.334745 2.566376 -0.669489Z' id='g2-58'/>
<path d='M6.332254 -4.658531C6.248568 -5.439601 5.760399 -6.374097 4.505106 -6.374097C2.538481 -6.374097 0.530012 -4.379577 0.530012 -2.161893C0.530012 -1.311083 1.115816 0.292902 3.012702 0.292902C6.304359 0.292902 7.713076 -4.505106 7.713076 -6.41594C7.713076 -8.424408 6.583313 -9.972603 4.798007 -9.972603C2.775592 -9.972603 2.175841 -8.201245 2.175841 -7.824658C2.175841 -7.699128 2.259527 -7.392279 2.650062 -7.392279C3.138232 -7.392279 3.347447 -7.838605 3.347447 -8.075716C3.347447 -8.508095 2.915068 -8.508095 2.733748 -8.508095C3.305604 -9.540224 4.365629 -9.637858 4.742217 -9.637858C5.969614 -9.637858 6.750685 -8.661519 6.750685 -7.099377C6.750685 -6.206725 6.485679 -5.174595 6.346202 -4.658531H6.332254ZM3.054545 -0.083686C1.743462 -0.083686 1.520299 -1.115816 1.520299 -1.701619C1.520299 -2.315318 1.910834 -3.75193 2.12005 -4.267995C2.30137 -4.686426 3.096389 -6.095143 4.546949 -6.095143C5.816189 -6.095143 6.109091 -4.993275 6.109091 -4.2401C6.109091 -3.20797 5.202491 -0.083686 3.054545 -0.083686Z' id='g2-64'/>
<path d='M10.432877 -8.508095C10.558406 -8.982316 10.586301 -9.121793 11.576588 -9.121793C11.827646 -9.121793 11.967123 -9.121793 11.967123 -9.372852C11.967123 -9.526276 11.841594 -9.526276 11.757908 -9.526276C11.506849 -9.526276 11.213948 -9.498381 10.948941 -9.498381H9.303113C9.038107 -9.498381 8.745205 -9.526276 8.480199 -9.526276C8.382565 -9.526276 8.215193 -9.526276 8.215193 -9.26127C8.215193 -9.121793 8.312827 -9.121793 8.577833 -9.121793C9.414695 -9.121793 9.414695 -9.010212 9.414695 -8.856787C9.414695 -8.828892 9.414695 -8.745205 9.358904 -8.53599L8.508095 -5.160648H4.29589L5.132752 -8.508095C5.258281 -8.982316 5.286177 -9.121793 6.276463 -9.121793C6.527522 -9.121793 6.666999 -9.121793 6.666999 -9.372852C6.666999 -9.526276 6.541469 -9.526276 6.457783 -9.526276C6.206725 -9.526276 5.913823 -9.498381 5.648817 -9.498381H4.002989C3.737983 -9.498381 3.445081 -9.526276 3.180075 -9.526276C3.082441 -9.526276 2.915068 -9.526276 2.915068 -9.26127C2.915068 -9.121793 3.012702 -9.121793 3.277709 -9.121793C4.11457 -9.121793 4.11457 -9.010212 4.11457 -8.856787C4.11457 -8.828892 4.11457 -8.745205 4.05878 -8.53599L2.175841 -1.03213C2.050311 -0.54396 2.022416 -0.404483 1.060025 -0.404483C0.739228 -0.404483 0.641594 -0.404483 0.641594 -0.139477C0.641594 0 0.795019 0 0.836862 0C1.08792 0 1.380822 -0.027895 1.645828 -0.027895H3.291656C3.556663 -0.027895 3.849564 0 4.11457 0C4.226152 0 4.379577 0 4.379577 -0.265006C4.379577 -0.404483 4.254047 -0.404483 4.044832 -0.404483C3.194022 -0.404483 3.194022 -0.516065 3.194022 -0.655542C3.194022 -0.669489 3.194022 -0.767123 3.221918 -0.878705L4.184309 -4.756164H8.410461C8.17335 -3.835616 7.462017 -0.920548 7.434122 -0.836862C7.280697 -0.418431 7.057534 -0.418431 6.23462 -0.404483C6.067248 -0.404483 5.941719 -0.404483 5.941719 -0.139477C5.941719 0 6.095143 0 6.136986 0C6.388045 0 6.680946 -0.027895 6.945953 -0.027895H8.591781C8.856787 -0.027895 9.149689 0 9.414695 0C9.526276 0 9.679701 0 9.679701 -0.265006C9.679701 -0.404483 9.554172 -0.404483 9.344956 -0.404483C8.494147 -0.404483 8.494147 -0.516065 8.494147 -0.655542C8.494147 -0.669489 8.494147 -0.767123 8.522042 -0.878705L10.432877 -8.508095Z' id='g2-72'/>
<path d='M2.803487 -5.606974H4.086675C4.351681 -5.606974 4.491158 -5.606974 4.491158 -5.858032C4.491158 -6.011457 4.407472 -6.011457 4.128518 -6.011457H2.901121L3.417186 -8.047821C3.472976 -8.243088 3.472976 -8.270984 3.472976 -8.368618C3.472976 -8.591781 3.291656 -8.71731 3.110336 -8.71731C2.998755 -8.71731 2.677958 -8.675467 2.566376 -8.229141L2.022416 -6.011457H0.711333C0.432379 -6.011457 0.306849 -6.011457 0.306849 -5.746451C0.306849 -5.606974 0.404483 -5.606974 0.669489 -5.606974H1.910834L0.990286 -1.924782C0.878705 -1.436613 0.836862 -1.297136 0.836862 -1.115816C0.836862 -0.460274 1.297136 0.139477 2.078207 0.139477C3.486924 0.139477 4.2401 -1.896887 4.2401 -1.994521C4.2401 -2.078207 4.184309 -2.12005 4.100623 -2.12005C4.072727 -2.12005 4.016936 -2.12005 3.989041 -2.064259C3.975093 -2.050311 3.961146 -2.036364 3.863512 -1.8132C3.57061 -1.115816 2.929016 -0.139477 2.12005 -0.139477C1.701619 -0.139477 1.673724 -0.488169 1.673724 -0.795019C1.673724 -0.808966 1.673724 -1.073973 1.715567 -1.241345L2.803487 -5.606974Z' id='g2-116'/>
<path d='M4.533001 3.38929C4.533001 3.347447 4.533001 3.319552 4.29589 3.082441C2.901121 1.673724 2.12005 -0.627646 2.12005 -3.472976C2.12005 -6.178829 2.775592 -8.508095 4.393524 -10.153923C4.533001 -10.279452 4.533001 -10.307347 4.533001 -10.349191C4.533001 -10.432877 4.463263 -10.460772 4.407472 -10.460772C4.226152 -10.460772 3.082441 -9.456538 2.399004 -8.089664C1.687671 -6.680946 1.366874 -5.188543 1.366874 -3.472976C1.366874 -2.231631 1.562142 -0.571856 2.287422 0.920548C3.110336 2.594271 4.254047 3.500872 4.407472 3.500872C4.463263 3.500872 4.533001 3.472976 4.533001 3.38929Z' id='g3-40'/>
<path d='M3.93325 -3.472976C3.93325 -4.533001 3.793773 -6.262516 3.012702 -7.880448C2.189788 -9.554172 1.046077 -10.460772 0.892653 -10.460772C0.836862 -10.460772 0.767123 -10.432877 0.767123 -10.349191C0.767123 -10.307347 0.767123 -10.279452 1.004234 -10.042341C2.399004 -8.633624 3.180075 -6.332254 3.180075 -3.486924C3.180075 -0.781071 2.524533 1.548194 0.9066 3.194022C0.767123 3.319552 0.767123 3.347447 0.767123 3.38929C0.767123 3.472976 0.836862 3.500872 0.892653 3.500872C1.073973 3.500872 2.217684 2.496638 2.901121 1.129763C3.612453 -0.292902 3.93325 -1.799253 3.93325 -3.472976Z' id='g3-41'/>
<path d='M9.414695 -4.519054C9.609963 -4.519054 9.861021 -4.519054 9.861021 -4.770112C9.861021 -5.035118 9.62391 -5.035118 9.414695 -5.035118H1.199502C1.004234 -5.035118 0.753176 -5.035118 0.753176 -4.78406C0.753176 -4.519054 0.990286 -4.519054 1.199502 -4.519054H9.414695ZM9.414695 -1.924782C9.609963 -1.924782 9.861021 -1.924782 9.861021 -2.175841C9.861021 -2.440847 9.62391 -2.440847 9.414695 -2.440847H1.199502C1.004234 -2.440847 0.753176 -2.440847 0.753176 -2.189788C0.753176 -1.924782 0.990286 -1.924782 1.199502 -1.924782H9.414695Z' id='g3-61'/>
<path d='M3.417186 -9.679701L1.590037 -7.782814L1.8132 -7.573599L3.403238 -9.010212L5.007223 -7.573599L5.230386 -7.782814L3.417186 -9.679701Z' id='g3-94'/>
<path d='M2.426899 -8.591781C2.426899 -8.954421 2.133998 -9.275218 1.743462 -9.275218C1.380822 -9.275218 1.073973 -8.982316 1.073973 -8.605729C1.073973 -8.187298 1.408717 -7.922291 1.743462 -7.922291C2.175841 -7.922291 2.426899 -8.284932 2.426899 -8.591781ZM0.502117 -5.997509V-5.593026C1.39477 -5.593026 1.520299 -5.50934 1.520299 -4.825903V-1.03213C1.520299 -0.404483 1.366874 -0.404483 0.460274 -0.404483V0C0.850809 -0.027895 1.520299 -0.027895 1.924782 -0.027895C2.078207 -0.027895 2.887173 -0.027895 3.361395 0V-0.404483C2.454795 -0.404483 2.399004 -0.474222 2.399004 -1.018182V-6.150934L0.502117 -5.997509Z' id='g3-105'/>
<path d='M3.556663 -7.671233H6.262516C6.499626 -7.671233 6.653051 -7.671233 6.653051 -7.838605C6.653051 -8.019925 6.485679 -8.019925 6.220672 -8.019925H3.640349C3.737983 -8.368618 3.737983 -8.396513 3.821669 -8.745205C3.891407 -8.996264 4.016936 -9.484433 4.016936 -9.512329C4.016936 -9.637858 3.93325 -9.679701 3.821669 -9.679701C3.556663 -9.679701 2.454795 -9.56812 2.12005 -9.540224C2.008468 -9.526276 1.855044 -9.512329 1.855044 -9.247323C1.855044 -9.093898 1.994521 -9.093898 2.189788 -9.093898C2.859278 -9.093898 2.887173 -8.996264 2.887173 -8.856787C2.887173 -8.759153 2.761644 -8.298879 2.691905 -8.019925H1.910834C1.63188 -8.019925 1.478456 -8.019925 1.478456 -7.838605C1.478456 -7.671233 1.603985 -7.671233 1.868991 -7.671233H2.608219L0.822914 -0.557908C0.767123 -0.348692 0.767123 -0.320797 0.767123 -0.237111C0.767123 0.069738 1.004234 0.153425 1.171606 0.153425C1.436613 0.153425 1.63188 -0.041843 1.687671 -0.223163C1.715567 -0.292902 1.868991 -0.920548 1.952677 -1.26924L2.273474 -2.510585C2.315318 -2.719801 2.454795 -3.249813 2.496638 -3.459029C2.566376 -3.682192 2.66401 -4.11457 2.677958 -4.156413C2.789539 -4.393524 3.542715 -5.858032 4.937484 -5.858032C5.551183 -5.858032 5.69066 -5.355915 5.69066 -4.895641C5.69066 -4.030884 5.049066 -2.329265 4.798007 -1.687671C4.714321 -1.464508 4.644583 -1.26924 4.644583 -1.004234C4.644583 -0.278954 5.160648 0.153425 5.788294 0.153425C7.127273 0.153425 7.615442 -1.910834 7.615442 -1.994521C7.615442 -2.133998 7.489913 -2.133998 7.44807 -2.133998C7.308593 -2.133998 7.308593 -2.092154 7.238854 -1.882939C6.834371 -0.460274 6.206725 -0.153425 5.830137 -0.153425C5.565131 -0.153425 5.481445 -0.320797 5.481445 -0.613699C5.481445 -0.962391 5.634869 -1.352927 5.718555 -1.590037C5.955666 -2.203736 6.583313 -3.87746 6.583313 -4.658531C6.583313 -5.676712 5.941719 -6.164882 4.979328 -6.164882C4.546949 -6.164882 3.710087 -6.067248 2.915068 -5.104857L3.556663 -7.671233Z' id='g0-126'/>
</defs>
<g id='page1'>
<use x='165.981071' xlink:href='#g3-105' y='97.429622'/>
<use x='169.774676' xlink:href='#g0-126' y='97.429622'/>
<use x='180.971707' xlink:href='#g2-64' y='87.993906'/>
<rect height='0.55789' width='12.899852' x='178.505856' y='93.663745'/>
<use x='178.505856' xlink:href='#g2-64' y='106.997046'/>
<use x='186.474036' xlink:href='#g2-116' y='106.997046'/>
<use x='192.601222' xlink:href='#g1-106' y='97.429622'/>
<use x='198.80019' xlink:href='#g2-32' y='97.429622'/>
<use x='208.179277' xlink:href='#g3-40' y='97.429622'/>
<use x='213.490324' xlink:href='#g2-116' y='97.429622'/>
<use x='218.42201' xlink:href='#g3-41' y='97.429622'/>
<use x='223.733057' xlink:href='#g1-105' y='97.429622'/>
<use x='233.031506' xlink:href='#g3-61' y='97.429622'/>
<use x='251.068923' xlink:href='#g3-94' y='93.903964'/>
<use x='247.527926' xlink:href='#g2-72' y='97.429622'/>
<use x='259.920966' xlink:href='#g1-106' y='97.429622'/>
<use x='266.119934' xlink:href='#g2-32' y='97.429622'/>
<use x='275.499021' xlink:href='#g3-40' y='97.429622'/>
<use x='280.810068' xlink:href='#g2-116' y='97.429622'/>
<use x='285.741754' xlink:href='#g3-41' y='97.429622'/>
<use x='291.052801' xlink:href='#g1-105' y='97.429622'/>
<use x='296.476924' xlink:href='#g2-58' y='97.429622'/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 13 KiB

10
_images/svg_image.svg Normal file
View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- originate: https://commons.wikimedia.org/wiki/File:Variable_Resistor.svg -->
<svg xmlns="http://www.w3.org/2000/svg"
version="1.1" baseProfile="full"
width="70px" height="40px" viewBox="0 0 700 400">
<line x1="0" y1="200" x2="700" y2="200" stroke="black" stroke-width="20px"/>
<rect x="100" y="100" width="500" height="200" fill="white" stroke="black" stroke-width="20px"/>
<line x1="180" y1="370" x2="500" y2="50" stroke="black" stroke-width="15px"/>
<polygon points="585 0 525 25 585 50" transform="rotate(135 525 25)"/>
</svg>

After

Width:  |  Height:  |  Size: 580 B

View File

@ -0,0 +1,96 @@
.. _adminapi:
==================
Administration API
==================
Get configuration data
======================
.. code:: http
GET /config HTTP/1.1
Sample response
---------------
.. code:: json
{
"autocomplete": "",
"categories": [
"map",
"it",
"images",
],
"default_locale": "",
"default_theme": "oscar",
"engines": [
{
"categories": [
"map"
],
"enabled": true,
"name": "openstreetmap",
"shortcut": "osm"
},
{
"categories": [
"it"
],
"enabled": true,
"name": "arch linux wiki",
"shortcut": "al"
},
{
"categories": [
"images"
],
"enabled": true,
"name": "google images",
"shortcut": "goi"
},
{
"categories": [
"it"
],
"enabled": false,
"name": "bitbucket",
"shortcut": "bb"
},
],
"instance_name": "searx",
"locales": {
"de": "Deutsch (German)",
"en": "English",
"eo": "Esperanto (Esperanto)",
},
"plugins": [
{
"enabled": true,
"name": "HTTPS rewrite"
},
{
"enabled": false,
"name": "Vim-like hotkeys"
}
],
"safe_search": 0
}
Embed search bar
================
The search bar can be embedded into websites. Just paste the example into the
HTML of the site. URL of the searx instance and values are customizable.
.. code:: html
<form method="post" action="https://searx.me/">
<!-- search --> <input type="text" name="q" />
<!-- categories --> <input type="hidden" name="categories" value="general,social media" />
<!-- language --> <input type="hidden" name="lang" value="all" />
<!-- locale --> <input type="hidden" name="locale" value="en" />
<!-- date filter --> <input type="hidden" name="time_range" value="month" />
</form>

View File

@ -1,94 +0,0 @@
.. _adminapi:
Administration API
------------------
Get configuration data
~~~~~~~~~~~~~~~~~~~~~~
.. code:: sh
GET /config
Sample response
```````````````
.. code:: sh
{
"autocomplete": "",
"categories": [
"map",
"it",
"images",
],
"default_locale": "",
"default_theme": "oscar",
"engines": [
{
"categories": [
"map"
],
"enabled": true,
"name": "openstreetmap",
"shortcut": "osm"
},
{
"categories": [
"it"
],
"enabled": true,
"name": "arch linux wiki",
"shortcut": "al"
},
{
"categories": [
"images"
],
"enabled": true,
"name": "google images",
"shortcut": "goi"
},
{
"categories": [
"it"
],
"enabled": false,
"name": "bitbucket",
"shortcut": "bb"
},
],
"instance_name": "searx",
"locales": {
"de": "Deutsch (German)",
"en": "English",
"eo": "Esperanto (Esperanto)",
},
"plugins": [
{
"enabled": true,
"name": "HTTPS rewrite"
},
{
"enabled": false,
"name": "Vim-like hotkeys"
}
],
"safe_search": 0
}
Embed search bar
----------------
The search bar can be embedded into websites. Just paste the example into the HTML of the site.
URL of the searx instance and values are customizable.
.. code:: html
<form method="post" action="https://searx.me/">
<!-- search query --> <input type="text" name="q" />
<!-- categories --> <input type="hidden" name="categories" value="general,social media" />
<!-- language --> <input type="hidden" name="lang" value="all" />
<!-- locale --> <input type="hidden" name="locale" value="en" />
<!-- date filter --> <input type="hidden" name="time_range" value="month" />
</form>

View File

@ -0,0 +1,24 @@
.. _architecture:
============
Architecture
============
.. sidebar:: Needs work!
This article needs some work / Searx is a collaborative effort. If you have
any contribution, feel welcome to send us your :pull:`PR <../pulls>`, see
:ref:`how to contribute`.
Herein you will find some hints and suggestions about typical architectures of
searx infrastructures.
We start with a contribution from :pull:`@dalf <1776#issuecomment-567917320>`.
It shows a *reference* setup for public searx instances.
.. _arch public:
.. kernel-figure:: arch_public.dot
:alt: arch_public.dot
Reference architecture of a public searx setup.

View File

@ -0,0 +1,103 @@
.. _buildhosts:
==========
Buildhosts
==========
.. sidebar:: This article needs some work
If you have any contribution send us your :pull:`PR <../pulls>`, see
:ref:`how to contribute`.
To get best results from build, its recommend to install additional packages
on build hosts.
.. _docs build:
Build docs
==========
.. _Graphviz: https://graphviz.gitlab.io
.. _ImageMagick: https://www.imagemagick.org
.. _XeTeX: https://tug.org/xetex/
.. _dvisvgm: https://dvisvgm.de/
.. sidebar:: Sphinx build needs
- ImageMagick_
- Graphviz_
- XeTeX_
- dvisvgm_
Most of the sphinx requirements are installed from :origin:`setup.py` and the
docs can be build from scratch with ``make docs``. For better math and image
processing additional packages are needed. The XeTeX_ needed not only for PDF
creation, its also needed for :ref:`math` when HTML output is build.
To be able to do :ref:`sphinx:math-support` without CDNs, the math are rendered
as images (``sphinx.ext.imgmath`` extension). If your docs build (``make
docs``) shows warnings like this::
WARNING: dot(1) not found, for better output quality install \
graphviz from http://www.graphviz.org
..
WARNING: LaTeX command 'latex' cannot be run (needed for math \
display), check the imgmath_latex setting
you need to install additional packages on your build host, to get better HTML
output.
.. _system requirements:
.. tabs::
.. group-tab:: Ubuntu / debian
.. code-block:: sh
$ sudo apt install graphviz imagemagick texlive-xetex librsvg2-bin
.. group-tab:: Arch Linux
.. code-block:: sh
$ sudo pacman -S graphviz imagemagick texlive-bin extra/librsvg
.. group-tab:: Fedora / RHEL
.. code-block:: sh
$ sudo dnf install graphviz graphviz-gd texlive-xetex-bin librsvg2-tools
For PDF output you also need:
.. tabs::
.. group-tab:: Ubuntu / debian
.. code:: sh
$ sudo apt texlive-latex-recommended texlive-extra-utils ttf-dejavu
.. group-tab:: Arch Linux
.. code:: sh
$ sudo pacman -S texlive-core texlive-latexextra ttf-dejavu
.. group-tab:: Fedora / RHEL
.. code:: sh
$ sudo dnf install \
texlive-collection-fontsrecommended texlive-collection-latex \
dejavu-sans-fonts dejavu-serif-fonts dejavu-sans-mono-fonts
.. _system requirements END:
.. literalinclude:: ../conf.py
:language: python
:start-after: # sphinx.ext.imgmath setup
:end-before: # sphinx.ext.imgmath setup END

View File

@ -0,0 +1,68 @@
.. _engines generic:
=======
engines
=======
.. sidebar:: Further reading ..
- :ref:`engines generic`
- :ref:`configured engines`
- :ref:`engine settings`
- :ref:`engine file`
============= =========== ==================== ============
:ref:`engine settings` :ref:`engine file`
------------------------- ---------------------------------
Name (cfg) Categories
------------------------- ---------------------------------
Engine .. Paging support **P**
------------------------- -------------------- ------------
Shortcut **S** Language support **L**
Timeout **TO** Time range support **TR**
Disabled **D** Offline **O**
------------- ----------- -------------------- ------------
Suspend end **SE**
------------- ----------- ---------------------------------
Safe search **SS**
============= =========== =================================
Configuration defaults (at built time):
.. _configured engines:
.. jinja:: webapp
.. flat-table:: Engines configured at built time (defaults)
:header-rows: 1
:stub-columns: 2
* - Name (cfg)
- S
- Engine
- TO
- Categories
- P
- L
- SS
- D
- TR
- O
- SE
{% for name, mod in engines.items() %}
* - {{name}}
- !{{mod.shortcut}}
- {{mod.__name__}}
- {{mod.timeout}}
- {{", ".join(mod.categories)}}
- {{(mod.paging and "y") or ""}}
- {{(mod.language_support and "y") or ""}}
- {{(mod.safesearch and "y") or ""}}
- {{(mod.disabled and "y") or ""}}
- {{(mod.time_range_support and "y") or ""}}
- {{(mod.offline and "y") or ""}}
- {{mod.suspend_end_time}}
{% endfor %}

View File

@ -0,0 +1,148 @@
==========================
How to protect an instance
==========================
Searx depens on external search services. To avoid the abuse of these services
it is advised to limit the number of requests processed by searx.
An application firewall, ``filtron`` solves exactly this problem. Information
on how to install it can be found at the `project page of filtron
<https://github.com/asciimoo/filtron>`__.
Sample configuration of filtron
===============================
An example configuration can be find below. This configuration limits the access
of:
- scripts or applications (roboagent limit)
- webcrawlers (botlimit)
- IPs which send too many requests (IP limit)
- too many json, csv, etc. requests (rss/json limit)
- the same UserAgent of if too many requests (useragent limit)
.. code:: json
[{
"name":"search request",
"filters":[
"Param:q",
"Path=^(/|/search)$"
],
"interval":"<time-interval-in-sec (int)>",
"limit":"<max-request-number-in-interval (int)>",
"subrules":[
{
"name":"roboagent limit",
"interval":"<time-interval-in-sec (int)>",
"limit":"<max-request-number-in-interval (int)>",
"filters":[
"Header:User-Agent=(curl|cURL|Wget|python-requests|Scrapy|FeedFetcher|Go-http-client)"
],
"actions":[
{
"name":"block",
"params":{
"message":"Rate limit exceeded"
}
}
]
},
{
"name":"botlimit",
"limit":0,
"stop":true,
"filters":[
"Header:User-Agent=(Googlebot|bingbot|Baiduspider|yacybot|YandexMobileBot|YandexBot|Yahoo! Slurp|MJ12bot|AhrefsBot|archive.org_bot|msnbot|MJ12bot|SeznamBot|linkdexbot|Netvibes|SMTBot|zgrab|James BOT)"
],
"actions":[
{
"name":"block",
"params":{
"message":"Rate limit exceeded"
}
}
]
},
{
"name":"IP limit",
"interval":"<time-interval-in-sec (int)>",
"limit":"<max-request-number-in-interval (int)>",
"stop":true,
"aggregations":[
"Header:X-Forwarded-For"
],
"actions":[
{
"name":"block",
"params":{
"message":"Rate limit exceeded"
}
}
]
},
{
"name":"rss/json limit",
"interval":"<time-interval-in-sec (int)>",
"limit":"<max-request-number-in-interval (int)>",
"stop":true,
"filters":[
"Param:format=(csv|json|rss)"
],
"actions":[
{
"name":"block",
"params":{
"message":"Rate limit exceeded"
}
}
]
},
{
"name":"useragent limit",
"interval":"<time-interval-in-sec (int)>",
"limit":"<max-request-number-in-interval (int)>",
"aggregations":[
"Header:User-Agent"
],
"actions":[
{
"name":"block",
"params":{
"message":"Rate limit exceeded"
}
}
]
}
]
}]
Route request through filtron
=============================
Filtron can be started using the following command:
.. code:: sh
$ filtron -rules rules.json
It listens on ``127.0.0.1:4004`` and forwards filtered requests to
``127.0.0.1:8888`` by default.
Use it along with ``nginx`` with the following example configuration.
.. code:: nginx
location / {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Scheme $scheme;
proxy_pass http://127.0.0.1:4004/;
}
Requests are coming from port 4004 going through filtron and then forwarded to
port 8888 where a searx is being run.

View File

@ -1,114 +0,0 @@
How to protect an instance
==========================
Searx depens on external search services. To avoid the abuse of these services it is advised to limit the number of requests processed by searx.
An application firewall, ``filtron`` solves exactly this problem. Information on how to install it can be found at the `project page of filtron <https://github.com/asciimoo/filtron>`__.
Sample configuration of filtron
-------------------------------
An example configuration can be find below. This configuration limits the access of
* scripts or applications (roboagent limit)
* webcrawlers (botlimit)
* IPs which send too many requests (IP limit)
* too many json, csv, etc. requests (rss/json limit)
* the same UserAgent of if too many requests (useragent limit)
.. code:: json
[
{
"name": "search request",
"filters": ["Param:q", "Path=^(/|/search)$"],
"interval": <time-interval-in-sec>,
"limit": <max-request-number-in-interval>,
"subrules": [
{
"name": "roboagent limit",
"interval": <time-interval-in-sec>,
"limit": <max-request-number-in-interval>,
"filters": ["Header:User-Agent=(curl|cURL|Wget|python-requests|Scrapy|FeedFetcher|Go-http-client)"],
"actions": [
{"name": "block",
"params": {"message": "Rate limit exceeded"}}
]
},
{
"name": "botlimit",
"limit": 0,
"stop": true,
"filters": ["Header:User-Agent=(Googlebot|bingbot|Baiduspider|yacybot|YandexMobileBot|YandexBot|Yahoo! Slurp|MJ12bot|AhrefsBot|archive.org_bot|msnbot|MJ12bot|SeznamBot|linkdexbot|Netvibes|SMTBot|zgrab|James BOT)"],
"actions": [
{"name": "block",
"params": {"message": "Rate limit exceeded"}}
]
},
{
"name": "IP limit",
"interval": <time-interval-in-sec>,
"limit": <max-request-number-in-interval>,
"stop": true,
"aggregations": ["Header:X-Forwarded-For"],
"actions": [
{"name": "block",
"params": {"message": "Rate limit exceeded"}}
]
},
{
"name": "rss/json limit",
"interval": <time-interval-in-sec>,
"limit": <max-request-number-in-interval>,
"stop": true,
"filters": ["Param:format=(csv|json|rss)"],
"actions": [
{"name": "block",
"params": {"message": "Rate limit exceeded"}}
]
},
{
"name": "useragent limit",
"interval": <time-interval-in-sec>,
"limit": <max-request-number-in-interval>,
"aggregations": ["Header:User-Agent"],
"actions": [
{"name": "block",
"params": {"message": "Rate limit exceeded"}}
]
}
]
}
]
Route request through filtron
-----------------------------
Filtron can be started using the following command:
.. code:: bash
$ filtron -rules rules.json
It listens on 127.0.0.1:4004 and forwards filtered requests to 127.0.0.1:8888 by default.
Use it along with ``nginx`` with the following example configuration.
.. code:: bash
location / {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Scheme $scheme;
proxy_pass http://127.0.0.1:4004/;
}
Requests are coming from port 4004 going through filtron and then forwarded to port 8888 where a searx is being run.

View File

@ -0,0 +1,15 @@
===========================
Administrator documentation
===========================
.. toctree::
:maxdepth: 1
installation
api
architecture
filtron
morty
engines
plugins
buildhosts

View File

@ -1,5 +1,6 @@
.. _installation:
============
Installation
============
@ -7,37 +8,44 @@ Installation
:depth: 3
Basic installation
------------------
==================
Step by step installation for Debian/Ubuntu with virtualenv. For Ubuntu, be sure to have enable universe repository.
Step by step installation for Debian/Ubuntu with virtualenv. For Ubuntu, be sure
to have enable universe repository.
Install packages:
.. code:: sh
sudo apt-get install git build-essential libxslt-dev python-dev python-virtualenv python-babel zlib1g-dev libffi-dev libssl-dev
$ sudo -H apt-get install \
git build-essential libxslt-dev \
python-dev python-virtualenv python-babel \
zlib1g-dev libffi-dev libssl-dev
Install searx:
.. code:: sh
cd /usr/local
sudo git clone https://github.com/asciimoo/searx.git
sudo useradd searx -d /usr/local/searx
sudo chown searx:searx -R /usr/local/searx
sudo -H git clone https://github.com/asciimoo/searx.git
sudo -H useradd searx -d /usr/local/searx
sudo -H chown searx:searx -R /usr/local/searx
Install dependencies in a virtualenv:
.. code:: sh
sudo -u searx -i
cd /usr/local/searx
virtualenv searx-ve
. ./searx-ve/bin/activate
./manage.sh update_packages
sudo -H -u searx -i
.. code:: sh
(searx)$ virtualenv searx-ve
(searx)$ . ./searx-ve/bin/activate
(searx)$ ./manage.sh update_packages
Configuration
-------------
==============
.. code:: sh
@ -46,7 +54,7 @@ Configuration
Edit searx/settings.yml if necessary.
Check
-----
=====
Start searx:
@ -68,18 +76,19 @@ You can exit the virtualenv and the searx user bash (enter exit command
twice).
uwsgi
-----
=====
Install packages:
.. code:: sh
sudo apt-get install uwsgi uwsgi-plugin-python
sudo -H apt-get install \
uwsgi uwsgi-plugin-python
Create the configuration file /etc/uwsgi/apps-available/searx.ini with
this content:
Create the configuration file ``/etc/uwsgi/apps-available/searx.ini`` with this
content:
::
.. code:: ini
[uwsgi]
# Who will run the code
@ -119,22 +128,22 @@ Activate the uwsgi application and restart:
/etc/init.d/uwsgi restart
Web server
----------
==========
with nginx
^^^^^^^^^^
----------
If nginx is not installed (uwsgi will not work with the package
nginx-light):
.. code:: sh
sudo apt-get install nginx
sudo -H apt-get install nginx
Hosted at /
"""""""""""
~~~~~~~~~~~
Create the configuration file /etc/nginx/sites-available/searx with this
Create the configuration file ``/etc/nginx/sites-available/searx`` with this
content:
.. code:: nginx
@ -154,20 +163,20 @@ Create a symlink to sites-enabled:
.. code:: sh
sudo ln -s /etc/nginx/sites-available/searx /etc/nginx/sites-enabled/searx
sudo -H ln -s /etc/nginx/sites-available/searx /etc/nginx/sites-enabled/searx
Restart service:
.. code:: sh
sudo service nginx restart
sudo service uwsgi restart
sudo -H service nginx restart
sudo -H service uwsgi restart
from subdirectory URL (/searx)
""""""""""""""""""""""""""""""
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Add this configuration in the server config file
/etc/nginx/sites-enabled/default:
``/etc/nginx/sites-enabled/default``:
.. code:: nginx
@ -183,10 +192,8 @@ Add this configuration in the server config file
}
OR
using reverse proxy
(Please, note that reverse proxy advised to be used in case of single-user or low-traffic instances.)
**OR** using reverse proxy (Please, note that reverse proxy advised to be used
in case of single-user or low-traffic instances.)
.. code:: nginx
@ -200,9 +207,9 @@ using reverse proxy
}
Enable base\_url in searx/settings.yml
Enable ``base_url`` in ``searx/settings.yml``
::
.. code:: yaml
base_url : http://your.domain.tld/searx/
@ -210,18 +217,18 @@ Restart service:
.. code:: sh
sudo service nginx restart
sudo service uwsgi restart
sudo -H service nginx restart
sudo -H service uwsgi restart
disable logs
~~~~~~~~~~~~
^^^^^^^^^^^^
for better privacy you can disable nginx logs about searx.
how to proceed: below ``uwsgi_pass`` in
/etc/nginx/sites-available/default add
how to proceed: below ``uwsgi_pass`` in ``/etc/nginx/sites-available/default``
add:
::
.. code:: nginx
access_log /dev/null;
error_log /dev/null;
@ -230,19 +237,19 @@ Restart service:
.. code:: sh
sudo service nginx restart
sudo -H service nginx restart
with apache
^^^^^^^^^^^
-----------
Add wsgi mod:
.. code:: sh
sudo apt-get install libapache2-mod-uwsgi
sudo a2enmod uwsgi
sudo -H apt-get install libapache2-mod-uwsgi
sudo -H a2enmod uwsgi
Add this configuration in the file /etc/apache2/apache2.conf:
Add this configuration in the file ``/etc/apache2/apache2.conf``:
.. code:: apache
@ -252,27 +259,26 @@ Add this configuration in the file /etc/apache2/apache2.conf:
uWSGISocket /run/uwsgi/app/searx/socket
</Location>
Note that if your instance of searx is not at the root, you should
change ``<Location />`` by the location of your instance, like
``<Location /searx>``.
Note that if your instance of searx is not at the root, you should change
``<Location />`` by the location of your instance, like ``<Location /searx>``.
Restart Apache:
.. code:: sh
sudo /etc/init.d/apache2 restart
sudo -H /etc/init.d/apache2 restart
disable logs
""""""""""""
~~~~~~~~~~~~
For better privacy you can disable Apache logs.
WARNING: not tested
.. warning::
WARNING: you can only disable logs for the whole (virtual) server not
for a specific path.
You can only disable logs for the whole (virtual) server not for a specific
path.
Go back to /etc/apache2/apache2.conf and above ``<Location />`` add:
Go back to ``/etc/apache2/apache2.conf`` and above ``<Location />`` add:
.. code:: apache
@ -282,24 +288,30 @@ Restart Apache:
.. code:: sh
sudo /etc/init.d/apache2 restart
sudo -H /etc/init.d/apache2 restart
How to update
-------------
=============
.. code:: sh
cd /usr/local/searx
sudo -u searx -i
. ./searx-ve/bin/activate
git stash
git pull origin master
git stash apply
./manage.sh update_packages
sudo service uwsgi restart
sudo -H -u searx -i
.. code:: sh
(searx)$ . ./searx-ve/bin/activate
(searx)$ git stash
(searx)$ git pull origin master
(searx)$ git stash apply
(searx)$ ./manage.sh update_packages
.. code:: sh
sudo -H service uwsgi restart
Docker
------
======
Make sure you have installed Docker. For instance, you can deploy searx like this:
@ -308,22 +320,22 @@ Make sure you have installed Docker. For instance, you can deploy searx like thi
docker pull wonderfall/searx
docker run -d --name searx -p $PORT:8888 wonderfall/searx
Go to http://localhost:$PORT.
Go to ``http://localhost:$PORT``.
See https://hub.docker.com/r/wonderfall/searx/ for more informations.
It's also possible to build searx from the embedded Dockerfile.
See https://hub.docker.com/r/wonderfall/searx/ for more informations. It's also
possible to build searx from the embedded Dockerfile.
.. code:: sh
git clone https://github.com/asciimoo/searx.git
cd searx
docker build -t whatever/searx .
git clone https://github.com/asciimoo/searx.git
cd searx
docker build -t whatever/searx .
References
==========
* https://about.okhin.fr/posts/Searx/ with some additions
* https://about.okhin.fr/posts/Searx/ with some additions
* How to: `Setup searx in a couple of hours with a free SSL certificate <https://www.reddit.com/r/privacytoolsIO/comments/366kvn/how_to_setup_your_own_privacy_respecting_search/>`__
* How to: `Setup searx in a couple of hours with a free SSL certificate
<https://www.reddit.com/r/privacytoolsIO/comments/366kvn/how_to_setup_your_own_privacy_respecting_search/>`__

View File

@ -0,0 +1,26 @@
=========================
How to setup result proxy
=========================
.. _morty: https://github.com/asciimoo/morty
.. _morty's README: https://github.com/asciimoo/morty
By default searx can only act as an image proxy for result images, but it is
possible to proxify all the result URLs with an external service, morty_.
To use this feature, morty has to be installed and activated in searx's
``settings.yml``.
Add the following snippet to your ``settings.yml`` and restart searx:
.. code:: yaml
result_proxy:
url : http://127.0.0.1:3000/
key : your_morty_proxy_key
``url``
Is the address of the running morty service.
``key``
Is an optional argument, see `morty's README`_ for more information.

View File

@ -0,0 +1,39 @@
.. _plugins generic:
===============
Plugins builtin
===============
.. sidebar:: Further reading ..
- :ref:`dev plugin`
Configuration defaults (at built time):
:DO: Default on
.. _configured plugins:
.. jinja:: webapp
.. flat-table:: Plugins configured at built time (defaults)
:header-rows: 1
:stub-columns: 1
:widths: 3 1 9
* - Name
- DO
- Description
JS & CSS dependencies
{% for plgin in plugins %}
* - {{plgin.name}}
- {{(plgin.default_on and "y") or ""}}
- {{plgin.description}}
{% for dep in (plgin.js_dependencies + plgin.css_dependencies) %}
| ``{{dep}}`` {% endfor %}
{% endfor %}

View File

@ -0,0 +1,43 @@
=============================================================
Searx admin interface
=============================================================
.. _searx-admin: https://github.com/kvch/searx-admin#searx-admin
.. _NLnet Foundation: https://nlnet.nl/
manage your instance from your browser
.. sidebar:: Installation
Installation guide can be found in the repository of searx-admin_.
One of the biggest advantages of searx is being extremely customizable. But at
first it can be daunting to newcomers. A barrier of taking advantage of this
feature is our ugly settings file which is sometimes hard to understand and
edit.
To make self-hosting searx more accessible a new tool is introduced, called
``searx-admin``. It is a web application which is capable of managing your
instance and manipulating its settings via a web UI. It aims to replace editing
of ``settings.yml`` for less experienced administrators or people who prefer
graphical admin interfaces.
.. figure:: searx-admin-engines.png
:alt: Screenshot of engine list
Configuration page of engines
Since ``searx-admin`` acts as a supervisor for searx, we have decided to
implement it as a standalone tool instead of part of searx. Another reason for
making it a standalone tool is that the codebase and dependencies of searx
should not grow because of a fully optional feature, which does not affect
existing instances.
Acknowledgements
================
This development was sponsored by `NLnet Foundation`_.
| Happy hacking.
| kvch // 2017.08.22 21:25

View File

@ -1,7 +0,0 @@
Blog
====
.. toctree::
:maxdepth: 1
python3

View File

@ -1,3 +1,4 @@
====
Blog
====

View File

@ -0,0 +1,77 @@
===============================
Preparation for offline engines
===============================
Offline engines
===============
To extend the functionality of searx, offline engines are going to be
introduced. An offline engine is an engine which does not need Internet
connection to perform a search and does not use HTTP to communicate.
Offline engines can be configured as online engines, by adding those to the
`engines` list of :origin:`settings.yml <searx/settings.yml>`. Thus, searx
finds the engine file and imports it.
Example skeleton for the new engines:
.. code:: python
from subprocess import PIPE, Popen
categories = ['general']
offline = True
def init(settings):
pass
def search(query, params):
process = Popen(['ls', query], stdout=PIPE)
return_code = process.wait()
if return_code != 0:
raise RuntimeError('non-zero return code', return_code)
results = []
line = process.stdout.readline()
while line:
result = parse_line(line)
results.append(results)
line = process.stdout.readline()
return results
Development progress
====================
First, a proposal has been created as a Github issue. Then it was moved to the
wiki as a design document. You can read it here: :wiki:`Offline-engines`.
In this development step, searx core was prepared to accept and perform offline
searches. Offline search requests are scheduled together with regular offline
requests.
As offline searches can return arbitrary results depending on the engine, the
current result templates were insufficient to present such results. Thus, a new
template is introduced which is caplable of presenting arbitrary key value pairs
as a table. You can check out the pull request for more details see
:pull:`1700`.
Next steps
==========
Today, it is possible to create/run an offline engine. However, it is going to be publicly available for everyone who knows the searx instance. So the next step is to introduce token based access for engines. This way administrators are able to limit the access to private engines.
Acknowledgement
===============
This development was sponsored by `Search and Discovery Fund`_ of `NLnet Foundation`_ .
.. _Search and Discovery Fund: https://nlnet.nl/discovery
.. _NLnet Foundation: https://nlnet.nl/
| Happy hacking.
| kvch // 2019.10.21 17:03

View File

@ -0,0 +1,68 @@
============================
Introducing Python 3 support
============================
.. _Python 2.7 clock: https://pythonclock.org/
.. sidebar:: Python 2.7 to 3 upgrade
This chapter exists of historical reasons. Python 2.7 release schedule ends
(`Python 2.7 clock`_) after 11 years Python 3 exists
As most operation systems are coming with Python3 installed by default. So it is
time for searx to support Python3. But don't worry support of Python2.7 won't be
dropped.
.. image:: searxpy3.png
:scale: 50 %
:alt: hurray
:align: center
How to run searx using Python 3
===============================
Please make sure that you run at least Python 3.5.
To run searx, first a Python3 virtualenv should be created. After entering the
virtualenv, dependencies must be installed. Then run searx with python3 instead
of the usual python command.
.. code:: sh
virtualenv -p python3 venv3
source venv3/bin/activate
pip3 install -r requirements.txt
python3 searx/webapp.py
If you want to run searx using Python2.7, you don't have to do anything
differently as before.
Fun facts
=========
- 115 files were changed when implementing the support for both Python versions.
- All of the dependencies was compatible except for the robotframework used for
browser tests. Thus, these tests were migrated to splinter. So from now on
both versions are being tested on Travis and can be tested locally.
If you found bugs
=================
Please open an issue on `GitHub`_. Make sure that you mention your Python
version in your issue, so we can investigate it properly.
.. _GitHub: https://github.com/asciimoo/searx/issues
Acknowledgment
==============
This development was sponsored by `NLnet Foundation`_.
.. _NLnet Foundation: https://nlnet.nl/
| Happy hacking.
| kvch // 2017.05.13 22:57

View File

@ -1,54 +0,0 @@
Introducing Python3 support
===========================
As most operation systems are coming with Python3 installed by default. So it is time for searx to support Python3. But don't worry support of Python2.7 won't be dropped.
.. image:: searxpy3.png
:scale: 50 %
:alt: hurray
:align: center
How to run searx using Python3
------------------------------
Please make sure that you run at least Python3.5.
To run searx, first a Python3 virtualenv should be created. After entering the virtualenv,
dependencies must be installed. Then run searx with python3 instead of the usual python command.
.. code:: sh
virtualenv -p python3 venv3
source venv3/bin/activate
pip3 install -r requirements.txt
python3 searx/webapp.py
If you want to run searx using Python2.7, you don't have to do anything differently as before.
Fun facts
---------
- 115 files were changed when implementing the support for both Python versions.
- All of the dependencies was compatible except for the robotframework used for browser tests. Thus, these tests were migrated to splinter. So from now on both versions are being tested on Travis and can be tested locally.
If you found bugs...
--------------------
...please open an issue on `GitHub`_. Make sure that you mention your Python version in your issue,
so we can investigate it properly.
.. _GitHub: https://github.com/asciimoo/searx/issues
Acknowledgement
---------------
This development was sponsored by `NLnet Foundation`_.
.. _NLnet Foundation: https://nlnet.nl/
| Happy hacking.
| kvch // 2017.05.13 22:57

View File

@ -0,0 +1,180 @@
.. _how to contribute:
=================
How to contribute
=================
Prime directives: Privacy, Hackability
======================================
Searx has two prime directives, **privacy-by-design and hackability** . The
hackability comes in three levels:
- support of search engines
- plugins to alter search behaviour
- hacking searx itself
Note the lack of "world domination" among the directives. Searx has no
intention of wide mass-adoption, rounded corners, etc. The prime directive
"privacy" deserves a separate chapter, as it's quite uncommon unfortunately.
Privacy-by-design
-----------------
Searx was born out of the need for a **privacy-respecting** search tool which
can be extended easily to maximize both, its search and its privacy protecting
capabilities.
A few widely used features work differently or turned off by default or not
implemented at all **as a consequence of privacy-by-design**.
If a feature reduces the privacy preserving aspects of searx, it should be
switched off by default or should not implemented at all. There are plenty of
search engines already providing such features. If a feature reduces the
protection of searx, users must be informed about the effect of choosing to
enable it. Features that protect privacy but differ from the expectations of
the user should also be explained.
Also, if you think that something works weird with searx, it's might be because
of the tool you use is designed in a way to interfere with the privacy respect.
Submitting a bugreport to the vendor of the tool that misbehaves might be a good
feedback to reconsider the disrespect to its customers (e.g. ``GET`` vs ``POST``
requests in various browsers).
Remember the other prime directive of searx is to be hackable, so if the above
privacy concerns do not fancy you, simply fork it.
*Happy hacking.*
Code
====
.. _PEP8: https://www.python.org/dev/peps/pep-0008/
.. _Conventional Commits: https://www.conventionalcommits.org/
.. _Git Commit Good Practice: https://wiki.openstack.org/wiki/GitCommitMessages
.. _Structural split of changes:
https://wiki.openstack.org/wiki/GitCommitMessages#Structural_split_of_changes
.. _gitmoji: https://gitmoji.carloscuesta.me/
.. _Semantic PR: https://github.com/zeke/semantic-pull-requests
.. sidebar:: Create good commits!
- `Structural split of changes`_
- `Conventional Commits`_
- `Git Commit Good Practice`_
- some like to use: gitmoji_
- not yet active: `Semantic PR`_
In order to submit a patch, please follow the steps below:
- Follow coding conventions.
- PEP8_ standards apply, except the convention of line length
- Maximum line length is 120 characters
- The cardinal rule for creating good commits is to ensure there is only one
*logical change* per commit / read `Structural split of changes`_
- Check if your code breaks existing tests. If so, update the tests or fix your
code.
- If your code can be unit-tested, add unit tests.
- Add yourself to the :origin:`AUTHORS.rst` file.
- Choose meaning full commit messages, read `Conventional Commits`_
.. code::
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
- Create a pull request.
For more help on getting started with searx development, see :ref:`devquickstart`.
Translation
===========
Translation currently takes place on :ref:`transifex <translation>`.
.. caution::
Please, do not update translation files in the repo.
.. _contrib docs:
Documentation
=============
.. _Sphinx: http://www.sphinx-doc.org
.. _reST: http://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html
.. sidebar:: The reST sources
has been moved from ``gh-branch`` into ``master`` (:origin:`docs`).
The documentation is built using Sphinx_. So in order to be able to generate
the required files, you have to install it on your system. Much easier, use
our :ref:`makefile`.
Here is an example which makes a complete rebuild:
.. code:: sh
$ make docs-clean docs
...
The HTML pages are in dist/docs.
.. _make docs-live:
live build
----------
.. sidebar:: docs-clean
It is recommended to assert a complete rebuild before deploying (use
``docs-clean``).
Live build is like WYSIWYG. If you want to edit the documentation, its
recommended to use. The Makefile target ``docs-live`` builds the docs, opens
URL in your favorite browser and rebuilds every time a reST file has been
changed.
.. code:: sh
$ make docs-live
...
The HTML pages are in dist/docs.
... Serving on http://0.0.0.0:8080
... Start watching changes
.. _deploy on github.io:
deploy on github.io
-------------------
To deploy documentation at :docs:`github.io <.>` use Makefile target
:ref:`make gh-pages`, which will builds the documentation, clones searx into a sub
folder ``gh-pages``, cleans it, copies the doc build into and runs all the
needed git add, commit and push:
.. code:: sh
$ make docs-clean gh-pages
...
SPHINX docs --> file://<...>/dist/docs
The HTML pages are in dist/docs.
...
Cloning into 'gh-pages' ...
...
cd gh-pages; git checkout gh-pages >/dev/null
Switched to a new branch 'gh-pages'
...
doc available at --> https://asciimoo.github.io/searx

View File

@ -1,98 +0,0 @@
How to contribute
-----------------
Prime directives: Privacy, Hackability
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Searx has two prime directives, privacy-by-design and hackability. The
hackability comes in three levels:
- support of search engines
- plugins to alter search behaviour
- hacking searx itself
Note the lack of "world domination" among the directives.
Searx has no intention of wide mass-adoption, rounded
corners, etc. The prime directive "privacy" deserves a separate
chapter, as it's quite uncommon unfortunately.
Privacy-by-design
^^^^^^^^^^^^^^^^^
Searx was born out of the need for a privacy-respecting search tool
which can be extended easily to maximize both its search and its
privacy protecting capabilities.
A few widely used features work differently or turned off by default or not implemented
at all as a consequence of privacy-by-design.
If a feature reduces the privacy preserving aspects of searx, it
should be switched off by default or should not implemented at all.
There are plenty of search engines already providing such features.
If a feature reduces the protection of searx, users must be
informed about the effect of choosing to enable it. Features
that protect privacy but differ from the expectations of the
user should also be explained.
Also, if you think that something works weird with searx,
it's might be because of the tool you use is designed in a way to interfere with
the privacy respect. Submitting a bugreport to the vendor of the tool that
misbehaves might be a good feedback to reconsider the disrespect to
its customers (e.g. GET vs POST requests in various browsers).
Remember the other prime directive of searx is to be hackable, so if the
above privacy concerns do not fancy you, simply fork it.
Happy hacking.
Code
~~~~
In order to submit a patch, please follow the steps below:
- Follow coding conventions.
- PEP8 standards apply, except the convention of line length
- Maximum line length is 120 characters
- Check if your code breaks existing tests. If so, update the tests or fix your code.
- If your code can be unit-tested, add unit tests.
- Add yourself to the AUTHORS file.
- Create a pull request.
For more help on getting started with searx development, see :ref:`devquickstart`.
Translation
~~~~~~~~~~~
Translation currently takes place on
`transifex <https://transifex.com/projects/p/searx>`__.
**Please, do not update translation files in the repo.**
Documentation
~~~~~~~~~~~~~
The documentation is built using Sphinx. So in order to be able to generate the required
files, you have to install it on your system. (It can be installed easily using pip.)
1. Checkout the gh-pages branch.
2. Edit the rst file you wish to update. Or create a new rst file and place it under the appropriate folder.
3. Build the documentation using Sphinx.
4. Add the updated and created files of these extension:
- .rst
- .html
- .txt
6. Create a pull request.

View File

@ -0,0 +1,267 @@
.. _engines-dev:
===============
Engine overview
===============
.. _metasearch-engine: https://en.wikipedia.org/wiki/Metasearch_engine
searx is a metasearch-engine_, so it uses different search engines to provide
better results.
Because there is no general search API which could be used for every search
engine, an adapter has to be built between searx and the external search
engines. Adapters are stored under the folder :origin:`searx/engines`.
.. contents::
:depth: 3
:backlinks: entry
general engine configuration
============================
It is required to tell searx the type of results the engine provides. The
arguments can be set in the engine file or in the settings file
(normally ``settings.yml``). The arguments in the settings file override
the ones in the engine file.
It does not matter if an option is stored in the engine file or in the
settings. However, the standard way is the following:
.. _engine file:
engine file
-----------
======================= =========== ===========================================
argument type information
======================= =========== ===========================================
categories list pages, in which the engine is working
paging boolean support multible pages
language_support boolean support language choosing
time_range_support boolean support search time range
offline boolean engine runs offline
======================= =========== ===========================================
.. _engine settings:
settings.yml
------------
======================= =========== ===========================================
argument type information
======================= =========== ===========================================
name string name of search-engine
engine string name of searx-engine
(filename without ``.py``)
shortcut string shortcut of search-engine
timeout string specific timeout for search-engine
======================= =========== ===========================================
overrides
---------
A few of the options have default values in the engine, but are often
overwritten by the settings. If ``None`` is assigned to an option in the engine
file, it has to be redefined in the settings, otherwise searx will not start
with that engine.
The naming of overrides is arbitrary. But the recommended overrides are the
following:
======================= =========== ===========================================
argument type information
======================= =========== ===========================================
base_url string base-url, can be overwritten to use same
engine on other URL
number_of_results int maximum number of results per request
language string ISO code of language and country like en_US
api_key string api-key if required by engine
======================= =========== ===========================================
example code
------------
.. code:: python
# engine dependent config
categories = ['general']
paging = True
language_support = True
making a request
================
To perform a search an URL have to be specified. In addition to specifying an
URL, arguments can be passed to the query.
passed arguments
----------------
These arguments can be used to construct the search query. Furthermore,
parameters with default value can be redefined for special purposes.
====================== ============ ========================================================================
argument type default-value, information
====================== ============ ========================================================================
url string ``''``
method string ``'GET'``
headers set ``{}``
data set ``{}``
cookies set ``{}``
verify boolean ``True``
headers.User-Agent string a random User-Agent
category string current category, like ``'general'``
started datetime current date-time
pageno int current pagenumber
language string specific language code like ``'en_US'``, or ``'all'`` if unspecified
====================== ============ ========================================================================
parsed arguments
----------------
The function ``def request(query, params):`` always returns the ``params``
variable. Inside searx, the following paramters can be used to specify a search
request:
============ =========== =========================================================
argument type information
============ =========== =========================================================
url string requested url
method string HTTP request method
headers set HTTP header information
data set HTTP data information (parsed if ``method != 'GET'``)
cookies set HTTP cookies
verify boolean Performing SSL-Validity check
============ =========== =========================================================
example code
------------
.. code:: python
# search-url
base_url = 'https://example.com/'
search_string = 'search?{query}&page={page}'
# do search-request
def request(query, params):
search_path = search_string.format(
query=urlencode({'q': query}),
page=params['pageno'])
params['url'] = base_url + search_path
return params
returned results
================
Searx is able to return results of different media-types. Currently the
following media-types are supported:
- default_
- images_
- videos_
- torrent_
- map_
To set another media-type as default, the parameter ``template`` must be set to
the desired type.
default
-------
========================= =====================================================
result-parameter information
========================= =====================================================
url string, url of the result
title string, title of the result
content string, general result-text
publishedDate :py:class:`datetime.datetime`, time of publish
========================= =====================================================
images
------
To use this template, the parameter:
========================= =====================================================
result-parameter information
========================= =====================================================
template is set to ``images.html``
url string, url to the result site
title string, title of the result *(partly implemented)*
content *(partly implemented)*
publishedDate :py:class:`datetime.datetime`,
time of publish *(partly implemented)*
img\_src string, url to the result image
thumbnail\_src string, url to a small-preview image
========================= =====================================================
videos
------
========================= =====================================================
result-parameter information
========================= =====================================================
template is set to ``videos.html``
url string, url of the result
title string, title of the result
content *(not implemented yet)*
publishedDate :py:class:`datetime.datetime`, time of publish
thumbnail string, url to a small-preview image
========================= =====================================================
torrent
-------
.. _magnetlink: https://en.wikipedia.org/wiki/Magnet_URI_scheme
========================= =====================================================
result-parameter information
========================= =====================================================
template is set to ``torrent.html``
url string, url of the result
title string, title of the result
content string, general result-text
publishedDate :py:class:`datetime.datetime`,
time of publish *(not implemented yet)*
seed int, number of seeder
leech int, number of leecher
filesize int, size of file in bytes
files int, number of files
magnetlink string, magnetlink_ of the result
torrentfile string, torrentfile of the result
========================= =====================================================
map
---
========================= =====================================================
result-parameter information
========================= =====================================================
url string, url of the result
title string, title of the result
content string, general result-text
publishedDate :py:class:`datetime.datetime`, time of publish
latitude latitude of result (in decimal format)
longitude longitude of result (in decimal format)
boundingbox boundingbox of result (array of 4. values
``[lat-min, lat-max, lon-min, lon-max]``)
geojson geojson of result (http://geojson.org)
osm.type type of osm-object (if OSM-Result)
osm.id id of osm-object (if OSM-Result)
address.name name of object
address.road street name of object
address.house_number house number of object
address.locality city, place of object
address.postcode postcode of object
address.country country of object
========================= =====================================================

View File

@ -1,313 +0,0 @@
Engine overview
===============
searx is a `metasearch-engine <https://en.wikipedia.org/wiki/Metasearch_engine>`__,
so it uses different search engines to provide better results.
Because there is no general search API which could be used for every
search engine, an adapter has to be built between searx and the
external search engines. Adapters are stored under the folder
`searx/engines
<https://github.com/asciimoo/searx/tree/master/searx/engines>`__.
.. contents::
:depth: 3
general engine configuration
----------------------------
It is required to tell searx the type of results the engine provides. The
arguments can be set in the engine file or in the settings file
(normally ``settings.yml``). The arguments in the settings file override
the ones in the engine file.
It does not matter if an option is stored in the engine file or in the
settings. However, the standard way is the following:
engine file
~~~~~~~~~~~
+----------------------+-----------+-----------------------------------------+
| argument | type | information |
+======================+===========+=========================================+
| categories | list | pages, in which the engine is working |
+----------------------+-----------+-----------------------------------------+
| paging | boolean | support multible pages |
+----------------------+-----------+-----------------------------------------+
| language\_support | boolean | support language choosing |
+----------------------+-----------+-----------------------------------------+
| time\_range\_support | boolean | support search time range |
+----------------------+-----------+-----------------------------------------+
settings.yml
~~~~~~~~~~~~
+------------+----------+-----------------------------------------------+
| argument | type | information |
+============+==========+===============================================+
| name | string | name of search-engine |
+------------+----------+-----------------------------------------------+
| engine | string | name of searx-engine (filename without .py) |
+------------+----------+-----------------------------------------------+
| shortcut | string | shortcut of search-engine |
+------------+----------+-----------------------------------------------+
| timeout | string | specific timeout for search-engine |
+------------+----------+-----------------------------------------------+
overrides
~~~~~~~~~
A few of the options have default values in the engine, but are
often overwritten by the settings. If ``None`` is assigned to an option
in the engine file, it has to be redefined in the settings,
otherwise searx will not start with that engine.
The naming of overrides is arbitrary. But the recommended
overrides are the following:
+-----------------------+----------+----------------------------------------------------------------+
| argument | type | information |
+=======================+==========+================================================================+
| base\_url | string | base-url, can be overwritten to use same engine on other URL |
+-----------------------+----------+----------------------------------------------------------------+
| number\_of\_results | int | maximum number of results per request |
+-----------------------+----------+----------------------------------------------------------------+
| language | string | ISO code of language and country like en\_US |
+-----------------------+----------+----------------------------------------------------------------+
| api\_key | string | api-key if required by engine |
+-----------------------+----------+----------------------------------------------------------------+
example code
~~~~~~~~~~~~
.. code:: python
# engine dependent config
categories = ['general']
paging = True
language_support = True
making a request
----------------
To perform a search an URL have to be specified. In addition to
specifying an URL, arguments can be passed to the query.
passed arguments
~~~~~~~~~~~~~~~~
These arguments can be used to construct the search query. Furthermore,
parameters with default value can be redefined for special purposes.
+----------------------+------------+------------------------------------------------------------------------+
| argument | type | default-value, information |
+======================+============+========================================================================+
| url | string | ``''`` |
+----------------------+------------+------------------------------------------------------------------------+
| method | string | ``'GET'`` |
+----------------------+------------+------------------------------------------------------------------------+
| headers | set | ``{}`` |
+----------------------+------------+------------------------------------------------------------------------+
| data | set | ``{}`` |
+----------------------+------------+------------------------------------------------------------------------+
| cookies | set | ``{}`` |
+----------------------+------------+------------------------------------------------------------------------+
| verify | boolean | ``True`` |
+----------------------+------------+------------------------------------------------------------------------+
| headers.User-Agent | string | a random User-Agent |
+----------------------+------------+------------------------------------------------------------------------+
| category | string | current category, like ``'general'`` |
+----------------------+------------+------------------------------------------------------------------------+
| started | datetime | current date-time |
+----------------------+------------+------------------------------------------------------------------------+
| pageno | int | current pagenumber |
+----------------------+------------+------------------------------------------------------------------------+
| language | string | specific language code like ``'en_US'``, or ``'all'`` if unspecified |
+----------------------+------------+------------------------------------------------------------------------+
parsed arguments
~~~~~~~~~~~~~~~~
The function ``def request(query, params):`` always returns the
``params`` variable. Inside searx, the following paramters can be
used to specify a search request:
+------------+-----------+---------------------------------------------------------+
| argument | type | information |
+============+===========+=========================================================+
| url | string | requested url |
+------------+-----------+---------------------------------------------------------+
| method | string | HTTP request method |
+------------+-----------+---------------------------------------------------------+
| headers | set | HTTP header information |
+------------+-----------+---------------------------------------------------------+
| data | set | HTTP data information (parsed if ``method != 'GET'``) |
+------------+-----------+---------------------------------------------------------+
| cookies | set | HTTP cookies |
+------------+-----------+---------------------------------------------------------+
| verify | boolean | Performing SSL-Validity check |
+------------+-----------+---------------------------------------------------------+
example code
~~~~~~~~~~~~
.. code:: python
# search-url
base_url = 'https://example.com/'
search_string = 'search?{query}&page={page}'
# do search-request
def request(query, params):
search_path = search_string.format(
query=urlencode({'q': query}),
page=params['pageno'])
params['url'] = base_url + search_path
return params
returned results
----------------
Searx is able to return results of different media-types.
Currently the following media-types are supported:
- default
- images
- videos
- torrent
- map
To set another media-type as default, the parameter
``template`` must be set to the desired type.
default
~~~~~~~
+--------------------+---------------------------------------------------------------------------------------------------------------+
| result-parameter | information |
+====================+===============================================================================================================+
| url | string, url of the result |
+--------------------+---------------------------------------------------------------------------------------------------------------+
| title | string, title of the result |
+--------------------+---------------------------------------------------------------------------------------------------------------+
| content | string, general result-text |
+--------------------+---------------------------------------------------------------------------------------------------------------+
| publishedDate | `datetime.datetime <https://docs.python.org/2/library/datetime.html#datetime-objects>`__, time of publish |
+--------------------+---------------------------------------------------------------------------------------------------------------+
images
~~~~~~
to use this template, the parameter
+--------------------+---------------------------------------------------------------------------------------------------------------------------------------+
| result-parameter | information |
+====================+=======================================================================================================================================+
| template | is set to ``images.html`` |
+--------------------+---------------------------------------------------------------------------------------------------------------------------------------+
| url | string, url to the result site |
+--------------------+---------------------------------------------------------------------------------------------------------------------------------------+
| title | string, title of the result *(partly implemented)* |
+--------------------+---------------------------------------------------------------------------------------------------------------------------------------+
| content | *(partly implemented)* |
+--------------------+---------------------------------------------------------------------------------------------------------------------------------------+
| publishedDate | `datetime.datetime <https://docs.python.org/2/library/datetime.html#datetime-objects>`__, time of publish *(partly implemented)* |
+--------------------+---------------------------------------------------------------------------------------------------------------------------------------+
| img\_src | string, url to the result image |
+--------------------+---------------------------------------------------------------------------------------------------------------------------------------+
| thumbnail\_src | string, url to a small-preview image |
+--------------------+---------------------------------------------------------------------------------------------------------------------------------------+
videos
~~~~~~
+--------------------+--------------------------------------------------------------------------------------------------------------+
| result-parameter | information |
+====================+==============================================================================================================+
| template | is set to ``videos.html`` |
+--------------------+--------------------------------------------------------------------------------------------------------------+
| url | string, url of the result |
+--------------------+--------------------------------------------------------------------------------------------------------------+
| title | string, title of the result |
+--------------------+--------------------------------------------------------------------------------------------------------------+
| content | *(not implemented yet)* |
+--------------------+--------------------------------------------------------------------------------------------------------------+
| publishedDate | `datetime.datetime <https://docs.python.org/2/library/datetime.html#datetime-objects>`__, time of publish |
+--------------------+--------------------------------------------------------------------------------------------------------------+
| thumbnail | string, url to a small-preview image |
+--------------------+--------------------------------------------------------------------------------------------------------------+
torrent
~~~~~~~
+------------------+---------------------------------------------------------------------------------------------------------------------------------------+
| result-parameter | information |
+==================+=======================================================================================================================================+
| template | is set to ``torrent.html`` |
+------------------+---------------------------------------------------------------------------------------------------------------------------------------+
| url | string, url of the result |
+------------------+---------------------------------------------------------------------------------------------------------------------------------------+
| title | string, title of the result |
+------------------+---------------------------------------------------------------------------------------------------------------------------------------+
| content | string, general result-text |
+------------------+---------------------------------------------------------------------------------------------------------------------------------------+
| publishedDate | `datetime.datetime <https://docs.python.org/2/library/datetime.html#datetime-objects>`__, time of publish *(not implemented yet)* |
+------------------+---------------------------------------------------------------------------------------------------------------------------------------+
| seed | int, number of seeder |
+------------------+---------------------------------------------------------------------------------------------------------------------------------------+
| leech | int, number of leecher |
+------------------+---------------------------------------------------------------------------------------------------------------------------------------+
| filesize | int, size of file in bytes |
+------------------+---------------------------------------------------------------------------------------------------------------------------------------+
| files | int, number of files |
+------------------+---------------------------------------------------------------------------------------------------------------------------------------+
| magnetlink | string, `magnetlink <https://en.wikipedia.org/wiki/Magnet_URI_scheme>`__ of the result |
+------------------+---------------------------------------------------------------------------------------------------------------------------------------+
| torrentfile | string, torrentfile of the result |
+------------------+---------------------------------------------------------------------------------------------------------------------------------------+
map
~~~
+-------------------------+--------------------------------------------------------------------------------------------------------------+
| result-parameter | information |
+=========================+==============================================================================================================+
| url | string, url of the result |
+-------------------------+--------------------------------------------------------------------------------------------------------------+
| title | string, title of the result |
+-------------------------+--------------------------------------------------------------------------------------------------------------+
| content | string, general result-text |
+-------------------------+--------------------------------------------------------------------------------------------------------------+
| publishedDate | `datetime.datetime <https://docs.python.org/2/library/datetime.html#datetime-objects>`__, time of publish |
+-------------------------+--------------------------------------------------------------------------------------------------------------+
| latitude | latitude of result (in decimal format) |
+-------------------------+--------------------------------------------------------------------------------------------------------------+
| longitude | longitude of result (in decimal format) |
+-------------------------+--------------------------------------------------------------------------------------------------------------+
| boundingbox | boundingbox of result (array of 4. values ``[lat-min, lat-max, lon-min, lon-max]``) |
+-------------------------+--------------------------------------------------------------------------------------------------------------+
| geojson | geojson of result (http://geojson.org) |
+-------------------------+--------------------------------------------------------------------------------------------------------------+
| osm.type | type of osm-object (if OSM-Result) |
+-------------------------+--------------------------------------------------------------------------------------------------------------+
| osm.id | id of osm-object (if OSM-Result) |
+-------------------------+--------------------------------------------------------------------------------------------------------------+
| address.name | name of object |
+-------------------------+--------------------------------------------------------------------------------------------------------------+
| address.road | street name of object |
+-------------------------+--------------------------------------------------------------------------------------------------------------+
| address.house\_number | house number of object |
+-------------------------+--------------------------------------------------------------------------------------------------------------+
| address.locality | city, place of object |
+-------------------------+--------------------------------------------------------------------------------------------------------------+
| address.postcode | postcode of object |
+-------------------------+--------------------------------------------------------------------------------------------------------------+
| address.country | country of object |
+-------------------------+--------------------------------------------------------------------------------------------------------------+

View File

@ -0,0 +1,15 @@
=======================
Developer documentation
=======================
.. toctree::
:maxdepth: 1
quickstart
contribution_guide
engine_overview
search_api
plugins
translation
makefile
reST

View File

@ -1,323 +0,0 @@
.. _installation:
Installation
============
.. contents::
:depth: 3
Basic installation
------------------
Step by step installation for Debian/Ubuntu with virtualenv. For Ubuntu, be sure to have enable universe repository.
Install packages:
.. code:: sh
sudo apt-get install git build-essential libxslt-dev python-dev python-virtualenv python-pybabel zlib1g-dev libffi-dev libssl-dev
Install searx:
.. code:: sh
cd /usr/local
sudo git clone https://github.com/asciimoo/searx.git
sudo useradd searx -d /usr/local/searx
sudo chown searx:searx -R /usr/local/searx
Install dependencies in a virtualenv:
.. code:: sh
sudo -u searx -i
cd /usr/local/searx
virtualenv searx-ve
. ./searx-ve/bin/activate
./manage.sh update_packages
Configuration
-------------
.. code:: sh
sed -i -e "s/ultrasecretkey/`openssl rand -hex 16`/g" searx/settings.yml
Edit searx/settings.yml if necessary.
Check
-----
Start searx:
.. code:: sh
python searx/webapp.py
Go to http://localhost:8888
If everything works fine, disable the debug option in settings.yml:
.. code:: sh
sed -i -e "s/debug : True/debug : False/g" searx/settings.yml
At this point searx is not demonized ; uwsgi allows this.
You can exit the virtualenv and the searx user bash (enter exit command
twice).
uwsgi
-----
Install packages:
.. code:: sh
sudo apt-get install uwsgi uwsgi-plugin-python
Create the configuration file /etc/uwsgi/apps-available/searx.ini with
this content:
::
[uwsgi]
# Who will run the code
uid = searx
gid = searx
# disable logging for privacy
disable-logging = true
# Number of workers (usually CPU count)
workers = 4
# The right granted on the created socket
chmod-socket = 666
# Plugin to use and interpretor config
single-interpreter = true
master = true
plugin = python
lazy-apps = true
enable-threads = true
# Module to import
module = searx.webapp
# Virtualenv and python path
virtualenv = /usr/local/searx/searx-ve/
pythonpath = /usr/local/searx/
chdir = /usr/local/searx/searx/
Activate the uwsgi application and restart:
.. code:: sh
cd /etc/uwsgi/apps-enabled
ln -s ../apps-available/searx.ini
/etc/init.d/uwsgi restart
Web server
----------
with nginx
^^^^^^^^^^
If nginx is not installed (uwsgi will not work with the package
nginx-light):
.. code:: sh
sudo apt-get install nginx
Hosted at /
"""""""""""
Create the configuration file /etc/nginx/sites-available/searx with this
content:
.. code:: nginx
server {
listen 80;
server_name searx.example.com;
root /usr/local/searx;
location / {
include uwsgi_params;
uwsgi_pass unix:/run/uwsgi/app/searx/socket;
}
}
Restart service:
.. code:: sh
sudo service nginx restart
sudo service uwsgi restart
from subdirectory URL (/searx)
""""""""""""""""""""""""""""""
Add this configuration in the server config file
/etc/nginx/sites-enabled/default:
.. code:: nginx
location = /searx { rewrite ^ /searx/; }
location /searx {
try_files $uri @searx;
}
location @searx {
uwsgi_param SCRIPT_NAME /searx;
include uwsgi_params;
uwsgi_modifier1 30;
uwsgi_pass unix:/run/uwsgi/app/searx/socket;
}
OR
using reverse proxy
(Please, note that reverse proxy advised to be used in case of single-user or low-traffic instances.)
.. code:: nginx
location /searx {
proxy_pass http://127.0.0.1:8888;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Script-Name /searx;
proxy_buffering off;
}
Enable base\_url in searx/settings.yml
::
base_url : http://your.domain.tld/searx/
Restart service:
.. code:: sh
sudo service nginx restart
sudo service uwsgi restart
disable logs
~~~~~~~~~~~~
for better privacy you can disable nginx logs about searx.
how to proceed: below ``uwsgi_pass`` in
/etc/nginx/sites-available/default add
::
access_log /dev/null;
error_log /dev/null;
Restart service:
.. code:: sh
sudo service nginx restart
with apache
^^^^^^^^^^^
Add wsgi mod:
.. code:: sh
sudo apt-get install libapache2-mod-uwsgi
sudo a2enmod uwsgi
Add this configuration in the file /etc/apache2/apache2.conf:
.. code:: apache
<Location />
Options FollowSymLinks Indexes
SetHandler uwsgi-handler
uWSGISocket /run/uwsgi/app/searx/socket
</Location>
Note that if your instance of searx is not at the root, you should
change ``<Location />`` by the location of your instance, like
``<Location /searx>``.
Restart Apache:
.. code:: sh
sudo /etc/init.d/apache2 restart
disable logs
""""""""""""
For better privacy you can disable Apache logs.
WARNING: not tested
WARNING: you can only disable logs for the whole (virtual) server not
for a specific path.
Go back to /etc/apache2/apache2.conf and above ``<Location />`` add:
.. code:: apache
CustomLog /dev/null combined
Restart Apache:
.. code:: sh
sudo /etc/init.d/apache2 restart
How to update
-------------
.. code:: sh
cd /usr/local/searx
sudo -u searx -i
. ./searx-ve/bin/activate
git stash
git pull origin master
git stash apply
./manage.sh update_packages
sudo service uwsgi restart
Docker
------
Make sure you have installed Docker. For instance, you can deploy searx like this:
.. code:: sh
docker pull wonderfall/searx
docker run -d --name searx -p $PORT:8888 wonderfall/searx
Go to http://localhost:$PORT.
See https://hub.docker.com/r/wonderfall/searx/ for more informations.
It's also possible to build searx from the embedded Dockerfile.
.. code:: sh
git clone https://github.com/asciimoo/searx.git
cd searx
docker build -t whatever/searx .
References
==========
* https://about.okhin.fr/posts/Searx/ with some additions
* How to: `Setup searx in a couple of hours with a free SSL certificate <https://www.reddit.com/r/privacytoolsIO/comments/366kvn/how_to_setup_your_own_privacy_respecting_search/>`__

View File

@ -0,0 +1,221 @@
.. _makefile:
================
Makefile Targets
================
.. _gnu-make: https://www.gnu.org/software/make/manual/make.html#Introduction
.. sidebar:: build environment
Before looking deeper at the targets, first read about :ref:`makefile setup`
and :ref:`make pyenv`.
With the aim to simplify development cycles, started with :pull:`1756` a
``Makefile`` based boilerplate was added. If you are not familiar with
Makefiles, we recommend to read gnu-make_ introduction.
The usage is simple, just type ``make {target-name}`` to *build* a target.
Calling the ``help`` target gives a first overview::
$ make help
test - run developer tests
docs - build documentation
docs-live - autobuild HTML documentation while editing
run - run developer instance
install - developer install (./local)
uninstall - uninstall (./local)
gh-pages - build docs & deploy on gh-pages branch
clean - drop builds and environments
...
.. contents:: Contents
:depth: 2
:local:
:backlinks: entry
.. _makefile setup:
Setup
=====
.. _git stash: https://git-scm.com/docs/git-stash
The main setup is done in the :origin:`Makefile`::
export GIT_URL=https://github.com/asciimoo/searx
export SEARX_URL=https://searx.me
export DOCS_URL=https://asciimoo.github.io/searx
.. sidebar:: fork & upstream
Commit changes in your (local) branch, fork or whatever, but do not push them
upstream / `git stash`_ is your friend.
:GIT_URL: Changes this, to point to your searx fork.
:SEARX_URL: Changes this, to point to your searx instance.
:DOCS_URL: If you host your own (branded) documentation, change this URL.
.. _make pyenv:
Python environment
==================
.. sidebar:: activate environment
``source ./local/py3/bin/activate``
With Makefile we do no longer need to build up the virualenv manually (as
described in the :ref:`devquickstart` guide). Jump into your git working tree
and release a ``make pyenv``:
.. code:: sh
$ cd ~/searx-clone
$ make pyenv
PYENV usage: source ./local/py3/bin/activate
...
With target ``pyenv`` a development environment (aka virtualenv) was build up in
``./local/py3/``. To make a *developer install* of searx (:origin:`setup.py`)
into this environment, use make target ``install``:
.. code:: sh
$ make install
PYENV usage: source ./local/py3/bin/activate
PYENV using virtualenv from ./local/py3
PYENV install .
You have never to think about intermediate targets like ``pyenv`` or
``install``, the ``Makefile`` chains them as requisites. Just run your main
target.
.. sidebar:: drop environment
To get rid of the existing environment before re-build use :ref:`clean target
<make clean>` first.
If you think, something goes wrong with your ./local environment or you change
the :origin:`setup.py` file (or the requirements listed in
:origin:`requirements-dev.txt` and :origin:`requirements.txt`), you have to call
:ref:`make clean`.
.. _make run:
``make run``
============
To get up a running a developer instance simply call ``make run``. This enables
*debug* option in :origin:`searx/settings.yml`, starts a ``./searx/webapp.py``
instance, disables *debug* option again and opens the URL in your favorite WEB
browser (:man:`xdg-open`):
.. code:: sh
$ make run
PYENV usage: source ./local/py3/bin/activate
PYENV install .
./local/py3/bin/python ./searx/webapp.py
...
INFO:werkzeug: * Running on http://127.0.0.1:8888/ (Press CTRL+C to quit)
...
.. _make clean:
``make clean``
==============
Drop all intermediate files, all builds, but keep sources untouched. Includes
target ``pyclean`` which drops ./local environment. Before calling ``make
clean`` stop all processes using :ref:`make pyenv`.
.. code:: sh
$ make clean
CLEAN pyclean
CLEAN clean
.. _make docs:
``make docs docs-live docs-clean``
==================================
We describe the usage of the ``doc*`` targets in the :ref:`How to contribute /
Documentation <contrib docs>` section. If you want to edit the documentation
read our :ref:`make docs-live` section. If you are working in your own brand,
adjust your :ref:`Makefile setup <makefile setup>`.
.. _make gh-pages:
``make gh-pages``
=================
To deploy on github.io first adjust your :ref:`Makefile setup <makefile
setup>`. For any further read :ref:`deploy on github.io`.
.. _make test:
``make test``
=============
Runs a series of tests: ``test.pep8``, ``test.unit``, ``test.robot`` and does
additional :ref:`pylint checks <make pylint>`. You can run tests selective,
e.g.:
.. code:: sh
$ make test.pep8 test.unit
. ./local/py3/bin/activate; ./manage.sh pep8_check
[!] Running pep8 check
. ./local/py3/bin/activate; ./manage.sh unit_tests
[!] Running unit tests
.. _make pylint:
``make pylint``
===============
.. _Pylint: https://www.pylint.org/
Before commiting its recommend to do some (more) linting. Pylint_ is known as
one of the best source-code, bug and quality checker for the Python programming
language. Pylint_ is not yet a quality gate within our searx project (like
:ref:`test.pep8 <make test>` it is), but Pylint_ can help to improve code
quality anyway. The pylint profile we use at searx project is found in
project's root folder :origin:`.pylintrc`.
Code quality is a ongoing process. Don't try to fix all messages from Pylint,
run Pylint and check if your changed lines are bringing up new messages. If so,
fix it. By this, code quality gets incremental better and if there comes the
day, the linting is balanced out, we might decide to add Pylint as a quality
gate.
``make pybuild``
================
.. _PyPi: https://pypi.org/
.. _twine: https://twine.readthedocs.io/en/latest/
Build Python packages in ``./dist/py``.
.. code:: sh
$ make pybuild
...
BUILD pybuild
running sdist
running egg_info
...
$ ls ./dist/py/
searx-0.15.0-py3-none-any.whl searx-0.15.0.tar.gz
To upload packages to PyPi_, there is also a ``upload-pypi`` target. It needs
twine_ to be installed. Since you are not the owner of :pypi:`searx` you will
never need the latter.

View File

@ -0,0 +1,54 @@
.. _dev plugin:
=======
Plugins
=======
.. sidebar:: Further reading ..
- :ref:`plugins generic`
Plugins can extend or replace functionality of various components of searx.
Example plugin
==============
.. code:: python
name = 'Example plugin'
description = 'This plugin extends the suggestions with the word "example"'
default_on = False # disabled by default
js_dependencies = tuple() # optional, list of static js files
css_dependencies = tuple() # optional, list of static css files
# attach callback to the post search hook
# request: flask request object
# ctx: the whole local context of the post search hook
def post_search(request, ctx):
ctx['search'].suggestions.add('example')
return True
Plugin entry points
===================
Entry points (hooks) define when a plugin runs. Right now only three hooks are
implemented. So feel free to implement a hook if it fits the behaviour of your
plugin.
Pre search hook
---------------
Runs BEFORE the search request. Function to implement: ``pre_search``
Post search hook
----------------
Runs AFTER the search request. Function to implement: ``post_search``
Result hook
-----------
Runs when a new result is added to the result list. Function to implement:
``on_result``

View File

@ -1,45 +0,0 @@
Plugins
-------
Plugins can extend or replace functionality of various components of
searx.
Example plugin
~~~~~~~~~~~~~~
.. code:: python
name = 'Example plugin'
description = 'This plugin extends the suggestions with the word "example"'
default_on = False # disabled by default
js_dependencies = tuple() # optional, list of static js files
css_dependencies = tuple() # optional, list of static css files
# attach callback to the post search hook
# request: flask request object
# ctx: the whole local context of the post search hook
def post_search(request, ctx):
ctx['search'].suggestions.add('example')
return True
Plugin entry points
~~~~~~~~~~~~~~~~~~~
Entry points (hooks) define when a plugin runs. Right now only three hooks are implemented. So feel free to implement a hook if it fits the behaviour of your plugin.
Pre search hook
```````````````
Runs BEFORE the search request. Function to implement: ``pre_search``
Post search hook
````````````````
Runs AFTER the search request. Function to implement: ``post_search``
Result hook
```````````
Runs when a new result is added to the result list. Function to implement: ``on_result``

View File

@ -0,0 +1,132 @@
.. _devquickstart:
======================
Development Quickstart
======================
.. sidebar:: :ref:`makefile`
For additional developer purpose there are :ref:`makefile`.
This quickstart guide gets your environment set up with searx. Furthermore, it
gives a short introduction to the ``manage.sh`` script.
How to setup your development environment
=========================================
.. sidebar:: :ref:`make pyenv <make pyenv>`
Alternatively use the :ref:`make pyenv`.
First, clone the source code of searx to the desired folder. In this case the
source is cloned to ``~/myprojects/searx``. Then create and activate the
searx-ve virtualenv and install the required packages using ``manage.sh``.
.. code:: sh
cd ~/myprojects
git clone https://github.com/asciimoo/searx.git
cd searx
virtualenv searx-ve
. ./searx-ve/bin/activate
./manage.sh update_dev_packages
How to run tests
================
.. sidebar:: :ref:`make test.unit <make test>`
Alternatively use the ``test.pep8``, ``test.unit``, ``test.robot`` targets.
Tests can be run using the ``manage.sh`` script. Following tests and checks are
available:
- Unit tests
- Selenium tests
- PEP8 validation
- Unit test coverage check
For example unit tests are run with the command below:
.. code:: sh
./manage.sh unit_tests
For further test options, please consult the help of the ``manage.sh`` script or
read :ref:`make test`.
How to compile styles and javascript
====================================
.. _less: http://lesscss.org/
.. _NodeJS: https://nodejs.org
How to build styles
-------------------
Less_ is required to build the styles of searx. Less_ can be installed using
either NodeJS_ or Apt.
.. code:: sh
sudo -H apt-get install nodejs
sudo -H npm install -g less
OR
.. code:: sh
sudo -H apt-get install node-less
After satisfying the requirements styles can be build using ``manage.sh``
.. code:: sh
./manage.sh styles
How to build the source of the oscar theme
==========================================
.. _grunt: https://gruntjs.com/
Grunt_ must be installed in order to build the javascript sources. It depends on
NodeJS, so first Node has to be installed.
.. code:: sh
sudo -H apt-get install nodejs
sudo -H npm install -g grunt-cli
After installing grunt, the files can be built using the following command:
.. code:: sh
./manage.sh grunt_build
Tips for debugging/development
==============================
.. sidebar:: :ref:`make run`
Makefile target ``run`` already enables debug option for your developer
session / see :ref:`make run`.
Turn on debug logging
Whether you are working on a new engine or trying to eliminate a bug, it is
always a good idea to turn on debug logging. When debug logging is enabled a
stack trace appears, instead of the cryptic ``Internal Server Error``
message. It can be turned on by setting ``debug: False`` to ``debug: True`` in
:origin:`settings.yml <searx/settings.yml>`.
.. sidebar:: :ref:`make test`
Alternatively use the :ref:`make test` targets.
Run ``./manage.sh tests`` before creating a PR.
Failing build on Travis is common because of PEP8 checks. So a new commit
must be created containing these format fixes. This phase can be skipped if
``./manage.sh tests`` is run locally before creating a PR.

View File

@ -1,108 +0,0 @@
.. _devquickstart:
Development Quickstart
----------------------
This quickstart guide gets your environment set up with searx. Furthermore, it gives a
short introduction to the new manage.sh script.
How to setup your development environment
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
First, clone the source code of searx to the desired folder. In this case the source
is cloned to ~/myprojects/searx. Then create and activate the searx-ve
virtualenv and install the required packages using manage.sh.
.. code:: sh
cd ~/myprojects
git clone https://github.com/asciimoo/searx.git
cd searx
virtualenv searx-ve
. ./searx-ve/bin/activate
./manage.sh update_dev_packages
How to run tests
~~~~~~~~~~~~~~~~
Tests can be run using the manage.sh script.
Following tests and checks are available:
- Unit tests
- Selenium tests
- PEP8 validation
- Unit test coverage check
For example unit tests are run with the command below:
.. code:: sh
./manage.sh unit_tests
For further test options, please consult the help of the manage.sh script.
How to compile styles and javascript
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
How to build styles
^^^^^^^^^^^^^^^^^^^
Less is required to build the styles of searx. Less can be installed using either NodeJS or Apt.
.. code:: sh
sudo apt-get install nodejs
sudo npm install -g less
OR
.. code:: sh
sudo apt-get install node-less
After satisfying the requirements styles can be build using manage.sh
.. code:: sh
./manage.sh styles
How to build the source of the oscar theme
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Grunt must be installed in order to build the javascript sources. It depends on NodeJS, so first
Node has to be installed.
.. code:: sh
sudo apt-get install nodejs
sudo npm install -g grunt-cli
After installing grunt, the files can be built using the following command:
.. code:: sh
./manage.sh build_grunt
Tips for debugging/development
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1. Turn on debug logging
Whether you are working on a new engine or trying to eliminate a bug, it is always a good idea
to turn on debug logging. When debug logging is enabled a stack trace appears,
instead of the cryptic ``Internal Server Error`` message. It can be turned on by setting
``debug: False`` to ``debug: True`` in settings.yml.
2. Run ``./manage.sh tests`` before creating a PR.
Failing build on Travis is common because of PEP8 checks. So a new commit must be created
containing these format fixes. This phase can be skipped if ``./manage.sh tests`` is run
locally before creating a PR.

1428
_sources/dev/reST.rst.txt Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,119 @@
==========
Search API
==========
The search supports both ``GET`` and ``POST``.
Furthermore, two enpoints ``/`` and ``/search`` are available for querying.
``GET /``
``GET /search``
Parameters
==========
.. sidebar:: Further reading ..
- :ref:`engines generic`
- :ref:`configured engines`
- :ref:`engine settings`
- :ref:`engine file`
``q`` : required
The search query. This string is passed to external search services. Thus,
searx supports syntax of each search service. For example, ``site:github.com
searx`` is a valid query for Google. However, if simply the query above is
passed to any search engine which does not filter its results based on this
syntax, you might not get the results you wanted.
See more at :ref:`search-syntax`
``categories`` : optional
Comma separated list, specifies the active search categories
``engines``: optional
Comma separated list, specifies the active search engines.
``lang``: default ``all``
Code of the language.
``pageno``: default ``1``
Search page number.
``time_range``: optional
[ ``day``, ``month``, ``year`` ]
Time range of search for engines which support it. See if an engine supports
time range search in the preferences page of an instance.
``format``: optional
[ ``json``, ``csv``, ``rss`` ]
Output format of results.
``results_on_new_tab``: default ``0``
[ ``0``, ``1`` ]
Open search results on new tab.
``image_proxy``: default ``False``
[ ``True``, ``False`` ]
Proxy image results through searx.
``autocomplete``: default *empty*
[ ``google``, ``dbpedia``, ``duckduckgo``, ``startpage``, ``wikipedia`` ]
Service which completes words as you type.
``safesearch``: default ``None``
[ ``0``, ``1``, ``None`` ]
Filter search results of engines which support safe search. See if an engine
supports safe search in the preferences page of an instance.
``theme``: default ``oscar``
[ ``oscar``, ``simple``, ``legacy``, ``pix-art``, ``courgette`` ]
Theme of instance.
Please note, available themes depend on an instance. It is possible that an
instance administrator deleted, created or renamed themes on his/her instance.
See the available options in the preferences page of the instance.
``oscar-style``: default ``logicodev``
[ ``pointhi``, ``logicodev`` ]
Style of Oscar theme. It is only parsed if the theme of an instance is
``oscar``.
Please note, available styles depend on an instance. It is possible that an
instance administrator deleted, created or renamed styles on his/her
instance. See the available options in the preferences page of the instance.
``enabled_plugins``: optional
List of enabled plugins.
:default: ``HTTPS_rewrite``, ``Self_Informations``,
``Search_on_category_select``, ``Tracker_URL_remover``
:values: [ ``DOAI_rewrite``, ``HTTPS_rewrite``, ``Infinite_scroll``,
``Vim-like_hotkeys``, ``Self_Informations``, ``Tracker_URL_remover``,
``Search_on_category_select`` ]
``disabled_plugins``: optional
List of disabled plugins.
:default: ``DOAI_rewrite``, ``Infinite_scroll``, ``Vim-like_hotkeys``
:values: ``DOAI_rewrite``, ``HTTPS_rewrite``, ``Infinite_scroll``,
``Vim-like_hotkeys``, ``Self_Informations``, ``Tracker_URL_remover``,
``Search_on_category_select``
``enabled_engines``: optional : *all* :origin:`engines <searx/engines>`
List of enabled engines.
``disabled_engines``: optional : *all* :origin:`engines <searx/engines>`
List of disabled engines.

View File

@ -1,35 +0,0 @@
Search API
==========
The search supports both ``GET`` and ``POST``.
Furthermore, two enpoints ``/`` and ``/search`` are available for querying.
.. code:: sh
GET /
.. code:: sh
GET /search
Parameters
``````````
+------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------+
| Name | Description | |
+==================+====================================================================================================+==================================================+
| ``q`` | The search query, see :doc:`/user/search_syntax` | required |
+------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------+
| ``categories`` | Comma separated list, specifies the active search categories | optional |
+------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------+
| ``engines`` | Comma separated list, specifies the active search engines | optional |
+------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------+
| ``lang`` | Code of the language | optional (default: ``all``) |
+------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------+
| ``pageno`` | Search page number | optional (default: ``1``) |
+------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------+
| ``time_range`` | Time range of search | optional (possible: ``day``, ``month``, ``year``)|
+------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------+
| ``format`` | Output format of results | optional (possible: ``json``, ``csv``, ``rss``) |
+------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------+

View File

@ -1,28 +1,36 @@
.. _translation:
===========
Translation
===========
.. _searx@transifex: https://www.transifex.com/asciimoo/searx/
Translation currently takes place on `searx@transifex`_
Requirements
------------
============
* Transifex account
* Installed CLI tool of Transifex
* Transifex account
* Installed CLI tool of Transifex
Init Transifex project
----------------------
======================
After installing ``transifex`` using pip, run the following command to initialize the project.
After installing ``transifex`` using pip, run the following command to
initialize the project.
.. code:: shell
.. code:: sh
tx init # Transifex instance: https://www.transifex.com/asciimoo/searx/
tx init # Transifex instance: https://www.transifex.com/asciimoo/searx/
After ``$HOME/.transifexrc`` is created, get a Transifex API key and insert it into the configuration file.
After ``$HOME/.transifexrc`` is created, get a Transifex API key and insert it
into the configuration file.
Create a configuration file for ``tx`` named ``$HOME/.tx/config``.
.. code:: shell
.. code:: ini
[main]
host = https://www.transifex.com
@ -42,20 +50,22 @@ Then run ``tx set``:
Update translations
-------------------
===================
To retrieve the latest translations, pull it from Transifex.
.. code:: shell
.. code:: sh
tx pull -a
tx pull -a
Then check the new languages. If strings translated are not enough, delete those folders, because
those should not be compiled. Call the command below to compile the ``.po`` files.
Then check the new languages. If strings translated are not enough, delete those
folders, because those should not be compiled. Call the command below to compile
the ``.po`` files.
.. code:: shell
pybabel compile -d searx/translations
pybabel compile -d searx/translations
After the compilation is finished commit the ``.po`` and ``.mo`` files and create a PR.
After the compilation is finished commit the ``.po`` and ``.mo`` files and
create a PR.

32
_sources/index.rst.txt Normal file
View File

@ -0,0 +1,32 @@
================
Welcome to searx
================
Search without being tracked.
.. sidebar:: Features
- Self hosted
- No user tracking
- No user profiling
- About 70 supported search engines
- Easy integration with any search engine
- Cookies are not used by default
- Secure, encrypted connections (HTTPS/SSL)
- Hosted by organizations, such as *La Quadrature du Net*, which promote
digital rights
Searx is a free internet metasearch engine which aggregates results from more
than 70 search services. Users are neither tracked nor profiled. Additionally,
searx can be used over Tor for online anonymity.
Get started with searx by using one of the :wiki:`Searx-instances`. If you
don't trust anyone, you can set up your own, see :ref:`installation`.
.. toctree::
:maxdepth: 2
user/index
admin/index
dev/index
blog/index

View File

@ -1,55 +0,0 @@
Welcome to searx
================
Search without being tracked.
Searx is a free internet metasearch engine which aggregates results from more than 70 search services. Users are neither tracked nor profiled. Additionally, searx can be used over Tor for online anonymity.
Get started with searx by using one of the `public instances`_. If you don't trust anyone, you can set up your own, see :ref:`installation`.
.. _public instances: https://github.com/asciimoo/searx/wiki/Searx-instances
Features
--------
- Self hosted
- No user tracking
- No user profiling
- About 70 supported search engines
- Easy integration with any search engine
- Cookies are not used by default
- Secure, encrypted connections (HTTPS/SSL)
- Hosted by organisations, such as La Quadrature du Net, which promote digital rights
User documentation
------------------
.. toctree::
:maxdepth: 1
user/search_syntax
user/own-instance
Administrator documentation
---------------------------
.. toctree::
:maxdepth: 1
dev/install/installation
admin/api
admin/filtron
Developer documentation
-----------------------
.. toctree::
:maxdepth: 1
dev/quickstart
dev/contribution_guide
dev/engine_overview
dev/search_api
dev/plugins
dev/translation

View File

@ -0,0 +1,9 @@
==================
User documentation
==================
.. toctree::
:maxdepth: 1
search_syntax
own-instance

View File

@ -0,0 +1,77 @@
===========================
Why use a private instance?
===========================
"Is it worth to run my own instance?" is a common question among searx users.
Before answering this question, see what options a searx user has.
Public instances are open to everyone who has access to its URL. Usually, these
are operated by unknown parties (from the users' point of view). Private
instances can be used by a select group of people. It is for example a searx of
group of friends or a company which can be accessed through VPN. Also it can be
single user one which runs on the user's laptop.
To gain more insight on how these instances work let's dive into how searx
protects its users.
How does searx protect privacy?
===============================
Searx protects the privacy of its users in multiple ways regardless of the type
of the instance (private, public). Removal of private data from search requests
comes in three forms:
1. removal of private data from requests going to search services
2. not forwarding anything from a third party services through search services
(e.g. advertisement)
3. removal of private data from requests going to the result pages
Removing private data means not sending cookies to external search engines and
generating a random browser profile for every request. Thus, it does not matter
if a public or private instance handles the request, because it is anonymized in
both cases. IP addresses will be the IP of the instance. But searx can be
configured to use proxy or Tor. `Result proxy
<https://github.com/asciimoo/morty>`__ is supported, too.
Searx does not serve ads or tracking content unlike most search services. So
private data is not forwarded to third parties who might monetize it. Besides
protecting users from search services, both referring page and search query are
hidden from visited result pages.
What are the consequences of using public instances?
----------------------------------------------------
If someone uses a public instance, he/she has to trust the administrator of that
instance. This means that the user of the public instance does not know whether
his/her requests are logged, aggregated and sent or sold to a third party.
Also, public instances without proper protection are more vulnerable to abusing
the search service, In this case the external service in exchange returns
CAPTCHAs or bans the IP of the instance. Thus, search requests return less
results.
I see. What about private instances?
------------------------------------
If users run their own instances, everything is in their control: the source
code, logging settings and private data. Unknown instance administrators do not
have to be trusted.
Furthermore, as the default settings of their instance is editable, there is no
need to use cookies to tailor searx to their needs. So preferences will not be
reset to defaults when clearing browser cookies. As settings are stored on
their computer, it will not be accessible to others as long as their computer is
not compromised.
Conclusion
==========
Always use an instance which is operated by people you trust. The privacy
features of searx are available to users no matter what kind of instance they
use.
If someone is on the go or just wants to try searx for the first time public
instances are the best choices. Additionally, public instance are making a
world a better place, because those who cannot or do not want to run an
instance, have access to a privacy respecting search service.

View File

@ -1,43 +0,0 @@
Why use a private instance?
===========================
"Is it worth to run my own instance?" is a common question among searx users. Before answering this question, see what options a searx user has.
Public instances are open to everyone who has access to its URL. Usually, these are operated by unknown parties (from the users' point of view). Private instances can be used by a select group of people. It is for example a searx of group of friends or a company which can be accessed through VPN. Also it can be single user one which runs on the user's laptop.
To gain more insight on how these instances work let's dive into how searx protects its users.
How does searx protect privacy?
-------------------------------
Searx protects the privacy of its users in multiple ways regardless of the type of the instance (private, public). Removal of private data from search requests comes in three forms:
1. removal of private data from requests going to search services
2. not forwarding anything from a third party services through search services (e.g. advertisement)
3. removal of private data from requests going to the result pages
Removing private data means not sending cookies to external search engines and generating a random browser profile for every request. Thus, it does not matter if a public or private instance handles the request, because it is anonymized in both cases. IP addresses will be the IP of the instance. But searx can be configured to use proxy or Tor. `Result proxy <https://github.com/asciimoo/morty>`__ is supported, too.
Searx does not serve ads or tracking content unlike most search services. So private data is not forwarded to third parties who might monetize it. Besides protecting users from search services, both referring page and search query are hidden from visited result pages.
What are the consequences of using public instances?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If someone uses a public instance, he/she has to trust the administrator of that instance.
This means that the user of the public instance does not know whether his/her requests are logged, aggregated and sent or sold to a third party.
Also, public instances without proper protection are more vulnerable to abusing the search service, In this case the external service in exchange returns CAPTCHAs or bans the IP of the instance. Thus, search requests return less results.
I see. What about private instances?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If users run their own instances, everything is in their control: the source code, logging settings and private data. Unknown instance administrators do not have to be trusted.
Furthermore, as the default settings of their instance is editable, there is no need to use cookies to tailor searx to their needs. So preferences will not be reset to defaults when clearing browser cookies. As settings are stored on their computer, it will not be accessible to others as long as their computer is not compromised.
Conclusion
----------
Always use an instance which is operated by people you trust. The privacy features of searx are available to users no matter what kind of instance they use.
If someone is on the go or just wants to try searx for the first time public instances are the best choices. Additionally, public instance are making a world a better place, because those who cannot or do not want to run an instance, have access to a privacy respecting search service.

View File

@ -0,0 +1,42 @@
.. _search-syntax:
=============
Search syntax
=============
Searx allows you to modify the default categories, engines and search language
via the search query.
Prefix ``!``
to set Category/engine
Prefix: ``:``
to set language
Prefix: ``?``
to add engines and categories to the currently selected categories
Abbrevations of the engines and languages are also accepted. Engine/category
modifiers are chainable and inclusive (e.g. with :search:`!it !ddg !wp qwer
<?q=%21it%20%21ddg%20%21wp%20qwer>` search in IT category **and** duckduckgo
**and** wikipedia for ``qwer``).
See the :search:`/preferences page <preferences>` for the list of engines,
categories and languages.
Examples
========
Search in wikipedia for ``qwer``:
- :search:`!wp qwer <?q=%21wp%20qwer>` or
- :search:`!wikipedia qwer :search:<?q=%21wikipedia%20qwer>`
Image search:
- :search:`!images Cthulhu <?q=%21images%20Cthulhu>`
Custom language in wikipedia:
- :search:`:hu !wp hackerspace <?q=%3Ahu%20%21wp%20hackerspace>`

View File

@ -1,33 +0,0 @@
Search syntax
=============
Searx allows you to modify the default categories, engines and search
language via the search query.
Category/engine prefix: ``!``
Language prefix: ``:``
Prefix to add engines and categories to the currently selected
categories: ``?``
Abbrevations of the engines and languages are also accepted.
Engine/category modifiers are chainable and inclusive (e.g. with
`!it !ddg !wp qwer <https://searx.me/?q=%21it%20%21ddg%20%21wp%20qwer>`_
search in IT category **and** duckduckgo **and** wikipedia for ``qwer``).
See the `/preferences page <https://searx.me/preferences>`_ for the
list of engines, categories and languages.
Examples
~~~~~~~~
Search in wikipedia for ``qwer``:
`!wp qwer <https://searx.me/?q=%21wp%20qwer>`__ or
`!wikipedia qwer <https://searx.me/?q=%21wikipedia%20qwer>`_
Image search:
`!images Cthulhu <https://searx.me/?q=%21images%20Cthulhu>`_
Custom language in wikipedia:
`:hu !wp hackerspace <https://searx.me/?q=%3Ahu%20%21wp%20hackerspace>`_

Binary file not shown.

Before

Width:  |  Height:  |  Size: 673 B

View File

@ -4,7 +4,7 @@
*
* Sphinx stylesheet -- basic theme.
*
* :copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
@ -81,10 +81,26 @@ div.sphinxsidebar input {
font-size: 1em;
}
div.sphinxsidebar #searchbox input[type="text"] {
width: 170px;
div.sphinxsidebar #searchbox form.search {
overflow: hidden;
}
div.sphinxsidebar #searchbox input[type="text"] {
float: left;
width: 80%;
padding: 0.25em;
box-sizing: border-box;
}
div.sphinxsidebar #searchbox input[type="submit"] {
float: left;
width: 20%;
border-left: none;
padding: 0.25em;
box-sizing: border-box;
}
img {
border: 0;
max-width: 100%;
@ -199,6 +215,11 @@ table.modindextable td {
/* -- general body styles --------------------------------------------------- */
div.body {
min-width: 450px;
max-width: 800px;
}
div.body p, div.body dd, div.body li, div.body blockquote {
-moz-hyphens: auto;
-ms-hyphens: auto;
@ -210,6 +231,16 @@ a.headerlink {
visibility: hidden;
}
a.brackets:before,
span.brackets > a:before{
content: "[";
}
a.brackets:after,
span.brackets > a:after {
content: "]";
}
h1:hover > a.headerlink,
h2:hover > a.headerlink,
h3:hover > a.headerlink,
@ -258,6 +289,12 @@ img.align-center, .figure.align-center, object.align-center {
margin-right: auto;
}
img.align-default, .figure.align-default {
display: block;
margin-left: auto;
margin-right: auto;
}
.align-left {
text-align: left;
}
@ -266,6 +303,10 @@ img.align-center, .figure.align-center, object.align-center {
text-align: center;
}
.align-default {
text-align: center;
}
.align-right {
text-align: right;
}
@ -332,6 +373,16 @@ table.docutils {
border-collapse: collapse;
}
table.align-center {
margin-left: auto;
margin-right: auto;
}
table.align-default {
margin-left: auto;
margin-right: auto;
}
table caption span.caption-number {
font-style: italic;
}
@ -365,6 +416,16 @@ table.citation td {
border-bottom: none;
}
th > p:first-child,
td > p:first-child {
margin-top: 0px;
}
th > p:last-child,
td > p:last-child {
margin-bottom: 0px;
}
/* -- figures --------------------------------------------------------------- */
div.figure {
@ -405,6 +466,13 @@ table.field-list td, table.field-list th {
hyphens: manual;
}
/* -- hlist styles ---------------------------------------------------------- */
table.hlist td {
vertical-align: top;
}
/* -- other body styles ----------------------------------------------------- */
ol.arabic {
@ -427,11 +495,58 @@ ol.upperroman {
list-style: upper-roman;
}
li > p:first-child {
margin-top: 0px;
}
li > p:last-child {
margin-bottom: 0px;
}
dl.footnote > dt,
dl.citation > dt {
float: left;
}
dl.footnote > dd,
dl.citation > dd {
margin-bottom: 0em;
}
dl.footnote > dd:after,
dl.citation > dd:after {
content: "";
clear: both;
}
dl.field-list {
display: grid;
grid-template-columns: fit-content(30%) auto;
}
dl.field-list > dt {
font-weight: bold;
word-break: break-word;
padding-left: 0.5em;
padding-right: 5px;
}
dl.field-list > dt:after {
content: ":";
}
dl.field-list > dd {
padding-left: 0.5em;
margin-top: 0em;
margin-left: 0em;
margin-bottom: 0em;
}
dl {
margin-bottom: 15px;
}
dd p {
dd > p:first-child {
margin-top: 0px;
}
@ -445,10 +560,14 @@ dd {
margin-left: 30px;
}
dt:target, .highlighted {
dt:target, span.highlighted {
background-color: #fbe54e;
}
rect.highlighted {
fill: #fbe54e;
}
dl.glossary dt {
font-weight: bold;
font-size: 1.1em;
@ -500,6 +619,12 @@ dl.glossary dt {
font-style: oblique;
}
.classifier:before {
font-style: normal;
margin: 0.5em;
content: ":";
}
abbr, acronym {
border-bottom: dotted 1px;
cursor: help;
@ -547,6 +672,10 @@ div.code-block-caption + div > div.highlight > pre {
margin-top: 0;
}
div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */
user-select: none;
}
div.code-block-caption span.caption-number {
padding: 0.1em 0.3em;
font-style: italic;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 756 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 829 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 641 B

View File

@ -4,7 +4,7 @@
*
* Sphinx JavaScript utilities for all documentation.
*
* :copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
@ -45,7 +45,7 @@ jQuery.urlencode = encodeURIComponent;
* it will always return arrays of strings for the value parts.
*/
jQuery.getQueryParameters = function(s) {
if (typeof s == 'undefined')
if (typeof s === 'undefined')
s = document.location.search;
var parts = s.substr(s.indexOf('?') + 1).split('&');
var result = {};
@ -66,29 +66,54 @@ jQuery.getQueryParameters = function(s) {
* span elements with the given class name.
*/
jQuery.fn.highlightText = function(text, className) {
function highlight(node) {
if (node.nodeType == 3) {
function highlight(node, addItems) {
if (node.nodeType === 3) {
var val = node.nodeValue;
var pos = val.toLowerCase().indexOf(text);
if (pos >= 0 && !jQuery(node.parentNode).hasClass(className)) {
var span = document.createElement("span");
span.className = className;
if (pos >= 0 &&
!jQuery(node.parentNode).hasClass(className) &&
!jQuery(node.parentNode).hasClass("nohighlight")) {
var span;
var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
if (isInSVG) {
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
} else {
span = document.createElement("span");
span.className = className;
}
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
node.parentNode.insertBefore(span, node.parentNode.insertBefore(
document.createTextNode(val.substr(pos + text.length)),
node.nextSibling));
node.nodeValue = val.substr(0, pos);
if (isInSVG) {
var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
var bbox = node.parentElement.getBBox();
rect.x.baseVal.value = bbox.x;
rect.y.baseVal.value = bbox.y;
rect.width.baseVal.value = bbox.width;
rect.height.baseVal.value = bbox.height;
rect.setAttribute('class', className);
addItems.push({
"parent": node.parentNode,
"target": rect});
}
}
}
else if (!jQuery(node).is("button, select, textarea")) {
jQuery.each(node.childNodes, function() {
highlight(this);
highlight(this, addItems);
});
}
}
return this.each(function() {
highlight(this);
var addItems = [];
var result = this.each(function() {
highlight(this, addItems);
});
for (var i = 0; i < addItems.length; ++i) {
jQuery(addItems[i].parent).before(addItems[i].target);
}
return result;
};
/*
@ -124,28 +149,30 @@ var Documentation = {
this.fixFirefoxAnchorBug();
this.highlightSearchWords();
this.initIndexTable();
if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) {
this.initOnKeyListeners();
}
},
/**
* i18n support
*/
TRANSLATIONS : {},
PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; },
PLURAL_EXPR : function(n) { return n === 1 ? 0 : 1; },
LOCALE : 'unknown',
// gettext and ngettext don't access this so that the functions
// can safely bound to a different name (_ = Documentation.gettext)
gettext : function(string) {
var translated = Documentation.TRANSLATIONS[string];
if (typeof translated == 'undefined')
if (typeof translated === 'undefined')
return string;
return (typeof translated == 'string') ? translated : translated[0];
return (typeof translated === 'string') ? translated : translated[0];
},
ngettext : function(singular, plural, n) {
var translated = Documentation.TRANSLATIONS[singular];
if (typeof translated == 'undefined')
if (typeof translated === 'undefined')
return (n == 1) ? singular : plural;
return translated[Documentation.PLURALEXPR(n)];
},
@ -180,7 +207,7 @@ var Documentation = {
* see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075
*/
fixFirefoxAnchorBug : function() {
if (document.location.hash)
if (document.location.hash && $.browser.mozilla)
window.setTimeout(function() {
document.location.href += '';
}, 10);
@ -216,7 +243,7 @@ var Documentation = {
var src = $(this).attr('src');
var idnum = $(this).attr('id').substr(7);
$('tr.cg-' + idnum).toggle();
if (src.substr(-9) == 'minus.png')
if (src.substr(-9) === 'minus.png')
$(this).attr('src', src.substr(0, src.length-9) + 'plus.png');
else
$(this).attr('src', src.substr(0, src.length-8) + 'minus.png');
@ -248,7 +275,7 @@ var Documentation = {
var path = document.location.pathname;
var parts = path.split(/\//);
$.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() {
if (this == '..')
if (this === '..')
parts.pop();
});
var url = parts.join('/');
@ -284,4 +311,4 @@ _ = Documentation.gettext;
$(document).ready(function() {
Documentation.init();
});
});

View File

@ -0,0 +1,11 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
VERSION: '0.15.0',
LANGUAGE: 'None',
COLLAPSE_INDEX: false,
BUILDER: 'html',
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt',
NAVIGATION_WITH_KEYS: false
};

Binary file not shown.

Before

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 202 B

File diff suppressed because it is too large Load Diff

6
_static/jquery.js vendored

File diff suppressed because one or more lines are too long

297
_static/language_data.js Normal file
View File

@ -0,0 +1,297 @@
/*
* language_data.js
* ~~~~~~~~~~~~~~~~
*
* This script contains the language-specific data used by searchtools.js,
* namely the list of stopwords, stemmer, scorer and splitter.
*
* :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"];
/* Non-minified version JS is _stemmer.js if file is provided */
/**
* Porter Stemmer
*/
var Stemmer = function() {
var step2list = {
ational: 'ate',
tional: 'tion',
enci: 'ence',
anci: 'ance',
izer: 'ize',
bli: 'ble',
alli: 'al',
entli: 'ent',
eli: 'e',
ousli: 'ous',
ization: 'ize',
ation: 'ate',
ator: 'ate',
alism: 'al',
iveness: 'ive',
fulness: 'ful',
ousness: 'ous',
aliti: 'al',
iviti: 'ive',
biliti: 'ble',
logi: 'log'
};
var step3list = {
icate: 'ic',
ative: '',
alize: 'al',
iciti: 'ic',
ical: 'ic',
ful: '',
ness: ''
};
var c = "[^aeiou]"; // consonant
var v = "[aeiouy]"; // vowel
var C = c + "[^aeiouy]*"; // consonant sequence
var V = v + "[aeiou]*"; // vowel sequence
var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0
var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1
var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1
var s_v = "^(" + C + ")?" + v; // vowel in stem
this.stemWord = function (w) {
var stem;
var suffix;
var firstch;
var origword = w;
if (w.length < 3)
return w;
var re;
var re2;
var re3;
var re4;
firstch = w.substr(0,1);
if (firstch == "y")
w = firstch.toUpperCase() + w.substr(1);
// Step 1a
re = /^(.+?)(ss|i)es$/;
re2 = /^(.+?)([^s])s$/;
if (re.test(w))
w = w.replace(re,"$1$2");
else if (re2.test(w))
w = w.replace(re2,"$1$2");
// Step 1b
re = /^(.+?)eed$/;
re2 = /^(.+?)(ed|ing)$/;
if (re.test(w)) {
var fp = re.exec(w);
re = new RegExp(mgr0);
if (re.test(fp[1])) {
re = /.$/;
w = w.replace(re,"");
}
}
else if (re2.test(w)) {
var fp = re2.exec(w);
stem = fp[1];
re2 = new RegExp(s_v);
if (re2.test(stem)) {
w = stem;
re2 = /(at|bl|iz)$/;
re3 = new RegExp("([^aeiouylsz])\\1$");
re4 = new RegExp("^" + C + v + "[^aeiouwxy]$");
if (re2.test(w))
w = w + "e";
else if (re3.test(w)) {
re = /.$/;
w = w.replace(re,"");
}
else if (re4.test(w))
w = w + "e";
}
}
// Step 1c
re = /^(.+?)y$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
re = new RegExp(s_v);
if (re.test(stem))
w = stem + "i";
}
// Step 2
re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
suffix = fp[2];
re = new RegExp(mgr0);
if (re.test(stem))
w = stem + step2list[suffix];
}
// Step 3
re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
suffix = fp[2];
re = new RegExp(mgr0);
if (re.test(stem))
w = stem + step3list[suffix];
}
// Step 4
re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
re2 = /^(.+?)(s|t)(ion)$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
re = new RegExp(mgr1);
if (re.test(stem))
w = stem;
}
else if (re2.test(w)) {
var fp = re2.exec(w);
stem = fp[1] + fp[2];
re2 = new RegExp(mgr1);
if (re2.test(stem))
w = stem;
}
// Step 5
re = /^(.+?)e$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
re = new RegExp(mgr1);
re2 = new RegExp(meq1);
re3 = new RegExp("^" + C + v + "[^aeiouwxy]$");
if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))
w = stem;
}
re = /ll$/;
re2 = new RegExp(mgr1);
if (re.test(w) && re2.test(w)) {
re = /.$/;
w = w.replace(re,"");
}
// and turn initial Y back to y
if (firstch == "y")
w = firstch.toLowerCase() + w.substr(1);
return w;
}
}
var splitChars = (function() {
var result = {};
var singles = [96, 180, 187, 191, 215, 247, 749, 885, 903, 907, 909, 930, 1014, 1648,
1748, 1809, 2416, 2473, 2481, 2526, 2601, 2609, 2612, 2615, 2653, 2702,
2706, 2729, 2737, 2740, 2857, 2865, 2868, 2910, 2928, 2948, 2961, 2971,
2973, 3085, 3089, 3113, 3124, 3213, 3217, 3241, 3252, 3295, 3341, 3345,
3369, 3506, 3516, 3633, 3715, 3721, 3736, 3744, 3748, 3750, 3756, 3761,
3781, 3912, 4239, 4347, 4681, 4695, 4697, 4745, 4785, 4799, 4801, 4823,
4881, 5760, 5901, 5997, 6313, 7405, 8024, 8026, 8028, 8030, 8117, 8125,
8133, 8181, 8468, 8485, 8487, 8489, 8494, 8527, 11311, 11359, 11687, 11695,
11703, 11711, 11719, 11727, 11735, 12448, 12539, 43010, 43014, 43019, 43587,
43696, 43713, 64286, 64297, 64311, 64317, 64319, 64322, 64325, 65141];
var i, j, start, end;
for (i = 0; i < singles.length; i++) {
result[singles[i]] = true;
}
var ranges = [[0, 47], [58, 64], [91, 94], [123, 169], [171, 177], [182, 184], [706, 709],
[722, 735], [741, 747], [751, 879], [888, 889], [894, 901], [1154, 1161],
[1318, 1328], [1367, 1368], [1370, 1376], [1416, 1487], [1515, 1519], [1523, 1568],
[1611, 1631], [1642, 1645], [1750, 1764], [1767, 1773], [1789, 1790], [1792, 1807],
[1840, 1868], [1958, 1968], [1970, 1983], [2027, 2035], [2038, 2041], [2043, 2047],
[2070, 2073], [2075, 2083], [2085, 2087], [2089, 2307], [2362, 2364], [2366, 2383],
[2385, 2391], [2402, 2405], [2419, 2424], [2432, 2436], [2445, 2446], [2449, 2450],
[2483, 2485], [2490, 2492], [2494, 2509], [2511, 2523], [2530, 2533], [2546, 2547],
[2554, 2564], [2571, 2574], [2577, 2578], [2618, 2648], [2655, 2661], [2672, 2673],
[2677, 2692], [2746, 2748], [2750, 2767], [2769, 2783], [2786, 2789], [2800, 2820],
[2829, 2830], [2833, 2834], [2874, 2876], [2878, 2907], [2914, 2917], [2930, 2946],
[2955, 2957], [2966, 2968], [2976, 2978], [2981, 2983], [2987, 2989], [3002, 3023],
[3025, 3045], [3059, 3076], [3130, 3132], [3134, 3159], [3162, 3167], [3170, 3173],
[3184, 3191], [3199, 3204], [3258, 3260], [3262, 3293], [3298, 3301], [3312, 3332],
[3386, 3388], [3390, 3423], [3426, 3429], [3446, 3449], [3456, 3460], [3479, 3481],
[3518, 3519], [3527, 3584], [3636, 3647], [3655, 3663], [3674, 3712], [3717, 3718],
[3723, 3724], [3726, 3731], [3752, 3753], [3764, 3772], [3774, 3775], [3783, 3791],
[3802, 3803], [3806, 3839], [3841, 3871], [3892, 3903], [3949, 3975], [3980, 4095],
[4139, 4158], [4170, 4175], [4182, 4185], [4190, 4192], [4194, 4196], [4199, 4205],
[4209, 4212], [4226, 4237], [4250, 4255], [4294, 4303], [4349, 4351], [4686, 4687],
[4702, 4703], [4750, 4751], [4790, 4791], [4806, 4807], [4886, 4887], [4955, 4968],
[4989, 4991], [5008, 5023], [5109, 5120], [5741, 5742], [5787, 5791], [5867, 5869],
[5873, 5887], [5906, 5919], [5938, 5951], [5970, 5983], [6001, 6015], [6068, 6102],
[6104, 6107], [6109, 6111], [6122, 6127], [6138, 6159], [6170, 6175], [6264, 6271],
[6315, 6319], [6390, 6399], [6429, 6469], [6510, 6511], [6517, 6527], [6572, 6592],
[6600, 6607], [6619, 6655], [6679, 6687], [6741, 6783], [6794, 6799], [6810, 6822],
[6824, 6916], [6964, 6980], [6988, 6991], [7002, 7042], [7073, 7085], [7098, 7167],
[7204, 7231], [7242, 7244], [7294, 7400], [7410, 7423], [7616, 7679], [7958, 7959],
[7966, 7967], [8006, 8007], [8014, 8015], [8062, 8063], [8127, 8129], [8141, 8143],
[8148, 8149], [8156, 8159], [8173, 8177], [8189, 8303], [8306, 8307], [8314, 8318],
[8330, 8335], [8341, 8449], [8451, 8454], [8456, 8457], [8470, 8472], [8478, 8483],
[8506, 8507], [8512, 8516], [8522, 8525], [8586, 9311], [9372, 9449], [9472, 10101],
[10132, 11263], [11493, 11498], [11503, 11516], [11518, 11519], [11558, 11567],
[11622, 11630], [11632, 11647], [11671, 11679], [11743, 11822], [11824, 12292],
[12296, 12320], [12330, 12336], [12342, 12343], [12349, 12352], [12439, 12444],
[12544, 12548], [12590, 12592], [12687, 12689], [12694, 12703], [12728, 12783],
[12800, 12831], [12842, 12880], [12896, 12927], [12938, 12976], [12992, 13311],
[19894, 19967], [40908, 40959], [42125, 42191], [42238, 42239], [42509, 42511],
[42540, 42559], [42592, 42593], [42607, 42622], [42648, 42655], [42736, 42774],
[42784, 42785], [42889, 42890], [42893, 43002], [43043, 43055], [43062, 43071],
[43124, 43137], [43188, 43215], [43226, 43249], [43256, 43258], [43260, 43263],
[43302, 43311], [43335, 43359], [43389, 43395], [43443, 43470], [43482, 43519],
[43561, 43583], [43596, 43599], [43610, 43615], [43639, 43641], [43643, 43647],
[43698, 43700], [43703, 43704], [43710, 43711], [43715, 43738], [43742, 43967],
[44003, 44015], [44026, 44031], [55204, 55215], [55239, 55242], [55292, 55295],
[57344, 63743], [64046, 64047], [64110, 64111], [64218, 64255], [64263, 64274],
[64280, 64284], [64434, 64466], [64830, 64847], [64912, 64913], [64968, 65007],
[65020, 65135], [65277, 65295], [65306, 65312], [65339, 65344], [65371, 65381],
[65471, 65473], [65480, 65481], [65488, 65489], [65496, 65497]];
for (i = 0; i < ranges.length; i++) {
start = ranges[i][0];
end = ranges[i][1];
for (j = start; j <= end; j++) {
result[j] = true;
}
}
return result;
})();
function splitQuery(query) {
var result = [];
var start = -1;
for (var i = 0; i < query.length; i++) {
if (splitChars[query.charCodeAt(i)]) {
if (start !== -1) {
result.push(query.slice(start, i));
start = -1;
}
} else if (start === -1) {
start = i;
}
}
if (start !== -1) {
result.push(query.slice(start));
}
return result;
}

483
_static/pocoo.css Normal file
View File

@ -0,0 +1,483 @@
@import url("basic.css");
/* -- page layout --------------------------------------------------- */
body {
font-family: 'Garamond', 'Georgia', serif;
font-size: 17px;
background-color: #fff;
color: #3e4349;
margin: 0;
padding: 0;
}
div.related {
max-width: 1140px;
margin: 10px auto;
/* displayed on mobile */
display: none;
}
div.document {
max-width: 1140px;
margin: 10px auto;
}
div.documentwrapper {
float: left;
width: 100%;
}
div.bodywrapper {
margin: 0 0 0 220px;
}
div.body {
min-width: initial;
max-width: initial;
padding: 0 30px;
}
div.sphinxsidebarwrapper {
padding: 10px;
}
div.sphinxsidebar {
width: 220px;
font-size: 14px;
line-height: 1.5;
color: #444;
}
div.sphinxsidebar a,
div.sphinxsidebar a code {
color: #444;
border-color: #444;
}
div.sphinxsidebar p.logo {
margin: 0;
text-align: center;
}
div.sphinxsidebar h3,
div.sphinxsidebar h4 {
font-size: 24px;
color: #444;
}
div.sphinxsidebar p.logo a,
div.sphinxsidebar h3 a,
div.sphinxsidebar p.logo a:hover,
div.sphinxsidebar h3 a:hover {
border: none;
}
div.sphinxsidebar p,
div.sphinxsidebar h3,
div.sphinxsidebar h4 {
margin: 10px 0;
}
div.sphinxsidebar ul {
margin: 10px 0;
padding: 0;
}
div.sphinxsidebar input {
border: 1px solid #999;
font-size: 1em;
}
div.footer {
max-width: 1140px;
margin: 20px auto;
font-size: 14px;
text-align: right;
color: #888;
}
div.footer a {
color: #888;
border-color: #888;
}
/* -- quick search -------------------------------------------------- */
div.sphinxsidebar #searchbox form {
display: flex;
}
div.sphinxsidebar #searchbox form > div {
display: flex;
flex: 1 1 auto;
}
div.sphinxsidebar #searchbox input[type=text] {
flex: 1 1 auto;
width: 1% !important;
}
div.sphinxsidebar #searchbox input[type=submit] {
border-left-width: 0;
}
/* -- versions ------------------------------------------------------ */
div.sphinxsidebar ul.versions a.current {
font-style: italic;
border-bottom: 1px solid #000;
color: #000;
}
div.sphinxsidebar ul.versions span.note {
color: #999;
}
/* -- version warning ----------------------------------------------- */
p.version-warning {
top: 10px;
position: sticky;
margin: 10px 0;
padding: 5px 10px;
border-radius: 4px;
letter-spacing: 1px;
color: #fff;
text-shadow: 0 0 2px #000;
text-align: center;
background: #d40 repeating-linear-gradient(
135deg,
transparent,
transparent 56px,
rgba(255, 255, 255, 0.2) 56px,
rgba(255, 255, 255, 0.2) 112px
);
}
p.version-warning a {
color: #fff;
border-color: #fff;
}
/* -- body styles --------------------------------------------------- */
a {
text-decoration: none;
border-bottom: 1px dotted #000;
}
a:hover {
border-bottom-style: solid;
}
h1, h2, h3, h4, h5, h6 {
font-weight: normal;
margin: 30px 0 10px;
padding: 0;
color: black;
}
div.body h1 {
font-size: 240%;
}
div.body h2 {
font-size: 180%;
}
div.body h3 {
font-size: 150%;
}
div.body h4 {
font-size: 130%;
}
div.body h5 {
font-size: 100%;
}
div.body h6 {
font-size: 100%;
}
div.body h1:first-of-type {
margin-top: 0;
}
a.headerlink {
color: #ddd;
margin: 0 0.2em;
padding: 0 0.2em;
border: none;
}
a.headerlink:hover {
color: #444;
}
div.body p,
div.body dd,
div.body li {
line-height: 1.4;
}
img.screenshot {
box-shadow: 2px 2px 4px #eee;
}
hr {
border: 1px solid #999;
}
blockquote {
margin: 0 0 0 30px;
padding: 0;
}
ul, ol {
margin: 10px 0 10px 30px;
padding: 0;
}
a.footnote-reference {
font-size: 0.7em;
vertical-align: top;
}
/* -- admonitions --------------------------------------------------- */
div.admonition,
div.topic {
background-color: #fafafa;
margin: 10px -10px;
padding: 10px;
border-top: 1px solid #ccc;
border-right: none;
border-bottom: 1px solid #ccc;
border-left: none;
}
div.admonition p.admonition-title,
div.topic p.topic-title {
font-weight: normal;
font-size: 24px;
margin: 0 0 10px 0;
padding: 0;
line-height: 1;
display: inline;
}
p.admonition-title::after {
content: ":";
}
div.admonition p.last,
div.topic p:last-child {
margin-bottom: 0;
}
div.danger, div.error {
background-color: #fff0f0;
border-color: #ffb0b0;
}
div.seealso {
background-color: #fffff0;
border-color: #f0f0a8;
}
/* -- changelog ----------------------------------------------------- */
details.changelog summary {
cursor: pointer;
font-style: italic;
margin-bottom: 10px;
}
/* -- search highlight ---------------------------------------------- */
dt:target,
.footnote:target,
span.highlighted {
background-color: #ffdf80;
}
rect.highlighted {
fill: #ffdf80;
}
/* -- code displays ------------------------------------------------- */
pre, code {
font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
font-size: 0.9em;
}
pre {
margin: 0;
padding: 0;
line-height: 1.3;
}
div.literal-block-wrapper {
padding: 10px 0 0;
}
div.code-block-caption {
padding: 0;
}
div.highlight, div.literal-block-wrapper div.highlight {
margin: 10px -10px;
padding: 10px;
}
code {
color: #222;
background: #e8eff0;
}
/* -- tables -------------------------------------------------------- */
table.docutils {
border: 1px solid #888;
box-shadow: 2px 2px 4px #eee;
}
table.docutils td,
table.docutils th {
border: 1px solid #888;
padding: 0.25em 0.7em;
}
table.field-list,
table.footnote {
border: none;
box-shadow: none;
}
table.footnote {
margin: 15px 0;
width: 100%;
border: 1px solid #eee;
background-color: #fafafa;
font-size: 0.9em;
}
table.footnote + table.footnote {
margin-top: -15px;
border-top: none;
}
table.field-list th {
padding: 0 0.8em 0 0;
}
table.field-list td {
padding: 0;
}
table.footnote td.label {
width: 0;
padding: 0.3em 0 0.3em 0.5em;
}
table.footnote td {
padding: 0.3em 0.5em;
}
/* -- responsive screen --------------------------------------------- */
@media screen and (max-width: 1139px) {
p.version-warning {
margin: 10px;
}
div.footer {
margin: 20px 10px;
}
}
/* -- small screen -------------------------------------------------- */
@media screen and (max-width: 767px) {
body {
padding: 0 20px;
}
div.related {
display: block;
}
p.version-warning {
margin: 10px 0;
}
div.documentwrapper {
float: none;
}
div.bodywrapper {
margin: 0;
}
div.body {
min-height: 0;
padding: 0;
}
div.sphinxsidebar {
float: none;
width: 100%;
margin: 0 -20px -10px;
padding: 0 20px;
background-color: #333;
color: #ccc;
}
div.sphinxsidebar a,
div.sphinxsidebar a code,
div.sphinxsidebar h3,
div.sphinxsidebar h4,
div.footer a {
color: #ccc;
border-color: #ccc;
}
div.sphinxsidebar p.logo {
display: none;
}
div.sphinxsidebar ul.versions a.current {
border-bottom-color: #fff;
color: #fff;
}
div.footer {
text-align: left;
margin: 0 -20px;
padding: 20px;
background-color: #333;
color: #ccc;
}
}
/* https://github.com/twbs/bootstrap/blob
/0e8831505ac845f3102fa2c5996a7141c9ab01ee
/scss/mixins/_screen-reader.scss */
.hide-header > h1:first-child {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}

View File

@ -1,65 +1,73 @@
.highlight .hll { background-color: #ffffcc }
.highlight { background: #eeffcc; }
.highlight .c { color: #408090; font-style: italic } /* Comment */
.highlight .err { border: 1px solid #FF0000 } /* Error */
.highlight .k { color: #007020; font-weight: bold } /* Keyword */
.highlight .o { color: #666666 } /* Operator */
.highlight .ch { color: #408090; font-style: italic } /* Comment.Hashbang */
.highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #007020 } /* Comment.Preproc */
.highlight .cpf { color: #408090; font-style: italic } /* Comment.PreprocFile */
.highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */
.highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #A00000 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #FF0000 } /* Generic.Error */
.highlight { background: #f8f8f8; }
.highlight .c { color: #8f5902; font-style: italic } /* Comment */
.highlight .err { color: #a40000; border: 1px solid #ef2929 } /* Error */
.highlight .g { color: #000000 } /* Generic */
.highlight .k { color: #004461; font-weight: bold } /* Keyword */
.highlight .l { color: #000000 } /* Literal */
.highlight .n { color: #000000 } /* Name */
.highlight .o { color: #582800 } /* Operator */
.highlight .x { color: #000000 } /* Other */
.highlight .p { color: #000000; font-weight: bold } /* Punctuation */
.highlight .ch { color: #8f5902; font-style: italic } /* Comment.Hashbang */
.highlight .cm { color: #8f5902; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #8f5902 } /* Comment.Preproc */
.highlight .cpf { color: #8f5902; font-style: italic } /* Comment.PreprocFile */
.highlight .c1 { color: #8f5902; font-style: italic } /* Comment.Single */
.highlight .cs { color: #8f5902; font-style: italic } /* Comment.Special */
.highlight .gd { color: #a40000 } /* Generic.Deleted */
.highlight .ge { color: #000000; font-style: italic } /* Generic.Emph */
.highlight .gr { color: #ef2929 } /* Generic.Error */
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.highlight .gi { color: #00A000 } /* Generic.Inserted */
.highlight .go { color: #333333 } /* Generic.Output */
.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #745334 } /* Generic.Prompt */
.highlight .gs { color: #000000; font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
.highlight .gt { color: #0044DD } /* Generic.Traceback */
.highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #007020 } /* Keyword.Pseudo */
.highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #902000 } /* Keyword.Type */
.highlight .m { color: #208050 } /* Literal.Number */
.highlight .s { color: #4070a0 } /* Literal.String */
.highlight .na { color: #4070a0 } /* Name.Attribute */
.highlight .nb { color: #007020 } /* Name.Builtin */
.highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */
.highlight .no { color: #60add5 } /* Name.Constant */
.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */
.highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */
.highlight .ne { color: #007020 } /* Name.Exception */
.highlight .nf { color: #06287e } /* Name.Function */
.highlight .nl { color: #002070; font-weight: bold } /* Name.Label */
.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
.highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #bb60d5 } /* Name.Variable */
.highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #208050 } /* Literal.Number.Bin */
.highlight .mf { color: #208050 } /* Literal.Number.Float */
.highlight .mh { color: #208050 } /* Literal.Number.Hex */
.highlight .mi { color: #208050 } /* Literal.Number.Integer */
.highlight .mo { color: #208050 } /* Literal.Number.Oct */
.highlight .sb { color: #4070a0 } /* Literal.String.Backtick */
.highlight .sc { color: #4070a0 } /* Literal.String.Char */
.highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */
.highlight .s2 { color: #4070a0 } /* Literal.String.Double */
.highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */
.highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */
.highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */
.highlight .sx { color: #c65d09 } /* Literal.String.Other */
.highlight .sr { color: #235388 } /* Literal.String.Regex */
.highlight .s1 { color: #4070a0 } /* Literal.String.Single */
.highlight .ss { color: #517918 } /* Literal.String.Symbol */
.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */
.highlight .vc { color: #bb60d5 } /* Name.Variable.Class */
.highlight .vg { color: #bb60d5 } /* Name.Variable.Global */
.highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */
.highlight .il { color: #208050 } /* Literal.Number.Integer.Long */
.highlight .gt { color: #a40000; font-weight: bold } /* Generic.Traceback */
.highlight .kc { color: #004461; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #004461; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #004461; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #004461; font-weight: bold } /* Keyword.Pseudo */
.highlight .kr { color: #004461; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #004461; font-weight: bold } /* Keyword.Type */
.highlight .ld { color: #000000 } /* Literal.Date */
.highlight .m { color: #990000 } /* Literal.Number */
.highlight .s { color: #4e9a06 } /* Literal.String */
.highlight .na { color: #c4a000 } /* Name.Attribute */
.highlight .nb { color: #004461 } /* Name.Builtin */
.highlight .nc { color: #000000 } /* Name.Class */
.highlight .no { color: #000000 } /* Name.Constant */
.highlight .nd { color: #888888 } /* Name.Decorator */
.highlight .ni { color: #ce5c00 } /* Name.Entity */
.highlight .ne { color: #cc0000; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #000000 } /* Name.Function */
.highlight .nl { color: #f57900 } /* Name.Label */
.highlight .nn { color: #000000 } /* Name.Namespace */
.highlight .nx { color: #000000 } /* Name.Other */
.highlight .py { color: #000000 } /* Name.Property */
.highlight .nt { color: #004461; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #000000 } /* Name.Variable */
.highlight .ow { color: #004461; font-weight: bold } /* Operator.Word */
.highlight .w { color: #f8f8f8; text-decoration: underline } /* Text.Whitespace */
.highlight .mb { color: #990000 } /* Literal.Number.Bin */
.highlight .mf { color: #990000 } /* Literal.Number.Float */
.highlight .mh { color: #990000 } /* Literal.Number.Hex */
.highlight .mi { color: #990000 } /* Literal.Number.Integer */
.highlight .mo { color: #990000 } /* Literal.Number.Oct */
.highlight .sb { color: #4e9a06 } /* Literal.String.Backtick */
.highlight .sc { color: #4e9a06 } /* Literal.String.Char */
.highlight .sd { color: #8f5902; font-style: italic } /* Literal.String.Doc */
.highlight .s2 { color: #4e9a06 } /* Literal.String.Double */
.highlight .se { color: #4e9a06 } /* Literal.String.Escape */
.highlight .sh { color: #4e9a06 } /* Literal.String.Heredoc */
.highlight .si { color: #4e9a06 } /* Literal.String.Interpol */
.highlight .sx { color: #4e9a06 } /* Literal.String.Other */
.highlight .sr { color: #4e9a06 } /* Literal.String.Regex */
.highlight .s1 { color: #4e9a06 } /* Literal.String.Single */
.highlight .ss { color: #4e9a06 } /* Literal.String.Symbol */
.highlight .bp { color: #3465a4 } /* Name.Builtin.Pseudo */
.highlight .vc { color: #000000 } /* Name.Variable.Class */
.highlight .vg { color: #000000 } /* Name.Variable.Global */
.highlight .vi { color: #000000 } /* Name.Variable.Instance */
.highlight .il { color: #990000 } /* Literal.Number.Integer.Long */

View File

@ -1,331 +1,54 @@
/*
* searchtools.js_t
* searchtools.js
* ~~~~~~~~~~~~~~~~
*
* Sphinx JavaScript utilities for the full-text search.
*
* :copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
if (!Scorer) {
/**
* Simple result scoring code.
*/
var Scorer = {
// Implement the following function to further tweak the score for each result
// The function takes a result array [filename, title, anchor, descr, score]
// and returns the new score.
/*
score: function(result) {
return result[4];
},
*/
/* Non-minified version JS is _stemmer.js if file is provided */
/**
* Porter Stemmer
*/
var Stemmer = function() {
// query matches the full name of an object
objNameMatch: 11,
// or matches in the last dotted part of the object name
objPartialMatch: 6,
// Additive scores depending on the priority of the object
objPrio: {0: 15, // used to be importantResults
1: 5, // used to be objectResults
2: -5}, // used to be unimportantResults
// Used when the priority is not in the mapping.
objPrioDefault: 0,
var step2list = {
ational: 'ate',
tional: 'tion',
enci: 'ence',
anci: 'ance',
izer: 'ize',
bli: 'ble',
alli: 'al',
entli: 'ent',
eli: 'e',
ousli: 'ous',
ization: 'ize',
ation: 'ate',
ator: 'ate',
alism: 'al',
iveness: 'ive',
fulness: 'ful',
ousness: 'ous',
aliti: 'al',
iviti: 'ive',
biliti: 'ble',
logi: 'log'
// query found in title
title: 15,
partialTitle: 7,
// query found in terms
term: 5,
partialTerm: 2
};
}
var step3list = {
icate: 'ic',
ative: '',
alize: 'al',
iciti: 'ic',
ical: 'ic',
ful: '',
ness: ''
};
var c = "[^aeiou]"; // consonant
var v = "[aeiouy]"; // vowel
var C = c + "[^aeiouy]*"; // consonant sequence
var V = v + "[aeiou]*"; // vowel sequence
var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0
var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1
var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1
var s_v = "^(" + C + ")?" + v; // vowel in stem
this.stemWord = function (w) {
var stem;
var suffix;
var firstch;
var origword = w;
if (w.length < 3)
return w;
var re;
var re2;
var re3;
var re4;
firstch = w.substr(0,1);
if (firstch == "y")
w = firstch.toUpperCase() + w.substr(1);
// Step 1a
re = /^(.+?)(ss|i)es$/;
re2 = /^(.+?)([^s])s$/;
if (re.test(w))
w = w.replace(re,"$1$2");
else if (re2.test(w))
w = w.replace(re2,"$1$2");
// Step 1b
re = /^(.+?)eed$/;
re2 = /^(.+?)(ed|ing)$/;
if (re.test(w)) {
var fp = re.exec(w);
re = new RegExp(mgr0);
if (re.test(fp[1])) {
re = /.$/;
w = w.replace(re,"");
}
}
else if (re2.test(w)) {
var fp = re2.exec(w);
stem = fp[1];
re2 = new RegExp(s_v);
if (re2.test(stem)) {
w = stem;
re2 = /(at|bl|iz)$/;
re3 = new RegExp("([^aeiouylsz])\\1$");
re4 = new RegExp("^" + C + v + "[^aeiouwxy]$");
if (re2.test(w))
w = w + "e";
else if (re3.test(w)) {
re = /.$/;
w = w.replace(re,"");
}
else if (re4.test(w))
w = w + "e";
}
}
// Step 1c
re = /^(.+?)y$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
re = new RegExp(s_v);
if (re.test(stem))
w = stem + "i";
}
// Step 2
re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
suffix = fp[2];
re = new RegExp(mgr0);
if (re.test(stem))
w = stem + step2list[suffix];
}
// Step 3
re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
suffix = fp[2];
re = new RegExp(mgr0);
if (re.test(stem))
w = stem + step3list[suffix];
}
// Step 4
re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
re2 = /^(.+?)(s|t)(ion)$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
re = new RegExp(mgr1);
if (re.test(stem))
w = stem;
}
else if (re2.test(w)) {
var fp = re2.exec(w);
stem = fp[1] + fp[2];
re2 = new RegExp(mgr1);
if (re2.test(stem))
w = stem;
}
// Step 5
re = /^(.+?)e$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
re = new RegExp(mgr1);
re2 = new RegExp(meq1);
re3 = new RegExp("^" + C + v + "[^aeiouwxy]$");
if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))
w = stem;
}
re = /ll$/;
re2 = new RegExp(mgr1);
if (re.test(w) && re2.test(w)) {
re = /.$/;
w = w.replace(re,"");
}
// and turn initial Y back to y
if (firstch == "y")
w = firstch.toLowerCase() + w.substr(1);
return w;
if (!splitQuery) {
function splitQuery(query) {
return query.split(/\s+/);
}
}
/**
* Simple result scoring code.
*/
var Scorer = {
// Implement the following function to further tweak the score for each result
// The function takes a result array [filename, title, anchor, descr, score]
// and returns the new score.
/*
score: function(result) {
return result[4];
},
*/
// query matches the full name of an object
objNameMatch: 11,
// or matches in the last dotted part of the object name
objPartialMatch: 6,
// Additive scores depending on the priority of the object
objPrio: {0: 15, // used to be importantResults
1: 5, // used to be objectResults
2: -5}, // used to be unimportantResults
// Used when the priority is not in the mapping.
objPrioDefault: 0,
// query found in title
title: 15,
// query found in terms
term: 5
};
var splitChars = (function() {
var result = {};
var singles = [96, 180, 187, 191, 215, 247, 749, 885, 903, 907, 909, 930, 1014, 1648,
1748, 1809, 2416, 2473, 2481, 2526, 2601, 2609, 2612, 2615, 2653, 2702,
2706, 2729, 2737, 2740, 2857, 2865, 2868, 2910, 2928, 2948, 2961, 2971,
2973, 3085, 3089, 3113, 3124, 3213, 3217, 3241, 3252, 3295, 3341, 3345,
3369, 3506, 3516, 3633, 3715, 3721, 3736, 3744, 3748, 3750, 3756, 3761,
3781, 3912, 4239, 4347, 4681, 4695, 4697, 4745, 4785, 4799, 4801, 4823,
4881, 5760, 5901, 5997, 6313, 7405, 8024, 8026, 8028, 8030, 8117, 8125,
8133, 8181, 8468, 8485, 8487, 8489, 8494, 8527, 11311, 11359, 11687, 11695,
11703, 11711, 11719, 11727, 11735, 12448, 12539, 43010, 43014, 43019, 43587,
43696, 43713, 64286, 64297, 64311, 64317, 64319, 64322, 64325, 65141];
var i, j, start, end;
for (i = 0; i < singles.length; i++) {
result[singles[i]] = true;
}
var ranges = [[0, 47], [58, 64], [91, 94], [123, 169], [171, 177], [182, 184], [706, 709],
[722, 735], [741, 747], [751, 879], [888, 889], [894, 901], [1154, 1161],
[1318, 1328], [1367, 1368], [1370, 1376], [1416, 1487], [1515, 1519], [1523, 1568],
[1611, 1631], [1642, 1645], [1750, 1764], [1767, 1773], [1789, 1790], [1792, 1807],
[1840, 1868], [1958, 1968], [1970, 1983], [2027, 2035], [2038, 2041], [2043, 2047],
[2070, 2073], [2075, 2083], [2085, 2087], [2089, 2307], [2362, 2364], [2366, 2383],
[2385, 2391], [2402, 2405], [2419, 2424], [2432, 2436], [2445, 2446], [2449, 2450],
[2483, 2485], [2490, 2492], [2494, 2509], [2511, 2523], [2530, 2533], [2546, 2547],
[2554, 2564], [2571, 2574], [2577, 2578], [2618, 2648], [2655, 2661], [2672, 2673],
[2677, 2692], [2746, 2748], [2750, 2767], [2769, 2783], [2786, 2789], [2800, 2820],
[2829, 2830], [2833, 2834], [2874, 2876], [2878, 2907], [2914, 2917], [2930, 2946],
[2955, 2957], [2966, 2968], [2976, 2978], [2981, 2983], [2987, 2989], [3002, 3023],
[3025, 3045], [3059, 3076], [3130, 3132], [3134, 3159], [3162, 3167], [3170, 3173],
[3184, 3191], [3199, 3204], [3258, 3260], [3262, 3293], [3298, 3301], [3312, 3332],
[3386, 3388], [3390, 3423], [3426, 3429], [3446, 3449], [3456, 3460], [3479, 3481],
[3518, 3519], [3527, 3584], [3636, 3647], [3655, 3663], [3674, 3712], [3717, 3718],
[3723, 3724], [3726, 3731], [3752, 3753], [3764, 3772], [3774, 3775], [3783, 3791],
[3802, 3803], [3806, 3839], [3841, 3871], [3892, 3903], [3949, 3975], [3980, 4095],
[4139, 4158], [4170, 4175], [4182, 4185], [4190, 4192], [4194, 4196], [4199, 4205],
[4209, 4212], [4226, 4237], [4250, 4255], [4294, 4303], [4349, 4351], [4686, 4687],
[4702, 4703], [4750, 4751], [4790, 4791], [4806, 4807], [4886, 4887], [4955, 4968],
[4989, 4991], [5008, 5023], [5109, 5120], [5741, 5742], [5787, 5791], [5867, 5869],
[5873, 5887], [5906, 5919], [5938, 5951], [5970, 5983], [6001, 6015], [6068, 6102],
[6104, 6107], [6109, 6111], [6122, 6127], [6138, 6159], [6170, 6175], [6264, 6271],
[6315, 6319], [6390, 6399], [6429, 6469], [6510, 6511], [6517, 6527], [6572, 6592],
[6600, 6607], [6619, 6655], [6679, 6687], [6741, 6783], [6794, 6799], [6810, 6822],
[6824, 6916], [6964, 6980], [6988, 6991], [7002, 7042], [7073, 7085], [7098, 7167],
[7204, 7231], [7242, 7244], [7294, 7400], [7410, 7423], [7616, 7679], [7958, 7959],
[7966, 7967], [8006, 8007], [8014, 8015], [8062, 8063], [8127, 8129], [8141, 8143],
[8148, 8149], [8156, 8159], [8173, 8177], [8189, 8303], [8306, 8307], [8314, 8318],
[8330, 8335], [8341, 8449], [8451, 8454], [8456, 8457], [8470, 8472], [8478, 8483],
[8506, 8507], [8512, 8516], [8522, 8525], [8586, 9311], [9372, 9449], [9472, 10101],
[10132, 11263], [11493, 11498], [11503, 11516], [11518, 11519], [11558, 11567],
[11622, 11630], [11632, 11647], [11671, 11679], [11743, 11822], [11824, 12292],
[12296, 12320], [12330, 12336], [12342, 12343], [12349, 12352], [12439, 12444],
[12544, 12548], [12590, 12592], [12687, 12689], [12694, 12703], [12728, 12783],
[12800, 12831], [12842, 12880], [12896, 12927], [12938, 12976], [12992, 13311],
[19894, 19967], [40908, 40959], [42125, 42191], [42238, 42239], [42509, 42511],
[42540, 42559], [42592, 42593], [42607, 42622], [42648, 42655], [42736, 42774],
[42784, 42785], [42889, 42890], [42893, 43002], [43043, 43055], [43062, 43071],
[43124, 43137], [43188, 43215], [43226, 43249], [43256, 43258], [43260, 43263],
[43302, 43311], [43335, 43359], [43389, 43395], [43443, 43470], [43482, 43519],
[43561, 43583], [43596, 43599], [43610, 43615], [43639, 43641], [43643, 43647],
[43698, 43700], [43703, 43704], [43710, 43711], [43715, 43738], [43742, 43967],
[44003, 44015], [44026, 44031], [55204, 55215], [55239, 55242], [55292, 55295],
[57344, 63743], [64046, 64047], [64110, 64111], [64218, 64255], [64263, 64274],
[64280, 64284], [64434, 64466], [64830, 64847], [64912, 64913], [64968, 65007],
[65020, 65135], [65277, 65295], [65306, 65312], [65339, 65344], [65371, 65381],
[65471, 65473], [65480, 65481], [65488, 65489], [65496, 65497]];
for (i = 0; i < ranges.length; i++) {
start = ranges[i][0];
end = ranges[i][1];
for (j = start; j <= end; j++) {
result[j] = true;
}
}
return result;
})();
function splitQuery(query) {
var result = [];
var start = -1;
for (var i = 0; i < query.length; i++) {
if (splitChars[query.charCodeAt(i)]) {
if (start !== -1) {
result.push(query.slice(start, i));
start = -1;
}
} else if (start === -1) {
start = i;
}
}
if (start !== -1) {
result.push(query.slice(start));
}
return result;
}
/**
* Search Module
*/
@ -335,6 +58,14 @@ var Search = {
_queued_query : null,
_pulse_status : -1,
htmlToText : function(htmlString) {
var htmlElement = document.createElement('span');
htmlElement.innerHTML = htmlString;
$(htmlElement).find('.headerlink').remove();
docContent = $(htmlElement).find('[role=main]')[0];
return docContent.textContent || docContent.innerText;
},
init : function() {
var params = $.getQueryParameters();
if (params.q) {
@ -399,7 +130,7 @@ var Search = {
this.out = $('#search-results');
this.title = $('<h2>' + _('Searching') + '</h2>').appendTo(this.out);
this.dots = $('<span></span>').appendTo(this.title);
this.status = $('<p style="display: none"></p>').appendTo(this.out);
this.status = $('<p class="search-summary">&nbsp;</p>').appendTo(this.out);
this.output = $('<ul class="search"/>').appendTo(this.out);
$('#search-progress').text(_('Preparing search...'));
@ -417,7 +148,6 @@ var Search = {
*/
query : function(query) {
var i;
var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"];
// stem the searchterms and add them to the correct list
var stemmer = new Stemmer();
@ -515,7 +245,7 @@ var Search = {
if (results.length) {
var item = results.pop();
var listItem = $('<li style="display:none"></li>');
if (DOCUMENTATION_OPTIONS.FILE_SUFFIX === '') {
if (DOCUMENTATION_OPTIONS.BUILDER === 'dirhtml') {
// dirhtml builder
var dirname = item[0] + '/';
if (dirname.match(/\/index\/$/)) {
@ -539,8 +269,7 @@ var Search = {
displayNextItem();
});
} else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
var suffix = DOCUMENTATION_OPTIONS.SOURCELINK_SUFFIX;
$.ajax({url: DOCUMENTATION_OPTIONS.URL_ROOT + '_sources/' + item[5] + (item[5].slice(-suffix.length) === suffix ? '' : suffix),
$.ajax({url: DOCUMENTATION_OPTIONS.URL_ROOT + item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX,
dataType: "text",
complete: function(jqxhr, textstatus) {
var data = jqxhr.responseText;
@ -590,12 +319,13 @@ var Search = {
for (var prefix in objects) {
for (var name in objects[prefix]) {
var fullname = (prefix ? prefix + '.' : '') + name;
if (fullname.toLowerCase().indexOf(object) > -1) {
var fullnameLower = fullname.toLowerCase()
if (fullnameLower.indexOf(object) > -1) {
var score = 0;
var parts = fullname.split('.');
var parts = fullnameLower.split('.');
// check for different match types: exact matches of full name or
// "last name" (i.e. last dotted part)
if (fullname == object || parts[parts.length - 1] == object) {
if (fullnameLower == object || parts[parts.length - 1] == object) {
score += Scorer.objNameMatch;
// matches in last name
} else if (parts[parts.length - 1].indexOf(object) > -1) {
@ -662,6 +392,19 @@ var Search = {
{files: terms[word], score: Scorer.term},
{files: titleterms[word], score: Scorer.title}
];
// add support for partial matches
if (word.length > 2) {
for (var w in terms) {
if (w.match(word) && !terms[word]) {
_o.push({files: terms[w], score: Scorer.partialTerm})
}
}
for (var w in titleterms) {
if (w.match(word) && !titleterms[word]) {
_o.push({files: titleterms[w], score: Scorer.partialTitle})
}
}
}
// no match but word was a required one
if ($u.every(_o, function(o){return o.files === undefined;})) {
@ -681,7 +424,7 @@ var Search = {
for (j = 0; j < _files.length; j++) {
file = _files[j];
if (!(file in scoreMap))
scoreMap[file] = {}
scoreMap[file] = {};
scoreMap[file][word] = o.score;
}
});
@ -689,7 +432,7 @@ var Search = {
// create the mapping
for (j = 0; j < files.length; j++) {
file = files[j];
if (file in fileMap)
if (file in fileMap && fileMap[file].indexOf(word) === -1)
fileMap[file].push(word);
else
fileMap[file] = [word];
@ -701,8 +444,12 @@ var Search = {
var valid = true;
// check if all requirements are matched
if (fileMap[file].length != searchterms.length)
continue;
var filteredTermCount = // as search terms with length < 3 are discarded: ignore
searchterms.filter(function(term){return term.length > 2}).length
if (
fileMap[file].length != searchterms.length &&
fileMap[file].length != filteredTermCount
) continue;
// ensure that none of the excluded terms is in the search result
for (i = 0; i < excluded.length; i++) {
@ -733,7 +480,8 @@ var Search = {
* words. the first one is used to find the occurrence, the
* latter for highlighting it.
*/
makeSearchSummary : function(text, keywords, hlwords) {
makeSearchSummary : function(htmlText, keywords, hlwords) {
var text = Search.htmlToText(htmlText);
var textLower = text.toLowerCase();
var start = 0;
$.each(keywords, function() {
@ -755,4 +503,4 @@ var Search = {
$(document).ready(function() {
Search.init();
});
});

130
_static/searx.css Normal file
View File

@ -0,0 +1,130 @@
@import url("pocoo.css");
a, a.reference, a.footnote-reference {
color: #004b6b;
border-color: #004b6b;
}
a:hover {
color: #6d4100;
border-color: #6d4100;
}
p.version-warning {
background-color: #004b6b;
}
div.sidebar {
background-color: whitesmoke;
border-color: lightsteelblue;
border-radius: 3pt;
}
p.sidebar-title, .sidebar p {
margin: 6pt;
}
.sidebar li,
.hlist li {
list-style-type: disclosure-closed;
}
/* admonitions
*/
div.admonition, div.topic {
background-color: #fafafa;
margin: 8px 0px;
padding: 1em;
border-radius: 3pt 0 0 3pt;
border-top: none;
border-right: none;
border-bottom: none;
border-left: 5pt solid #ccc;
}
p.admonition-title:after {
content: none;
}
.admonition.hint { border-color: #416dc0b0; }
.admonition.note { border-color: #6c856cb0; }
.admonition.tip { border-color: #85c5c2b0; }
.admonition.attention { border-color: #ecec97b0; }
.admonition.caution { border-color: #a6c677b0; }
.admonition.danger { border-color: #d46262b0; }
.admonition.important { border-color: #dfa3a3b0; }
.admonition.error { border-color: red; }
.admonition.warning { border-color: darkred; }
.admonition.admonition-generic-admonition-title {
border-color: #416dc0b0;
}
/* admonitions with (rendered) reST markup examples (:class: rst-example)
*
* .. admonition:: title of the example
* :class: rst-example
* ....
*/
div.rst-example {
background-color: inherit;
margin: 0;
border-top: none;
border-right: 1px solid #ccc;
border-bottom: none;
border-left: none;
border-radius: none;
padding: 0;
}
div.rst-example > p.admonition-title {
font-family: Sans Serif;
font-style: italic;
font-size: 0.8em;
display: block;
border-bottom: 1px solid #ccc;
padding: 0.5em 1em;
text-align: right;
}
/* code block in figures
*/
div.highlight pre {
text-align: left;
}
/* Table theme
*/
thead, tfoot {
background-color: #fff;
}
th:hover, td:hover {
background-color: #ffc;
}
thead th, tfoot th, tfoot td, tbody th {
background-color: #fffaef;
}
tbody tr:nth-child(odd) {
background-color: #fff;
}
tbody tr:nth-child(even) {
background-color: #fafafa;
}
caption {
font-family: Sans Serif;
padding: 0.5em;
margin: 0.5em 0 0.5em 0;
caption-side: top;
text-align: left;
}

View File

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,9 @@
/*!
* # Semantic UI 2.4.0 - Tab
* http://github.com/semantic-org/semantic-ui/
*
*
* Released under the MIT license
* http://opensource.org/licenses/MIT
*
*/.ui.tab{display:none}.ui.tab.active,.ui.tab.open{display:block}.ui.tab.loading{position:relative;overflow:hidden;display:block;min-height:250px}.ui.tab.loading *{position:relative!important;left:-10000px!important}.ui.tab.loading.segment:before,.ui.tab.loading:before{position:absolute;content:'';top:100px;left:50%;margin:-1.25em 0 0 -1.25em;width:2.5em;height:2.5em;border-radius:500rem;border:.2em solid rgba(0,0,0,.1)}.ui.tab.loading.segment:after,.ui.tab.loading:after{position:absolute;content:'';top:100px;left:50%;margin:-1.25em 0 0 -1.25em;width:2.5em;height:2.5em;-webkit-animation:button-spin .6s linear;animation:button-spin .6s linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;border-radius:500rem;border-color:#767676 transparent transparent;border-style:solid;border-width:.2em;-webkit-box-shadow:0 0 0 1px transparent;box-shadow:0 0 0 1px transparent}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,44 @@
.sphinx-tabs {
margin-bottom: 2em;
}
.sphinx-tabs:last-child {
margin-bottom: 1em;
}
.sphinx-tabs .sphinx-menu .item p {
margin: 0;
}
.sphinx-tabs .sphinx-menu a.item {
color: #2980b9 !important;
}
.sphinx-tabs .sphinx-menu {
border-bottom-color: #a0b3bf !important;
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
.sphinx-tabs .sphinx-menu a.active.item {
border-color: #a0b3bf !important;
}
.sphinx-tab {
border-color: #a0b3bf !important;
box-sizing: border-box;
}
.sphinx-tab.tab.active {
margin-bottom: 0;
}
/* Code tabs don't need the code-block border */
.code-tab.tab {
padding: 0.4em !important;
}
.code-tab.tab div[class^='highlight'] {
border: none;
}

View File

@ -0,0 +1,94 @@
if (!String.prototype.startsWith) {
Object.defineProperty(String.prototype, 'startsWith', {
value: function(search, pos) {
pos = !pos || pos < 0 ? 0 : +pos;
return this.substring(pos, pos + search.length) === search;
}
});
}
// From http://stackoverflow.com/questions/123999/how-to-tell-if-a-dom-element-is-visible-in-the-current-viewport
function elementIsInView (el) {
if (typeof jQuery === "function" && el instanceof jQuery) {
el = el[0];
}
const rect = el.getBoundingClientRect();
return (
rect.top >= 0 &&
rect.left >= 0 &&
rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&
rect.right <= (window.innerWidth || document.documentElement.clientWidth)
);
}
$(function() {
// Change container tags <div> -> <a>
$('.sphinx-menu.menu .item').each(function() {
var this_ = $(this);
var a_this = $('<a>');
a_this.html(this_.html());
$.each(this_.prop('attributes'), function() {
a_this.attr(this.name, this.value);
});
this_.replaceWith(a_this);
});
// We store the data-tab values as sphinx-data-<data-tab value>
// Add data-tab attribute with the extracted value
$('.sphinx-menu.menu .item, .sphinx-tab.tab').each(function() {
var this_ = $(this);
const prefix = 'sphinx-data-';
const classes = this_.attr('class').split(/\s+/);
$.each(classes, function(idx, clazz) {
if (clazz.startsWith(prefix)) {
this_.attr('data-tab',
clazz.substring(prefix.length));
}
});
});
// Mimic the Semantic UI behaviour
$('.sphinx-menu.menu .item').each(function() {
var this1 = $(this);
var data_tab = this1.attr('data-tab');
this1.on('click', function() {
// Find offset in view
const offset = (this1.offset().top - $(window).scrollTop());
// Enable all tabs with this id
// For each tab group
$('.sphinx-tabs').each(function() {
var this2 = $(this);
// Check if tab group has a tab matching the clicked tab
var has_tab = false;
this2.children().eq(0).children().each(function() {
has_tab |= $(this).attr('data-tab') === data_tab;
});
if (has_tab) {
// Enable just the matching tab
var toggle = function() {
var this3 = $(this);
if (this3.attr('data-tab') === data_tab) {
this3.addClass('active');
} else {
this3.removeClass('active');
}
};
this2.children().eq(0).children('[data-tab]').each(toggle);
this2.children('[data-tab]').each(toggle);
}
});
// Keep tab with the original view offset
$(window).scrollTop(this1.offset().top - offset);
});
});
});

View File

@ -1,443 +0,0 @@
/*
* flasky.css_t
* ~~~~~~~~~~~~
*
* :copyright: Copyright 2010 by Armin Ronacher. Modifications by Kenneth Reitz.
* :license: Flask Design License, see LICENSE for details.
*/
@import url("basic.css");
/* -- page layout ----------------------------------------------------------- */
body {
font-family: 'goudy old style', 'minion pro', 'bell mt', Georgia, 'Hiragino Mincho Pro';
font-size: 17px;
background-color: white;
color: #000;
margin: 0;
padding: 0;
}
div.document {
width: 940px;
margin: 30px auto 0 auto;
}
div.documentwrapper {
float: left;
width: 100%;
}
div.bodywrapper {
margin: 0 0 0 220px;
}
div.sphinxsidebar {
width: 220px;
word-wrap: normal !important;
overflow-wrap: normal !important;
}
hr {
border: 1px solid #B1B4B6;
}
div.body {
background-color: #ffffff;
color: #3E4349;
padding: 0 30px 0 30px;
}
img.floatingflask {
padding: 0 0 10px 10px;
float: right;
}
div.footer {
width: 940px;
margin: 20px auto 30px auto;
font-size: 14px;
color: #888;
text-align: right;
}
div.footer a {
color: #888;
}
div.sphinxsidebar a {
color: #444;
text-decoration: none;
border-bottom: 1px dotted #999;
}
div.sphinxsidebar a:hover {
border-bottom: 1px solid #999;
}
div.sphinxsidebarwrapper {
padding: 0 10px;
}
div.sphinxsidebarwrapper p.logo {
padding: 0;
margin: -10px 0 0 -20px;
text-align: center;
}
div.sphinxsidebar h3,
div.sphinxsidebar h4 {
font-family: 'Garamond', 'Georgia', serif;
color: #444;
font-size: 24px;
font-weight: normal;
margin: 0 0 5px 0;
padding: 0;
}
div.sphinxsidebar h4 {
font-size: 20px;
}
div.sphinxsidebar h3 a {
color: #444;
}
div.sphinxsidebar p.logo a,
div.sphinxsidebar h3 a,
div.sphinxsidebar p.logo a:hover,
div.sphinxsidebar h3 a:hover {
border: none;
}
div.sphinxsidebar p {
color: #555;
margin: 10px 0;
}
div.sphinxsidebar ul {
margin: 10px 0;
padding: 0;
color: #000;
}
div.sphinxsidebar input {
border: 1px solid #ccc;
font-family: 'Georgia', serif;
font-size: 1em;
}
/* -- body styles ----------------------------------------------------------- */
a {
color: #004B6B;
text-decoration: underline;
}
a:hover {
color: #6D4100;
text-decoration: underline;
}
div.body h1,
div.body h2,
div.body h3,
div.body h4,
div.body h5,
div.body h6 {
font-family: 'Garamond', 'Georgia', serif;
font-weight: normal;
margin: 30px 0px 10px 0px;
padding: 0;
}
div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; }
div.body h2 { font-size: 180%; }
div.body h3 { font-size: 150%; }
div.body h4 { font-size: 130%; }
div.body h5 { font-size: 100%; }
div.body h6 { font-size: 100%; }
a.headerlink {
color: #ddd;
padding: 0 4px;
text-decoration: none;
}
a.headerlink:hover {
color: #444;
background: #eaeaea;
}
div.body p, div.body dd, div.body li {
line-height: 1.4em;
}
div.admonition {
background: #fafafa;
margin: 20px -30px;
padding: 10px 30px;
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
}
div.admonition tt.xref, div.admonition a tt {
border-bottom: 1px solid #fafafa;
}
dd div.admonition {
margin-left: -60px;
padding-left: 60px;
}
div.admonition p.admonition-title {
font-family: 'Garamond', 'Georgia', serif;
font-weight: normal;
font-size: 24px;
margin: 0 0 10px 0;
padding: 0;
line-height: 1;
}
div.admonition p.last {
margin-bottom: 0;
}
div.highlight {
background-color: white;
}
dt:target, .highlight {
background: #FAF3E8;
}
div.note {
background-color: #eee;
border: 1px solid #ccc;
}
div.seealso {
background-color: #ffc;
border: 1px solid #ff6;
}
div.topic {
background-color: #eee;
}
p.admonition-title {
display: inline;
}
p.admonition-title:after {
content: ":";
}
pre, tt {
font-family: 'Consolas', 'Menlo', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
font-size: 0.9em;
}
img.screenshot {
}
tt.descname, tt.descclassname {
font-size: 0.95em;
}
tt.descname {
padding-right: 0.08em;
}
img.screenshot {
-moz-box-shadow: 2px 2px 4px #eee;
-webkit-box-shadow: 2px 2px 4px #eee;
box-shadow: 2px 2px 4px #eee;
}
table.docutils {
border: 1px solid #888;
-moz-box-shadow: 2px 2px 4px #eee;
-webkit-box-shadow: 2px 2px 4px #eee;
box-shadow: 2px 2px 4px #eee;
}
table.docutils td, table.docutils th {
border: 1px solid #888;
padding: 0.25em 0.7em;
}
table.field-list, table.footnote {
border: none;
-moz-box-shadow: none;
-webkit-box-shadow: none;
box-shadow: none;
}
table.footnote {
margin: 15px 0;
width: 100%;
border: 1px solid #eee;
background: #fdfdfd;
font-size: 0.9em;
}
table.footnote + table.footnote {
margin-top: -15px;
border-top: none;
}
table.field-list th {
padding: 0 0.8em 0 0;
}
table.field-list td {
padding: 0;
}
table.footnote td.label {
width: 0px;
padding: 0.3em 0 0.3em 0.5em;
}
table.footnote td {
padding: 0.3em 0.5em;
}
dl {
margin: 0;
padding: 0;
}
dl dd {
margin-left: 30px;
}
blockquote {
margin: 0 0 0 30px;
padding: 0;
}
ul, ol {
margin: 10px 0 10px 30px;
padding: 0;
}
pre {
background: #eee;
padding: 7px 30px;
margin: 15px -30px;
line-height: 1.3em;
}
dl pre, blockquote pre, li pre {
margin-left: -60px;
padding-left: 60px;
}
dl dl pre {
margin-left: -90px;
padding-left: 90px;
}
tt {
background-color: #ecf0f3;
color: #222;
/* padding: 1px 2px; */
}
tt.xref, a tt {
background-color: #FBFBFB;
border-bottom: 1px solid white;
}
a.reference {
text-decoration: none;
border-bottom: 1px dotted #004B6B;
}
a.reference:hover {
border-bottom: 1px solid #6D4100;
}
a.footnote-reference {
text-decoration: none;
font-size: 0.7em;
vertical-align: top;
border-bottom: 1px dotted #004B6B;
}
a.footnote-reference:hover {
border-bottom: 1px solid #6D4100;
}
a:hover tt {
background: #EEE;
}
@media screen and (max-width: 600px) {
div.document {
width: 100%;
}
div.documentwrapper {
margin-left: 0;
margin-top: 0;
margin-right: 0;
margin-bottom: 0;
}
div.bodywrapper {
margin-top: 0;
margin-right: 0;
margin-bottom: 0;
margin-left: 0;
}
ul {
margin-left: 0;
}
.document {
width: auto;
}
.footer {
width: auto;
}
.bodywrapper {
margin: 0;
}
.footer {
width: auto;
}
div.sphinxsidebar {
display: none;
}
}
div.sidebar_container, div.sidebar_container h1 {
}
div.sidebar_container h1 {
padding: 0;
margin: 0;
font-size: 350%;
line-height: 100%;
}
div.sidebar_container ul li {
padding: 2px 8px;
font-size: 0.9em;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 214 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 203 B

View File

@ -0,0 +1,40 @@
/*
When showing the sticky version warning, the warning will cover the
scroll target when navigating to #id hash locations. Take over scrolling
to adjust the position to account for the height of the warning.
*/
$(() => {
const versionWarning = $('.version-warning')
// Skip if there is no version warning, regular browser behavior is
// fine in that case.
if (versionWarning.length) {
const height = versionWarning.outerHeight(true)
const target = $(':target')
// Adjust position when the initial link has a hash.
if (target.length) {
// Use absolute scrollTo instead of relative scrollBy to avoid
// scrolling when the viewport is already at the bottom of the
// document and has space.
const y = target.offset().top - height
// Delayed because the initial browser scroll doesn't seem to
// happen until after the document ready event, so scrolling
// immediately will be overridden.
setTimeout(() => scrollTo(0, y), 100)
}
// Listen to clicks on hash anchors.
$('a[href^="#"]').on('click', e => {
// Stop default scroll. Also stops the automatic URL hash update.
e.preventDefault()
// Get the id to scroll to and set the URL hash manually.
const id = $(e.currentTarget).attr('href').substring(1)
location.hash = id
// Use getElementById since the hash may have dots in it.
const target = $(document.getElementById(id))
// Scroll to top of target with space for the version warning.
scrollTo(0, target.offset().top - height)
})
}
})

View File

@ -1,808 +0,0 @@
/*
* websupport.js
* ~~~~~~~~~~~~~
*
* sphinx.websupport utilities for all documentation.
*
* :copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
(function($) {
$.fn.autogrow = function() {
return this.each(function() {
var textarea = this;
$.fn.autogrow.resize(textarea);
$(textarea)
.focus(function() {
textarea.interval = setInterval(function() {
$.fn.autogrow.resize(textarea);
}, 500);
})
.blur(function() {
clearInterval(textarea.interval);
});
});
};
$.fn.autogrow.resize = function(textarea) {
var lineHeight = parseInt($(textarea).css('line-height'), 10);
var lines = textarea.value.split('\n');
var columns = textarea.cols;
var lineCount = 0;
$.each(lines, function() {
lineCount += Math.ceil(this.length / columns) || 1;
});
var height = lineHeight * (lineCount + 1);
$(textarea).css('height', height);
};
})(jQuery);
(function($) {
var comp, by;
function init() {
initEvents();
initComparator();
}
function initEvents() {
$(document).on("click", 'a.comment-close', function(event) {
event.preventDefault();
hide($(this).attr('id').substring(2));
});
$(document).on("click", 'a.vote', function(event) {
event.preventDefault();
handleVote($(this));
});
$(document).on("click", 'a.reply', function(event) {
event.preventDefault();
openReply($(this).attr('id').substring(2));
});
$(document).on("click", 'a.close-reply', function(event) {
event.preventDefault();
closeReply($(this).attr('id').substring(2));
});
$(document).on("click", 'a.sort-option', function(event) {
event.preventDefault();
handleReSort($(this));
});
$(document).on("click", 'a.show-proposal', function(event) {
event.preventDefault();
showProposal($(this).attr('id').substring(2));
});
$(document).on("click", 'a.hide-proposal', function(event) {
event.preventDefault();
hideProposal($(this).attr('id').substring(2));
});
$(document).on("click", 'a.show-propose-change', function(event) {
event.preventDefault();
showProposeChange($(this).attr('id').substring(2));
});
$(document).on("click", 'a.hide-propose-change', function(event) {
event.preventDefault();
hideProposeChange($(this).attr('id').substring(2));
});
$(document).on("click", 'a.accept-comment', function(event) {
event.preventDefault();
acceptComment($(this).attr('id').substring(2));
});
$(document).on("click", 'a.delete-comment', function(event) {
event.preventDefault();
deleteComment($(this).attr('id').substring(2));
});
$(document).on("click", 'a.comment-markup', function(event) {
event.preventDefault();
toggleCommentMarkupBox($(this).attr('id').substring(2));
});
}
/**
* Set comp, which is a comparator function used for sorting and
* inserting comments into the list.
*/
function setComparator() {
// If the first three letters are "asc", sort in ascending order
// and remove the prefix.
if (by.substring(0,3) == 'asc') {
var i = by.substring(3);
comp = function(a, b) { return a[i] - b[i]; };
} else {
// Otherwise sort in descending order.
comp = function(a, b) { return b[by] - a[by]; };
}
// Reset link styles and format the selected sort option.
$('a.sel').attr('href', '#').removeClass('sel');
$('a.by' + by).removeAttr('href').addClass('sel');
}
/**
* Create a comp function. If the user has preferences stored in
* the sortBy cookie, use those, otherwise use the default.
*/
function initComparator() {
by = 'rating'; // Default to sort by rating.
// If the sortBy cookie is set, use that instead.
if (document.cookie.length > 0) {
var start = document.cookie.indexOf('sortBy=');
if (start != -1) {
start = start + 7;
var end = document.cookie.indexOf(";", start);
if (end == -1) {
end = document.cookie.length;
by = unescape(document.cookie.substring(start, end));
}
}
}
setComparator();
}
/**
* Show a comment div.
*/
function show(id) {
$('#ao' + id).hide();
$('#ah' + id).show();
var context = $.extend({id: id}, opts);
var popup = $(renderTemplate(popupTemplate, context)).hide();
popup.find('textarea[name="proposal"]').hide();
popup.find('a.by' + by).addClass('sel');
var form = popup.find('#cf' + id);
form.submit(function(event) {
event.preventDefault();
addComment(form);
});
$('#s' + id).after(popup);
popup.slideDown('fast', function() {
getComments(id);
});
}
/**
* Hide a comment div.
*/
function hide(id) {
$('#ah' + id).hide();
$('#ao' + id).show();
var div = $('#sc' + id);
div.slideUp('fast', function() {
div.remove();
});
}
/**
* Perform an ajax request to get comments for a node
* and insert the comments into the comments tree.
*/
function getComments(id) {
$.ajax({
type: 'GET',
url: opts.getCommentsURL,
data: {node: id},
success: function(data, textStatus, request) {
var ul = $('#cl' + id);
var speed = 100;
$('#cf' + id)
.find('textarea[name="proposal"]')
.data('source', data.source);
if (data.comments.length === 0) {
ul.html('<li>No comments yet.</li>');
ul.data('empty', true);
} else {
// If there are comments, sort them and put them in the list.
var comments = sortComments(data.comments);
speed = data.comments.length * 100;
appendComments(comments, ul);
ul.data('empty', false);
}
$('#cn' + id).slideUp(speed + 200);
ul.slideDown(speed);
},
error: function(request, textStatus, error) {
showError('Oops, there was a problem retrieving the comments.');
},
dataType: 'json'
});
}
/**
* Add a comment via ajax and insert the comment into the comment tree.
*/
function addComment(form) {
var node_id = form.find('input[name="node"]').val();
var parent_id = form.find('input[name="parent"]').val();
var text = form.find('textarea[name="comment"]').val();
var proposal = form.find('textarea[name="proposal"]').val();
if (text == '') {
showError('Please enter a comment.');
return;
}
// Disable the form that is being submitted.
form.find('textarea,input').attr('disabled', 'disabled');
// Send the comment to the server.
$.ajax({
type: "POST",
url: opts.addCommentURL,
dataType: 'json',
data: {
node: node_id,
parent: parent_id,
text: text,
proposal: proposal
},
success: function(data, textStatus, error) {
// Reset the form.
if (node_id) {
hideProposeChange(node_id);
}
form.find('textarea')
.val('')
.add(form.find('input'))
.removeAttr('disabled');
var ul = $('#cl' + (node_id || parent_id));
if (ul.data('empty')) {
$(ul).empty();
ul.data('empty', false);
}
insertComment(data.comment);
var ao = $('#ao' + node_id);
ao.find('img').attr({'src': opts.commentBrightImage});
if (node_id) {
// if this was a "root" comment, remove the commenting box
// (the user can get it back by reopening the comment popup)
$('#ca' + node_id).slideUp();
}
},
error: function(request, textStatus, error) {
form.find('textarea,input').removeAttr('disabled');
showError('Oops, there was a problem adding the comment.');
}
});
}
/**
* Recursively append comments to the main comment list and children
* lists, creating the comment tree.
*/
function appendComments(comments, ul) {
$.each(comments, function() {
var div = createCommentDiv(this);
ul.append($(document.createElement('li')).html(div));
appendComments(this.children, div.find('ul.comment-children'));
// To avoid stagnating data, don't store the comments children in data.
this.children = null;
div.data('comment', this);
});
}
/**
* After adding a new comment, it must be inserted in the correct
* location in the comment tree.
*/
function insertComment(comment) {
var div = createCommentDiv(comment);
// To avoid stagnating data, don't store the comments children in data.
comment.children = null;
div.data('comment', comment);
var ul = $('#cl' + (comment.node || comment.parent));
var siblings = getChildren(ul);
var li = $(document.createElement('li'));
li.hide();
// Determine where in the parents children list to insert this comment.
for(i=0; i < siblings.length; i++) {
if (comp(comment, siblings[i]) <= 0) {
$('#cd' + siblings[i].id)
.parent()
.before(li.html(div));
li.slideDown('fast');
return;
}
}
// If we get here, this comment rates lower than all the others,
// or it is the only comment in the list.
ul.append(li.html(div));
li.slideDown('fast');
}
function acceptComment(id) {
$.ajax({
type: 'POST',
url: opts.acceptCommentURL,
data: {id: id},
success: function(data, textStatus, request) {
$('#cm' + id).fadeOut('fast');
$('#cd' + id).removeClass('moderate');
},
error: function(request, textStatus, error) {
showError('Oops, there was a problem accepting the comment.');
}
});
}
function deleteComment(id) {
$.ajax({
type: 'POST',
url: opts.deleteCommentURL,
data: {id: id},
success: function(data, textStatus, request) {
var div = $('#cd' + id);
if (data == 'delete') {
// Moderator mode: remove the comment and all children immediately
div.slideUp('fast', function() {
div.remove();
});
return;
}
// User mode: only mark the comment as deleted
div
.find('span.user-id:first')
.text('[deleted]').end()
.find('div.comment-text:first')
.text('[deleted]').end()
.find('#cm' + id + ', #dc' + id + ', #ac' + id + ', #rc' + id +
', #sp' + id + ', #hp' + id + ', #cr' + id + ', #rl' + id)
.remove();
var comment = div.data('comment');
comment.username = '[deleted]';
comment.text = '[deleted]';
div.data('comment', comment);
},
error: function(request, textStatus, error) {
showError('Oops, there was a problem deleting the comment.');
}
});
}
function showProposal(id) {
$('#sp' + id).hide();
$('#hp' + id).show();
$('#pr' + id).slideDown('fast');
}
function hideProposal(id) {
$('#hp' + id).hide();
$('#sp' + id).show();
$('#pr' + id).slideUp('fast');
}
function showProposeChange(id) {
$('#pc' + id).hide();
$('#hc' + id).show();
var textarea = $('#pt' + id);
textarea.val(textarea.data('source'));
$.fn.autogrow.resize(textarea[0]);
textarea.slideDown('fast');
}
function hideProposeChange(id) {
$('#hc' + id).hide();
$('#pc' + id).show();
var textarea = $('#pt' + id);
textarea.val('').removeAttr('disabled');
textarea.slideUp('fast');
}
function toggleCommentMarkupBox(id) {
$('#mb' + id).toggle();
}
/** Handle when the user clicks on a sort by link. */
function handleReSort(link) {
var classes = link.attr('class').split(/\s+/);
for (var i=0; i<classes.length; i++) {
if (classes[i] != 'sort-option') {
by = classes[i].substring(2);
}
}
setComparator();
// Save/update the sortBy cookie.
var expiration = new Date();
expiration.setDate(expiration.getDate() + 365);
document.cookie= 'sortBy=' + escape(by) +
';expires=' + expiration.toUTCString();
$('ul.comment-ul').each(function(index, ul) {
var comments = getChildren($(ul), true);
comments = sortComments(comments);
appendComments(comments, $(ul).empty());
});
}
/**
* Function to process a vote when a user clicks an arrow.
*/
function handleVote(link) {
if (!opts.voting) {
showError("You'll need to login to vote.");
return;
}
var id = link.attr('id');
if (!id) {
// Didn't click on one of the voting arrows.
return;
}
// If it is an unvote, the new vote value is 0,
// Otherwise it's 1 for an upvote, or -1 for a downvote.
var value = 0;
if (id.charAt(1) != 'u') {
value = id.charAt(0) == 'u' ? 1 : -1;
}
// The data to be sent to the server.
var d = {
comment_id: id.substring(2),
value: value
};
// Swap the vote and unvote links.
link.hide();
$('#' + id.charAt(0) + (id.charAt(1) == 'u' ? 'v' : 'u') + d.comment_id)
.show();
// The div the comment is displayed in.
var div = $('div#cd' + d.comment_id);
var data = div.data('comment');
// If this is not an unvote, and the other vote arrow has
// already been pressed, unpress it.
if ((d.value !== 0) && (data.vote === d.value * -1)) {
$('#' + (d.value == 1 ? 'd' : 'u') + 'u' + d.comment_id).hide();
$('#' + (d.value == 1 ? 'd' : 'u') + 'v' + d.comment_id).show();
}
// Update the comments rating in the local data.
data.rating += (data.vote === 0) ? d.value : (d.value - data.vote);
data.vote = d.value;
div.data('comment', data);
// Change the rating text.
div.find('.rating:first')
.text(data.rating + ' point' + (data.rating == 1 ? '' : 's'));
// Send the vote information to the server.
$.ajax({
type: "POST",
url: opts.processVoteURL,
data: d,
error: function(request, textStatus, error) {
showError('Oops, there was a problem casting that vote.');
}
});
}
/**
* Open a reply form used to reply to an existing comment.
*/
function openReply(id) {
// Swap out the reply link for the hide link
$('#rl' + id).hide();
$('#cr' + id).show();
// Add the reply li to the children ul.
var div = $(renderTemplate(replyTemplate, {id: id})).hide();
$('#cl' + id)
.prepend(div)
// Setup the submit handler for the reply form.
.find('#rf' + id)
.submit(function(event) {
event.preventDefault();
addComment($('#rf' + id));
closeReply(id);
})
.find('input[type=button]')
.click(function() {
closeReply(id);
});
div.slideDown('fast', function() {
$('#rf' + id).find('textarea').focus();
});
}
/**
* Close the reply form opened with openReply.
*/
function closeReply(id) {
// Remove the reply div from the DOM.
$('#rd' + id).slideUp('fast', function() {
$(this).remove();
});
// Swap out the hide link for the reply link
$('#cr' + id).hide();
$('#rl' + id).show();
}
/**
* Recursively sort a tree of comments using the comp comparator.
*/
function sortComments(comments) {
comments.sort(comp);
$.each(comments, function() {
this.children = sortComments(this.children);
});
return comments;
}
/**
* Get the children comments from a ul. If recursive is true,
* recursively include childrens' children.
*/
function getChildren(ul, recursive) {
var children = [];
ul.children().children("[id^='cd']")
.each(function() {
var comment = $(this).data('comment');
if (recursive)
comment.children = getChildren($(this).find('#cl' + comment.id), true);
children.push(comment);
});
return children;
}
/** Create a div to display a comment in. */
function createCommentDiv(comment) {
if (!comment.displayed && !opts.moderator) {
return $('<div class="moderate">Thank you! Your comment will show up '
+ 'once it is has been approved by a moderator.</div>');
}
// Prettify the comment rating.
comment.pretty_rating = comment.rating + ' point' +
(comment.rating == 1 ? '' : 's');
// Make a class (for displaying not yet moderated comments differently)
comment.css_class = comment.displayed ? '' : ' moderate';
// Create a div for this comment.
var context = $.extend({}, opts, comment);
var div = $(renderTemplate(commentTemplate, context));
// If the user has voted on this comment, highlight the correct arrow.
if (comment.vote) {
var direction = (comment.vote == 1) ? 'u' : 'd';
div.find('#' + direction + 'v' + comment.id).hide();
div.find('#' + direction + 'u' + comment.id).show();
}
if (opts.moderator || comment.text != '[deleted]') {
div.find('a.reply').show();
if (comment.proposal_diff)
div.find('#sp' + comment.id).show();
if (opts.moderator && !comment.displayed)
div.find('#cm' + comment.id).show();
if (opts.moderator || (opts.username == comment.username))
div.find('#dc' + comment.id).show();
}
return div;
}
/**
* A simple template renderer. Placeholders such as <%id%> are replaced
* by context['id'] with items being escaped. Placeholders such as <#id#>
* are not escaped.
*/
function renderTemplate(template, context) {
var esc = $(document.createElement('div'));
function handle(ph, escape) {
var cur = context;
$.each(ph.split('.'), function() {
cur = cur[this];
});
return escape ? esc.text(cur || "").html() : cur;
}
return template.replace(/<([%#])([\w\.]*)\1>/g, function() {
return handle(arguments[2], arguments[1] == '%' ? true : false);
});
}
/** Flash an error message briefly. */
function showError(message) {
$(document.createElement('div')).attr({'class': 'popup-error'})
.append($(document.createElement('div'))
.attr({'class': 'error-message'}).text(message))
.appendTo('body')
.fadeIn("slow")
.delay(2000)
.fadeOut("slow");
}
/** Add a link the user uses to open the comments popup. */
$.fn.comment = function() {
return this.each(function() {
var id = $(this).attr('id').substring(1);
var count = COMMENT_METADATA[id];
var title = count + ' comment' + (count == 1 ? '' : 's');
var image = count > 0 ? opts.commentBrightImage : opts.commentImage;
var addcls = count == 0 ? ' nocomment' : '';
$(this)
.append(
$(document.createElement('a')).attr({
href: '#',
'class': 'sphinx-comment-open' + addcls,
id: 'ao' + id
})
.append($(document.createElement('img')).attr({
src: image,
alt: 'comment',
title: title
}))
.click(function(event) {
event.preventDefault();
show($(this).attr('id').substring(2));
})
)
.append(
$(document.createElement('a')).attr({
href: '#',
'class': 'sphinx-comment-close hidden',
id: 'ah' + id
})
.append($(document.createElement('img')).attr({
src: opts.closeCommentImage,
alt: 'close',
title: 'close'
}))
.click(function(event) {
event.preventDefault();
hide($(this).attr('id').substring(2));
})
);
});
};
var opts = {
processVoteURL: '/_process_vote',
addCommentURL: '/_add_comment',
getCommentsURL: '/_get_comments',
acceptCommentURL: '/_accept_comment',
deleteCommentURL: '/_delete_comment',
commentImage: '/static/_static/comment.png',
closeCommentImage: '/static/_static/comment-close.png',
loadingImage: '/static/_static/ajax-loader.gif',
commentBrightImage: '/static/_static/comment-bright.png',
upArrow: '/static/_static/up.png',
downArrow: '/static/_static/down.png',
upArrowPressed: '/static/_static/up-pressed.png',
downArrowPressed: '/static/_static/down-pressed.png',
voting: false,
moderator: false
};
if (typeof COMMENT_OPTIONS != "undefined") {
opts = jQuery.extend(opts, COMMENT_OPTIONS);
}
var popupTemplate = '\
<div class="sphinx-comments" id="sc<%id%>">\
<p class="sort-options">\
Sort by:\
<a href="#" class="sort-option byrating">best rated</a>\
<a href="#" class="sort-option byascage">newest</a>\
<a href="#" class="sort-option byage">oldest</a>\
</p>\
<div class="comment-header">Comments</div>\
<div class="comment-loading" id="cn<%id%>">\
loading comments... <img src="<%loadingImage%>" alt="" /></div>\
<ul id="cl<%id%>" class="comment-ul"></ul>\
<div id="ca<%id%>">\
<p class="add-a-comment">Add a comment\
(<a href="#" class="comment-markup" id="ab<%id%>">markup</a>):</p>\
<div class="comment-markup-box" id="mb<%id%>">\
reStructured text markup: <i>*emph*</i>, <b>**strong**</b>, \
<code>``code``</code>, \
code blocks: <code>::</code> and an indented block after blank line</div>\
<form method="post" id="cf<%id%>" class="comment-form" action="">\
<textarea name="comment" cols="80"></textarea>\
<p class="propose-button">\
<a href="#" id="pc<%id%>" class="show-propose-change">\
Propose a change &#9657;\
</a>\
<a href="#" id="hc<%id%>" class="hide-propose-change">\
Propose a change &#9663;\
</a>\
</p>\
<textarea name="proposal" id="pt<%id%>" cols="80"\
spellcheck="false"></textarea>\
<input type="submit" value="Add comment" />\
<input type="hidden" name="node" value="<%id%>" />\
<input type="hidden" name="parent" value="" />\
</form>\
</div>\
</div>';
var commentTemplate = '\
<div id="cd<%id%>" class="sphinx-comment<%css_class%>">\
<div class="vote">\
<div class="arrow">\
<a href="#" id="uv<%id%>" class="vote" title="vote up">\
<img src="<%upArrow%>" />\
</a>\
<a href="#" id="uu<%id%>" class="un vote" title="vote up">\
<img src="<%upArrowPressed%>" />\
</a>\
</div>\
<div class="arrow">\
<a href="#" id="dv<%id%>" class="vote" title="vote down">\
<img src="<%downArrow%>" id="da<%id%>" />\
</a>\
<a href="#" id="du<%id%>" class="un vote" title="vote down">\
<img src="<%downArrowPressed%>" />\
</a>\
</div>\
</div>\
<div class="comment-content">\
<p class="tagline comment">\
<span class="user-id"><%username%></span>\
<span class="rating"><%pretty_rating%></span>\
<span class="delta"><%time.delta%></span>\
</p>\
<div class="comment-text comment"><#text#></div>\
<p class="comment-opts comment">\
<a href="#" class="reply hidden" id="rl<%id%>">reply &#9657;</a>\
<a href="#" class="close-reply" id="cr<%id%>">reply &#9663;</a>\
<a href="#" id="sp<%id%>" class="show-proposal">proposal &#9657;</a>\
<a href="#" id="hp<%id%>" class="hide-proposal">proposal &#9663;</a>\
<a href="#" id="dc<%id%>" class="delete-comment hidden">delete</a>\
<span id="cm<%id%>" class="moderation hidden">\
<a href="#" id="ac<%id%>" class="accept-comment">accept</a>\
</span>\
</p>\
<pre class="proposal" id="pr<%id%>">\
<#proposal_diff#>\
</pre>\
<ul class="comment-children" id="cl<%id%>"></ul>\
</div>\
<div class="clearleft"></div>\
</div>\
</div>';
var replyTemplate = '\
<li>\
<div class="reply-div" id="rd<%id%>">\
<form id="rf<%id%>">\
<textarea name="comment" cols="80"></textarea>\
<input type="submit" value="Add reply" />\
<input type="button" value="Cancel" />\
<input type="hidden" name="parent" value="<%id%>" />\
<input type="hidden" name="node" value="" />\
</form>\
</div>\
</li>';
$(document).ready(function() {
init();
});
})(jQuery);
$(document).ready(function() {
// add comment anchors for all paragraphs that are commentable
$('.sphinx-has-comment').comment();
// highlight search words in search results
$("div.context").each(function() {
var params = $.getQueryParameters();
var terms = (params.q) ? params.q[0].split(/\s+/) : [];
var result = $(this);
$.each(terms, function() {
result.highlightText(this.toLowerCase(), 'highlighted');
});
});
// directly open comment window if requested
var anchor = document.location.hash;
if (anchor.substring(0, 9) == '#comment-') {
$('#ao' + anchor.substring(9)).click();
document.location.hash = '#s' + anchor.substring(9);
}
});

View File

@ -1,40 +1,41 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Administration API &#8212; searx 0.12.0 documentation</title>
<link rel="stylesheet" href="../_static/style.css" type="text/css" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Administration API &#8212; Searx Documentation (Searx-0.15.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '0.12.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../_static/language_data.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="How to protect an instance" href="filtron.html" />
<link rel="prev" title="Installation" href="../dev/install/installation.html" />
<link rel="next" title="Architecture" href="architecture.html" />
<link rel="prev" title="Installation" href="installation.html" />
<script>DOCUMENTATION_OPTIONS.URL_ROOT = '../';</script>
<link media="only screen and (max-device-width: 480px)" href="../_static/small_flask.css" type= "text/css" rel="stylesheet" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
</head>
<body>
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<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="architecture.html" title="Architecture"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="installation.html" title="Installation"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.15.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> &#187;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
@ -45,117 +46,147 @@
<span id="adminapi"></span><h1>Administration API<a class="headerlink" href="#administration-api" title="Permalink to this headline"></a></h1>
<div class="section" id="get-configuration-data">
<h2>Get configuration data<a class="headerlink" href="#get-configuration-data" title="Permalink to this headline"></a></h2>
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">GET</span> <span class="o">/</span><span class="n">config</span>
<div class="highlight-http notranslate"><div class="highlight"><pre><span></span><span class="nf">GET</span> <span class="nn">/config</span> <span class="kr">HTTP</span><span class="o">/</span><span class="m">1.1</span>
</pre></div>
</div>
<div class="section" id="sample-response">
<h3>Sample response<a class="headerlink" href="#sample-response" title="Permalink to this headline"></a></h3>
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="s2">&quot;autocomplete&quot;</span><span class="p">:</span> <span class="s2">&quot;&quot;</span><span class="p">,</span>
<span class="s2">&quot;categories&quot;</span><span class="p">:</span> <span class="p">[</span>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="nt">&quot;autocomplete&quot;</span><span class="p">:</span> <span class="s2">&quot;&quot;</span><span class="p">,</span>
<span class="nt">&quot;categories&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="s2">&quot;map&quot;</span><span class="p">,</span>
<span class="s2">&quot;it&quot;</span><span class="p">,</span>
<span class="s2">&quot;images&quot;</span><span class="p">,</span>
<span class="p">],</span>
<span class="s2">&quot;default_locale&quot;</span><span class="p">:</span> <span class="s2">&quot;&quot;</span><span class="p">,</span>
<span class="s2">&quot;default_theme&quot;</span><span class="p">:</span> <span class="s2">&quot;oscar&quot;</span><span class="p">,</span>
<span class="s2">&quot;engines&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="nt">&quot;default_locale&quot;</span><span class="p">:</span> <span class="s2">&quot;&quot;</span><span class="p">,</span>
<span class="nt">&quot;default_theme&quot;</span><span class="p">:</span> <span class="s2">&quot;oscar&quot;</span><span class="p">,</span>
<span class="nt">&quot;engines&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="p">{</span>
<span class="s2">&quot;categories&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="nt">&quot;categories&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="s2">&quot;map&quot;</span>
<span class="p">],</span>
<span class="s2">&quot;enabled&quot;</span><span class="p">:</span> <span class="n">true</span><span class="p">,</span>
<span class="s2">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;openstreetmap&quot;</span><span class="p">,</span>
<span class="s2">&quot;shortcut&quot;</span><span class="p">:</span> <span class="s2">&quot;osm&quot;</span>
<span class="nt">&quot;enabled&quot;</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span>
<span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;openstreetmap&quot;</span><span class="p">,</span>
<span class="nt">&quot;shortcut&quot;</span><span class="p">:</span> <span class="s2">&quot;osm&quot;</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="s2">&quot;categories&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="nt">&quot;categories&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="s2">&quot;it&quot;</span>
<span class="p">],</span>
<span class="s2">&quot;enabled&quot;</span><span class="p">:</span> <span class="n">true</span><span class="p">,</span>
<span class="s2">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;arch linux wiki&quot;</span><span class="p">,</span>
<span class="s2">&quot;shortcut&quot;</span><span class="p">:</span> <span class="s2">&quot;al&quot;</span>
<span class="nt">&quot;enabled&quot;</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span>
<span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;arch linux wiki&quot;</span><span class="p">,</span>
<span class="nt">&quot;shortcut&quot;</span><span class="p">:</span> <span class="s2">&quot;al&quot;</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="s2">&quot;categories&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="nt">&quot;categories&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="s2">&quot;images&quot;</span>
<span class="p">],</span>
<span class="s2">&quot;enabled&quot;</span><span class="p">:</span> <span class="n">true</span><span class="p">,</span>
<span class="s2">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;google images&quot;</span><span class="p">,</span>
<span class="s2">&quot;shortcut&quot;</span><span class="p">:</span> <span class="s2">&quot;goi&quot;</span>
<span class="nt">&quot;enabled&quot;</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span>
<span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;google images&quot;</span><span class="p">,</span>
<span class="nt">&quot;shortcut&quot;</span><span class="p">:</span> <span class="s2">&quot;goi&quot;</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="s2">&quot;categories&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="nt">&quot;categories&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="s2">&quot;it&quot;</span>
<span class="p">],</span>
<span class="s2">&quot;enabled&quot;</span><span class="p">:</span> <span class="n">false</span><span class="p">,</span>
<span class="s2">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;bitbucket&quot;</span><span class="p">,</span>
<span class="s2">&quot;shortcut&quot;</span><span class="p">:</span> <span class="s2">&quot;bb&quot;</span>
<span class="nt">&quot;enabled&quot;</span><span class="p">:</span> <span class="kc">false</span><span class="p">,</span>
<span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;bitbucket&quot;</span><span class="p">,</span>
<span class="nt">&quot;shortcut&quot;</span><span class="p">:</span> <span class="s2">&quot;bb&quot;</span>
<span class="p">},</span>
<span class="p">],</span>
<span class="s2">&quot;instance_name&quot;</span><span class="p">:</span> <span class="s2">&quot;searx&quot;</span><span class="p">,</span>
<span class="s2">&quot;locales&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="s2">&quot;de&quot;</span><span class="p">:</span> <span class="s2">&quot;Deutsch (German)&quot;</span><span class="p">,</span>
<span class="s2">&quot;en&quot;</span><span class="p">:</span> <span class="s2">&quot;English&quot;</span><span class="p">,</span>
<span class="s2">&quot;eo&quot;</span><span class="p">:</span> <span class="s2">&quot;Esperanto (Esperanto)&quot;</span><span class="p">,</span>
<span class="nt">&quot;instance_name&quot;</span><span class="p">:</span> <span class="s2">&quot;searx&quot;</span><span class="p">,</span>
<span class="nt">&quot;locales&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="nt">&quot;de&quot;</span><span class="p">:</span> <span class="s2">&quot;Deutsch (German)&quot;</span><span class="p">,</span>
<span class="nt">&quot;en&quot;</span><span class="p">:</span> <span class="s2">&quot;English&quot;</span><span class="p">,</span>
<span class="nt">&quot;eo&quot;</span><span class="p">:</span> <span class="s2">&quot;Esperanto (Esperanto)&quot;</span><span class="p">,</span>
<span class="p">},</span>
<span class="s2">&quot;plugins&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="nt">&quot;plugins&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="p">{</span>
<span class="s2">&quot;enabled&quot;</span><span class="p">:</span> <span class="n">true</span><span class="p">,</span>
<span class="s2">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;HTTPS rewrite&quot;</span>
<span class="nt">&quot;enabled&quot;</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span>
<span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;HTTPS rewrite&quot;</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="s2">&quot;enabled&quot;</span><span class="p">:</span> <span class="n">false</span><span class="p">,</span>
<span class="s2">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;Vim-like hotkeys&quot;</span>
<span class="nt">&quot;enabled&quot;</span><span class="p">:</span> <span class="kc">false</span><span class="p">,</span>
<span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;Vim-like hotkeys&quot;</span>
<span class="p">}</span>
<span class="p">],</span>
<span class="s2">&quot;safe_search&quot;</span><span class="p">:</span> <span class="mi">0</span>
<span class="nt">&quot;safe_search&quot;</span><span class="p">:</span> <span class="mi">0</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="embed-search-bar">
<h1>Embed search bar<a class="headerlink" href="#embed-search-bar" title="Permalink to this headline"></a></h1>
<p>The search bar can be embedded into websites. Just paste the example into the HTML of the site.
URL of the searx instance and values are customizable.</p>
<div class="code html highlight-default"><div class="highlight"><pre><span></span>&lt;form method=&quot;post&quot; action=&quot;https://searx.me/&quot;&gt;
&lt;!-- search query --&gt; &lt;input type=&quot;text&quot; name=&quot;q&quot; /&gt;
&lt;!-- categories --&gt; &lt;input type=&quot;hidden&quot; name=&quot;categories&quot; value=&quot;general,social media&quot; /&gt;
&lt;!-- language --&gt; &lt;input type=&quot;hidden&quot; name=&quot;lang&quot; value=&quot;all&quot; /&gt;
&lt;!-- locale --&gt; &lt;input type=&quot;hidden&quot; name=&quot;locale&quot; value=&quot;en&quot; /&gt;
&lt;!-- date filter --&gt; &lt;input type=&quot;hidden&quot; name=&quot;time_range&quot; value=&quot;month&quot; /&gt;
&lt;/form&gt;
<h2>Embed search bar<a class="headerlink" href="#embed-search-bar" title="Permalink to this headline"></a></h2>
<p>The search bar can be embedded into websites. Just paste the example into the
HTML of the site. URL of the searx instance and values are customizable.</p>
<div class="highlight-html notranslate"><div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">form</span> <span class="na">method</span><span class="o">=</span><span class="s">&quot;post&quot;</span> <span class="na">action</span><span class="o">=</span><span class="s">&quot;https://searx.me/&quot;</span><span class="p">&gt;</span>
<span class="c">&lt;!-- search --&gt;</span> <span class="p">&lt;</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;text&quot;</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;q&quot;</span> <span class="p">/&gt;</span>
<span class="c">&lt;!-- categories --&gt;</span> <span class="p">&lt;</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;hidden&quot;</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;categories&quot;</span> <span class="na">value</span><span class="o">=</span><span class="s">&quot;general,social media&quot;</span> <span class="p">/&gt;</span>
<span class="c">&lt;!-- language --&gt;</span> <span class="p">&lt;</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;hidden&quot;</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;lang&quot;</span> <span class="na">value</span><span class="o">=</span><span class="s">&quot;all&quot;</span> <span class="p">/&gt;</span>
<span class="c">&lt;!-- locale --&gt;</span> <span class="p">&lt;</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;hidden&quot;</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;locale&quot;</span> <span class="na">value</span><span class="o">=</span><span class="s">&quot;en&quot;</span> <span class="p">/&gt;</span>
<span class="c">&lt;!-- date filter --&gt;</span> <span class="p">&lt;</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;hidden&quot;</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;time_range&quot;</span> <span class="na">value</span><span class="o">=</span><span class="s">&quot;month&quot;</span> <span class="p">/&gt;</span>
<span class="p">&lt;/</span><span class="nt">form</span><span class="p">&gt;</span>
</pre></div>
</div>
</div>
</div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper"><div class="sidebar_container body">
<h1>Searx</h1>
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/searx_logo_small.png" alt="Logo"/>
</a></p>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/asciimoo/searx">Source</a>
<li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a>
<li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a>
<li><a href="https://twitter.com/Searx_engine">Twitter</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../index.html">Home</a></li>
<li><a href="https://github.com/asciimoo/searx">Source</a></li>
<li><a href="../blog/blog.html">Blog</a></li>
<li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a></li>
<li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a></li>
</ul>
<hr />
<ul>
<li><a href="https://twitter.com/Searx_engine">Twitter</a></li>
<li><a href="../index.html">Overview</a>
<ul>
<li><a href="index.html">Administrator documentation</a>
<ul>
<li>Previous: <a href="installation.html" title="previous chapter">Installation</a>
<li>Next: <a href="architecture.html" title="next chapter">Architecture</a></ul>
</li>
</ul>
</li>
</ul>
<div 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" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
&copy; Copyright 2015-2019, Adam Tauber, Noémi Ványi.
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2019, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.3.1.
</div>
<script type="text/javascript" src="../_static/version_warning_offset.js"></script>
</body>
</html>

119
admin/architecture.html Normal file
View File

@ -0,0 +1,119 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Architecture &#8212; Searx Documentation (Searx-0.15.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../_static/language_data.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="How to protect an instance" href="filtron.html" />
<link rel="prev" title="Administration API" href="api.html" />
<script>DOCUMENTATION_OPTIONS.URL_ROOT = '../';</script>
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<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="filtron.html" title="How to protect an instance"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="api.html" title="Administration API"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.15.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> &#187;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="architecture">
<span id="id1"></span><h1>Architecture<a class="headerlink" href="#architecture" title="Permalink to this headline"></a></h1>
<div class="sidebar">
<p class="sidebar-title">Needs work!</p>
<p>This article needs some work / Searx is a collaborative effort. If you have
any contribution, feel welcome to send us your <a class="reference external" href="https://github.com/asciimoo/searx/pull/../pulls">PR</a>, see
<a class="reference internal" href="../dev/contribution_guide.html#how-to-contribute"><span class="std std-ref">How to contribute</span></a>.</p>
</div>
<p>Herein you will find some hints and suggestions about typical architectures of
searx infrastructures.</p>
<p>We start with a contribution from <a class="reference external" href="https://github.com/asciimoo/searx/pull/1776#issuecomment-567917320">&#64;dalf</a>.
It shows a <em>reference</em> setup for public searx instances.</p>
<div class="figure align-default" id="id2">
<img alt="arch_public.dot" src="../_images/arch_public.svg" /><p class="caption"><span class="caption-number">Fig. 1 </span><span class="caption-text">Reference architecture of a public searx setup.</span><a class="headerlink" href="#id2" title="Permalink to this image"></a></p>
</div>
</div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/searx_logo_small.png" alt="Logo"/>
</a></p>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/asciimoo/searx">Source</a>
<li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a>
<li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a>
<li><a href="https://twitter.com/Searx_engine">Twitter</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../index.html">Overview</a>
<ul>
<li><a href="index.html">Administrator documentation</a>
<ul>
<li>Previous: <a href="api.html" title="previous chapter">Administration API</a>
<li>Next: <a href="filtron.html" title="next chapter">How to protect an instance</a></ul>
</li>
</ul>
</li>
</ul>
<div 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" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2019, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.3.1.
</div>
<script type="text/javascript" src="../_static/version_warning_offset.js"></script>
</body>
</html>

223
admin/buildhosts.html Normal file
View File

@ -0,0 +1,223 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Buildhosts &#8212; Searx Documentation (Searx-0.15.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/semantic-ui-2.4.1/segment.min.css" />
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/semantic-ui-2.4.1/menu.min.css" />
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/semantic-ui-2.4.1/tab.min.css" />
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/tabs.css" />
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../_static/language_data.js"></script>
<script type="text/javascript" src="../_static/sphinx_tabs/semantic-ui-2.4.1/tab.min.js"></script>
<script type="text/javascript" src="../_static/sphinx_tabs/tabs.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Developer documentation" href="../dev/index.html" />
<link rel="prev" title="Plugins builtin" href="plugins.html" />
<script>DOCUMENTATION_OPTIONS.URL_ROOT = '../';</script>
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<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="../dev/index.html" title="Developer documentation"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="plugins.html" title="Plugins builtin"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.15.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> &#187;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="buildhosts">
<span id="id1"></span><h1>Buildhosts<a class="headerlink" href="#buildhosts" title="Permalink to this headline"></a></h1>
<div class="sidebar">
<p class="sidebar-title">This article needs some work</p>
<p>If you have any contribution send us your <a class="reference external" href="https://github.com/asciimoo/searx/pull/../pulls">PR</a>, see
<a class="reference internal" href="../dev/contribution_guide.html#how-to-contribute"><span class="std std-ref">How to contribute</span></a>.</p>
</div>
<p>To get best results from build, its recommend to install additional packages
on build hosts.</p>
<div class="section" id="build-docs">
<span id="docs-build"></span><h2>Build docs<a class="headerlink" href="#build-docs" title="Permalink to this headline"></a></h2>
<div class="sidebar">
<p class="sidebar-title">Sphinx build needs</p>
<ul class="simple">
<li><p><a class="reference external" href="https://www.imagemagick.org">ImageMagick</a></p></li>
<li><p><a class="reference external" href="https://graphviz.gitlab.io">Graphviz</a></p></li>
<li><p><a class="reference external" href="https://tug.org/xetex/">XeTeX</a></p></li>
<li><p><a class="reference external" href="https://dvisvgm.de/">dvisvgm</a></p></li>
</ul>
</div>
<p>Most of the sphinx requirements are installed from <a class="reference external" href="https://github.com/asciimoo/searx/blob/master/setup.py">git://setup.py</a> and the
docs can be build from scratch with <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs</span></code>. For better math and image
processing additional packages are needed. The <a class="reference external" href="https://tug.org/xetex/">XeTeX</a> needed not only for PDF
creation, its also needed for <a class="reference internal" href="../dev/reST.html#math"><span class="std std-ref">Math equations</span></a> when HTML output is build.</p>
<p>To be able to do <a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/extensions/math.html#math-support" title="(in Sphinx v3.0.0+/9458d631d)"><span>Math support for HTML outputs in Sphinx</span></a> without CDNs, the math are rendered
as images (<code class="docutils literal notranslate"><span class="pre">sphinx.ext.imgmath</span></code> extension). If your docs build (<code class="docutils literal notranslate"><span class="pre">make</span>
<span class="pre">docs</span></code>) shows warnings like this:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>WARNING: dot(1) not found, for better output quality install \
graphviz from http://www.graphviz.org
..
WARNING: LaTeX command &#39;latex&#39; cannot be run (needed for math \
display), check the imgmath_latex setting
</pre></div>
</div>
<p>you need to install additional packages on your build host, to get better HTML
output.</p>
<div class="sphinx-tabs docutils container" id="system-requirements">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu docutils container">
<div class="docutils container">
<p>Ubuntu / debian</p>
</div>
</div>
<div class="item sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
<div class="docutils container">
<p>Arch Linux</p>
</div>
</div>
<div class="item sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
<div class="docutils container">
<p>Fedora / RHEL</p>
</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu active docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo apt install graphviz imagemagick texlive-xetex librsvg2-bin
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo pacman -S graphviz imagemagick texlive-bin extra/librsvg
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo dnf install graphviz graphviz-gd texlive-xetex-bin librsvg2-tools
</pre></div>
</div>
</div>
</div>
<p>For PDF output you also need:</p>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu docutils container">
<div class="docutils container">
<p>Ubuntu / debian</p>
</div>
</div>
<div class="item sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
<div class="docutils container">
<p>Arch Linux</p>
</div>
</div>
<div class="item sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
<div class="docutils container">
<p>Fedora / RHEL</p>
</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu active docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo apt texlive-latex-recommended texlive-extra-utils ttf-dejavu
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo pacman -S texlive-core texlive-latexextra ttf-dejavu
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo dnf install <span class="se">\</span>
texlive-collection-fontsrecommended texlive-collection-latex <span class="se">\</span>
dejavu-sans-fonts dejavu-serif-fonts dejavu-sans-mono-fonts
</pre></div>
</div>
</div>
</div>
<div class="highlight-python notranslate" id="system-requirements-end"><div class="highlight"><pre><span></span><span class="n">html_math_renderer</span> <span class="o">=</span> <span class="s1">&#39;imgmath&#39;</span>
<span class="n">imgmath_image_format</span> <span class="o">=</span> <span class="s1">&#39;svg&#39;</span>
<span class="n">imgmath_font_size</span> <span class="o">=</span> <span class="mi">14</span>
</pre></div>
</div>
</div>
</div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/searx_logo_small.png" alt="Logo"/>
</a></p>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/asciimoo/searx">Source</a>
<li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a>
<li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a>
<li><a href="https://twitter.com/Searx_engine">Twitter</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../index.html">Overview</a>
<ul>
<li><a href="index.html">Administrator documentation</a>
<ul>
<li>Previous: <a href="plugins.html" title="previous chapter">Plugins builtin</a>
<li>Next: <a href="../dev/index.html" title="next chapter">Developer documentation</a></ul>
</li>
</ul>
</li>
</ul>
<div 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" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2019, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.3.1.
</div>
<script type="text/javascript" src="../_static/version_warning_offset.js"></script>
</body>
</html>

1441
admin/engines.html Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,40 +1,41 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>How to protect an instance &#8212; searx 0.12.0 documentation</title>
<link rel="stylesheet" href="../_static/style.css" type="text/css" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>How to protect an instance &#8212; Searx Documentation (Searx-0.15.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '0.12.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../_static/language_data.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="How to setup result proxy" href="morty.html" />
<link rel="prev" title="Administration API" href="api.html" />
<link rel="prev" title="Architecture" href="architecture.html" />
<script>DOCUMENTATION_OPTIONS.URL_ROOT = '../';</script>
<link media="only screen and (max-device-width: 480px)" href="../_static/small_flask.css" type= "text/css" rel="stylesheet" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
</head>
<body>
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<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="morty.html" title="How to setup result proxy"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="architecture.html" title="Architecture"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.15.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> &#187;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
@ -43,103 +44,137 @@
<div class="section" id="how-to-protect-an-instance">
<h1>How to protect an instance<a class="headerlink" href="#how-to-protect-an-instance" title="Permalink to this headline"></a></h1>
<p>Searx depens on external search services. To avoid the abuse of these services it is advised to limit the number of requests processed by searx.</p>
<p>An application firewall, <code class="docutils literal"><span class="pre">filtron</span></code> solves exactly this problem. Information on how to install it can be found at the <a class="reference external" href="https://github.com/asciimoo/filtron">project page of filtron</a>.</p>
<p>Searx depens on external search services. To avoid the abuse of these services
it is advised to limit the number of requests processed by searx.</p>
<p>An application firewall, <code class="docutils literal notranslate"><span class="pre">filtron</span></code> solves exactly this problem. Information
on how to install it can be found at the <a class="reference external" href="https://github.com/asciimoo/filtron">project page of filtron</a>.</p>
<div class="section" id="sample-configuration-of-filtron">
<h2>Sample configuration of filtron<a class="headerlink" href="#sample-configuration-of-filtron" title="Permalink to this headline"></a></h2>
<p>An example configuration can be find below. This configuration limits the access of</p>
<blockquote>
<div><ul class="simple">
<li>scripts or applications (roboagent limit)</li>
<li>webcrawlers (botlimit)</li>
<li>IPs which send too many requests (IP limit)</li>
<li>too many json, csv, etc. requests (rss/json limit)</li>
<li>the same UserAgent of if too many requests (useragent limit)</li>
<p>An example configuration can be find below. This configuration limits the access
of:</p>
<ul class="simple">
<li><p>scripts or applications (roboagent limit)</p></li>
<li><p>webcrawlers (botlimit)</p></li>
<li><p>IPs which send too many requests (IP limit)</p></li>
<li><p>too many json, csv, etc. requests (rss/json limit)</p></li>
<li><p>the same UserAgent of if too many requests (useragent limit)</p></li>
</ul>
</div></blockquote>
<div class="code json highlight-default"><div class="highlight"><pre><span></span><span class="p">[</span>
<span class="p">{</span>
<span class="s2">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;search request&quot;</span><span class="p">,</span>
<span class="s2">&quot;filters&quot;</span><span class="p">:</span> <span class="p">[</span><span class="s2">&quot;Param:q&quot;</span><span class="p">,</span> <span class="s2">&quot;Path=^(/|/search)$&quot;</span><span class="p">],</span>
<span class="s2">&quot;interval&quot;</span><span class="p">:</span> <span class="o">&lt;</span><span class="n">time</span><span class="o">-</span><span class="n">interval</span><span class="o">-</span><span class="ow">in</span><span class="o">-</span><span class="n">sec</span><span class="o">&gt;</span><span class="p">,</span>
<span class="s2">&quot;limit&quot;</span><span class="p">:</span> <span class="o">&lt;</span><span class="nb">max</span><span class="o">-</span><span class="n">request</span><span class="o">-</span><span class="n">number</span><span class="o">-</span><span class="ow">in</span><span class="o">-</span><span class="n">interval</span><span class="o">&gt;</span><span class="p">,</span>
<span class="s2">&quot;subrules&quot;</span><span class="p">:</span> <span class="p">[</span>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">[{</span>
<span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="s2">&quot;search request&quot;</span><span class="p">,</span>
<span class="nt">&quot;filters&quot;</span><span class="p">:[</span>
<span class="s2">&quot;Param:q&quot;</span><span class="p">,</span>
<span class="s2">&quot;Path=^(/|/search)$&quot;</span>
<span class="p">],</span>
<span class="nt">&quot;interval&quot;</span><span class="p">:</span><span class="s2">&quot;&lt;time-interval-in-sec (int)&gt;&quot;</span><span class="p">,</span>
<span class="nt">&quot;limit&quot;</span><span class="p">:</span><span class="s2">&quot;&lt;max-request-number-in-interval (int)&gt;&quot;</span><span class="p">,</span>
<span class="nt">&quot;subrules&quot;</span><span class="p">:[</span>
<span class="p">{</span>
<span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="s2">&quot;roboagent limit&quot;</span><span class="p">,</span>
<span class="nt">&quot;interval&quot;</span><span class="p">:</span><span class="s2">&quot;&lt;time-interval-in-sec (int)&gt;&quot;</span><span class="p">,</span>
<span class="nt">&quot;limit&quot;</span><span class="p">:</span><span class="s2">&quot;&lt;max-request-number-in-interval (int)&gt;&quot;</span><span class="p">,</span>
<span class="nt">&quot;filters&quot;</span><span class="p">:[</span>
<span class="s2">&quot;Header:User-Agent=(curl|cURL|Wget|python-requests|Scrapy|FeedFetcher|Go-http-client)&quot;</span>
<span class="p">],</span>
<span class="nt">&quot;actions&quot;</span><span class="p">:[</span>
<span class="p">{</span>
<span class="s2">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;roboagent limit&quot;</span><span class="p">,</span>
<span class="s2">&quot;interval&quot;</span><span class="p">:</span> <span class="o">&lt;</span><span class="n">time</span><span class="o">-</span><span class="n">interval</span><span class="o">-</span><span class="ow">in</span><span class="o">-</span><span class="n">sec</span><span class="o">&gt;</span><span class="p">,</span>
<span class="s2">&quot;limit&quot;</span><span class="p">:</span> <span class="o">&lt;</span><span class="nb">max</span><span class="o">-</span><span class="n">request</span><span class="o">-</span><span class="n">number</span><span class="o">-</span><span class="ow">in</span><span class="o">-</span><span class="n">interval</span><span class="o">&gt;</span><span class="p">,</span>
<span class="s2">&quot;filters&quot;</span><span class="p">:</span> <span class="p">[</span><span class="s2">&quot;Header:User-Agent=(curl|cURL|Wget|python-requests|Scrapy|FeedFetcher|Go-http-client)&quot;</span><span class="p">],</span>
<span class="s2">&quot;actions&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="p">{</span><span class="s2">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;block&quot;</span><span class="p">,</span>
<span class="s2">&quot;params&quot;</span><span class="p">:</span> <span class="p">{</span><span class="s2">&quot;message&quot;</span><span class="p">:</span> <span class="s2">&quot;Rate limit exceeded&quot;</span><span class="p">}}</span>
<span class="p">]</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="s2">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;botlimit&quot;</span><span class="p">,</span>
<span class="s2">&quot;limit&quot;</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
<span class="s2">&quot;stop&quot;</span><span class="p">:</span> <span class="n">true</span><span class="p">,</span>
<span class="s2">&quot;filters&quot;</span><span class="p">:</span> <span class="p">[</span><span class="s2">&quot;Header:User-Agent=(Googlebot|bingbot|Baiduspider|yacybot|YandexMobileBot|YandexBot|Yahoo! Slurp|MJ12bot|AhrefsBot|archive.org_bot|msnbot|MJ12bot|SeznamBot|linkdexbot|Netvibes|SMTBot|zgrab|James BOT)&quot;</span><span class="p">],</span>
<span class="s2">&quot;actions&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="p">{</span><span class="s2">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;block&quot;</span><span class="p">,</span>
<span class="s2">&quot;params&quot;</span><span class="p">:</span> <span class="p">{</span><span class="s2">&quot;message&quot;</span><span class="p">:</span> <span class="s2">&quot;Rate limit exceeded&quot;</span><span class="p">}}</span>
<span class="p">]</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="s2">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;IP limit&quot;</span><span class="p">,</span>
<span class="s2">&quot;interval&quot;</span><span class="p">:</span> <span class="o">&lt;</span><span class="n">time</span><span class="o">-</span><span class="n">interval</span><span class="o">-</span><span class="ow">in</span><span class="o">-</span><span class="n">sec</span><span class="o">&gt;</span><span class="p">,</span>
<span class="s2">&quot;limit&quot;</span><span class="p">:</span> <span class="o">&lt;</span><span class="nb">max</span><span class="o">-</span><span class="n">request</span><span class="o">-</span><span class="n">number</span><span class="o">-</span><span class="ow">in</span><span class="o">-</span><span class="n">interval</span><span class="o">&gt;</span><span class="p">,</span>
<span class="s2">&quot;stop&quot;</span><span class="p">:</span> <span class="n">true</span><span class="p">,</span>
<span class="s2">&quot;aggregations&quot;</span><span class="p">:</span> <span class="p">[</span><span class="s2">&quot;Header:X-Forwarded-For&quot;</span><span class="p">],</span>
<span class="s2">&quot;actions&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="p">{</span><span class="s2">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;block&quot;</span><span class="p">,</span>
<span class="s2">&quot;params&quot;</span><span class="p">:</span> <span class="p">{</span><span class="s2">&quot;message&quot;</span><span class="p">:</span> <span class="s2">&quot;Rate limit exceeded&quot;</span><span class="p">}}</span>
<span class="p">]</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="s2">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;rss/json limit&quot;</span><span class="p">,</span>
<span class="s2">&quot;interval&quot;</span><span class="p">:</span> <span class="o">&lt;</span><span class="n">time</span><span class="o">-</span><span class="n">interval</span><span class="o">-</span><span class="ow">in</span><span class="o">-</span><span class="n">sec</span><span class="o">&gt;</span><span class="p">,</span>
<span class="s2">&quot;limit&quot;</span><span class="p">:</span> <span class="o">&lt;</span><span class="nb">max</span><span class="o">-</span><span class="n">request</span><span class="o">-</span><span class="n">number</span><span class="o">-</span><span class="ow">in</span><span class="o">-</span><span class="n">interval</span><span class="o">&gt;</span><span class="p">,</span>
<span class="s2">&quot;stop&quot;</span><span class="p">:</span> <span class="n">true</span><span class="p">,</span>
<span class="s2">&quot;filters&quot;</span><span class="p">:</span> <span class="p">[</span><span class="s2">&quot;Param:format=(csv|json|rss)&quot;</span><span class="p">],</span>
<span class="s2">&quot;actions&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="p">{</span><span class="s2">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;block&quot;</span><span class="p">,</span>
<span class="s2">&quot;params&quot;</span><span class="p">:</span> <span class="p">{</span><span class="s2">&quot;message&quot;</span><span class="p">:</span> <span class="s2">&quot;Rate limit exceeded&quot;</span><span class="p">}}</span>
<span class="p">]</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="s2">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;useragent limit&quot;</span><span class="p">,</span>
<span class="s2">&quot;interval&quot;</span><span class="p">:</span> <span class="o">&lt;</span><span class="n">time</span><span class="o">-</span><span class="n">interval</span><span class="o">-</span><span class="ow">in</span><span class="o">-</span><span class="n">sec</span><span class="o">&gt;</span><span class="p">,</span>
<span class="s2">&quot;limit&quot;</span><span class="p">:</span> <span class="o">&lt;</span><span class="nb">max</span><span class="o">-</span><span class="n">request</span><span class="o">-</span><span class="n">number</span><span class="o">-</span><span class="ow">in</span><span class="o">-</span><span class="n">interval</span><span class="o">&gt;</span><span class="p">,</span>
<span class="s2">&quot;aggregations&quot;</span><span class="p">:</span> <span class="p">[</span><span class="s2">&quot;Header:User-Agent&quot;</span><span class="p">],</span>
<span class="s2">&quot;actions&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="p">{</span><span class="s2">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;block&quot;</span><span class="p">,</span>
<span class="s2">&quot;params&quot;</span><span class="p">:</span> <span class="p">{</span><span class="s2">&quot;message&quot;</span><span class="p">:</span> <span class="s2">&quot;Rate limit exceeded&quot;</span><span class="p">}}</span>
<span class="p">]</span>
<span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="s2">&quot;block&quot;</span><span class="p">,</span>
<span class="nt">&quot;params&quot;</span><span class="p">:{</span>
<span class="nt">&quot;message&quot;</span><span class="p">:</span><span class="s2">&quot;Rate limit exceeded&quot;</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">]</span>
<span class="p">}</span>
<span class="p">]</span>
<span class="p">]</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="s2">&quot;botlimit&quot;</span><span class="p">,</span>
<span class="nt">&quot;limit&quot;</span><span class="p">:</span><span class="mi">0</span><span class="p">,</span>
<span class="nt">&quot;stop&quot;</span><span class="p">:</span><span class="kc">true</span><span class="p">,</span>
<span class="nt">&quot;filters&quot;</span><span class="p">:[</span>
<span class="s2">&quot;Header:User-Agent=(Googlebot|bingbot|Baiduspider|yacybot|YandexMobileBot|YandexBot|Yahoo! Slurp|MJ12bot|AhrefsBot|archive.org_bot|msnbot|MJ12bot|SeznamBot|linkdexbot|Netvibes|SMTBot|zgrab|James BOT)&quot;</span>
<span class="p">],</span>
<span class="nt">&quot;actions&quot;</span><span class="p">:[</span>
<span class="p">{</span>
<span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="s2">&quot;block&quot;</span><span class="p">,</span>
<span class="nt">&quot;params&quot;</span><span class="p">:{</span>
<span class="nt">&quot;message&quot;</span><span class="p">:</span><span class="s2">&quot;Rate limit exceeded&quot;</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">]</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="s2">&quot;IP limit&quot;</span><span class="p">,</span>
<span class="nt">&quot;interval&quot;</span><span class="p">:</span><span class="s2">&quot;&lt;time-interval-in-sec (int)&gt;&quot;</span><span class="p">,</span>
<span class="nt">&quot;limit&quot;</span><span class="p">:</span><span class="s2">&quot;&lt;max-request-number-in-interval (int)&gt;&quot;</span><span class="p">,</span>
<span class="nt">&quot;stop&quot;</span><span class="p">:</span><span class="kc">true</span><span class="p">,</span>
<span class="nt">&quot;aggregations&quot;</span><span class="p">:[</span>
<span class="s2">&quot;Header:X-Forwarded-For&quot;</span>
<span class="p">],</span>
<span class="nt">&quot;actions&quot;</span><span class="p">:[</span>
<span class="p">{</span>
<span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="s2">&quot;block&quot;</span><span class="p">,</span>
<span class="nt">&quot;params&quot;</span><span class="p">:{</span>
<span class="nt">&quot;message&quot;</span><span class="p">:</span><span class="s2">&quot;Rate limit exceeded&quot;</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">]</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="s2">&quot;rss/json limit&quot;</span><span class="p">,</span>
<span class="nt">&quot;interval&quot;</span><span class="p">:</span><span class="s2">&quot;&lt;time-interval-in-sec (int)&gt;&quot;</span><span class="p">,</span>
<span class="nt">&quot;limit&quot;</span><span class="p">:</span><span class="s2">&quot;&lt;max-request-number-in-interval (int)&gt;&quot;</span><span class="p">,</span>
<span class="nt">&quot;stop&quot;</span><span class="p">:</span><span class="kc">true</span><span class="p">,</span>
<span class="nt">&quot;filters&quot;</span><span class="p">:[</span>
<span class="s2">&quot;Param:format=(csv|json|rss)&quot;</span>
<span class="p">],</span>
<span class="nt">&quot;actions&quot;</span><span class="p">:[</span>
<span class="p">{</span>
<span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="s2">&quot;block&quot;</span><span class="p">,</span>
<span class="nt">&quot;params&quot;</span><span class="p">:{</span>
<span class="nt">&quot;message&quot;</span><span class="p">:</span><span class="s2">&quot;Rate limit exceeded&quot;</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">]</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="s2">&quot;useragent limit&quot;</span><span class="p">,</span>
<span class="nt">&quot;interval&quot;</span><span class="p">:</span><span class="s2">&quot;&lt;time-interval-in-sec (int)&gt;&quot;</span><span class="p">,</span>
<span class="nt">&quot;limit&quot;</span><span class="p">:</span><span class="s2">&quot;&lt;max-request-number-in-interval (int)&gt;&quot;</span><span class="p">,</span>
<span class="nt">&quot;aggregations&quot;</span><span class="p">:[</span>
<span class="s2">&quot;Header:User-Agent&quot;</span>
<span class="p">],</span>
<span class="nt">&quot;actions&quot;</span><span class="p">:[</span>
<span class="p">{</span>
<span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="s2">&quot;block&quot;</span><span class="p">,</span>
<span class="nt">&quot;params&quot;</span><span class="p">:{</span>
<span class="nt">&quot;message&quot;</span><span class="p">:</span><span class="s2">&quot;Rate limit exceeded&quot;</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">]</span>
<span class="p">}</span>
<span class="p">]</span>
<span class="p">}]</span>
</pre></div>
</div>
</div>
<div class="section" id="route-request-through-filtron">
<h2>Route request through filtron<a class="headerlink" href="#route-request-through-filtron" title="Permalink to this headline"></a></h2>
<p>Filtron can be started using the following command:</p>
<div class="code bash highlight-default"><div class="highlight"><pre><span></span>$ filtron -rules rules.json
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ filtron -rules rules.json
</pre></div>
</div>
<p>It listens on 127.0.0.1:4004 and forwards filtered requests to 127.0.0.1:8888 by default.</p>
<p>Use it along with <code class="docutils literal"><span class="pre">nginx</span></code> with the following example configuration.</p>
<div class="code bash highlight-default"><div class="highlight"><pre><span></span>location / {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Scheme $scheme;
proxy_pass http://127.0.0.1:4004/;
}
<p>It listens on <code class="docutils literal notranslate"><span class="pre">127.0.0.1:4004</span></code> and forwards filtered requests to
<code class="docutils literal notranslate"><span class="pre">127.0.0.1:8888</span></code> by default.</p>
<p>Use it along with <code class="docutils literal notranslate"><span class="pre">nginx</span></code> with the following example configuration.</p>
<div class="highlight-nginx notranslate"><div class="highlight"><pre><span></span><span class="k">location</span> <span class="s">/</span> <span class="p">{</span>
<span class="kn">proxy_set_header</span> <span class="s">Host</span> <span class="nv">$http_host</span><span class="p">;</span>
<span class="kn">proxy_set_header</span> <span class="s">X-Real-IP</span> <span class="nv">$remote_addr</span><span class="p">;</span>
<span class="kn">proxy_set_header</span> <span class="s">X-Forwarded-For</span> <span class="nv">$proxy_add_x_forwarded_for</span><span class="p">;</span>
<span class="kn">proxy_set_header</span> <span class="s">X-Scheme</span> <span class="nv">$scheme</span><span class="p">;</span>
<span class="kn">proxy_pass</span> <span class="s">http://127.0.0.1:4004/</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
<p>Requests are coming from port 4004 going through filtron and then forwarded to port 8888 where a searx is being run.</p>
<p>Requests are coming from port 4004 going through filtron and then forwarded to
port 8888 where a searx is being run.</p>
</div>
</div>
@ -147,27 +182,57 @@
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper"><div class="sidebar_container body">
<h1>Searx</h1>
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/searx_logo_small.png" alt="Logo"/>
</a></p>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/asciimoo/searx">Source</a>
<li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a>
<li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a>
<li><a href="https://twitter.com/Searx_engine">Twitter</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../index.html">Home</a></li>
<li><a href="https://github.com/asciimoo/searx">Source</a></li>
<li><a href="../blog/blog.html">Blog</a></li>
<li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a></li>
<li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a></li>
</ul>
<hr />
<ul>
<li><a href="https://twitter.com/Searx_engine">Twitter</a></li>
<li><a href="../index.html">Overview</a>
<ul>
<li><a href="index.html">Administrator documentation</a>
<ul>
<li>Previous: <a href="architecture.html" title="previous chapter">Architecture</a>
<li>Next: <a href="morty.html" title="next chapter">How to setup result proxy</a></ul>
</li>
</ul>
</li>
</ul>
<div 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" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
&copy; Copyright 2015-2019, Adam Tauber, Noémi Ványi.
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2019, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.3.1.
</div>
<script type="text/javascript" src="../_static/version_warning_offset.js"></script>
</body>
</html>

114
admin/index.html Normal file
View File

@ -0,0 +1,114 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Administrator documentation &#8212; Searx Documentation (Searx-0.15.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../_static/language_data.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Installation" href="installation.html" />
<link rel="prev" title="Why use a private instance?" href="../user/own-instance.html" />
<script>DOCUMENTATION_OPTIONS.URL_ROOT = '../';</script>
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<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="installation.html" title="Installation"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="../user/own-instance.html" title="Why use a private instance?"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.15.0.tex)</a> &#187;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="administrator-documentation">
<h1>Administrator documentation<a class="headerlink" href="#administrator-documentation" title="Permalink to this headline"></a></h1>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="api.html">Administration API</a></li>
<li class="toctree-l1"><a class="reference internal" href="architecture.html">Architecture</a></li>
<li class="toctree-l1"><a class="reference internal" href="filtron.html">How to protect an instance</a></li>
<li class="toctree-l1"><a class="reference internal" href="morty.html">How to setup result proxy</a></li>
<li class="toctree-l1"><a class="reference internal" href="engines.html">engines</a></li>
<li class="toctree-l1"><a class="reference internal" href="plugins.html">Plugins builtin</a></li>
<li class="toctree-l1"><a class="reference internal" href="buildhosts.html">Buildhosts</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/searx_logo_small.png" alt="Logo"/>
</a></p>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/asciimoo/searx">Source</a>
<li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a>
<li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a>
<li><a href="https://twitter.com/Searx_engine">Twitter</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../index.html">Overview</a>
<ul>
<li>Previous: <a href="../user/own-instance.html" title="previous chapter">Why use a private instance?</a>
<li>Next: <a href="installation.html" title="next chapter">Installation</a>
</ul>
</li>
</ul>
<div 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" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2019, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.3.1.
</div>
<script type="text/javascript" src="../_static/version_warning_offset.js"></script>
</body>
</html>

393
admin/installation.html Normal file
View File

@ -0,0 +1,393 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Installation &#8212; Searx Documentation (Searx-0.15.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../_static/language_data.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Administration API" href="api.html" />
<link rel="prev" title="Administrator documentation" href="index.html" />
<script>DOCUMENTATION_OPTIONS.URL_ROOT = '../';</script>
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<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="api.html" title="Administration API"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="index.html" title="Administrator documentation"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.15.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> &#187;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="installation">
<span id="id1"></span><h1><a class="toc-backref" href="#id3">Installation</a><a class="headerlink" href="#installation" title="Permalink to this headline"></a></h1>
<div class="contents topic" id="contents">
<p class="topic-title first">Contents</p>
<ul class="simple">
<li><p><a class="reference internal" href="#installation" id="id3">Installation</a></p>
<ul>
<li><p><a class="reference internal" href="#basic-installation" id="id4">Basic installation</a></p></li>
<li><p><a class="reference internal" href="#configuration" id="id5">Configuration</a></p></li>
<li><p><a class="reference internal" href="#check" id="id6">Check</a></p></li>
<li><p><a class="reference internal" href="#uwsgi" id="id7">uwsgi</a></p></li>
<li><p><a class="reference internal" href="#web-server" id="id8">Web server</a></p>
<ul>
<li><p><a class="reference internal" href="#with-nginx" id="id9">with nginx</a></p></li>
<li><p><a class="reference internal" href="#with-apache" id="id10">with apache</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#how-to-update" id="id11">How to update</a></p></li>
<li><p><a class="reference internal" href="#docker" id="id12">Docker</a></p></li>
<li><p><a class="reference internal" href="#references" id="id13">References</a></p></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="basic-installation">
<h2><a class="toc-backref" href="#id4">Basic installation</a><a class="headerlink" href="#basic-installation" title="Permalink to this headline"></a></h2>
<p>Step by step installation for Debian/Ubuntu with virtualenv. For Ubuntu, be sure
to have enable universe repository.</p>
<p>Install packages:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo -H apt-get install <span class="se">\</span>
git build-essential libxslt-dev <span class="se">\</span>
python-dev python-virtualenv python-babel <span class="se">\</span>
zlib1g-dev libffi-dev libssl-dev
</pre></div>
</div>
<p>Install searx:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="nb">cd</span> /usr/local
sudo -H git clone https://github.com/asciimoo/searx.git
sudo -H useradd searx -d /usr/local/searx
sudo -H chown searx:searx -R /usr/local/searx
</pre></div>
</div>
<p>Install dependencies in a virtualenv:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="nb">cd</span> /usr/local/searx
sudo -H -u searx -i
</pre></div>
</div>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="o">(</span>searx<span class="o">)</span>$ virtualenv searx-ve
<span class="o">(</span>searx<span class="o">)</span>$ . ./searx-ve/bin/activate
<span class="o">(</span>searx<span class="o">)</span>$ ./manage.sh update_packages
</pre></div>
</div>
</div>
<div class="section" id="configuration">
<h2><a class="toc-backref" href="#id5">Configuration</a><a class="headerlink" href="#configuration" title="Permalink to this headline"></a></h2>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sed -i -e <span class="s2">&quot;s/ultrasecretkey/`openssl rand -hex 16`/g&quot;</span> searx/settings.yml
</pre></div>
</div>
<p>Edit searx/settings.yml if necessary.</p>
</div>
<div class="section" id="check">
<h2><a class="toc-backref" href="#id6">Check</a><a class="headerlink" href="#check" title="Permalink to this headline"></a></h2>
<p>Start searx:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>python searx/webapp.py
</pre></div>
</div>
<p>Go to <a class="reference external" href="http://localhost:8888">http://localhost:8888</a></p>
<p>If everything works fine, disable the debug option in settings.yml:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sed -i -e <span class="s2">&quot;s/debug : True/debug : False/g&quot;</span> searx/settings.yml
</pre></div>
</div>
<p>At this point searx is not demonized ; uwsgi allows this.</p>
<p>You can exit the virtualenv and the searx user bash (enter exit command
twice).</p>
</div>
<div class="section" id="uwsgi">
<h2><a class="toc-backref" href="#id7">uwsgi</a><a class="headerlink" href="#uwsgi" title="Permalink to this headline"></a></h2>
<p>Install packages:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo -H apt-get install <span class="se">\</span>
uwsgi uwsgi-plugin-python
</pre></div>
</div>
<p>Create the configuration file <code class="docutils literal notranslate"><span class="pre">/etc/uwsgi/apps-available/searx.ini</span></code> with this
content:</p>
<div class="highlight-ini notranslate"><div class="highlight"><pre><span></span><span class="k">[uwsgi]</span>
<span class="c1"># Who will run the code</span>
<span class="na">uid</span> <span class="o">=</span> <span class="s">searx</span>
<span class="na">gid</span> <span class="o">=</span> <span class="s">searx</span>
<span class="c1"># disable logging for privacy</span>
<span class="na">disable-logging</span> <span class="o">=</span> <span class="s">true</span>
<span class="c1"># Number of workers (usually CPU count)</span>
<span class="na">workers</span> <span class="o">=</span> <span class="s">4</span>
<span class="c1"># The right granted on the created socket</span>
<span class="na">chmod-socket</span> <span class="o">=</span> <span class="s">666</span>
<span class="c1"># Plugin to use and interpretor config</span>
<span class="na">single-interpreter</span> <span class="o">=</span> <span class="s">true</span>
<span class="na">master</span> <span class="o">=</span> <span class="s">true</span>
<span class="na">plugin</span> <span class="o">=</span> <span class="s">python</span>
<span class="na">lazy-apps</span> <span class="o">=</span> <span class="s">true</span>
<span class="na">enable-threads</span> <span class="o">=</span> <span class="s">true</span>
<span class="c1"># Module to import</span>
<span class="na">module</span> <span class="o">=</span> <span class="s">searx.webapp</span>
<span class="c1"># Virtualenv and python path</span>
<span class="na">virtualenv</span> <span class="o">=</span> <span class="s">/usr/local/searx/searx-ve/</span>
<span class="na">pythonpath</span> <span class="o">=</span> <span class="s">/usr/local/searx/</span>
<span class="na">chdir</span> <span class="o">=</span> <span class="s">/usr/local/searx/searx/</span>
</pre></div>
</div>
<p>Activate the uwsgi application and restart:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="nb">cd</span> /etc/uwsgi/apps-enabled
ln -s ../apps-available/searx.ini
/etc/init.d/uwsgi restart
</pre></div>
</div>
</div>
<div class="section" id="web-server">
<h2><a class="toc-backref" href="#id8">Web server</a><a class="headerlink" href="#web-server" title="Permalink to this headline"></a></h2>
<div class="section" id="with-nginx">
<h3><a class="toc-backref" href="#id9">with nginx</a><a class="headerlink" href="#with-nginx" title="Permalink to this headline"></a></h3>
<p>If nginx is not installed (uwsgi will not work with the package
nginx-light):</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo -H apt-get install nginx
</pre></div>
</div>
<div class="section" id="hosted-at">
<h4>Hosted at /<a class="headerlink" href="#hosted-at" title="Permalink to this headline"></a></h4>
<p>Create the configuration file <code class="docutils literal notranslate"><span class="pre">/etc/nginx/sites-available/searx</span></code> with this
content:</p>
<div class="highlight-nginx notranslate"><div class="highlight"><pre><span></span><span class="k">server</span> <span class="p">{</span>
<span class="kn">listen</span> <span class="mi">80</span><span class="p">;</span>
<span class="kn">server_name</span> <span class="s">searx.example.com</span><span class="p">;</span>
<span class="kn">root</span> <span class="s">/usr/local/searx</span><span class="p">;</span>
<span class="kn">location</span> <span class="s">/</span> <span class="p">{</span>
<span class="kn">include</span> <span class="s">uwsgi_params</span><span class="p">;</span>
<span class="kn">uwsgi_pass</span> <span class="s">unix:/run/uwsgi/app/searx/socket</span><span class="p">;</span>
<span class="p">}</span>
<span class="p">}</span>
</pre></div>
</div>
<p>Create a symlink to sites-enabled:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo -H ln -s /etc/nginx/sites-available/searx /etc/nginx/sites-enabled/searx
</pre></div>
</div>
<p>Restart service:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo -H service nginx restart
sudo -H service uwsgi restart
</pre></div>
</div>
</div>
<div class="section" id="from-subdirectory-url-searx">
<h4>from subdirectory URL (/searx)<a class="headerlink" href="#from-subdirectory-url-searx" title="Permalink to this headline"></a></h4>
<p>Add this configuration in the server config file
<code class="docutils literal notranslate"><span class="pre">/etc/nginx/sites-enabled/default</span></code>:</p>
<div class="highlight-nginx notranslate"><div class="highlight"><pre><span></span><span class="k">location</span> <span class="p">=</span> <span class="s">/searx</span> <span class="p">{</span> <span class="kn">rewrite</span> <span class="s">^</span> <span class="s">/searx/</span><span class="p">;</span> <span class="p">}</span>
<span class="k">location</span> <span class="s">/searx</span> <span class="p">{</span>
<span class="kn">try_files</span> <span class="nv">$uri</span> <span class="s">@searx</span><span class="p">;</span>
<span class="p">}</span>
<span class="k">location</span> <span class="s">@searx</span> <span class="p">{</span>
<span class="kn">uwsgi_param</span> <span class="s">SCRIPT_NAME</span> <span class="s">/searx</span><span class="p">;</span>
<span class="kn">include</span> <span class="s">uwsgi_params</span><span class="p">;</span>
<span class="kn">uwsgi_modifier1</span> <span class="mi">30</span><span class="p">;</span>
<span class="kn">uwsgi_pass</span> <span class="s">unix:/run/uwsgi/app/searx/socket</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
<p><strong>OR</strong> using reverse proxy (Please, note that reverse proxy advised to be used
in case of single-user or low-traffic instances.)</p>
<div class="highlight-nginx notranslate"><div class="highlight"><pre><span></span><span class="k">location</span> <span class="s">/searx</span> <span class="p">{</span>
<span class="kn">proxy_pass</span> <span class="s">http://127.0.0.1:8888</span><span class="p">;</span>
<span class="kn">proxy_set_header</span> <span class="s">Host</span> <span class="nv">$host</span><span class="p">;</span>
<span class="kn">proxy_set_header</span> <span class="s">X-Forwarded-For</span> <span class="nv">$proxy_add_x_forwarded_for</span><span class="p">;</span>
<span class="kn">proxy_set_header</span> <span class="s">X-Scheme</span> <span class="nv">$scheme</span><span class="p">;</span>
<span class="kn">proxy_set_header</span> <span class="s">X-Script-Name</span> <span class="s">/searx</span><span class="p">;</span>
<span class="kn">proxy_buffering</span> <span class="no">off</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
<p>Enable <code class="docutils literal notranslate"><span class="pre">base_url</span></code> in <code class="docutils literal notranslate"><span class="pre">searx/settings.yml</span></code></p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="l l-Scalar l-Scalar-Plain">base_url</span> <span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">http://your.domain.tld/searx/</span>
</pre></div>
</div>
<p>Restart service:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo -H service nginx restart
sudo -H service uwsgi restart
</pre></div>
</div>
<div class="section" id="disable-logs">
<h5>disable logs<a class="headerlink" href="#disable-logs" title="Permalink to this headline"></a></h5>
<p>for better privacy you can disable nginx logs about searx.</p>
<p>how to proceed: below <code class="docutils literal notranslate"><span class="pre">uwsgi_pass</span></code> in <code class="docutils literal notranslate"><span class="pre">/etc/nginx/sites-available/default</span></code>
add:</p>
<div class="highlight-nginx notranslate"><div class="highlight"><pre><span></span><span class="k">access_log</span> <span class="s">/dev/null</span><span class="p">;</span>
<span class="k">error_log</span> <span class="s">/dev/null</span><span class="p">;</span>
</pre></div>
</div>
<p>Restart service:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo -H service nginx restart
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="with-apache">
<h3><a class="toc-backref" href="#id10">with apache</a><a class="headerlink" href="#with-apache" title="Permalink to this headline"></a></h3>
<p>Add wsgi mod:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo -H apt-get install libapache2-mod-uwsgi
sudo -H a2enmod uwsgi
</pre></div>
</div>
<p>Add this configuration in the file <code class="docutils literal notranslate"><span class="pre">/etc/apache2/apache2.conf</span></code>:</p>
<div class="highlight-apache notranslate"><div class="highlight"><pre><span></span><span class="nt">&lt;Location</span> <span class="s">/</span><span class="nt">&gt;</span>
<span class="nb">Options</span> FollowSymLinks Indexes
<span class="nb">SetHandler</span> uwsgi-handler
<span class="nb">uWSGISocket</span> <span class="sx">/run/uwsgi/app/searx/socket</span>
<span class="nt">&lt;/Location&gt;</span>
</pre></div>
</div>
<p>Note that if your instance of searx is not at the root, you should change
<code class="docutils literal notranslate"><span class="pre">&lt;Location</span> <span class="pre">/&gt;</span></code> by the location of your instance, like <code class="docutils literal notranslate"><span class="pre">&lt;Location</span> <span class="pre">/searx&gt;</span></code>.</p>
<p>Restart Apache:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo -H /etc/init.d/apache2 restart
</pre></div>
</div>
<div class="section" id="id2">
<h4>disable logs<a class="headerlink" href="#id2" title="Permalink to this headline"></a></h4>
<p>For better privacy you can disable Apache logs.</p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>You can only disable logs for the whole (virtual) server not for a specific
path.</p>
</div>
<p>Go back to <code class="docutils literal notranslate"><span class="pre">/etc/apache2/apache2.conf</span></code> and above <code class="docutils literal notranslate"><span class="pre">&lt;Location</span> <span class="pre">/&gt;</span></code> add:</p>
<div class="highlight-apache notranslate"><div class="highlight"><pre><span></span><span class="nb">CustomLog</span> <span class="sx">/dev/null</span> combined
</pre></div>
</div>
<p>Restart Apache:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo -H /etc/init.d/apache2 restart
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="how-to-update">
<h2><a class="toc-backref" href="#id11">How to update</a><a class="headerlink" href="#how-to-update" title="Permalink to this headline"></a></h2>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="nb">cd</span> /usr/local/searx
sudo -H -u searx -i
</pre></div>
</div>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="o">(</span>searx<span class="o">)</span>$ . ./searx-ve/bin/activate
<span class="o">(</span>searx<span class="o">)</span>$ git stash
<span class="o">(</span>searx<span class="o">)</span>$ git pull origin master
<span class="o">(</span>searx<span class="o">)</span>$ git stash apply
<span class="o">(</span>searx<span class="o">)</span>$ ./manage.sh update_packages
</pre></div>
</div>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo -H service uwsgi restart
</pre></div>
</div>
</div>
<div class="section" id="docker">
<h2><a class="toc-backref" href="#id12">Docker</a><a class="headerlink" href="#docker" title="Permalink to this headline"></a></h2>
<p>Make sure you have installed Docker. For instance, you can deploy searx like this:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>docker pull wonderfall/searx
docker run -d --name searx -p <span class="nv">$PORT</span>:8888 wonderfall/searx
</pre></div>
</div>
<p>Go to <code class="docutils literal notranslate"><span class="pre">http://localhost:$PORT</span></code>.</p>
<p>See <a class="reference external" href="https://hub.docker.com/r/wonderfall/searx/">https://hub.docker.com/r/wonderfall/searx/</a> for more informations. Its also
possible to build searx from the embedded Dockerfile.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>git clone https://github.com/asciimoo/searx.git
<span class="nb">cd</span> searx
docker build -t whatever/searx .
</pre></div>
</div>
</div>
<div class="section" id="references">
<h2><a class="toc-backref" href="#id13">References</a><a class="headerlink" href="#references" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li><p><a class="reference external" href="https://about.okhin.fr/posts/Searx/">https://about.okhin.fr/posts/Searx/</a> with some additions</p></li>
<li><p>How to: <a class="reference external" href="https://www.reddit.com/r/privacytoolsIO/comments/366kvn/how_to_setup_your_own_privacy_respecting_search/">Setup searx in a couple of hours with a free SSL certificate</a></p></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/searx_logo_small.png" alt="Logo"/>
</a></p>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/asciimoo/searx">Source</a>
<li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a>
<li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a>
<li><a href="https://twitter.com/Searx_engine">Twitter</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../index.html">Overview</a>
<ul>
<li><a href="index.html">Administrator documentation</a>
<ul>
<li>Previous: <a href="index.html" title="previous chapter">Administrator documentation</a>
<li>Next: <a href="api.html" title="next chapter">Administration API</a></ul>
</li>
</ul>
</li>
</ul>
<div 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" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2019, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.3.1.
</div>
<script type="text/javascript" src="../_static/version_warning_offset.js"></script>
</body>
</html>

View File

@ -1,40 +1,41 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>How to setup result proxy &#8212; searx 0.12.0 documentation</title>
<link rel="stylesheet" href="../_static/style.css" type="text/css" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>How to setup result proxy &#8212; Searx Documentation (Searx-0.15.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '0.12.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../_static/language_data.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Development Quickstart" href="../dev/quickstart.html" />
<link rel="next" title="engines" href="engines.html" />
<link rel="prev" title="How to protect an instance" href="filtron.html" />
<script>DOCUMENTATION_OPTIONS.URL_ROOT = '../';</script>
<link media="only screen and (max-device-width: 480px)" href="../_static/small_flask.css" type= "text/css" rel="stylesheet" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
</head>
<body>
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<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="engines.html" title="engines"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="filtron.html" title="How to protect an instance"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.15.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> &#187;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
@ -43,45 +44,79 @@
<div class="section" id="how-to-setup-result-proxy">
<h1>How to setup result proxy<a class="headerlink" href="#how-to-setup-result-proxy" title="Permalink to this headline"></a></h1>
<p>By default searx can only act as an image proxy for result images,
but it is possible to proxify all the result URLs with an external service,
<a class="reference external" href="https://github.com/asciimoo/morty">morty</a>.</p>
<p>To use this feature, morty has to be installed and activated in searxs <code class="docutils literal"><span class="pre">settings.yml</span></code>.</p>
<p>Add the following snippet to your <code class="docutils literal"><span class="pre">settings.yml</span></code> and restart searx:</p>
<div class="code yaml highlight-default"><div class="highlight"><pre><span></span><span class="n">result_proxy</span><span class="p">:</span>
<span class="n">url</span> <span class="p">:</span> <span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="mf">127.0</span><span class="o">.</span><span class="mf">0.1</span><span class="p">:</span><span class="mi">3000</span><span class="o">/</span>
<span class="n">key</span> <span class="p">:</span> <span class="n">your_morty_proxy_key</span>
<p>By default searx can only act as an image proxy for result images, but it is
possible to proxify all the result URLs with an external service, <a class="reference external" href="https://github.com/asciimoo/morty">morty</a>.</p>
<p>To use this feature, morty has to be installed and activated in searxs
<code class="docutils literal notranslate"><span class="pre">settings.yml</span></code>.</p>
<p>Add the following snippet to your <code class="docutils literal notranslate"><span class="pre">settings.yml</span></code> and restart searx:</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="l l-Scalar l-Scalar-Plain">result_proxy</span><span class="p p-Indicator">:</span>
<span class="l l-Scalar l-Scalar-Plain">url</span> <span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">http://127.0.0.1:3000/</span>
<span class="l l-Scalar l-Scalar-Plain">key</span> <span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">your_morty_proxy_key</span>
</pre></div>
</div>
<p><code class="docutils literal"><span class="pre">url</span></code> is the address of the running morty service</p>
<p><code class="docutils literal"><span class="pre">key</span></code> is an optional argument, see <a class="reference external" href="https://github.com/asciimoo/morty">mortys README</a> for more information.</p>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">url</span></code></dt><dd><p>Is the address of the running morty service.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">key</span></code></dt><dd><p>Is an optional argument, see <a class="reference external" href="https://github.com/asciimoo/morty">mortys README</a> for more information.</p>
</dd>
</dl>
</div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper"><div class="sidebar_container body">
<h1>Searx</h1>
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/searx_logo_small.png" alt="Logo"/>
</a></p>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/asciimoo/searx">Source</a>
<li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a>
<li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a>
<li><a href="https://twitter.com/Searx_engine">Twitter</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../index.html">Home</a></li>
<li><a href="https://github.com/asciimoo/searx">Source</a></li>
<li><a href="../blog/blog.html">Blog</a></li>
<li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a></li>
<li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a></li>
</ul>
<hr />
<ul>
<li><a href="https://twitter.com/Searx_engine">Twitter</a></li>
<li><a href="../index.html">Overview</a>
<ul>
<li><a href="index.html">Administrator documentation</a>
<ul>
<li>Previous: <a href="filtron.html" title="previous chapter">How to protect an instance</a>
<li>Next: <a href="engines.html" title="next chapter">engines</a></ul>
</li>
</ul>
</li>
</ul>
<div 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" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
&copy; Copyright 2015-2019, Adam Tauber, Noémi Ványi.
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2019, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.3.1.
</div>
<script type="text/javascript" src="../_static/version_warning_offset.js"></script>
</body>
</html>

186
admin/plugins.html Normal file
View File

@ -0,0 +1,186 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Plugins builtin &#8212; Searx Documentation (Searx-0.15.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../_static/language_data.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Buildhosts" href="buildhosts.html" />
<link rel="prev" title="engines" href="engines.html" />
<script>DOCUMENTATION_OPTIONS.URL_ROOT = '../';</script>
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<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="buildhosts.html" title="Buildhosts"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="engines.html" title="engines"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.15.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> &#187;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="plugins-builtin">
<span id="plugins-generic"></span><h1>Plugins builtin<a class="headerlink" href="#plugins-builtin" title="Permalink to this headline"></a></h1>
<div class="sidebar">
<p class="sidebar-title">Further reading ..</p>
<ul class="simple">
<li><p><a class="reference internal" href="../dev/plugins.html#dev-plugin"><span class="std std-ref">Plugins</span></a></p></li>
</ul>
</div>
<p>Configuration defaults (at built time):</p>
<dl class="field-list simple">
<dt class="field-odd">DO</dt>
<dd class="field-odd"><p>Default on</p>
</dd>
</dl>
<span id="configured-plugins"></span><table class="docutils align-default" id="id1">
<caption><span class="caption-number">Table 2 </span><span class="caption-text">Plugins configured at built time (defaults)</span><a class="headerlink" href="#id1" title="Permalink to this table"></a></caption>
<colgroup>
<col style="width: 23%" />
<col style="width: 8%" />
<col style="width: 69%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head stub"><p>Name</p></th>
<th class="head"><p>DO</p></th>
<th class="head"><p>Description</p>
<p>JS &amp; CSS dependencies</p>
</th>
</tr>
</thead>
<tbody>
<tr class="row-even"><th class="stub"><p>Open Access DOI rewrite</p></th>
<td></td>
<td><p>Avoid paywalls by redirecting to open-access versions of publications when available</p></td>
</tr>
<tr class="row-odd"><th class="stub"><p>HTTPS rewrite</p></th>
<td><p>y</p></td>
<td><p>Rewrite HTTP links to HTTPS if possible</p></td>
</tr>
<tr class="row-even"><th class="stub"><p>Infinite scroll</p></th>
<td></td>
<td><p>Automatically load next page when scrolling to bottom of current page</p>
<div class="line-block">
<div class="line"><code class="docutils literal notranslate"><span class="pre">plugins/js/infinite_scroll.js</span></code> </div>
<div class="line"><code class="docutils literal notranslate"><span class="pre">plugins/css/infinite_scroll.css</span></code> </div>
</div>
</td>
</tr>
<tr class="row-odd"><th class="stub"><p>Open result links on new browser tabs</p></th>
<td></td>
<td><p>Results are opened in the same window by default. This plugin overwrites the default behaviour to open links on new tabs/windows. (JavaScript required)</p>
<div class="line-block">
<div class="line"><code class="docutils literal notranslate"><span class="pre">plugins/js/open_results_on_new_tab.js</span></code> </div>
</div>
</td>
</tr>
<tr class="row-even"><th class="stub"><p>Self Informations</p></th>
<td><p>y</p></td>
<td><p>Displays your IP if the query is “ip” and your user agent if the query contains “user agent”.</p></td>
</tr>
<tr class="row-odd"><th class="stub"><p>Search on category select</p></th>
<td><p>y</p></td>
<td><p>Perform search immediately if a category selected. Disable to select multiple categories. (JavaScript required)</p>
<div class="line-block">
<div class="line"><code class="docutils literal notranslate"><span class="pre">plugins/js/search_on_category_select.js</span></code> </div>
</div>
</td>
</tr>
<tr class="row-even"><th class="stub"><p>Tracker URL remover</p></th>
<td><p>y</p></td>
<td><p>Remove trackers arguments from the returned URL</p></td>
</tr>
<tr class="row-odd"><th class="stub"><p>Vim-like hotkeys</p></th>
<td></td>
<td><p>Navigate search results with Vim-like hotkeys (JavaScript required). Press “h” key on main or result page to get help.</p>
<div class="line-block">
<div class="line"><code class="docutils literal notranslate"><span class="pre">plugins/js/vim_hotkeys.js</span></code> </div>
<div class="line"><code class="docutils literal notranslate"><span class="pre">plugins/css/vim_hotkeys.css</span></code> </div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/searx_logo_small.png" alt="Logo"/>
</a></p>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/asciimoo/searx">Source</a>
<li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a>
<li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a>
<li><a href="https://twitter.com/Searx_engine">Twitter</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../index.html">Overview</a>
<ul>
<li><a href="index.html">Administrator documentation</a>
<ul>
<li>Previous: <a href="engines.html" title="previous chapter">engines</a>
<li>Next: <a href="buildhosts.html" title="next chapter">Buildhosts</a></ul>
</li>
</ul>
</li>
</ul>
<div 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" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2019, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.3.1.
</div>
<script type="text/javascript" src="../_static/version_warning_offset.js"></script>
</body>
</html>

View File

@ -1,65 +1,74 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Searx admin interface: manage your instance from your browser &#8212; searx 0.12.0 documentation</title>
<link rel="stylesheet" href="../_static/style.css" type="text/css" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Searx admin interface &#8212; Searx Documentation (Searx-0.15.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '0.12.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../_static/language_data.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Preparation for offline engines" href="intro-offline.html" />
<link rel="prev" title="Introducing Python 3 support" href="python3.html" />
<script>DOCUMENTATION_OPTIONS.URL_ROOT = '../';</script>
<link media="only screen and (max-device-width: 480px)" href="../_static/small_flask.css" type= "text/css" rel="stylesheet" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
</head>
<body>
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<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="intro-offline.html" title="Preparation for offline engines"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="python3.html" title="Introducing Python 3 support"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.15.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Blog</a> &#187;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="searx-admin-interface-manage-your-instance-from-your-browser">
<h1>Searx admin interface: manage your instance from your browser<a class="headerlink" href="#searx-admin-interface-manage-your-instance-from-your-browser" title="Permalink to this headline"></a></h1>
<p>One of the biggest advantages of searx is being extremely customizable. But at first it can be daunting to newcomers.
A barrier of taking advantage of this feature is our ugly settings file which is sometimes hard to understand and edit.</p>
<p>To make self-hosting searx more accessible a new tool is introduced, called <code class="docutils literal"><span class="pre">searx-admin</span></code>.
It is a web application which is capable of managing your instance and manipulating its settings via a web UI.
It aims to replace editing of <code class="docutils literal"><span class="pre">settings.yml</span></code> for less experienced administrators or people
who prefer graphical admin interfaces.</p>
<div class="align-center figure" id="id1">
<a class="reference internal image-reference" href="../_images/searx-admin-engines.png"><img alt="Screenshot of engine list" src="../_images/searx-admin-engines.png" style="width: 682.0px; height: 352.5px;" /></a>
<p class="caption"><span class="caption-text">Configuration page of engines</span></p>
<div class="section" id="searx-admin-interface">
<h1>Searx admin interface<a class="headerlink" href="#searx-admin-interface" title="Permalink to this headline"></a></h1>
<blockquote>
<div><p>manage your instance from your browser</p>
</div></blockquote>
<div class="sidebar">
<p class="sidebar-title">Installation</p>
<p>Installation guide can be found in the repository of <a class="reference external" href="https://github.com/kvch/searx-admin#searx-admin">searx-admin</a>.</p>
</div>
<p>Since <code class="docutils literal"><span class="pre">searx-admin</span></code> acts as a supervisor for searx, we have decided to implement it
as a standalone tool instead of part of searx. Another reason for making it a standalone
tool is that the codebase and dependencies of searx should not grow because of a fully optional feature,
which does not affect existing instances.</p>
<div class="section" id="installation">
<h2>Installation<a class="headerlink" href="#installation" title="Permalink to this headline"></a></h2>
<p>Installation guide can be found in the repository of searx-admin:
<a class="reference external" href="https://github.com/kvch/searx-admin#installation--usage">https://github.com/kvch/searx-admin#installationusage</a></p>
<p>One of the biggest advantages of searx is being extremely customizable. But at
first it can be daunting to newcomers. A barrier of taking advantage of this
feature is our ugly settings file which is sometimes hard to understand and
edit.</p>
<p>To make self-hosting searx more accessible a new tool is introduced, called
<code class="docutils literal notranslate"><span class="pre">searx-admin</span></code>. It is a web application which is capable of managing your
instance and manipulating its settings via a web UI. It aims to replace editing
of <code class="docutils literal notranslate"><span class="pre">settings.yml</span></code> for less experienced administrators or people who prefer
graphical admin interfaces.</p>
<div class="figure align-default" id="id1">
<img alt="Screenshot of engine list" src="../_images/searx-admin-engines.png" />
<p class="caption"><span class="caption-number">Fig. 6 </span><span class="caption-text">Configuration page of engines</span><a class="headerlink" href="#id1" title="Permalink to this image"></a></p>
</div>
<p>Since <code class="docutils literal notranslate"><span class="pre">searx-admin</span></code> acts as a supervisor for searx, we have decided to
implement it as a standalone tool instead of part of searx. Another reason for
making it a standalone tool is that the codebase and dependencies of searx
should not grow because of a fully optional feature, which does not affect
existing instances.</p>
<div class="section" id="acknowledgements">
<h2>Acknowledgements<a class="headerlink" href="#acknowledgements" title="Permalink to this headline"></a></h2>
<p>This development was sponsored by <a class="reference external" href="https://nlnet.nl/">NLnet Foundation</a>.</p>
@ -74,27 +83,57 @@ which does not affect existing instances.</p>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper"><div class="sidebar_container body">
<h1>Searx</h1>
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/searx_logo_small.png" alt="Logo"/>
</a></p>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/asciimoo/searx">Source</a>
<li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a>
<li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a>
<li><a href="https://twitter.com/Searx_engine">Twitter</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../index.html">Home</a></li>
<li><a href="https://github.com/asciimoo/searx">Source</a></li>
<li><a href="blog.html">Blog</a></li>
<li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a></li>
<li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a></li>
</ul>
<hr />
<ul>
<li><a href="https://twitter.com/Searx_engine">Twitter</a></li>
<li><a href="../index.html">Overview</a>
<ul>
<li><a href="index.html">Blog</a>
<ul>
<li>Previous: <a href="python3.html" title="previous chapter">Introducing Python 3 support</a>
<li>Next: <a href="intro-offline.html" title="next chapter">Preparation for offline engines</a></ul>
</li>
</ul>
</li>
</ul>
<div 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" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
&copy; Copyright 2015-2019, Adam Tauber, Noémi Ványi.
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2019, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.3.1.
</div>
<script type="text/javascript" src="../_static/version_warning_offset.js"></script>
</body>
</html>

View File

@ -1,80 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Blog &#8212; searx 0.12.0 documentation</title>
<link rel="stylesheet" href="../_static/style.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '0.12.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link media="only screen and (max-device-width: 480px)" href="../_static/small_flask.css" type= "text/css" rel="stylesheet" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
</head>
<body>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="blog">
<h1>Blog<a class="headerlink" href="#blog" title="Permalink to this headline"></a></h1>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="python3.html">Introducing Python3 support</a></li>
<li class="toctree-l1"><a class="reference internal" href="admin.html">Searx admin interface: manage your instance from your browser</a></li>
<li class="toctree-l1"><a class="reference internal" href="intro-offline.html">Preparation for offline engines</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper"><div class="sidebar_container body">
<h1>Searx</h1>
<ul>
<li><a href="../index.html">Home</a></li>
<li><a href="https://github.com/asciimoo/searx">Source</a></li>
<li><a href="#">Blog</a></li>
<li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a></li>
<li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a></li>
</ul>
<hr />
<ul>
<li><a href="https://twitter.com/Searx_engine">Twitter</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
&copy; Copyright 2015-2019, Adam Tauber, Noémi Ványi.
</div>
</body>
</html>

109
blog/index.html Normal file
View File

@ -0,0 +1,109 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Blog &#8212; Searx Documentation (Searx-0.15.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../_static/language_data.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Introducing Python 3 support" href="python3.html" />
<link rel="prev" title="reST primer" href="../dev/reST.html" />
<script>DOCUMENTATION_OPTIONS.URL_ROOT = '../';</script>
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<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="python3.html" title="Introducing Python 3 support"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="../dev/reST.html" title="reST primer"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.15.0.tex)</a> &#187;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="blog">
<h1>Blog<a class="headerlink" href="#blog" title="Permalink to this headline"></a></h1>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="python3.html">Introducing Python 3 support</a></li>
<li class="toctree-l1"><a class="reference internal" href="admin.html">Searx admin interface</a></li>
<li class="toctree-l1"><a class="reference internal" href="intro-offline.html">Preparation for offline engines</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/searx_logo_small.png" alt="Logo"/>
</a></p>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/asciimoo/searx">Source</a>
<li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a>
<li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a>
<li><a href="https://twitter.com/Searx_engine">Twitter</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../index.html">Overview</a>
<ul>
<li>Previous: <a href="../dev/reST.html" title="previous chapter">reST primer</a>
<li>Next: <a href="python3.html" title="next chapter">Introducing Python 3 support</a>
</ul>
</li>
</ul>
<div 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" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2019, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.3.1.
</div>
<script type="text/javascript" src="../_static/version_warning_offset.js"></script>
</body>
</html>

View File

@ -1,38 +1,37 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Preparation for offline engines &#8212; searx 0.12.0 documentation</title>
<link rel="stylesheet" href="../_static/style.css" type="text/css" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Preparation for offline engines &#8212; Searx Documentation (Searx-0.15.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '0.12.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../_static/language_data.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="prev" title="Searx admin interface" href="admin.html" />
<script>DOCUMENTATION_OPTIONS.URL_ROOT = '../';</script>
<link media="only screen and (max-device-width: 480px)" href="../_static/small_flask.css" type= "text/css" rel="stylesheet" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
</head>
<body>
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<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="admin.html" title="Searx admin interface"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.15.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Blog</a> &#187;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
@ -43,13 +42,17 @@
<h1>Preparation for offline engines<a class="headerlink" href="#preparation-for-offline-engines" title="Permalink to this headline"></a></h1>
<div class="section" id="offline-engines">
<h2>Offline engines<a class="headerlink" href="#offline-engines" title="Permalink to this headline"></a></h2>
<p>To extend the functionality of searx, offline engines are going to be introduced. An offline engine is an engine which does not need Internet connection to perform a search and does not use HTTP to communicate.</p>
<p>Offline engines can be configured as online engines, by adding those to the <cite>engines</cite> list of <cite>settings.yml</cite>. Thus, searx finds the engine file and imports it.</p>
<p>To extend the functionality of searx, offline engines are going to be
introduced. An offline engine is an engine which does not need Internet
connection to perform a search and does not use HTTP to communicate.</p>
<p>Offline engines can be configured as online engines, by adding those to the
<cite>engines</cite> list of <a class="reference external" href="https://github.com/asciimoo/searx/blob/master/searx/settings.yml">settings.yml</a>. Thus, searx
finds the engine file and imports it.</p>
<p>Example skeleton for the new engines:</p>
<div class="code python highlight-default"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">subprocess</span> <span class="k">import</span> <span class="n">PIPE</span><span class="p">,</span> <span class="n">Popen</span>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">subprocess</span> <span class="kn">import</span> <span class="n">PIPE</span><span class="p">,</span> <span class="n">Popen</span>
<span class="n">categories</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;general&#39;</span><span class="p">]</span>
<span class="n">offline</span> <span class="o">=</span> <span class="kc">True</span>
<span class="n">offline</span> <span class="o">=</span> <span class="bp">True</span>
<span class="k">def</span> <span class="nf">init</span><span class="p">(</span><span class="n">settings</span><span class="p">):</span>
<span class="k">pass</span>
@ -74,9 +77,16 @@
</div>
<div class="section" id="development-progress">
<h2>Development progress<a class="headerlink" href="#development-progress" title="Permalink to this headline"></a></h2>
<p>First, a proposal has been created as a Github issue. Then it was moved to the wiki as a design document. You can read it here: <a class="reference external" href="https://github.com/asciimoo/searx/wiki/Offline-engines">https://github.com/asciimoo/searx/wiki/Offline-engines</a></p>
<p>In this development step, searx core was prepared to accept and perform offline searches. Offline search requests are scheduled together with regular offline requests.</p>
<p>As offline searches can return arbitrary results depending on the engine, the current result templates were insufficient to present such results. Thus, a new template is introduced which is caplable of presenting arbitrary key value pairs as a table. You can check out the pull request for more details: <a class="reference external" href="https://github.com/asciimoo/searx/pull/1700">https://github.com/asciimoo/searx/pull/1700</a></p>
<p>First, a proposal has been created as a Github issue. Then it was moved to the
wiki as a design document. You can read it here: <a class="reference external" href="https://github.com/asciimoo/searx/wiki/Offline-engines"> Offline-engines</a>.</p>
<p>In this development step, searx core was prepared to accept and perform offline
searches. Offline search requests are scheduled together with regular offline
requests.</p>
<p>As offline searches can return arbitrary results depending on the engine, the
current result templates were insufficient to present such results. Thus, a new
template is introduced which is caplable of presenting arbitrary key value pairs
as a table. You can check out the pull request for more details see
<a class="reference external" href="https://github.com/asciimoo/searx/pull/1700">PR 1700</a>.</p>
</div>
<div class="section" id="next-steps">
<h2>Next steps<a class="headerlink" href="#next-steps" title="Permalink to this headline"></a></h2>
@ -96,27 +106,57 @@
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper"><div class="sidebar_container body">
<h1>Searx</h1>
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/searx_logo_small.png" alt="Logo"/>
</a></p>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/asciimoo/searx">Source</a>
<li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a>
<li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a>
<li><a href="https://twitter.com/Searx_engine">Twitter</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../index.html">Home</a></li>
<li><a href="https://github.com/asciimoo/searx">Source</a></li>
<li><a href="blog.html">Blog</a></li>
<li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a></li>
<li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a></li>
</ul>
<hr />
<ul>
<li><a href="https://twitter.com/Searx_engine">Twitter</a></li>
<li><a href="../index.html">Overview</a>
<ul>
<li><a href="index.html">Blog</a>
<ul>
<li>Previous: <a href="admin.html" title="previous chapter">Searx admin interface</a>
</ul>
</li>
</ul>
</li>
</ul>
<div 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" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
&copy; Copyright 2015-2019, Adam Tauber, Noémi Ványi.
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2019, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.3.1.
</div>
<script type="text/javascript" src="../_static/version_warning_offset.js"></script>
</body>
</html>

View File

@ -1,75 +1,89 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Introducing Python3 support &#8212; searx 0.12.0 documentation</title>
<link rel="stylesheet" href="../_static/style.css" type="text/css" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Introducing Python 3 support &#8212; Searx Documentation (Searx-0.15.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '0.12.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../_static/language_data.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Searx admin interface" href="admin.html" />
<link rel="prev" title="Blog" href="index.html" />
<script>DOCUMENTATION_OPTIONS.URL_ROOT = '../';</script>
<link media="only screen and (max-device-width: 480px)" href="../_static/small_flask.css" type= "text/css" rel="stylesheet" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
</head>
<body>
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<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="admin.html" title="Searx admin interface"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="index.html" title="Blog"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.15.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Blog</a> &#187;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="introducing-python3-support">
<h1>Introducing Python3 support<a class="headerlink" href="#introducing-python3-support" title="Permalink to this headline"></a></h1>
<p>As most operation systems are coming with Python3 installed by default. So it is time for searx to support Python3. But dont worry support of Python2.7 wont be dropped.</p>
<div class="section" id="introducing-python-3-support">
<h1>Introducing Python 3 support<a class="headerlink" href="#introducing-python-3-support" title="Permalink to this headline"></a></h1>
<div class="sidebar">
<p class="sidebar-title">Python 2.7 to 3 upgrade</p>
<p>This chapter exists of historical reasons. Python 2.7 release schedule ends
(<a class="reference external" href="https://pythonclock.org/">Python 2.7 clock</a>) after 11 years Python 3 exists</p>
</div>
<p>As most operation systems are coming with Python3 installed by default. So it is
time for searx to support Python3. But dont worry support of Python2.7 wont be
dropped.</p>
<a class="reference internal image-reference" href="../_images/searxpy3.png"><img alt="hurray" class="align-center" src="../_images/searxpy3.png" style="width: 510.5px; height: 116.0px;" /></a>
<div class="section" id="how-to-run-searx-using-python3">
<h2>How to run searx using Python3<a class="headerlink" href="#how-to-run-searx-using-python3" title="Permalink to this headline"></a></h2>
<p>Please make sure that you run at least Python3.5.</p>
<p>To run searx, first a Python3 virtualenv should be created. After entering the virtualenv,
dependencies must be installed. Then run searx with python3 instead of the usual python command.</p>
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">virtualenv</span> <span class="o">-</span><span class="n">p</span> <span class="n">python3</span> <span class="n">venv3</span>
<span class="n">source</span> <span class="n">venv3</span><span class="o">/</span><span class="nb">bin</span><span class="o">/</span><span class="n">activate</span>
<span class="n">pip3</span> <span class="n">install</span> <span class="o">-</span><span class="n">r</span> <span class="n">requirements</span><span class="o">.</span><span class="n">txt</span>
<span class="n">python3</span> <span class="n">searx</span><span class="o">/</span><span class="n">webapp</span><span class="o">.</span><span class="n">py</span>
<div class="section" id="how-to-run-searx-using-python-3">
<h2>How to run searx using Python 3<a class="headerlink" href="#how-to-run-searx-using-python-3" title="Permalink to this headline"></a></h2>
<p>Please make sure that you run at least Python 3.5.</p>
<p>To run searx, first a Python3 virtualenv should be created. After entering the
virtualenv, dependencies must be installed. Then run searx with python3 instead
of the usual python command.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>virtualenv -p python3 venv3
<span class="nb">source</span> venv3/bin/activate
pip3 install -r requirements.txt
python3 searx/webapp.py
</pre></div>
</div>
<p>If you want to run searx using Python2.7, you dont have to do anything differently as before.</p>
<p>If you want to run searx using Python2.7, you dont have to do anything
differently as before.</p>
</div>
<div class="section" id="fun-facts">
<h2>Fun facts<a class="headerlink" href="#fun-facts" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li>115 files were changed when implementing the support for both Python versions.</li>
<li>All of the dependencies was compatible except for the robotframework used for browser tests. Thus, these tests were migrated to splinter. So from now on both versions are being tested on Travis and can be tested locally.</li>
<li><p>115 files were changed when implementing the support for both Python versions.</p></li>
<li><p>All of the dependencies was compatible except for the robotframework used for
browser tests. Thus, these tests were migrated to splinter. So from now on
both versions are being tested on Travis and can be tested locally.</p></li>
</ul>
</div>
<div class="section" id="if-you-found-bugs">
<h2>If you found bugs<a class="headerlink" href="#if-you-found-bugs" title="Permalink to this headline"></a></h2>
<p>…please open an issue on <a class="reference external" href="https://github.com/asciimoo/searx/issues">GitHub</a>. Make sure that you mention your Python version in your issue,
so we can investigate it properly.</p>
<h2>If you found bugs<a class="headerlink" href="#if-you-found-bugs" title="Permalink to this headline"></a></h2>
<p>Please open an issue on <a class="reference external" href="https://github.com/asciimoo/searx/issues">GitHub</a>. Make sure that you mention your Python
version in your issue, so we can investigate it properly.</p>
</div>
<div class="section" id="acknowledgement">
<h2>Acknowledgement<a class="headerlink" href="#acknowledgement" title="Permalink to this headline"></a></h2>
<div class="section" id="acknowledgment">
<h2>Acknowledgment<a class="headerlink" href="#acknowledgment" title="Permalink to this headline"></a></h2>
<p>This development was sponsored by <a class="reference external" href="https://nlnet.nl/">NLnet Foundation</a>.</p>
<div class="line-block">
<div class="line">Happy hacking.</div>
@ -82,27 +96,57 @@ so we can investigate it properly.</p>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper"><div class="sidebar_container body">
<h1>Searx</h1>
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/searx_logo_small.png" alt="Logo"/>
</a></p>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/asciimoo/searx">Source</a>
<li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a>
<li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a>
<li><a href="https://twitter.com/Searx_engine">Twitter</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../index.html">Home</a></li>
<li><a href="https://github.com/asciimoo/searx">Source</a></li>
<li><a href="blog.html">Blog</a></li>
<li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a></li>
<li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a></li>
</ul>
<hr />
<ul>
<li><a href="https://twitter.com/Searx_engine">Twitter</a></li>
<li><a href="../index.html">Overview</a>
<ul>
<li><a href="index.html">Blog</a>
<ul>
<li>Previous: <a href="index.html" title="previous chapter">Blog</a>
<li>Next: <a href="admin.html" title="next chapter">Searx admin interface</a></ul>
</li>
</ul>
</li>
</ul>
<div 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" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
&copy; Copyright 2015-2019, Adam Tauber, Noémi Ványi.
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2019, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.3.1.
</div>
<script type="text/javascript" src="../_static/version_warning_offset.js"></script>
</body>
</html>

View File

@ -1,40 +1,41 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>How to contribute &#8212; searx 0.12.0 documentation</title>
<link rel="stylesheet" href="../_static/style.css" type="text/css" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>How to contribute &#8212; Searx Documentation (Searx-0.15.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '0.12.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../_static/language_data.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Engine overview" href="engine_overview.html" />
<link rel="prev" title="Development Quickstart" href="quickstart.html" />
<script>DOCUMENTATION_OPTIONS.URL_ROOT = '../';</script>
<link media="only screen and (max-device-width: 480px)" href="../_static/small_flask.css" type= "text/css" rel="stylesheet" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
</head>
<body>
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<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="engine_overview.html" title="Engine overview"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="quickstart.html" title="Development Quickstart"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.15.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Developer documentation</a> &#187;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
@ -42,84 +43,145 @@
<div class="body" role="main">
<div class="section" id="how-to-contribute">
<h1>How to contribute<a class="headerlink" href="#how-to-contribute" title="Permalink to this headline"></a></h1>
<span id="id1"></span><h1>How to contribute<a class="headerlink" href="#how-to-contribute" title="Permalink to this headline"></a></h1>
<div class="section" id="prime-directives-privacy-hackability">
<h2>Prime directives: Privacy, Hackability<a class="headerlink" href="#prime-directives-privacy-hackability" title="Permalink to this headline"></a></h2>
<p>Searx has two prime directives, privacy-by-design and hackability. The
<p>Searx has two prime directives, <strong>privacy-by-design and hackability</strong> . The
hackability comes in three levels:</p>
<ul class="simple">
<li>support of search engines</li>
<li>plugins to alter search behaviour</li>
<li>hacking searx itself</li>
<li><p>support of search engines</p></li>
<li><p>plugins to alter search behaviour</p></li>
<li><p>hacking searx itself</p></li>
</ul>
<p>Note the lack of “world domination” among the directives.
Searx has no intention of wide mass-adoption, rounded
corners, etc. The prime directive “privacy” deserves a separate
chapter, as its quite uncommon unfortunately.</p>
<p>Note the lack of “world domination” among the directives. Searx has no
intention of wide mass-adoption, rounded corners, etc. The prime directive
“privacy” deserves a separate chapter, as its quite uncommon unfortunately.</p>
<div class="section" id="privacy-by-design">
<h3>Privacy-by-design<a class="headerlink" href="#privacy-by-design" title="Permalink to this headline"></a></h3>
<p>Searx was born out of the need for a privacy-respecting search tool
which can be extended easily to maximize both its search and its
privacy protecting capabilities.</p>
<p>A few widely used features work differently or turned off by default or not implemented
at all as a consequence of privacy-by-design.</p>
<p>If a feature reduces the privacy preserving aspects of searx, it
should be switched off by default or should not implemented at all.
There are plenty of search engines already providing such features.
If a feature reduces the protection of searx, users must be
informed about the effect of choosing to enable it. Features
that protect privacy but differ from the expectations of the
user should also be explained.</p>
<p>Also, if you think that something works weird with searx,
its might be because of the tool you use is designed in a way to interfere with
the privacy respect. Submitting a bugreport to the vendor of the tool that
misbehaves might be a good feedback to reconsider the disrespect to
its customers (e.g. GET vs POST requests in various browsers).</p>
<p>Remember the other prime directive of searx is to be hackable, so if the
above privacy concerns do not fancy you, simply fork it.</p>
<p>Happy hacking.</p>
<p>Searx was born out of the need for a <strong>privacy-respecting</strong> search tool which
can be extended easily to maximize both, its search and its privacy protecting
capabilities.</p>
<p>A few widely used features work differently or turned off by default or not
implemented at all <strong>as a consequence of privacy-by-design</strong>.</p>
<p>If a feature reduces the privacy preserving aspects of searx, it should be
switched off by default or should not implemented at all. There are plenty of
search engines already providing such features. If a feature reduces the
protection of searx, users must be informed about the effect of choosing to
enable it. Features that protect privacy but differ from the expectations of
the user should also be explained.</p>
<p>Also, if you think that something works weird with searx, its might be because
of the tool you use is designed in a way to interfere with the privacy respect.
Submitting a bugreport to the vendor of the tool that misbehaves might be a good
feedback to reconsider the disrespect to its customers (e.g. <code class="docutils literal notranslate"><span class="pre">GET</span></code> vs <code class="docutils literal notranslate"><span class="pre">POST</span></code>
requests in various browsers).</p>
<p>Remember the other prime directive of searx is to be hackable, so if the above
privacy concerns do not fancy you, simply fork it.</p>
<blockquote>
<div><p><em>Happy hacking.</em></p>
</div></blockquote>
</div>
</div>
<div class="section" id="code">
<h2>Code<a class="headerlink" href="#code" title="Permalink to this headline"></a></h2>
<p>In order to submit a patch, please follow the steps below:</p>
<div class="sidebar">
<p class="sidebar-title">Create good commits!</p>
<ul class="simple">
<li>Follow coding conventions.<ul>
<li>PEP8 standards apply, except the convention of line length</li>
<li>Maximum line length is 120 characters</li>
<li><p><a class="reference external" href="https://wiki.openstack.org/wiki/GitCommitMessages#Structural_split_of_changes">Structural split of changes</a></p></li>
<li><p><a class="reference external" href="https://www.conventionalcommits.org/">Conventional Commits</a></p></li>
<li><p><a class="reference external" href="https://wiki.openstack.org/wiki/GitCommitMessages">Git Commit Good Practice</a></p></li>
<li><p>some like to use: <a class="reference external" href="https://gitmoji.carloscuesta.me/">gitmoji</a></p></li>
<li><p>not yet active: <a class="reference external" href="https://github.com/zeke/semantic-pull-requests">Semantic PR</a></p></li>
</ul>
</div>
<p>In order to submit a patch, please follow the steps below:</p>
<ul>
<li><p>Follow coding conventions.</p>
<ul class="simple">
<li><p><a class="reference external" href="https://www.python.org/dev/peps/pep-0008/">PEP8</a> standards apply, except the convention of line length</p></li>
<li><p>Maximum line length is 120 characters</p></li>
</ul>
</li>
<li>Check if your code breaks existing tests. If so, update the tests or fix your code.</li>
<li>If your code can be unit-tested, add unit tests.</li>
<li>Add yourself to the AUTHORS file.</li>
<li>Create a pull request.</li>
<li><p>The cardinal rule for creating good commits is to ensure there is only one
<em>logical change</em> per commit / read <a class="reference external" href="https://wiki.openstack.org/wiki/GitCommitMessages#Structural_split_of_changes">Structural split of changes</a></p></li>
<li><p>Check if your code breaks existing tests. If so, update the tests or fix your
code.</p></li>
<li><p>If your code can be unit-tested, add unit tests.</p></li>
<li><p>Add yourself to the <a class="reference external" href="https://github.com/asciimoo/searx/blob/master/AUTHORS.rst">git://AUTHORS.rst</a> file.</p></li>
<li><p>Choose meaning full commit messages, read <a class="reference external" href="https://www.conventionalcommits.org/">Conventional Commits</a></p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>&lt;type&gt;[optional scope]: &lt;description&gt;
[optional body]
[optional footer(s)]
</pre></div>
</div>
</li>
<li><p>Create a pull request.</p></li>
</ul>
<p>For more help on getting started with searx development, see <a class="reference internal" href="quickstart.html#devquickstart"><span class="std std-ref">Development Quickstart</span></a>.</p>
</div>
<div class="section" id="translation">
<h2>Translation<a class="headerlink" href="#translation" title="Permalink to this headline"></a></h2>
<p>Translation currently takes place on
<a class="reference external" href="https://transifex.com/projects/p/searx">transifex</a>.</p>
<p><strong>Please, do not update translation files in the repo.</strong></p>
<p>Translation currently takes place on <a class="reference internal" href="translation.html#translation"><span class="std std-ref">transifex</span></a>.</p>
<div class="admonition caution">
<p class="admonition-title">Caution</p>
<p>Please, do not update translation files in the repo.</p>
</div>
</div>
<div class="section" id="documentation">
<h2>Documentation<a class="headerlink" href="#documentation" title="Permalink to this headline"></a></h2>
<p>The documentation is built using Sphinx. So in order to be able to generate the required
files, you have to install it on your system. (It can be installed easily using pip.)</p>
<ol class="arabic simple">
<li>Checkout the gh-pages branch.</li>
<li>Edit the rst file you wish to update. Or create a new rst file and place it under the appropriate folder.</li>
<li>Build the documentation using Sphinx.</li>
<li>Add the updated and created files of these extension:<ul>
<li>.rst</li>
<li>.html</li>
<li>.txt</li>
</ul>
</li>
</ol>
<ol class="arabic simple" start="6">
<li>Create a pull request.</li>
</ol>
<span id="contrib-docs"></span><h2>Documentation<a class="headerlink" href="#documentation" title="Permalink to this headline"></a></h2>
<div class="sidebar">
<p class="sidebar-title">The reST sources</p>
<p>has been moved from <code class="docutils literal notranslate"><span class="pre">gh-branch</span></code> into <code class="docutils literal notranslate"><span class="pre">master</span></code> (<a class="reference external" href="https://github.com/asciimoo/searx/blob/master/docs">git://docs</a>).</p>
</div>
<p>The documentation is built using <a class="reference external" href="http://www.sphinx-doc.org">Sphinx</a>. So in order to be able to generate
the required files, you have to install it on your system. Much easier, use
our <a class="reference internal" href="makefile.html#makefile"><span class="std std-ref">Makefile Targets</span></a>.</p>
<p>Here is an example which makes a complete rebuild:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ make docs-clean docs
...
The HTML pages are in dist/docs.
</pre></div>
</div>
<div class="section" id="live-build">
<span id="make-docs-live"></span><h3>live build<a class="headerlink" href="#live-build" title="Permalink to this headline"></a></h3>
<div class="sidebar">
<p class="sidebar-title">docs-clean</p>
<p>It is recommended to assert a complete rebuild before deploying (use
<code class="docutils literal notranslate"><span class="pre">docs-clean</span></code>).</p>
</div>
<p>Live build is like WYSIWYG. If you want to edit the documentation, its
recommended to use. The Makefile target <code class="docutils literal notranslate"><span class="pre">docs-live</span></code> builds the docs, opens
URL in your favorite browser and rebuilds every time a reST file has been
changed.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ make docs-live
...
The HTML pages are in dist/docs.
... Serving on http://0.0.0.0:8080
... Start watching changes
</pre></div>
</div>
</div>
<div class="section" id="deploy-on-github-io">
<span id="id2"></span><h3>deploy on github.io<a class="headerlink" href="#deploy-on-github-io" title="Permalink to this headline"></a></h3>
<p>To deploy documentation at <a class="reference external" href="https://asciimoo.github.io/searx/.">github.io</a> use Makefile target
<a class="reference internal" href="makefile.html#make-gh-pages"><span class="std std-ref">make gh-pages</span></a>, which will builds the documentation, clones searx into a sub
folder <code class="docutils literal notranslate"><span class="pre">gh-pages</span></code>, cleans it, copies the doc build into and runs all the
needed git add, commit and push:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ make docs-clean gh-pages
...
SPHINX docs --&gt; file://&lt;...&gt;/dist/docs
The HTML pages are in dist/docs.
...
Cloning into <span class="s1">&#39;gh-pages&#39;</span> ...
...
<span class="nb">cd</span> gh-pages<span class="p">;</span> git checkout gh-pages &gt;/dev/null
Switched to a new branch <span class="s1">&#39;gh-pages&#39;</span>
...
doc available at --&gt; https://asciimoo.github.io/searx
</pre></div>
</div>
</div>
</div>
</div>
@ -127,27 +189,57 @@ files, you have to install it on your system. (It can be installed easily using
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper"><div class="sidebar_container body">
<h1>Searx</h1>
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/searx_logo_small.png" alt="Logo"/>
</a></p>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/asciimoo/searx">Source</a>
<li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a>
<li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a>
<li><a href="https://twitter.com/Searx_engine">Twitter</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../index.html">Home</a></li>
<li><a href="https://github.com/asciimoo/searx">Source</a></li>
<li><a href="../blog/blog.html">Blog</a></li>
<li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a></li>
<li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a></li>
</ul>
<hr />
<ul>
<li><a href="https://twitter.com/Searx_engine">Twitter</a></li>
<li><a href="../index.html">Overview</a>
<ul>
<li><a href="index.html">Developer documentation</a>
<ul>
<li>Previous: <a href="quickstart.html" title="previous chapter">Development Quickstart</a>
<li>Next: <a href="engine_overview.html" title="next chapter">Engine overview</a></ul>
</li>
</ul>
</li>
</ul>
<div 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" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
&copy; Copyright 2015-2019, Adam Tauber, Noémi Ványi.
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2019, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.3.1.
</div>
<script type="text/javascript" src="../_static/version_warning_offset.js"></script>
</body>
</html>

View File

@ -1,40 +1,41 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Engine overview &#8212; searx 0.12.0 documentation</title>
<link rel="stylesheet" href="../_static/style.css" type="text/css" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Engine overview &#8212; Searx Documentation (Searx-0.15.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '0.12.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../_static/language_data.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Search API" href="search_api.html" />
<link rel="prev" title="How to contribute" href="contribution_guide.html" />
<script>DOCUMENTATION_OPTIONS.URL_ROOT = '../';</script>
<link media="only screen and (max-device-width: 480px)" href="../_static/small_flask.css" type= "text/css" rel="stylesheet" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
</head>
<body>
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<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="search_api.html" title="Search API"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="contribution_guide.html" title="How to contribute"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.15.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Developer documentation</a> &#187;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
@ -42,36 +43,39 @@
<div class="body" role="main">
<div class="section" id="engine-overview">
<h1><a class="toc-backref" href="#id2">Engine overview</a><a class="headerlink" href="#engine-overview" title="Permalink to this headline"></a></h1>
<p>searx is a <a class="reference external" href="https://en.wikipedia.org/wiki/Metasearch_engine">metasearch-engine</a>,
so it uses different search engines to provide better results.</p>
<p>Because there is no general search API which could be used for every
search engine, an adapter has to be built between searx and the
external search engines. Adapters are stored under the folder
<a class="reference external" href="https://github.com/asciimoo/searx/tree/master/searx/engines">searx/engines</a>.</p>
<span id="engines-dev"></span><h1><a class="toc-backref" href="#id3">Engine overview</a><a class="headerlink" href="#engine-overview" title="Permalink to this headline"></a></h1>
<p>searx is a <a class="reference external" href="https://en.wikipedia.org/wiki/Metasearch_engine">metasearch-engine</a>, so it uses different search engines to provide
better results.</p>
<p>Because there is no general search API which could be used for every search
engine, an adapter has to be built between searx and the external search
engines. Adapters are stored under the folder <a class="reference external" href="https://github.com/asciimoo/searx/blob/master/searx/engines">git://searx/engines</a>.</p>
<div class="contents topic" id="contents">
<p class="topic-title first">Contents</p>
<ul class="simple">
<li><a class="reference internal" href="#engine-overview" id="id2">Engine overview</a><ul>
<li><a class="reference internal" href="#general-engine-configuration" id="id3">general engine configuration</a><ul>
<li><a class="reference internal" href="#engine-file" id="id4">engine file</a></li>
<li><a class="reference internal" href="#settings-yml" id="id5">settings.yml</a></li>
<li><a class="reference internal" href="#overrides" id="id6">overrides</a></li>
<li><a class="reference internal" href="#example-code" id="id7">example code</a></li>
<li><p><a class="reference internal" href="#engine-overview" id="id3">Engine overview</a></p>
<ul>
<li><p><a class="reference internal" href="#general-engine-configuration" id="id4">general engine configuration</a></p>
<ul>
<li><p><a class="reference internal" href="#engine-file" id="id5">engine file</a></p></li>
<li><p><a class="reference internal" href="#settings-yml" id="id6">settings.yml</a></p></li>
<li><p><a class="reference internal" href="#overrides" id="id7">overrides</a></p></li>
<li><p><a class="reference internal" href="#example-code" id="id8">example code</a></p></li>
</ul>
</li>
<li><a class="reference internal" href="#making-a-request" id="id8">making a request</a><ul>
<li><a class="reference internal" href="#passed-arguments" id="id9">passed arguments</a></li>
<li><a class="reference internal" href="#parsed-arguments" id="id10">parsed arguments</a></li>
<li><a class="reference internal" href="#id1" id="id11">example code</a></li>
<li><p><a class="reference internal" href="#making-a-request" id="id9">making a request</a></p>
<ul>
<li><p><a class="reference internal" href="#passed-arguments" id="id10">passed arguments</a></p></li>
<li><p><a class="reference internal" href="#parsed-arguments" id="id11">parsed arguments</a></p></li>
<li><p><a class="reference internal" href="#id2" id="id12">example code</a></p></li>
</ul>
</li>
<li><a class="reference internal" href="#returned-results" id="id12">returned results</a><ul>
<li><a class="reference internal" href="#default" id="id13">default</a></li>
<li><a class="reference internal" href="#images" id="id14">images</a></li>
<li><a class="reference internal" href="#videos" id="id15">videos</a></li>
<li><a class="reference internal" href="#torrent" id="id16">torrent</a></li>
<li><a class="reference internal" href="#map" id="id17">map</a></li>
<li><p><a class="reference internal" href="#returned-results" id="id13">returned results</a></p>
<ul>
<li><p><a class="reference internal" href="#default" id="id14">default</a></p></li>
<li><p><a class="reference internal" href="#images" id="id15">images</a></p></li>
<li><p><a class="reference internal" href="#videos" id="id16">videos</a></p></li>
<li><p><a class="reference internal" href="#torrent" id="id17">torrent</a></p></li>
<li><p><a class="reference internal" href="#map" id="id18">map</a></p></li>
</ul>
</li>
</ul>
@ -79,253 +83,255 @@ external search engines. Adapters are stored under the folder
</ul>
</div>
<div class="section" id="general-engine-configuration">
<h2><a class="toc-backref" href="#id3">general engine configuration</a><a class="headerlink" href="#general-engine-configuration" title="Permalink to this headline"></a></h2>
<h2><a class="toc-backref" href="#id4">general engine configuration</a><a class="headerlink" href="#general-engine-configuration" title="Permalink to this headline"></a></h2>
<p>It is required to tell searx the type of results the engine provides. The
arguments can be set in the engine file or in the settings file
(normally <code class="docutils literal"><span class="pre">settings.yml</span></code>). The arguments in the settings file override
(normally <code class="docutils literal notranslate"><span class="pre">settings.yml</span></code>). The arguments in the settings file override
the ones in the engine file.</p>
<p>It does not matter if an option is stored in the engine file or in the
settings. However, the standard way is the following:</p>
settings. However, the standard way is the following:</p>
<div class="section" id="engine-file">
<h3><a class="toc-backref" href="#id4">engine file</a><a class="headerlink" href="#engine-file" title="Permalink to this headline"></a></h3>
<table border="1" class="docutils">
<span id="id1"></span><h3><a class="toc-backref" href="#id5">engine file</a><a class="headerlink" href="#engine-file" title="Permalink to this headline"></a></h3>
<table class="docutils align-default">
<colgroup>
<col width="30%" />
<col width="15%" />
<col width="55%" />
<col style="width: 30%" />
<col style="width: 14%" />
<col style="width: 56%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">argument</th>
<th class="head">type</th>
<th class="head">information</th>
<thead>
<tr class="row-odd"><th class="head"><p>argument</p></th>
<th class="head"><p>type</p></th>
<th class="head"><p>information</p></th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>categories</td>
<td>list</td>
<td>pages, in which the engine is working</td>
<tbody>
<tr class="row-even"><td><p>categories</p></td>
<td><p>list</p></td>
<td><p>pages, in which the engine is working</p></td>
</tr>
<tr class="row-odd"><td>paging</td>
<td>boolean</td>
<td>support multible pages</td>
<tr class="row-odd"><td><p>paging</p></td>
<td><p>boolean</p></td>
<td><p>support multible pages</p></td>
</tr>
<tr class="row-even"><td>language_support</td>
<td>boolean</td>
<td>support language choosing</td>
<tr class="row-even"><td><p>language_support</p></td>
<td><p>boolean</p></td>
<td><p>support language choosing</p></td>
</tr>
<tr class="row-odd"><td>time_range_support</td>
<td>boolean</td>
<td>support search time range</td>
<tr class="row-odd"><td><p>time_range_support</p></td>
<td><p>boolean</p></td>
<td><p>support search time range</p></td>
</tr>
<tr class="row-even"><td>offline</td>
<td>boolean</td>
<td>engine runs offline</td>
<tr class="row-even"><td><p>offline</p></td>
<td><p>boolean</p></td>
<td><p>engine runs offline</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="settings-yml">
<h3><a class="toc-backref" href="#id5">settings.yml</a><a class="headerlink" href="#settings-yml" title="Permalink to this headline"></a></h3>
<table border="1" class="docutils">
<span id="engine-settings"></span><h3><a class="toc-backref" href="#id6">settings.yml</a><a class="headerlink" href="#settings-yml" title="Permalink to this headline"></a></h3>
<table class="docutils align-default">
<colgroup>
<col width="17%" />
<col width="14%" />
<col width="68%" />
<col style="width: 30%" />
<col style="width: 14%" />
<col style="width: 56%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">argument</th>
<th class="head">type</th>
<th class="head">information</th>
<thead>
<tr class="row-odd"><th class="head"><p>argument</p></th>
<th class="head"><p>type</p></th>
<th class="head"><p>information</p></th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>name</td>
<td>string</td>
<td>name of search-engine</td>
<tbody>
<tr class="row-even"><td><p>name</p></td>
<td><p>string</p></td>
<td><p>name of search-engine</p></td>
</tr>
<tr class="row-odd"><td>engine</td>
<td>string</td>
<td>name of searx-engine (filename without .py)</td>
<tr class="row-odd"><td><p>engine</p></td>
<td><p>string</p></td>
<td><p>name of searx-engine
(filename without <code class="docutils literal notranslate"><span class="pre">.py</span></code>)</p></td>
</tr>
<tr class="row-even"><td>shortcut</td>
<td>string</td>
<td>shortcut of search-engine</td>
<tr class="row-even"><td><p>shortcut</p></td>
<td><p>string</p></td>
<td><p>shortcut of search-engine</p></td>
</tr>
<tr class="row-odd"><td>timeout</td>
<td>string</td>
<td>specific timeout for search-engine</td>
<tr class="row-odd"><td><p>timeout</p></td>
<td><p>string</p></td>
<td><p>specific timeout for search-engine</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="overrides">
<h3><a class="toc-backref" href="#id6">overrides</a><a class="headerlink" href="#overrides" title="Permalink to this headline"></a></h3>
<p>A few of the options have default values in the engine, but are
often overwritten by the settings. If <code class="docutils literal"><span class="pre">None</span></code> is assigned to an option
in the engine file, it has to be redefined in the settings,
otherwise searx will not start with that engine.</p>
<p>The naming of overrides is arbitrary. But the recommended
overrides are the following:</p>
<table border="1" class="docutils">
<h3><a class="toc-backref" href="#id7">overrides</a><a class="headerlink" href="#overrides" title="Permalink to this headline"></a></h3>
<p>A few of the options have default values in the engine, but are often
overwritten by the settings. If <code class="docutils literal notranslate"><span class="pre">None</span></code> is assigned to an option in the engine
file, it has to be redefined in the settings, otherwise searx will not start
with that engine.</p>
<p>The naming of overrides is arbitrary. But the recommended overrides are the
following:</p>
<table class="docutils align-default">
<colgroup>
<col width="24%" />
<col width="10%" />
<col width="66%" />
<col style="width: 30%" />
<col style="width: 14%" />
<col style="width: 56%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">argument</th>
<th class="head">type</th>
<th class="head">information</th>
<thead>
<tr class="row-odd"><th class="head"><p>argument</p></th>
<th class="head"><p>type</p></th>
<th class="head"><p>information</p></th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>base_url</td>
<td>string</td>
<td>base-url, can be overwritten to use same engine on other URL</td>
<tbody>
<tr class="row-even"><td><p>base_url</p></td>
<td><p>string</p></td>
<td><p>base-url, can be overwritten to use same
engine on other URL</p></td>
</tr>
<tr class="row-odd"><td>number_of_results</td>
<td>int</td>
<td>maximum number of results per request</td>
<tr class="row-odd"><td><p>number_of_results</p></td>
<td><p>int</p></td>
<td><p>maximum number of results per request</p></td>
</tr>
<tr class="row-even"><td>language</td>
<td>string</td>
<td>ISO code of language and country like en_US</td>
<tr class="row-even"><td><p>language</p></td>
<td><p>string</p></td>
<td><p>ISO code of language and country like en_US</p></td>
</tr>
<tr class="row-odd"><td>api_key</td>
<td>string</td>
<td>api-key if required by engine</td>
<tr class="row-odd"><td><p>api_key</p></td>
<td><p>string</p></td>
<td><p>api-key if required by engine</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="example-code">
<h3><a class="toc-backref" href="#id7">example code</a><a class="headerlink" href="#example-code" title="Permalink to this headline"></a></h3>
<div class="code python highlight-default"><div class="highlight"><pre><span></span><span class="c1"># engine dependent config</span>
<h3><a class="toc-backref" href="#id8">example code</a><a class="headerlink" href="#example-code" title="Permalink to this headline"></a></h3>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># engine dependent config</span>
<span class="n">categories</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;general&#39;</span><span class="p">]</span>
<span class="n">paging</span> <span class="o">=</span> <span class="kc">True</span>
<span class="n">language_support</span> <span class="o">=</span> <span class="kc">True</span>
<span class="n">paging</span> <span class="o">=</span> <span class="bp">True</span>
<span class="n">language_support</span> <span class="o">=</span> <span class="bp">True</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="making-a-request">
<h2><a class="toc-backref" href="#id8">making a request</a><a class="headerlink" href="#making-a-request" title="Permalink to this headline"></a></h2>
<p>To perform a search an URL have to be specified. In addition to
specifying an URL, arguments can be passed to the query.</p>
<h2><a class="toc-backref" href="#id9">making a request</a><a class="headerlink" href="#making-a-request" title="Permalink to this headline"></a></h2>
<p>To perform a search an URL have to be specified. In addition to specifying an
URL, arguments can be passed to the query.</p>
<div class="section" id="passed-arguments">
<h3><a class="toc-backref" href="#id9">passed arguments</a><a class="headerlink" href="#passed-arguments" title="Permalink to this headline"></a></h3>
<p>These arguments can be used to construct the search query. Furthermore,
<h3><a class="toc-backref" href="#id10">passed arguments</a><a class="headerlink" href="#passed-arguments" title="Permalink to this headline"></a></h3>
<p>These arguments can be used to construct the search query. Furthermore,
parameters with default value can be redefined for special purposes.</p>
<table border="1" class="docutils">
<table class="docutils align-default">
<colgroup>
<col width="21%" />
<col width="11%" />
<col width="68%" />
<col style="width: 21%" />
<col style="width: 11%" />
<col style="width: 68%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">argument</th>
<th class="head">type</th>
<th class="head">default-value, information</th>
<thead>
<tr class="row-odd"><th class="head"><p>argument</p></th>
<th class="head"><p>type</p></th>
<th class="head"><p>default-value, information</p></th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>url</td>
<td>string</td>
<td><code class="docutils literal"><span class="pre">''</span></code></td>
<tbody>
<tr class="row-even"><td><p>url</p></td>
<td><p>string</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">''</span></code></p></td>
</tr>
<tr class="row-odd"><td>method</td>
<td>string</td>
<td><code class="docutils literal"><span class="pre">'GET'</span></code></td>
<tr class="row-odd"><td><p>method</p></td>
<td><p>string</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">'GET'</span></code></p></td>
</tr>
<tr class="row-even"><td>headers</td>
<td>set</td>
<td><code class="docutils literal"><span class="pre">{}</span></code></td>
<tr class="row-even"><td><p>headers</p></td>
<td><p>set</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">{}</span></code></p></td>
</tr>
<tr class="row-odd"><td>data</td>
<td>set</td>
<td><code class="docutils literal"><span class="pre">{}</span></code></td>
<tr class="row-odd"><td><p>data</p></td>
<td><p>set</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">{}</span></code></p></td>
</tr>
<tr class="row-even"><td>cookies</td>
<td>set</td>
<td><code class="docutils literal"><span class="pre">{}</span></code></td>
<tr class="row-even"><td><p>cookies</p></td>
<td><p>set</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">{}</span></code></p></td>
</tr>
<tr class="row-odd"><td>verify</td>
<td>boolean</td>
<td><code class="docutils literal"><span class="pre">True</span></code></td>
<tr class="row-odd"><td><p>verify</p></td>
<td><p>boolean</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">True</span></code></p></td>
</tr>
<tr class="row-even"><td>headers.User-Agent</td>
<td>string</td>
<td>a random User-Agent</td>
<tr class="row-even"><td><p>headers.User-Agent</p></td>
<td><p>string</p></td>
<td><p>a random User-Agent</p></td>
</tr>
<tr class="row-odd"><td>category</td>
<td>string</td>
<td>current category, like <code class="docutils literal"><span class="pre">'general'</span></code></td>
<tr class="row-odd"><td><p>category</p></td>
<td><p>string</p></td>
<td><p>current category, like <code class="docutils literal notranslate"><span class="pre">'general'</span></code></p></td>
</tr>
<tr class="row-even"><td>started</td>
<td>datetime</td>
<td>current date-time</td>
<tr class="row-even"><td><p>started</p></td>
<td><p>datetime</p></td>
<td><p>current date-time</p></td>
</tr>
<tr class="row-odd"><td>pageno</td>
<td>int</td>
<td>current pagenumber</td>
<tr class="row-odd"><td><p>pageno</p></td>
<td><p>int</p></td>
<td><p>current pagenumber</p></td>
</tr>
<tr class="row-even"><td>language</td>
<td>string</td>
<td>specific language code like <code class="docutils literal"><span class="pre">'en_US'</span></code>, or <code class="docutils literal"><span class="pre">'all'</span></code> if unspecified</td>
<tr class="row-even"><td><p>language</p></td>
<td><p>string</p></td>
<td><p>specific language code like <code class="docutils literal notranslate"><span class="pre">'en_US'</span></code>, or <code class="docutils literal notranslate"><span class="pre">'all'</span></code> if unspecified</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="parsed-arguments">
<h3><a class="toc-backref" href="#id10">parsed arguments</a><a class="headerlink" href="#parsed-arguments" title="Permalink to this headline"></a></h3>
<p>The function <code class="docutils literal"><span class="pre">def</span> <span class="pre">request(query,</span> <span class="pre">params):</span></code> always returns the
<code class="docutils literal"><span class="pre">params</span></code> variable. Inside searx, the following paramters can be
used to specify a search request:</p>
<table border="1" class="docutils">
<h3><a class="toc-backref" href="#id11">parsed arguments</a><a class="headerlink" href="#parsed-arguments" title="Permalink to this headline"></a></h3>
<p>The function <code class="docutils literal notranslate"><span class="pre">def</span> <span class="pre">request(query,</span> <span class="pre">params):</span></code> always returns the <code class="docutils literal notranslate"><span class="pre">params</span></code>
variable. Inside searx, the following paramters can be used to specify a search
request:</p>
<table class="docutils align-default">
<colgroup>
<col width="15%" />
<col width="14%" />
<col width="71%" />
<col style="width: 15%" />
<col style="width: 14%" />
<col style="width: 71%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">argument</th>
<th class="head">type</th>
<th class="head">information</th>
<thead>
<tr class="row-odd"><th class="head"><p>argument</p></th>
<th class="head"><p>type</p></th>
<th class="head"><p>information</p></th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>url</td>
<td>string</td>
<td>requested url</td>
<tbody>
<tr class="row-even"><td><p>url</p></td>
<td><p>string</p></td>
<td><p>requested url</p></td>
</tr>
<tr class="row-odd"><td>method</td>
<td>string</td>
<td>HTTP request method</td>
<tr class="row-odd"><td><p>method</p></td>
<td><p>string</p></td>
<td><p>HTTP request method</p></td>
</tr>
<tr class="row-even"><td>headers</td>
<td>set</td>
<td>HTTP header information</td>
<tr class="row-even"><td><p>headers</p></td>
<td><p>set</p></td>
<td><p>HTTP header information</p></td>
</tr>
<tr class="row-odd"><td>data</td>
<td>set</td>
<td>HTTP data information (parsed if <code class="docutils literal"><span class="pre">method</span> <span class="pre">!=</span> <span class="pre">'GET'</span></code>)</td>
<tr class="row-odd"><td><p>data</p></td>
<td><p>set</p></td>
<td><p>HTTP data information (parsed if <code class="docutils literal notranslate"><span class="pre">method</span> <span class="pre">!=</span> <span class="pre">'GET'</span></code>)</p></td>
</tr>
<tr class="row-even"><td>cookies</td>
<td>set</td>
<td>HTTP cookies</td>
<tr class="row-even"><td><p>cookies</p></td>
<td><p>set</p></td>
<td><p>HTTP cookies</p></td>
</tr>
<tr class="row-odd"><td>verify</td>
<td>boolean</td>
<td>Performing SSL-Validity check</td>
<tr class="row-odd"><td><p>verify</p></td>
<td><p>boolean</p></td>
<td><p>Performing SSL-Validity check</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1">
<h3><a class="toc-backref" href="#id11">example code</a><a class="headerlink" href="#id1" title="Permalink to this headline"></a></h3>
<div class="code python highlight-default"><div class="highlight"><pre><span></span><span class="c1"># search-url</span>
<div class="section" id="id2">
<h3><a class="toc-backref" href="#id12">example code</a><a class="headerlink" href="#id2" title="Permalink to this headline"></a></h3>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># search-url</span>
<span class="n">base_url</span> <span class="o">=</span> <span class="s1">&#39;https://example.com/&#39;</span>
<span class="n">search_string</span> <span class="o">=</span> <span class="s1">&#39;search?</span><span class="si">{query}</span><span class="s1">&amp;page=</span><span class="si">{page}</span><span class="s1">&#39;</span>
<span class="n">search_string</span> <span class="o">=</span> <span class="s1">&#39;search?{query}&amp;page={page}&#39;</span>
<span class="c1"># do search-request</span>
<span class="k">def</span> <span class="nf">request</span><span class="p">(</span><span class="n">query</span><span class="p">,</span> <span class="n">params</span><span class="p">):</span>
@ -341,227 +347,230 @@ used to specify a search request:</p>
</div>
</div>
<div class="section" id="returned-results">
<h2><a class="toc-backref" href="#id12">returned results</a><a class="headerlink" href="#returned-results" title="Permalink to this headline"></a></h2>
<p>Searx is able to return results of different media-types.
Currently the following media-types are supported:</p>
<h2><a class="toc-backref" href="#id13">returned results</a><a class="headerlink" href="#returned-results" title="Permalink to this headline"></a></h2>
<p>Searx is able to return results of different media-types. Currently the
following media-types are supported:</p>
<ul class="simple">
<li>default</li>
<li>images</li>
<li>videos</li>
<li>torrent</li>
<li>map</li>
<li><p><a class="reference internal" href="#default">default</a></p></li>
<li><p><a class="reference internal" href="#images">images</a></p></li>
<li><p><a class="reference internal" href="#videos">videos</a></p></li>
<li><p><a class="reference internal" href="#torrent">torrent</a></p></li>
<li><p><a class="reference internal" href="#map">map</a></p></li>
</ul>
<p>To set another media-type as default, the parameter
<code class="docutils literal"><span class="pre">template</span></code> must be set to the desired type.</p>
<p>To set another media-type as default, the parameter <code class="docutils literal notranslate"><span class="pre">template</span></code> must be set to
the desired type.</p>
<div class="section" id="default">
<h3><a class="toc-backref" href="#id13">default</a><a class="headerlink" href="#default" title="Permalink to this headline"></a></h3>
<table border="1" class="docutils">
<h3><a class="toc-backref" href="#id14">default</a><a class="headerlink" href="#default" title="Permalink to this headline"></a></h3>
<table class="docutils align-default">
<colgroup>
<col width="15%" />
<col width="85%" />
<col style="width: 32%" />
<col style="width: 68%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">result-parameter</th>
<th class="head">information</th>
<thead>
<tr class="row-odd"><th class="head"><p>result-parameter</p></th>
<th class="head"><p>information</p></th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>url</td>
<td>string, url of the result</td>
<tbody>
<tr class="row-even"><td><p>url</p></td>
<td><p>string, url of the result</p></td>
</tr>
<tr class="row-odd"><td>title</td>
<td>string, title of the result</td>
<tr class="row-odd"><td><p>title</p></td>
<td><p>string, title of the result</p></td>
</tr>
<tr class="row-even"><td>content</td>
<td>string, general result-text</td>
<tr class="row-even"><td><p>content</p></td>
<td><p>string, general result-text</p></td>
</tr>
<tr class="row-odd"><td>publishedDate</td>
<td><a class="reference external" href="https://docs.python.org/2/library/datetime.html#datetime-objects">datetime.datetime</a>, time of publish</td>
<tr class="row-odd"><td><p>publishedDate</p></td>
<td><p><a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.datetime" title="(in Python v3.8)"><code class="xref py py-class docutils literal notranslate"><span class="pre">datetime.datetime</span></code></a>, time of publish</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="images">
<h3><a class="toc-backref" href="#id14">images</a><a class="headerlink" href="#images" title="Permalink to this headline"></a></h3>
<p>to use this template, the parameter</p>
<table border="1" class="docutils">
<h3><a class="toc-backref" href="#id15">images</a><a class="headerlink" href="#images" title="Permalink to this headline"></a></h3>
<p>To use this template, the parameter:</p>
<table class="docutils align-default">
<colgroup>
<col width="13%" />
<col width="87%" />
<col style="width: 32%" />
<col style="width: 68%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">result-parameter</th>
<th class="head">information</th>
<thead>
<tr class="row-odd"><th class="head"><p>result-parameter</p></th>
<th class="head"><p>information</p></th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>template</td>
<td>is set to <code class="docutils literal"><span class="pre">images.html</span></code></td>
<tbody>
<tr class="row-even"><td><p>template</p></td>
<td><p>is set to <code class="docutils literal notranslate"><span class="pre">images.html</span></code></p></td>
</tr>
<tr class="row-odd"><td>url</td>
<td>string, url to the result site</td>
<tr class="row-odd"><td><p>url</p></td>
<td><p>string, url to the result site</p></td>
</tr>
<tr class="row-even"><td>title</td>
<td>string, title of the result <em>(partly implemented)</em></td>
<tr class="row-even"><td><p>title</p></td>
<td><p>string, title of the result <em>(partly implemented)</em></p></td>
</tr>
<tr class="row-odd"><td>content</td>
<td><em>(partly implemented)</em></td>
<tr class="row-odd"><td><p>content</p></td>
<td><p><em>(partly implemented)</em></p></td>
</tr>
<tr class="row-even"><td>publishedDate</td>
<td><a class="reference external" href="https://docs.python.org/2/library/datetime.html#datetime-objects">datetime.datetime</a>, time of publish <em>(partly implemented)</em></td>
<tr class="row-even"><td><p>publishedDate</p></td>
<td><p><a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.datetime" title="(in Python v3.8)"><code class="xref py py-class docutils literal notranslate"><span class="pre">datetime.datetime</span></code></a>,
time of publish <em>(partly implemented)</em></p></td>
</tr>
<tr class="row-odd"><td>img_src</td>
<td>string, url to the result image</td>
<tr class="row-odd"><td><p>img_src</p></td>
<td><p>string, url to the result image</p></td>
</tr>
<tr class="row-even"><td>thumbnail_src</td>
<td>string, url to a small-preview image</td>
<tr class="row-even"><td><p>thumbnail_src</p></td>
<td><p>string, url to a small-preview image</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="videos">
<h3><a class="toc-backref" href="#id15">videos</a><a class="headerlink" href="#videos" title="Permalink to this headline"></a></h3>
<table border="1" class="docutils">
<h3><a class="toc-backref" href="#id16">videos</a><a class="headerlink" href="#videos" title="Permalink to this headline"></a></h3>
<table class="docutils align-default">
<colgroup>
<col width="15%" />
<col width="85%" />
<col style="width: 32%" />
<col style="width: 68%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">result-parameter</th>
<th class="head">information</th>
<thead>
<tr class="row-odd"><th class="head"><p>result-parameter</p></th>
<th class="head"><p>information</p></th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>template</td>
<td>is set to <code class="docutils literal"><span class="pre">videos.html</span></code></td>
<tbody>
<tr class="row-even"><td><p>template</p></td>
<td><p>is set to <code class="docutils literal notranslate"><span class="pre">videos.html</span></code></p></td>
</tr>
<tr class="row-odd"><td>url</td>
<td>string, url of the result</td>
<tr class="row-odd"><td><p>url</p></td>
<td><p>string, url of the result</p></td>
</tr>
<tr class="row-even"><td>title</td>
<td>string, title of the result</td>
<tr class="row-even"><td><p>title</p></td>
<td><p>string, title of the result</p></td>
</tr>
<tr class="row-odd"><td>content</td>
<td><em>(not implemented yet)</em></td>
<tr class="row-odd"><td><p>content</p></td>
<td><p><em>(not implemented yet)</em></p></td>
</tr>
<tr class="row-even"><td>publishedDate</td>
<td><a class="reference external" href="https://docs.python.org/2/library/datetime.html#datetime-objects">datetime.datetime</a>, time of publish</td>
<tr class="row-even"><td><p>publishedDate</p></td>
<td><p><a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.datetime" title="(in Python v3.8)"><code class="xref py py-class docutils literal notranslate"><span class="pre">datetime.datetime</span></code></a>, time of publish</p></td>
</tr>
<tr class="row-odd"><td>thumbnail</td>
<td>string, url to a small-preview image</td>
<tr class="row-odd"><td><p>thumbnail</p></td>
<td><p>string, url to a small-preview image</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="torrent">
<h3><a class="toc-backref" href="#id16">torrent</a><a class="headerlink" href="#torrent" title="Permalink to this headline"></a></h3>
<table border="1" class="docutils">
<h3><a class="toc-backref" href="#id17">torrent</a><a class="headerlink" href="#torrent" title="Permalink to this headline"></a></h3>
<table class="docutils align-default">
<colgroup>
<col width="12%" />
<col width="88%" />
<col style="width: 32%" />
<col style="width: 68%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">result-parameter</th>
<th class="head">information</th>
<thead>
<tr class="row-odd"><th class="head"><p>result-parameter</p></th>
<th class="head"><p>information</p></th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>template</td>
<td>is set to <code class="docutils literal"><span class="pre">torrent.html</span></code></td>
<tbody>
<tr class="row-even"><td><p>template</p></td>
<td><p>is set to <code class="docutils literal notranslate"><span class="pre">torrent.html</span></code></p></td>
</tr>
<tr class="row-odd"><td>url</td>
<td>string, url of the result</td>
<tr class="row-odd"><td><p>url</p></td>
<td><p>string, url of the result</p></td>
</tr>
<tr class="row-even"><td>title</td>
<td>string, title of the result</td>
<tr class="row-even"><td><p>title</p></td>
<td><p>string, title of the result</p></td>
</tr>
<tr class="row-odd"><td>content</td>
<td>string, general result-text</td>
<tr class="row-odd"><td><p>content</p></td>
<td><p>string, general result-text</p></td>
</tr>
<tr class="row-even"><td>publishedDate</td>
<td><a class="reference external" href="https://docs.python.org/2/library/datetime.html#datetime-objects">datetime.datetime</a>, time of publish <em>(not implemented yet)</em></td>
<tr class="row-even"><td><p>publishedDate</p></td>
<td><p><a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.datetime" title="(in Python v3.8)"><code class="xref py py-class docutils literal notranslate"><span class="pre">datetime.datetime</span></code></a>,
time of publish <em>(not implemented yet)</em></p></td>
</tr>
<tr class="row-odd"><td>seed</td>
<td>int, number of seeder</td>
<tr class="row-odd"><td><p>seed</p></td>
<td><p>int, number of seeder</p></td>
</tr>
<tr class="row-even"><td>leech</td>
<td>int, number of leecher</td>
<tr class="row-even"><td><p>leech</p></td>
<td><p>int, number of leecher</p></td>
</tr>
<tr class="row-odd"><td>filesize</td>
<td>int, size of file in bytes</td>
<tr class="row-odd"><td><p>filesize</p></td>
<td><p>int, size of file in bytes</p></td>
</tr>
<tr class="row-even"><td>files</td>
<td>int, number of files</td>
<tr class="row-even"><td><p>files</p></td>
<td><p>int, number of files</p></td>
</tr>
<tr class="row-odd"><td>magnetlink</td>
<td>string, <a class="reference external" href="https://en.wikipedia.org/wiki/Magnet_URI_scheme">magnetlink</a> of the result</td>
<tr class="row-odd"><td><p>magnetlink</p></td>
<td><p>string, <a class="reference external" href="https://en.wikipedia.org/wiki/Magnet_URI_scheme">magnetlink</a> of the result</p></td>
</tr>
<tr class="row-even"><td>torrentfile</td>
<td>string, torrentfile of the result</td>
<tr class="row-even"><td><p>torrentfile</p></td>
<td><p>string, torrentfile of the result</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="map">
<h3><a class="toc-backref" href="#id17">map</a><a class="headerlink" href="#map" title="Permalink to this headline"></a></h3>
<table border="1" class="docutils">
<h3><a class="toc-backref" href="#id18">map</a><a class="headerlink" href="#map" title="Permalink to this headline"></a></h3>
<table class="docutils align-default">
<colgroup>
<col width="19%" />
<col width="81%" />
<col style="width: 32%" />
<col style="width: 68%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">result-parameter</th>
<th class="head">information</th>
<thead>
<tr class="row-odd"><th class="head"><p>result-parameter</p></th>
<th class="head"><p>information</p></th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>url</td>
<td>string, url of the result</td>
<tbody>
<tr class="row-even"><td><p>url</p></td>
<td><p>string, url of the result</p></td>
</tr>
<tr class="row-odd"><td>title</td>
<td>string, title of the result</td>
<tr class="row-odd"><td><p>title</p></td>
<td><p>string, title of the result</p></td>
</tr>
<tr class="row-even"><td>content</td>
<td>string, general result-text</td>
<tr class="row-even"><td><p>content</p></td>
<td><p>string, general result-text</p></td>
</tr>
<tr class="row-odd"><td>publishedDate</td>
<td><a class="reference external" href="https://docs.python.org/2/library/datetime.html#datetime-objects">datetime.datetime</a>, time of publish</td>
<tr class="row-odd"><td><p>publishedDate</p></td>
<td><p><a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.datetime" title="(in Python v3.8)"><code class="xref py py-class docutils literal notranslate"><span class="pre">datetime.datetime</span></code></a>, time of publish</p></td>
</tr>
<tr class="row-even"><td>latitude</td>
<td>latitude of result (in decimal format)</td>
<tr class="row-even"><td><p>latitude</p></td>
<td><p>latitude of result (in decimal format)</p></td>
</tr>
<tr class="row-odd"><td>longitude</td>
<td>longitude of result (in decimal format)</td>
<tr class="row-odd"><td><p>longitude</p></td>
<td><p>longitude of result (in decimal format)</p></td>
</tr>
<tr class="row-even"><td>boundingbox</td>
<td>boundingbox of result (array of 4. values <code class="docutils literal"><span class="pre">[lat-min,</span> <span class="pre">lat-max,</span> <span class="pre">lon-min,</span> <span class="pre">lon-max]</span></code>)</td>
<tr class="row-even"><td><p>boundingbox</p></td>
<td><p>boundingbox of result (array of 4. values
<code class="docutils literal notranslate"><span class="pre">[lat-min,</span> <span class="pre">lat-max,</span> <span class="pre">lon-min,</span> <span class="pre">lon-max]</span></code>)</p></td>
</tr>
<tr class="row-odd"><td>geojson</td>
<td>geojson of result (<a class="reference external" href="http://geojson.org">http://geojson.org</a>)</td>
<tr class="row-odd"><td><p>geojson</p></td>
<td><p>geojson of result (<a class="reference external" href="http://geojson.org">http://geojson.org</a>)</p></td>
</tr>
<tr class="row-even"><td>osm.type</td>
<td>type of osm-object (if OSM-Result)</td>
<tr class="row-even"><td><p>osm.type</p></td>
<td><p>type of osm-object (if OSM-Result)</p></td>
</tr>
<tr class="row-odd"><td>osm.id</td>
<td>id of osm-object (if OSM-Result)</td>
<tr class="row-odd"><td><p>osm.id</p></td>
<td><p>id of osm-object (if OSM-Result)</p></td>
</tr>
<tr class="row-even"><td>address.name</td>
<td>name of object</td>
<tr class="row-even"><td><p>address.name</p></td>
<td><p>name of object</p></td>
</tr>
<tr class="row-odd"><td>address.road</td>
<td>street name of object</td>
<tr class="row-odd"><td><p>address.road</p></td>
<td><p>street name of object</p></td>
</tr>
<tr class="row-even"><td>address.house_number</td>
<td>house number of object</td>
<tr class="row-even"><td><p>address.house_number</p></td>
<td><p>house number of object</p></td>
</tr>
<tr class="row-odd"><td>address.locality</td>
<td>city, place of object</td>
<tr class="row-odd"><td><p>address.locality</p></td>
<td><p>city, place of object</p></td>
</tr>
<tr class="row-even"><td>address.postcode</td>
<td>postcode of object</td>
<tr class="row-even"><td><p>address.postcode</p></td>
<td><p>postcode of object</p></td>
</tr>
<tr class="row-odd"><td>address.country</td>
<td>country of object</td>
<tr class="row-odd"><td><p>address.country</p></td>
<td><p>country of object</p></td>
</tr>
</tbody>
</table>
@ -573,27 +582,57 @@ Currently the following media-types are supported:</p>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper"><div class="sidebar_container body">
<h1>Searx</h1>
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/searx_logo_small.png" alt="Logo"/>
</a></p>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/asciimoo/searx">Source</a>
<li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a>
<li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a>
<li><a href="https://twitter.com/Searx_engine">Twitter</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../index.html">Home</a></li>
<li><a href="https://github.com/asciimoo/searx">Source</a></li>
<li><a href="../blog/blog.html">Blog</a></li>
<li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a></li>
<li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a></li>
</ul>
<hr />
<ul>
<li><a href="https://twitter.com/Searx_engine">Twitter</a></li>
<li><a href="../index.html">Overview</a>
<ul>
<li><a href="index.html">Developer documentation</a>
<ul>
<li>Previous: <a href="contribution_guide.html" title="previous chapter">How to contribute</a>
<li>Next: <a href="search_api.html" title="next chapter">Search API</a></ul>
</li>
</ul>
</li>
</ul>
<div 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" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
&copy; Copyright 2015-2019, Adam Tauber, Noémi Ványi.
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2019, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.3.1.
</div>
<script type="text/javascript" src="../_static/version_warning_offset.js"></script>
</body>
</html>

114
dev/index.html Normal file
View File

@ -0,0 +1,114 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Developer documentation &#8212; Searx Documentation (Searx-0.15.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../_static/language_data.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Development Quickstart" href="quickstart.html" />
<link rel="prev" title="Buildhosts" href="../admin/buildhosts.html" />
<script>DOCUMENTATION_OPTIONS.URL_ROOT = '../';</script>
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<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="quickstart.html" title="Development Quickstart"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="../admin/buildhosts.html" title="Buildhosts"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.15.0.tex)</a> &#187;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="developer-documentation">
<h1>Developer documentation<a class="headerlink" href="#developer-documentation" title="Permalink to this headline"></a></h1>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="quickstart.html">Development Quickstart</a></li>
<li class="toctree-l1"><a class="reference internal" href="contribution_guide.html">How to contribute</a></li>
<li class="toctree-l1"><a class="reference internal" href="engine_overview.html">Engine overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="search_api.html">Search API</a></li>
<li class="toctree-l1"><a class="reference internal" href="plugins.html">Plugins</a></li>
<li class="toctree-l1"><a class="reference internal" href="translation.html">Translation</a></li>
<li class="toctree-l1"><a class="reference internal" href="makefile.html">Makefile Targets</a></li>
<li class="toctree-l1"><a class="reference internal" href="reST.html">reST primer</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/searx_logo_small.png" alt="Logo"/>
</a></p>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/asciimoo/searx">Source</a>
<li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a>
<li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a>
<li><a href="https://twitter.com/Searx_engine">Twitter</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../index.html">Overview</a>
<ul>
<li>Previous: <a href="../admin/buildhosts.html" title="previous chapter">Buildhosts</a>
<li>Next: <a href="quickstart.html" title="next chapter">Development Quickstart</a>
</ul>
</li>
</ul>
<div 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" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2019, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.3.1.
</div>
<script type="text/javascript" src="../_static/version_warning_offset.js"></script>
</body>
</html>

View File

@ -1,351 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Installation &#8212; searx 0.12.0 documentation</title>
<link rel="stylesheet" href="../../_static/style.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../../',
VERSION: '0.12.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="../../_static/jquery.js"></script>
<script type="text/javascript" src="../../_static/underscore.js"></script>
<script type="text/javascript" src="../../_static/doctools.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Administration API" href="../../admin/api.html" />
<link rel="prev" title="Why use a private instance?" href="../../user/own-instance.html" />
<link media="only screen and (max-device-width: 480px)" href="../../_static/small_flask.css" type= "text/css" rel="stylesheet" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
</head>
<body>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="installation">
<span id="id1"></span><h1><a class="toc-backref" href="#id3">Installation</a><a class="headerlink" href="#installation" title="Permalink to this headline"></a></h1>
<div class="contents topic" id="contents">
<p class="topic-title first">Contents</p>
<ul class="simple">
<li><a class="reference internal" href="#installation" id="id3">Installation</a><ul>
<li><a class="reference internal" href="#basic-installation" id="id4">Basic installation</a></li>
<li><a class="reference internal" href="#configuration" id="id5">Configuration</a></li>
<li><a class="reference internal" href="#check" id="id6">Check</a></li>
<li><a class="reference internal" href="#uwsgi" id="id7">uwsgi</a></li>
<li><a class="reference internal" href="#web-server" id="id8">Web server</a><ul>
<li><a class="reference internal" href="#with-nginx" id="id9">with nginx</a></li>
<li><a class="reference internal" href="#with-apache" id="id10">with apache</a></li>
</ul>
</li>
<li><a class="reference internal" href="#how-to-update" id="id11">How to update</a></li>
<li><a class="reference internal" href="#docker" id="id12">Docker</a></li>
</ul>
</li>
<li><a class="reference internal" href="#references" id="id13">References</a></li>
</ul>
</div>
<div class="section" id="basic-installation">
<h2><a class="toc-backref" href="#id4">Basic installation</a><a class="headerlink" href="#basic-installation" title="Permalink to this headline"></a></h2>
<p>Step by step installation for Debian/Ubuntu with virtualenv. For Ubuntu, be sure to have enable universe repository.</p>
<p>Install packages:</p>
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">git</span> <span class="n">build</span><span class="o">-</span><span class="n">essential</span> <span class="n">libxslt</span><span class="o">-</span><span class="n">dev</span> <span class="n">python</span><span class="o">-</span><span class="n">dev</span> <span class="n">python</span><span class="o">-</span><span class="n">virtualenv</span> <span class="n">python</span><span class="o">-</span><span class="n">babel</span> <span class="n">zlib1g</span><span class="o">-</span><span class="n">dev</span> <span class="n">libffi</span><span class="o">-</span><span class="n">dev</span> <span class="n">libssl</span><span class="o">-</span><span class="n">dev</span>
</pre></div>
</div>
<p>Install searx:</p>
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span>
<span class="n">sudo</span> <span class="n">git</span> <span class="n">clone</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">asciimoo</span><span class="o">/</span><span class="n">searx</span><span class="o">.</span><span class="n">git</span>
<span class="n">sudo</span> <span class="n">useradd</span> <span class="n">searx</span> <span class="o">-</span><span class="n">d</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span><span class="o">/</span><span class="n">searx</span>
<span class="n">sudo</span> <span class="n">chown</span> <span class="n">searx</span><span class="p">:</span><span class="n">searx</span> <span class="o">-</span><span class="n">R</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span><span class="o">/</span><span class="n">searx</span>
</pre></div>
</div>
<p>Install dependencies in a virtualenv:</p>
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="o">-</span><span class="n">u</span> <span class="n">searx</span> <span class="o">-</span><span class="n">i</span>
<span class="n">cd</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span><span class="o">/</span><span class="n">searx</span>
<span class="n">virtualenv</span> <span class="n">searx</span><span class="o">-</span><span class="n">ve</span>
<span class="o">.</span> <span class="o">./</span><span class="n">searx</span><span class="o">-</span><span class="n">ve</span><span class="o">/</span><span class="nb">bin</span><span class="o">/</span><span class="n">activate</span>
<span class="o">./</span><span class="n">manage</span><span class="o">.</span><span class="n">sh</span> <span class="n">update_packages</span>
</pre></div>
</div>
</div>
<div class="section" id="configuration">
<h2><a class="toc-backref" href="#id5">Configuration</a><a class="headerlink" href="#configuration" title="Permalink to this headline"></a></h2>
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">sed</span> <span class="o">-</span><span class="n">i</span> <span class="o">-</span><span class="n">e</span> <span class="s2">&quot;s/ultrasecretkey/`openssl rand -hex 16`/g&quot;</span> <span class="n">searx</span><span class="o">/</span><span class="n">settings</span><span class="o">.</span><span class="n">yml</span>
</pre></div>
</div>
<p>Edit searx/settings.yml if necessary.</p>
</div>
<div class="section" id="check">
<h2><a class="toc-backref" href="#id6">Check</a><a class="headerlink" href="#check" title="Permalink to this headline"></a></h2>
<p>Start searx:</p>
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">python</span> <span class="n">searx</span><span class="o">/</span><span class="n">webapp</span><span class="o">.</span><span class="n">py</span>
</pre></div>
</div>
<p>Go to <a class="reference external" href="http://localhost:8888">http://localhost:8888</a></p>
<p>If everything works fine, disable the debug option in settings.yml:</p>
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">sed</span> <span class="o">-</span><span class="n">i</span> <span class="o">-</span><span class="n">e</span> <span class="s2">&quot;s/debug : True/debug : False/g&quot;</span> <span class="n">searx</span><span class="o">/</span><span class="n">settings</span><span class="o">.</span><span class="n">yml</span>
</pre></div>
</div>
<p>At this point searx is not demonized ; uwsgi allows this.</p>
<p>You can exit the virtualenv and the searx user bash (enter exit command
twice).</p>
</div>
<div class="section" id="uwsgi">
<h2><a class="toc-backref" href="#id7">uwsgi</a><a class="headerlink" href="#uwsgi" title="Permalink to this headline"></a></h2>
<p>Install packages:</p>
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">uwsgi</span> <span class="n">uwsgi</span><span class="o">-</span><span class="n">plugin</span><span class="o">-</span><span class="n">python</span>
</pre></div>
</div>
<p>Create the configuration file /etc/uwsgi/apps-available/searx.ini with
this content:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="p">[</span><span class="n">uwsgi</span><span class="p">]</span>
<span class="c1"># Who will run the code</span>
<span class="n">uid</span> <span class="o">=</span> <span class="n">searx</span>
<span class="n">gid</span> <span class="o">=</span> <span class="n">searx</span>
<span class="c1"># disable logging for privacy</span>
<span class="n">disable</span><span class="o">-</span><span class="n">logging</span> <span class="o">=</span> <span class="n">true</span>
<span class="c1"># Number of workers (usually CPU count)</span>
<span class="n">workers</span> <span class="o">=</span> <span class="mi">4</span>
<span class="c1"># The right granted on the created socket</span>
<span class="n">chmod</span><span class="o">-</span><span class="n">socket</span> <span class="o">=</span> <span class="mi">666</span>
<span class="c1"># Plugin to use and interpretor config</span>
<span class="n">single</span><span class="o">-</span><span class="n">interpreter</span> <span class="o">=</span> <span class="n">true</span>
<span class="n">master</span> <span class="o">=</span> <span class="n">true</span>
<span class="n">plugin</span> <span class="o">=</span> <span class="n">python</span>
<span class="n">lazy</span><span class="o">-</span><span class="n">apps</span> <span class="o">=</span> <span class="n">true</span>
<span class="n">enable</span><span class="o">-</span><span class="n">threads</span> <span class="o">=</span> <span class="n">true</span>
<span class="c1"># Module to import</span>
<span class="n">module</span> <span class="o">=</span> <span class="n">searx</span><span class="o">.</span><span class="n">webapp</span>
<span class="c1"># Virtualenv and python path</span>
<span class="n">virtualenv</span> <span class="o">=</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span><span class="o">/</span><span class="n">searx</span><span class="o">/</span><span class="n">searx</span><span class="o">-</span><span class="n">ve</span><span class="o">/</span>
<span class="n">pythonpath</span> <span class="o">=</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span><span class="o">/</span><span class="n">searx</span><span class="o">/</span>
<span class="n">chdir</span> <span class="o">=</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span><span class="o">/</span><span class="n">searx</span><span class="o">/</span><span class="n">searx</span><span class="o">/</span>
</pre></div>
</div>
<p>Activate the uwsgi application and restart:</p>
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">uwsgi</span><span class="o">/</span><span class="n">apps</span><span class="o">-</span><span class="n">enabled</span>
<span class="n">ln</span> <span class="o">-</span><span class="n">s</span> <span class="o">../</span><span class="n">apps</span><span class="o">-</span><span class="n">available</span><span class="o">/</span><span class="n">searx</span><span class="o">.</span><span class="n">ini</span>
<span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">init</span><span class="o">.</span><span class="n">d</span><span class="o">/</span><span class="n">uwsgi</span> <span class="n">restart</span>
</pre></div>
</div>
</div>
<div class="section" id="web-server">
<h2><a class="toc-backref" href="#id8">Web server</a><a class="headerlink" href="#web-server" title="Permalink to this headline"></a></h2>
<div class="section" id="with-nginx">
<h3><a class="toc-backref" href="#id9">with nginx</a><a class="headerlink" href="#with-nginx" title="Permalink to this headline"></a></h3>
<p>If nginx is not installed (uwsgi will not work with the package
nginx-light):</p>
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">nginx</span>
</pre></div>
</div>
<div class="section" id="hosted-at">
<h4>Hosted at /<a class="headerlink" href="#hosted-at" title="Permalink to this headline"></a></h4>
<p>Create the configuration file /etc/nginx/sites-available/searx with this
content:</p>
<div class="code nginx highlight-default"><div class="highlight"><pre><span></span><span class="n">server</span> <span class="p">{</span>
<span class="n">listen</span> <span class="mi">80</span><span class="p">;</span>
<span class="n">server_name</span> <span class="n">searx</span><span class="o">.</span><span class="n">example</span><span class="o">.</span><span class="n">com</span><span class="p">;</span>
<span class="n">root</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span><span class="o">/</span><span class="n">searx</span><span class="p">;</span>
<span class="n">location</span> <span class="o">/</span> <span class="p">{</span>
<span class="n">include</span> <span class="n">uwsgi_params</span><span class="p">;</span>
<span class="n">uwsgi_pass</span> <span class="n">unix</span><span class="p">:</span><span class="o">/</span><span class="n">run</span><span class="o">/</span><span class="n">uwsgi</span><span class="o">/</span><span class="n">app</span><span class="o">/</span><span class="n">searx</span><span class="o">/</span><span class="n">socket</span><span class="p">;</span>
<span class="p">}</span>
<span class="p">}</span>
</pre></div>
</div>
<p>Create a symlink to sites-enabled:</p>
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">ln</span> <span class="o">-</span><span class="n">s</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">nginx</span><span class="o">/</span><span class="n">sites</span><span class="o">-</span><span class="n">available</span><span class="o">/</span><span class="n">searx</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">nginx</span><span class="o">/</span><span class="n">sites</span><span class="o">-</span><span class="n">enabled</span><span class="o">/</span><span class="n">searx</span>
</pre></div>
</div>
<p>Restart service:</p>
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">service</span> <span class="n">nginx</span> <span class="n">restart</span>
<span class="n">sudo</span> <span class="n">service</span> <span class="n">uwsgi</span> <span class="n">restart</span>
</pre></div>
</div>
</div>
<div class="section" id="from-subdirectory-url-searx">
<h4>from subdirectory URL (/searx)<a class="headerlink" href="#from-subdirectory-url-searx" title="Permalink to this headline"></a></h4>
<p>Add this configuration in the server config file
/etc/nginx/sites-enabled/default:</p>
<div class="code nginx highlight-default"><div class="highlight"><pre><span></span>location = /searx { rewrite ^ /searx/; }
location /searx {
try_files $uri @searx;
}
location @searx {
uwsgi_param SCRIPT_NAME /searx;
include uwsgi_params;
uwsgi_modifier1 30;
uwsgi_pass unix:/run/uwsgi/app/searx/socket;
}
</pre></div>
</div>
<p>OR</p>
<p>using reverse proxy
(Please, note that reverse proxy advised to be used in case of single-user or low-traffic instances.)</p>
<div class="code nginx highlight-default"><div class="highlight"><pre><span></span>location /searx {
proxy_pass http://127.0.0.1:8888;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Script-Name /searx;
proxy_buffering off;
}
</pre></div>
</div>
<p>Enable base_url in searx/settings.yml</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">base_url</span> <span class="p">:</span> <span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">your</span><span class="o">.</span><span class="n">domain</span><span class="o">.</span><span class="n">tld</span><span class="o">/</span><span class="n">searx</span><span class="o">/</span>
</pre></div>
</div>
<p>Restart service:</p>
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">service</span> <span class="n">nginx</span> <span class="n">restart</span>
<span class="n">sudo</span> <span class="n">service</span> <span class="n">uwsgi</span> <span class="n">restart</span>
</pre></div>
</div>
<div class="section" id="disable-logs">
<h5>disable logs<a class="headerlink" href="#disable-logs" title="Permalink to this headline"></a></h5>
<p>for better privacy you can disable nginx logs about searx.</p>
<p>how to proceed: below <code class="docutils literal"><span class="pre">uwsgi_pass</span></code> in
/etc/nginx/sites-available/default add</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">access_log</span> <span class="o">/</span><span class="n">dev</span><span class="o">/</span><span class="n">null</span><span class="p">;</span>
<span class="n">error_log</span> <span class="o">/</span><span class="n">dev</span><span class="o">/</span><span class="n">null</span><span class="p">;</span>
</pre></div>
</div>
<p>Restart service:</p>
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">service</span> <span class="n">nginx</span> <span class="n">restart</span>
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="with-apache">
<h3><a class="toc-backref" href="#id10">with apache</a><a class="headerlink" href="#with-apache" title="Permalink to this headline"></a></h3>
<p>Add wsgi mod:</p>
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">libapache2</span><span class="o">-</span><span class="n">mod</span><span class="o">-</span><span class="n">uwsgi</span>
<span class="n">sudo</span> <span class="n">a2enmod</span> <span class="n">uwsgi</span>
</pre></div>
</div>
<p>Add this configuration in the file /etc/apache2/apache2.conf:</p>
<div class="code apache highlight-default"><div class="highlight"><pre><span></span><span class="o">&lt;</span><span class="n">Location</span> <span class="o">/&gt;</span>
<span class="n">Options</span> <span class="n">FollowSymLinks</span> <span class="n">Indexes</span>
<span class="n">SetHandler</span> <span class="n">uwsgi</span><span class="o">-</span><span class="n">handler</span>
<span class="n">uWSGISocket</span> <span class="o">/</span><span class="n">run</span><span class="o">/</span><span class="n">uwsgi</span><span class="o">/</span><span class="n">app</span><span class="o">/</span><span class="n">searx</span><span class="o">/</span><span class="n">socket</span>
<span class="o">&lt;/</span><span class="n">Location</span><span class="o">&gt;</span>
</pre></div>
</div>
<p>Note that if your instance of searx is not at the root, you should
change <code class="docutils literal"><span class="pre">&lt;Location</span> <span class="pre">/&gt;</span></code> by the location of your instance, like
<code class="docutils literal"><span class="pre">&lt;Location</span> <span class="pre">/searx&gt;</span></code>.</p>
<p>Restart Apache:</p>
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">init</span><span class="o">.</span><span class="n">d</span><span class="o">/</span><span class="n">apache2</span> <span class="n">restart</span>
</pre></div>
</div>
<div class="section" id="id2">
<h4>disable logs<a class="headerlink" href="#id2" title="Permalink to this headline"></a></h4>
<p>For better privacy you can disable Apache logs.</p>
<p>WARNING: not tested</p>
<p>WARNING: you can only disable logs for the whole (virtual) server not
for a specific path.</p>
<p>Go back to /etc/apache2/apache2.conf and above <code class="docutils literal"><span class="pre">&lt;Location</span> <span class="pre">/&gt;</span></code> add:</p>
<div class="code apache highlight-default"><div class="highlight"><pre><span></span><span class="n">CustomLog</span> <span class="o">/</span><span class="n">dev</span><span class="o">/</span><span class="n">null</span> <span class="n">combined</span>
</pre></div>
</div>
<p>Restart Apache:</p>
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">init</span><span class="o">.</span><span class="n">d</span><span class="o">/</span><span class="n">apache2</span> <span class="n">restart</span>
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="how-to-update">
<h2><a class="toc-backref" href="#id11">How to update</a><a class="headerlink" href="#how-to-update" title="Permalink to this headline"></a></h2>
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span><span class="o">/</span><span class="n">searx</span>
<span class="n">sudo</span> <span class="o">-</span><span class="n">u</span> <span class="n">searx</span> <span class="o">-</span><span class="n">i</span>
<span class="o">.</span> <span class="o">./</span><span class="n">searx</span><span class="o">-</span><span class="n">ve</span><span class="o">/</span><span class="nb">bin</span><span class="o">/</span><span class="n">activate</span>
<span class="n">git</span> <span class="n">stash</span>
<span class="n">git</span> <span class="n">pull</span> <span class="n">origin</span> <span class="n">master</span>
<span class="n">git</span> <span class="n">stash</span> <span class="n">apply</span>
<span class="o">./</span><span class="n">manage</span><span class="o">.</span><span class="n">sh</span> <span class="n">update_packages</span>
<span class="n">sudo</span> <span class="n">service</span> <span class="n">uwsgi</span> <span class="n">restart</span>
</pre></div>
</div>
</div>
<div class="section" id="docker">
<h2><a class="toc-backref" href="#id12">Docker</a><a class="headerlink" href="#docker" title="Permalink to this headline"></a></h2>
<p>Make sure you have installed Docker. For instance, you can deploy searx like this:</p>
<div class="code sh highlight-default"><div class="highlight"><pre><span></span>docker pull wonderfall/searx
docker run -d --name searx -p $PORT:8888 wonderfall/searx
</pre></div>
</div>
<p>Go to <a class="reference external" href="http://localhost:$PORT">http://localhost:$PORT</a>.</p>
<p>See <a class="reference external" href="https://hub.docker.com/r/wonderfall/searx/">https://hub.docker.com/r/wonderfall/searx/</a> for more informations.</p>
<p>Its also possible to build searx from the embedded Dockerfile.</p>
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">git</span> <span class="n">clone</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">asciimoo</span><span class="o">/</span><span class="n">searx</span><span class="o">.</span><span class="n">git</span>
<span class="n">cd</span> <span class="n">searx</span>
<span class="n">docker</span> <span class="n">build</span> <span class="o">-</span><span class="n">t</span> <span class="n">whatever</span><span class="o">/</span><span class="n">searx</span> <span class="o">.</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="references">
<h1><a class="toc-backref" href="#id13">References</a><a class="headerlink" href="#references" title="Permalink to this headline"></a></h1>
<blockquote>
<div><ul class="simple">
<li><a class="reference external" href="https://about.okhin.fr/posts/Searx/">https://about.okhin.fr/posts/Searx/</a> with some additions</li>
<li>How to: <a class="reference external" href="https://www.reddit.com/r/privacytoolsIO/comments/366kvn/how_to_setup_your_own_privacy_respecting_search/">Setup searx in a couple of hours with a free SSL certificate</a></li>
</ul>
</div></blockquote>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper"><div class="sidebar_container body">
<h1>Searx</h1>
<ul>
<li><a href="../../index.html">Home</a></li>
<li><a href="https://github.com/asciimoo/searx">Source</a></li>
<li><a href="../../blog/blog.html">Blog</a></li>
<li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a></li>
<li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a></li>
</ul>
<hr />
<ul>
<li><a href="https://twitter.com/Searx_engine">Twitter</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
&copy; Copyright 2015-2019, Adam Tauber, Noémi Ványi.
</div>
</body>
</html>

285
dev/makefile.html Normal file
View File

@ -0,0 +1,285 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Makefile Targets &#8212; Searx Documentation (Searx-0.15.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../_static/language_data.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="reST primer" href="reST.html" />
<link rel="prev" title="Translation" href="translation.html" />
<script>DOCUMENTATION_OPTIONS.URL_ROOT = '../';</script>
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<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="reST.html" title="reST primer"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="translation.html" title="Translation"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.15.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Developer documentation</a> &#187;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="makefile-targets">
<span id="makefile"></span><h1>Makefile Targets<a class="headerlink" href="#makefile-targets" title="Permalink to this headline"></a></h1>
<div class="sidebar">
<p class="sidebar-title">build environment</p>
<p>Before looking deeper at the targets, first read about <a class="reference internal" href="#makefile-setup"><span class="std std-ref">Setup</span></a>
and <a class="reference internal" href="#make-pyenv"><span class="std std-ref">Python environment</span></a>.</p>
</div>
<p>With the aim to simplify development cycles, started with <a class="reference external" href="https://github.com/asciimoo/searx/pull/1756">PR 1756</a> a
<code class="docutils literal notranslate"><span class="pre">Makefile</span></code> based boilerplate was added. If you are not familiar with
Makefiles, we recommend to read <a class="reference external" href="https://www.gnu.org/software/make/manual/make.html#Introduction">gnu-make</a> introduction.</p>
<p>The usage is simple, just type <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">{target-name}</span></code> to <em>build</em> a target.
Calling the <code class="docutils literal notranslate"><span class="pre">help</span></code> target gives a first overview:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>$ make help
test - run developer tests
docs - build documentation
docs-live - autobuild HTML documentation while editing
run - run developer instance
install - developer install (./local)
uninstall - uninstall (./local)
gh-pages - build docs &amp; deploy on gh-pages branch
clean - drop builds and environments
...
</pre></div>
</div>
<div class="contents local topic" id="contents">
<p class="topic-title first">Contents</p>
<ul class="simple">
<li><p><a class="reference internal" href="#setup" id="id6">Setup</a></p></li>
<li><p><a class="reference internal" href="#python-environment" id="id7">Python environment</a></p></li>
<li><p><a class="reference internal" href="#make-run" id="id8"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">run</span></code></a></p></li>
<li><p><a class="reference internal" href="#make-clean" id="id9"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">clean</span></code></a></p></li>
<li><p><a class="reference internal" href="#make-docs-docs-live-docs-clean" id="id10"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs</span> <span class="pre">docs-live</span> <span class="pre">docs-clean</span></code></a></p></li>
<li><p><a class="reference internal" href="#make-gh-pages" id="id11"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">gh-pages</span></code></a></p></li>
<li><p><a class="reference internal" href="#make-test" id="id12"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test</span></code></a></p></li>
<li><p><a class="reference internal" href="#make-pylint" id="id13"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">pylint</span></code></a></p></li>
<li><p><a class="reference internal" href="#make-pybuild" id="id14"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">pybuild</span></code></a></p></li>
</ul>
</div>
<div class="section" id="setup">
<span id="makefile-setup"></span><h2><a class="toc-backref" href="#id6">Setup</a><a class="headerlink" href="#setup" title="Permalink to this headline"></a></h2>
<p>The main setup is done in the <a class="reference external" href="https://github.com/asciimoo/searx/blob/master/Makefile">git://Makefile</a>:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>export GIT_URL=https://github.com/asciimoo/searx
export SEARX_URL=https://searx.me
export DOCS_URL=https://asciimoo.github.io/searx
</pre></div>
</div>
<div class="sidebar">
<p class="sidebar-title">fork &amp; upstream</p>
<p>Commit changes in your (local) branch, fork or whatever, but do not push them
upstream / <a class="reference external" href="https://git-scm.com/docs/git-stash">git stash</a> is your friend.</p>
</div>
<dl class="field-list simple">
<dt class="field-odd">GIT_URL</dt>
<dd class="field-odd"><p>Changes this, to point to your searx fork.</p>
</dd>
<dt class="field-even">SEARX_URL</dt>
<dd class="field-even"><p>Changes this, to point to your searx instance.</p>
</dd>
<dt class="field-odd">DOCS_URL</dt>
<dd class="field-odd"><p>If you host your own (branded) documentation, change this URL.</p>
</dd>
</dl>
</div>
<div class="section" id="python-environment">
<span id="make-pyenv"></span><h2><a class="toc-backref" href="#id7">Python environment</a><a class="headerlink" href="#python-environment" title="Permalink to this headline"></a></h2>
<div class="sidebar">
<p class="sidebar-title">activate environment</p>
<p><code class="docutils literal notranslate"><span class="pre">source</span> <span class="pre">./local/py3/bin/activate</span></code></p>
</div>
<p>With Makefile we do no longer need to build up the virualenv manually (as
described in the <a class="reference internal" href="quickstart.html#devquickstart"><span class="std std-ref">Development Quickstart</span></a> guide). Jump into your git working tree
and release a <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">pyenv</span></code>:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ <span class="nb">cd</span> ~/searx-clone
$ make pyenv
PYENV usage: <span class="nb">source</span> ./local/py3/bin/activate
...
</pre></div>
</div>
<p>With target <code class="docutils literal notranslate"><span class="pre">pyenv</span></code> a development environment (aka virtualenv) was build up in
<code class="docutils literal notranslate"><span class="pre">./local/py3/</span></code>. To make a <em>developer install</em> of searx (<a class="reference external" href="https://github.com/asciimoo/searx/blob/master/setup.py">git://setup.py</a>)
into this environment, use make target <code class="docutils literal notranslate"><span class="pre">install</span></code>:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ make install
PYENV usage: <span class="nb">source</span> ./local/py3/bin/activate
PYENV using virtualenv from ./local/py3
PYENV install .
</pre></div>
</div>
<p>You have never to think about intermediate targets like <code class="docutils literal notranslate"><span class="pre">pyenv</span></code> or
<code class="docutils literal notranslate"><span class="pre">install</span></code>, the <code class="docutils literal notranslate"><span class="pre">Makefile</span></code> chains them as requisites. Just run your main
target.</p>
<div class="sidebar">
<p class="sidebar-title">drop environment</p>
<p>To get rid of the existing environment before re-build use <a class="reference internal" href="#make-clean"><span class="std std-ref">clean target</span></a> first.</p>
</div>
<p>If you think, something goes wrong with your ./local environment or you change
the <a class="reference external" href="https://github.com/asciimoo/searx/blob/master/setup.py">git://setup.py</a> file (or the requirements listed in
<a class="reference external" href="https://github.com/asciimoo/searx/blob/master/requirements-dev.txt">git://requirements-dev.txt</a> and <a class="reference external" href="https://github.com/asciimoo/searx/blob/master/requirements.txt">git://requirements.txt</a>), you have to call
<a class="reference internal" href="#make-clean"><span class="std std-ref">make clean</span></a>.</p>
</div>
<div class="section" id="make-run">
<span id="id1"></span><h2><a class="toc-backref" href="#id8"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">run</span></code></a><a class="headerlink" href="#make-run" title="Permalink to this headline"></a></h2>
<p>To get up a running a developer instance simply call <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">run</span></code>. This enables
<em>debug</em> option in <a class="reference external" href="https://github.com/asciimoo/searx/blob/master/searx/settings.yml">git://searx/settings.yml</a>, starts a <code class="docutils literal notranslate"><span class="pre">./searx/webapp.py</span></code>
instance, disables <em>debug</em> option again and opens the URL in your favorite WEB
browser (<a class="reference external" href="https://manpages.debian.org/jump?q=xdg-open">xdg-open</a>):</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ make run
PYENV usage: <span class="nb">source</span> ./local/py3/bin/activate
PYENV install .
./local/py3/bin/python ./searx/webapp.py
...
INFO:werkzeug: * Running on http://127.0.0.1:8888/ <span class="o">(</span>Press CTRL+C to quit<span class="o">)</span>
...
</pre></div>
</div>
</div>
<div class="section" id="make-clean">
<span id="id2"></span><h2><a class="toc-backref" href="#id9"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">clean</span></code></a><a class="headerlink" href="#make-clean" title="Permalink to this headline"></a></h2>
<p>Drop all intermediate files, all builds, but keep sources untouched. Includes
target <code class="docutils literal notranslate"><span class="pre">pyclean</span></code> which drops ./local environment. Before calling <code class="docutils literal notranslate"><span class="pre">make</span>
<span class="pre">clean</span></code> stop all processes using <a class="reference internal" href="#make-pyenv"><span class="std std-ref">Python environment</span></a>.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ make clean
CLEAN pyclean
CLEAN clean
</pre></div>
</div>
</div>
<div class="section" id="make-docs-docs-live-docs-clean">
<span id="make-docs"></span><h2><a class="toc-backref" href="#id10"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs</span> <span class="pre">docs-live</span> <span class="pre">docs-clean</span></code></a><a class="headerlink" href="#make-docs-docs-live-docs-clean" title="Permalink to this headline"></a></h2>
<p>We describe the usage of the <code class="docutils literal notranslate"><span class="pre">doc*</span></code> targets in the <a class="reference internal" href="contribution_guide.html#contrib-docs"><span class="std std-ref">How to contribute /
Documentation</span></a> section. If you want to edit the documentation
read our <a class="reference internal" href="contribution_guide.html#make-docs-live"><span class="std std-ref">live build</span></a> section. If you are working in your own brand,
adjust your <a class="reference internal" href="#makefile-setup"><span class="std std-ref">Makefile setup</span></a>.</p>
</div>
<div class="section" id="make-gh-pages">
<span id="id3"></span><h2><a class="toc-backref" href="#id11"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">gh-pages</span></code></a><a class="headerlink" href="#make-gh-pages" title="Permalink to this headline"></a></h2>
<p>To deploy on github.io first adjust your <a class="reference internal" href="#makefile-setup"><span class="std std-ref">Makefile setup</span></a>. For any further read <a class="reference internal" href="contribution_guide.html#deploy-on-github-io"><span class="std std-ref">deploy on github.io</span></a>.</p>
</div>
<div class="section" id="make-test">
<span id="id4"></span><h2><a class="toc-backref" href="#id12"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test</span></code></a><a class="headerlink" href="#make-test" title="Permalink to this headline"></a></h2>
<p>Runs a series of tests: <code class="docutils literal notranslate"><span class="pre">test.pep8</span></code>, <code class="docutils literal notranslate"><span class="pre">test.unit</span></code>, <code class="docutils literal notranslate"><span class="pre">test.robot</span></code> and does
additional <a class="reference internal" href="#make-pylint"><span class="std std-ref">pylint checks</span></a>. You can run tests selective,
e.g.:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ make test.pep8 test.unit
. ./local/py3/bin/activate<span class="p">;</span> ./manage.sh pep8_check
<span class="o">[</span>!<span class="o">]</span> Running pep8 check
. ./local/py3/bin/activate<span class="p">;</span> ./manage.sh unit_tests
<span class="o">[</span>!<span class="o">]</span> Running unit tests
</pre></div>
</div>
</div>
<div class="section" id="make-pylint">
<span id="id5"></span><h2><a class="toc-backref" href="#id13"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">pylint</span></code></a><a class="headerlink" href="#make-pylint" title="Permalink to this headline"></a></h2>
<p>Before commiting its recommend to do some (more) linting. <a class="reference external" href="https://www.pylint.org/">Pylint</a> is known as
one of the best source-code, bug and quality checker for the Python programming
language. <a class="reference external" href="https://www.pylint.org/">Pylint</a> is not yet a quality gate within our searx project (like
<a class="reference internal" href="#make-test"><span class="std std-ref">test.pep8</span></a> it is), but <a class="reference external" href="https://www.pylint.org/">Pylint</a> can help to improve code
quality anyway. The pylint profile we use at searx project is found in
projects root folder <a class="reference external" href="https://github.com/asciimoo/searx/blob/master/.pylintrc">git://.pylintrc</a>.</p>
<p>Code quality is a ongoing process. Dont try to fix all messages from Pylint,
run Pylint and check if your changed lines are bringing up new messages. If so,
fix it. By this, code quality gets incremental better and if there comes the
day, the linting is balanced out, we might decide to add Pylint as a quality
gate.</p>
</div>
<div class="section" id="make-pybuild">
<h2><a class="toc-backref" href="#id14"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">pybuild</span></code></a><a class="headerlink" href="#make-pybuild" title="Permalink to this headline"></a></h2>
<p>Build Python packages in <code class="docutils literal notranslate"><span class="pre">./dist/py</span></code>.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ make pybuild
...
BUILD pybuild
running sdist
running egg_info
...
$ ls ./dist/py/
searx-0.15.0-py3-none-any.whl searx-0.15.0.tar.gz
</pre></div>
</div>
<p>To upload packages to <a class="reference external" href="https://pypi.org/">PyPi</a>, there is also a <code class="docutils literal notranslate"><span class="pre">upload-pypi</span></code> target. It needs
<a class="reference external" href="https://twine.readthedocs.io/en/latest/">twine</a> to be installed. Since you are not the owner of <a class="reference external" href="https://pypi.org/project/searx">PyPi: searx</a> you will
never need the latter.</p>
</div>
</div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/searx_logo_small.png" alt="Logo"/>
</a></p>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/asciimoo/searx">Source</a>
<li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a>
<li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a>
<li><a href="https://twitter.com/Searx_engine">Twitter</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../index.html">Overview</a>
<ul>
<li><a href="index.html">Developer documentation</a>
<ul>
<li>Previous: <a href="translation.html" title="previous chapter">Translation</a>
<li>Next: <a href="reST.html" title="next chapter">reST primer</a></ul>
</li>
</ul>
</li>
</ul>
<div 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" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2019, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.3.1.
</div>
<script type="text/javascript" src="../_static/version_warning_offset.js"></script>
</body>
</html>

Some files were not shown because too many files have changed in this diff Show More