Skip to content

Commit

Permalink
Updated
Browse files Browse the repository at this point in the history
  • Loading branch information
wummel committed Nov 19, 2024
1 parent 6ff9e62 commit bf2e8f6
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 61 deletions.
2 changes: 1 addition & 1 deletion _sources/index.md.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ APE (.ape), AR (.a), ARC (.arc), ARJ (.arj), BZIP2 (.bz2), BZIP3 (.bz3),
CAB (.cab), CHM (.chm), COMPRESS (.Z), CPIO (.cpio), DEB (.deb), DMS (.dms),
FLAC (.flac), GZIP (.gz), ISO (.iso), LRZIP (.lrz), LZH (.lha, .lzh),
LZIP (.lz), LZMA (.lzma), LZOP (.lzo), RPM (.rpm), RAR (.rar, .cbr),
RZIP (.rz), SHN (.shn), TAR (.tar, .cbt), XZ (.xz),
RZIP (.rz), SHN (.shn), TAR (.tar, .cbt), UDF (.udf), XZ (.xz),
ZIP (.zip, .jar, .cbz), ZOO (.zoo) and ZSTANDARD (.zst) archive formats.

It relies on helper applications to handle those archive formats
Expand Down
15 changes: 2 additions & 13 deletions _static/basic.css
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
/*
* basic.css
* ~~~~~~~~~
*
* Sphinx stylesheet -- basic theme.
*
* :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/

/* -- main layout ----------------------------------------------------------- */
Expand Down Expand Up @@ -115,15 +108,11 @@ img {
/* -- search page ----------------------------------------------------------- */

ul.search {
margin: 10px 0 0 20px;
padding: 0;
margin-top: 10px;
}

ul.search li {
padding: 5px 0 5px 20px;
background-image: url(file.png);
background-repeat: no-repeat;
background-position: 0 7px;
padding: 5px 0;
}

ul.search li a {
Expand Down
7 changes: 0 additions & 7 deletions _static/doctools.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
/*
* doctools.js
* ~~~~~~~~~~~
*
* Base JavaScript utilities for all Sphinx HTML documentation.
*
* :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
"use strict";

Expand Down
7 changes: 0 additions & 7 deletions _static/language_data.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
/*
* 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-2024 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"];
Expand Down
38 changes: 25 additions & 13 deletions _static/searchtools.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
/*
* searchtools.js
* ~~~~~~~~~~~~~~~~
*
* Sphinx JavaScript utilities for the full-text search.
*
* :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
"use strict";

Expand All @@ -20,7 +13,7 @@ if (typeof Scorer === "undefined") {
// and returns the new score.
/*
score: result => {
const [docname, title, anchor, descr, score, filename] = result
const [docname, title, anchor, descr, score, filename, kind] = result
return score
},
*/
Expand All @@ -47,6 +40,14 @@ if (typeof Scorer === "undefined") {
};
}

// Global search result kind enum, used by themes to style search results.
class SearchResultKind {
static get index() { return "index"; }
static get object() { return "object"; }
static get text() { return "text"; }
static get title() { return "title"; }
}

const _removeChildren = (element) => {
while (element && element.lastChild) element.removeChild(element.lastChild);
};
Expand All @@ -64,9 +65,13 @@ const _displayItem = (item, searchTerms, highlightTerms) => {
const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY;
const contentRoot = document.documentElement.dataset.content_root;

const [docName, title, anchor, descr, score, _filename] = item;
const [docName, title, anchor, descr, score, _filename, kind] = item;

let listItem = document.createElement("li");
// Add a class representing the item's type:
// can be used by a theme's CSS selector for styling
// See SearchResultKind for the class names.
listItem.classList.add(`kind-${kind}`);
let requestUrl;
let linkUrl;
if (docBuilder === "dirhtml") {
Expand Down Expand Up @@ -115,8 +120,10 @@ const _finishSearch = (resultCount) => {
"Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories."
);
else
Search.status.innerText = _(
"Search finished, found ${resultCount} page(s) matching the search query."
Search.status.innerText = Documentation.ngettext(
"Search finished, found one page matching the search query.",
"Search finished, found ${resultCount} pages matching the search query.",
resultCount,
).replace('${resultCount}', resultCount);
};
const _displayNextItem = (
Expand All @@ -138,7 +145,7 @@ const _displayNextItem = (
else _finishSearch(resultCount);
};
// Helper function used by query() to order search results.
// Each input is an array of [docname, title, anchor, descr, score, filename].
// Each input is an array of [docname, title, anchor, descr, score, filename, kind].
// Order the results by score (in opposite order of appearance, since the
// `_displayNextItem` function uses pop() to retrieve items) and then alphabetically.
const _orderResultsByScoreThenName = (a, b) => {
Expand Down Expand Up @@ -248,6 +255,7 @@ const Search = {
searchSummary.classList.add("search-summary");
searchSummary.innerText = "";
const searchList = document.createElement("ul");
searchList.setAttribute("role", "list");
searchList.classList.add("search");

const out = document.getElementById("search-results");
Expand Down Expand Up @@ -318,7 +326,7 @@ const Search = {
const indexEntries = Search._index.indexentries;

// Collect multiple result groups to be sorted separately and then ordered.
// Each is an array of [docname, title, anchor, descr, score, filename].
// Each is an array of [docname, title, anchor, descr, score, filename, kind].
const normalResults = [];
const nonMainIndexResults = [];

Expand All @@ -337,6 +345,7 @@ const Search = {
null,
score + boost,
filenames[file],
SearchResultKind.title,
]);
}
}
Expand All @@ -354,6 +363,7 @@ const Search = {
null,
score,
filenames[file],
SearchResultKind.index,
];
if (isMain) {
normalResults.push(result);
Expand Down Expand Up @@ -475,6 +485,7 @@ const Search = {
descr,
score,
filenames[match[0]],
SearchResultKind.object,
]);
};
Object.keys(objects).forEach((prefix) =>
Expand Down Expand Up @@ -585,6 +596,7 @@ const Search = {
null,
score,
filenames[file],
SearchResultKind.text,
]);
}
return results;
Expand Down
12 changes: 6 additions & 6 deletions genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Index &#8212; patool documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d1102ebc" />
<link rel="stylesheet" type="text/css" href="_static/basic.css?v=c058f7c8" />
<link rel="stylesheet" type="text/css" href="_static/basic.css?v=686e5160" />
<link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=27fed22d" />
<script src="_static/documentation_options.js?v=5929fcd5"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/doctools.js?v=9bcbadda"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="#" />
<link rel="search" title="Search" href="search.html" />
Expand All @@ -26,12 +26,12 @@
<div class="document">

<section id="downloads">
<a href="https://pypi.python.org/packages/source/p/patool/patool-3.0.3.tar.gz"
<a href="https://pypi.python.org/packages/source/p/patool/patool-3.1.0.tar.gz"
title="Source .tar.gz package"
id="download-tar-gz" class="button"><span>patool-3.0.3.tar.gz</span></a>
<a href="https://pypi.python.org/packages/py2.py3/p/patool/patool-3.0.3-py2.py3-none-any.whl"
id="download-tar-gz" class="button"><span>patool-3.1.0.tar.gz</span></a>
<a href="https://pypi.python.org/packages/py2.py3/p/patool/patool-3.1.0-py2.py3-none-any.whl"
title="Wheel .whl package"
id="download-exe" class="button"><span>patool-3.0.3.whl</span></a>
id="download-exe" class="button"><span>patool-3.1.0.whl</span></a>
<a href="https://github.com/wummel/patool" id="view-on-github" class="button"><span>View on GitHub</span></a>
</section>

Expand Down
14 changes: 7 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@

<title>Patool &#8212; patool documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d1102ebc" />
<link rel="stylesheet" type="text/css" href="_static/basic.css?v=c058f7c8" />
<link rel="stylesheet" type="text/css" href="_static/basic.css?v=686e5160" />
<link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=27fed22d" />
<script src="_static/documentation_options.js?v=5929fcd5"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/doctools.js?v=9bcbadda"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
Expand All @@ -27,12 +27,12 @@
<div class="document">

<section id="downloads">
<a href="https://pypi.python.org/packages/source/p/patool/patool-3.0.3.tar.gz"
<a href="https://pypi.python.org/packages/source/p/patool/patool-3.1.0.tar.gz"
title="Source .tar.gz package"
id="download-tar-gz" class="button"><span>patool-3.0.3.tar.gz</span></a>
<a href="https://pypi.python.org/packages/py2.py3/p/patool/patool-3.0.3-py2.py3-none-any.whl"
id="download-tar-gz" class="button"><span>patool-3.1.0.tar.gz</span></a>
<a href="https://pypi.python.org/packages/py2.py3/p/patool/patool-3.1.0-py2.py3-none-any.whl"
title="Wheel .whl package"
id="download-exe" class="button"><span>patool-3.0.3.whl</span></a>
id="download-exe" class="button"><span>patool-3.1.0.whl</span></a>
<a href="https://github.com/wummel/patool" id="view-on-github" class="button"><span>View on GitHub</span></a>
</section>

Expand Down Expand Up @@ -65,7 +65,7 @@ <h2>Description<a class="headerlink" href="#description" title="Link to this hea
CAB (.cab), CHM (.chm), COMPRESS (.Z), CPIO (.cpio), DEB (.deb), DMS (.dms),
FLAC (.flac), GZIP (.gz), ISO (.iso), LRZIP (.lrz), LZH (.lha, .lzh),
LZIP (.lz), LZMA (.lzma), LZOP (.lzo), RPM (.rpm), RAR (.rar, .cbr),
RZIP (.rz), SHN (.shn), TAR (.tar, .cbt), XZ (.xz),
RZIP (.rz), SHN (.shn), TAR (.tar, .cbt), UDF (.udf), XZ (.xz),
ZIP (.zip, .jar, .cbz), ZOO (.zoo) and ZSTANDARD (.zst) archive formats.</p>
<p>It relies on helper applications to handle those archive formats
(for example <code class="docutils literal notranslate"><span class="pre">xz</span></code> for XZ (.xz) archives).</p>
Expand Down
Binary file modified objects.inv
Binary file not shown.
12 changes: 6 additions & 6 deletions search.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Search &#8212; patool documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d1102ebc" />
<link rel="stylesheet" type="text/css" href="_static/basic.css?v=c058f7c8" />
<link rel="stylesheet" type="text/css" href="_static/basic.css?v=686e5160" />
<link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=27fed22d" />

<script src="_static/documentation_options.js?v=5929fcd5"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/doctools.js?v=9bcbadda"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/searchtools.js"></script>
<script src="_static/language_data.js"></script>
Expand All @@ -33,12 +33,12 @@
<div class="document">

<section id="downloads">
<a href="https://pypi.python.org/packages/source/p/patool/patool-3.0.3.tar.gz"
<a href="https://pypi.python.org/packages/source/p/patool/patool-3.1.0.tar.gz"
title="Source .tar.gz package"
id="download-tar-gz" class="button"><span>patool-3.0.3.tar.gz</span></a>
<a href="https://pypi.python.org/packages/py2.py3/p/patool/patool-3.0.3-py2.py3-none-any.whl"
id="download-tar-gz" class="button"><span>patool-3.1.0.tar.gz</span></a>
<a href="https://pypi.python.org/packages/py2.py3/p/patool/patool-3.1.0-py2.py3-none-any.whl"
title="Wheel .whl package"
id="download-exe" class="button"><span>patool-3.0.3.whl</span></a>
id="download-exe" class="button"><span>patool-3.1.0.whl</span></a>
<a href="https://github.com/wummel/patool" id="view-on-github" class="button"><span>View on GitHub</span></a>
</section>

Expand Down
Loading

0 comments on commit bf2e8f6

Please sign in to comment.