diff options
author | 2019-10-18 21:25:56 +0200 | |
---|---|---|
committer | 2019-10-18 21:25:56 +0200 | |
commit | e6d2d321551f11531824005004a8f6ba825c97fc (patch) | |
tree | 81755737e3394d7396e48d7b99842c3b281e005c /app | |
parent | Change the documentation link to the wiki page (diff) | |
download | packages-5-e6d2d321551f11531824005004a8f6ba825c97fc.tar.gz packages-5-e6d2d321551f11531824005004a8f6ba825c97fc.tar.bz2 packages-5-e6d2d321551f11531824005004a8f6ba825c97fc.zip |
Move the query documentation to a new page
Move the documentation for advanced search queries to /about/queries
Signed-off-by: Max Magorsch <max@magorsch.de>
Diffstat (limited to 'app')
-rw-r--r-- | app/views/about/index.html.erb | 5 | ||||
-rw-r--r-- | app/views/about/queries.html.erb | 171 |
2 files changed, 176 insertions, 0 deletions
diff --git a/app/views/about/index.html.erb b/app/views/about/index.html.erb index 5d9ed0f..efa98a2 100644 --- a/app/views/about/index.html.erb +++ b/app/views/about/index.html.erb @@ -15,6 +15,11 @@ <h2>FAQ</h2> <dl> + <dt>How do I use advanced search queries?</dt> + <dd> + Please view the <a href="/about/queries">advanced search queries page</a> for further information about advanced search queries. + </dd> + <br> <dt>How often is the site updated?</dt> <dd> Updates are scheduled <strong>every 10 minutes</strong> and are processed using delayed jobs. diff --git a/app/views/about/queries.html.erb b/app/views/about/queries.html.erb new file mode 100644 index 0000000..bdba20a --- /dev/null +++ b/app/views/about/queries.html.erb @@ -0,0 +1,171 @@ +<ol class="breadcrumb"> + <li><a href="/"><%= t :home %></a></li> + <li><a href="/about"><%= t :about %></a></li> + <li class="active"><%= t :queries %></li> +</ol> + +<h1><%= t :queries %></h1> + +This website provides a search functionality to find Gentoo packages. You can use field/value pairs combined with operators to run advanced search queries. +The possible fields and operators are summarized in the following tables: +<ul style="margin-top:5px;"> + <li><a href="#fields">Possible Fields</a></li> + <li><a href="#operators">Possible Operators</a></li> + <li><a href="#examples">Examples</a></li> +</ul> + +<hr> + +<h2 id="fields">Possible Fields</h2> + +<table class="table"> + <thead> + <tr> + <th scope="col">Field</th> + <th scope="col">Description</th> + </tr> + </thead> + <tbody> + <tr> + <th scope="row">atom</th> + <td>The unique identifier of a package <br> <i style="padding-left:2em">e.g. sys-kernel/gentoo-sources</i></td> + </tr> + <tr> + <th scope="row">category</th> + <td>The category of a package <br> <i style="padding-left:2em">e.g. sys-kernel</i></td> + </tr> + <tr> + <th scope="row">name</th> + <td>The name of a package <br> <i style="padding-left:2em">e.g. gentoo-sources</i></td> + </tr> + <tr> + <th scope="row">description</th> + <td>The description of a package <br> <i style="padding-left:2em">e.g. A tiling window manager</i> </td> + </tr> + <tr> + <th scope="row">longdescription</th> + <td>The full descripiton of a package <br> <i style="padding-left:2em">e.g. xmonad is a tiling window manager for [...]</i></td> + </tr> + <tr> + <th scope="row">homepage</th> + <td>The homepage of a package <br> <i style="padding-left:2em">e.g. http://xmonad.org</i></td> + </tr> + <tr> + <th scope="row">license</th> + <td>The license of a package <br> <i style="padding-left:2em">e.g. BSD</i></td> + </tr> + <tr> + <th scope="row">Maintainers</th> + <td></td> + </tr> + <tr> + <th scope="row" style="padding-left:2em">maintainers.name</th> + <td>The name of the maintainer <br> <i style="padding-left:2em">e.g. Gentoo Haskell</i></td> + </tr> + <tr> + <th scope="row" style="padding-left:2em">maintainers.description</th> + <td>The description of the maintainers</td> + </tr> + <tr> + <th scope="row" style="padding-left:2em">maintainers.type</th> + <td>The type of maintainter <br> <i style="padding-left:2em">e.g. project</i></td> + </tr> + <tr> + <th scope="row" style="padding-left:2em">maintainers.restrict</th> + <td></td> + </tr> + <tr> + <th scope="row" style="padding-left:2em">maintainers.email</th> + <td>The email of the maintainer <br> <i style="padding-left:2em">e.g. haskell@gentoo.org</i></td> + </tr> + <tr> + <th scope="row">Useflag</th> + <td></td> + </tr> + <tr> + <th scope="row" style="padding-left:1em">global</th> + <td></td> + </tr> + <tr> + <th scope="row" style="padding-left:2em">useflags.global.name</th> + <td>The name of the global useflag <br> <i style="padding-left:2em">e.g. hscolour</i></td> + </tr> + <tr> + <th scope="row" style="padding-left:2em">useflags.global.description</th> + <td>The description of the global useflag <br> <i style="padding-left:2em">e.g. Include coloured haskell sources to [...]</i></td> + </tr> + <tr> + <th scope="row" style="padding-left:1em">local</th> + <td></td> + </tr> + <tr> + <th scope="row" style="padding-left:2em">useflags.local.name</th> + <td>The name of the local useflag</td> + </tr> + <tr> + <th scope="row" style="padding-left:2em">useflags.local.description</th> + <td>The description of the local useflag</td> + </tr> + <tr> + <th scope="row" style="padding-left:1em">use_expand</th> + <td></td> + </tr> + <tr> + <th scope="row" style="padding-left:2em">useflags.use_expand.name</th> + <td>The name of the local use_expand</td> + </tr> + <tr> + <th scope="row" style="padding-left:2em">useflags.use_expand.description</th> + <td>The description of the use_expand</td> + </tr> + <tr> + <th scope="row" style="padding-left:2em">useflags.use_expand.use_expand_prefix</th> + <td>The use_expand prefix <br> <i style="padding-left:2em">e.g. python_targets</i></td> + </tr> + <tr> + <th scope="row">metadata_hash</th> + <td>The hash of the metadata <br> <i style="padding-left:2em">e.g. 5cd76e098f966b4edcd1848866dd9099</i></td> + </tr> + </tbody> +</table> +<h2 id="operators">Possible Operators</h2> +The following operators can be used to combine multiple field/value pairs: +<table class="table"> + <thead> + <tr> + <th scope="col">Operator</th> + <th scope="col">Description</th> + </tr> + </thead> + <tbody> + <tr> + <th scope="row"></th> + <td>The term <b>should</b> appear (default)</td> + </tr> + <tr> + <th scope="row">+</th> + <td>The term <b>must</b> appear</td> + </tr> + <tr> + <th scope="row">-</th> + <td>The term <b>must not</b> appear</td> + </tr> + <tr> + <th scope="row">"..."</th> + <td>Can be used to <b>group</b> phrases <br> <i style="padding-left:2em">e.g. +description:"window manager"</i></td> + </tr> + </tbody> +</table> + +<h2 id="examples">Examples</h2> + +<ul> + <li>Find all packages named git: <br><code style="margin-left:2em">+name:git</code></li> + <li>Find all packages in the category sys-kernel: <br><code style="margin-left:2em">+category:sys-kernel</code></li> + <li>Find all packages with a BSD license: <br><code style="margin-left:2em">+license:BSD</code></li> + <li>Find all packages that neither have a BSD license nor a MIT license: <br><code style="margin-left:2em">-license:BSD -license:MIT</code></li> + <li>Find all packages maintained by the Haskell Team: <br><code style="margin-left:2em">+maintainer.email:haskell@gentoo.org</code></li> + <li>Find all packages maintained by the Haskell Team but that aren't in the 'dev-haskell' category: <br><code style="margin-left:2em">+maintainer.email:haskell@gentoo.org -category:dev-haskell</code></li> + <li>Find all packages those description contains 'window manager': <br><code style="margin-left:2em">+description:"window manager"</code></li> + <li>Find all packages that contain the use_expand 'python_targets': <br><code style="margin-left:2em">+useflags.use_expand.use_expand_prefix:python_targets</code></li> +</ul>
\ No newline at end of file |