summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-29 11:33:46 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-29 11:33:46 +0000
commit1d02a235f0b77c0997b43b1e5d20309d56609382 (patch)
tree4c8b45dc9194611697285f236a500636e075a4a2
parentc7e57f66c4d1a57a133eb6472af7ef7a1a5b302f (diff)
automatic import of python-mkdocs-izsam-search
-rw-r--r--.gitignore1
-rw-r--r--python-mkdocs-izsam-search.spec364
-rw-r--r--sources1
3 files changed, 366 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..0edfc60 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/mkdocs-izsam-search-0.1.8.tar.gz
diff --git a/python-mkdocs-izsam-search.spec b/python-mkdocs-izsam-search.spec
new file mode 100644
index 0000000..bc425f4
--- /dev/null
+++ b/python-mkdocs-izsam-search.spec
@@ -0,0 +1,364 @@
+%global _empty_manifest_terminate_build 0
+Name: python-mkdocs-izsam-search
+Version: 0.1.8
+Release: 1
+Summary: MkDocs plugin to extend search functions
+License: MIT
+URL: https://pypi.org/project/mkdocs-izsam-search/
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/2a/ed/8eaf4d58b3147ec80a396cb2c039baca7406429c70309e4fdbb87cbed14d/mkdocs-izsam-search-0.1.8.tar.gz
+BuildArch: noarch
+
+Requires: python3-mkdocs
+
+%description
+# mkdocs-search-izsam
+
+This is a MkDocs plugin that extends native search plugin in order to allow searches work locally. It will write two .js files (one storing a variable for `config` and one storing a variable for `docs`) that can be loaded in the theme using:
+
+```html
+<script src="{{ 'search/search_config.js'|url }}"></script>
+<script src="{{ 'search/search_docs.js'|url }}"></script>
+```
+
+This will allow to avoid CORS problem caused by `loadJSON` functions and native `worker.js` model.
+
+#### Important!
+
+To use .js features and bypass the native `worker.js` model, the theme should be configured to use the `search_index_only` option as `true`:
+
+```yaml
+theme:
+ name: null
+ custom_dir: your_custom_theme
+ include_search_page: true
+ search_index_only: true
+```
+
+and then manage search with your favourite js library (in our project we still use `lunr.js` loaded in a script tag in the theme). For additional information please refer to [https://www.mkdocs.org/dev-guide/themes/#search-and-themes](https://www.mkdocs.org/dev-guide/themes/#search-and-themes).
+
+## Setup
+
+Install the plugin using pip:
+
+`pip install mkdocs-izsam-search`
+
+Activate the plugin in `mkdocs.yml`:
+```yaml
+plugins:
+ - izsam-search
+```
+
+It is possible to use same config options of the native search plugin:
+
+```yaml
+- izsam-search:
+ lang: en
+```
+
+More information about plugins in the [MkDocs documentation][mkdocs-plugins].
+
+## See Also
+
+[mkdocs-plugins]: http://www.mkdocs.org/user-guide/plugins/
+[mkdocs-template]: https://www.mkdocs.org/user-guide/custom-themes/#template-variables
+[mkdocs-block]: https://www.mkdocs.org/user-guide/styling-your-docs/#overriding-template-blocks
+
+
+# Change log
+
+## [0.1.8] - 2021-11-10
+
+### Implementation of the main feature: build .js files to allow local search and avoid CORS problems
+- Added necessary code in plugin.py
+- Added instruction on README.md
+
+## [0.1.7] - 2021-11-10
+
+### Configuration error
+- Configuration error: mkdocs_izsam_search.search_index.SearchIndex must be a subclass of mkdocs.plugins.BasePlugin. Changed search_index.py
+
+## [0.1.6] - 2021-11-10
+
+### Configuration error
+- Configuration error: mkdocs_izsam_search.search_index.SearchIndex must be a subclass of mkdocs.plugins.BasePlugin. Changed entry_points in setup.py
+
+## [0.1.5] - 2021-11-10
+
+### Setup
+- different syntax for setup()
+
+## [0.1.4] - 2021-11-10
+
+### Setup
+- entry_points declaration in setup()
+
+## [0.1.3] - 2021-11-10
+
+### Debug on MANIFEST.in
+- Modified `MANIFEST.in` there was an error causing import data issues
+
+## [0.1.2] - 2021-11-10
+
+### Edited
+- `README.md`
+
+## [0.0.1] - 2021-11-10
+
+### Added
+- `HISTORY.md`
+
+
+
+
+%package -n python3-mkdocs-izsam-search
+Summary: MkDocs plugin to extend search functions
+Provides: python-mkdocs-izsam-search
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-mkdocs-izsam-search
+# mkdocs-search-izsam
+
+This is a MkDocs plugin that extends native search plugin in order to allow searches work locally. It will write two .js files (one storing a variable for `config` and one storing a variable for `docs`) that can be loaded in the theme using:
+
+```html
+<script src="{{ 'search/search_config.js'|url }}"></script>
+<script src="{{ 'search/search_docs.js'|url }}"></script>
+```
+
+This will allow to avoid CORS problem caused by `loadJSON` functions and native `worker.js` model.
+
+#### Important!
+
+To use .js features and bypass the native `worker.js` model, the theme should be configured to use the `search_index_only` option as `true`:
+
+```yaml
+theme:
+ name: null
+ custom_dir: your_custom_theme
+ include_search_page: true
+ search_index_only: true
+```
+
+and then manage search with your favourite js library (in our project we still use `lunr.js` loaded in a script tag in the theme). For additional information please refer to [https://www.mkdocs.org/dev-guide/themes/#search-and-themes](https://www.mkdocs.org/dev-guide/themes/#search-and-themes).
+
+## Setup
+
+Install the plugin using pip:
+
+`pip install mkdocs-izsam-search`
+
+Activate the plugin in `mkdocs.yml`:
+```yaml
+plugins:
+ - izsam-search
+```
+
+It is possible to use same config options of the native search plugin:
+
+```yaml
+- izsam-search:
+ lang: en
+```
+
+More information about plugins in the [MkDocs documentation][mkdocs-plugins].
+
+## See Also
+
+[mkdocs-plugins]: http://www.mkdocs.org/user-guide/plugins/
+[mkdocs-template]: https://www.mkdocs.org/user-guide/custom-themes/#template-variables
+[mkdocs-block]: https://www.mkdocs.org/user-guide/styling-your-docs/#overriding-template-blocks
+
+
+# Change log
+
+## [0.1.8] - 2021-11-10
+
+### Implementation of the main feature: build .js files to allow local search and avoid CORS problems
+- Added necessary code in plugin.py
+- Added instruction on README.md
+
+## [0.1.7] - 2021-11-10
+
+### Configuration error
+- Configuration error: mkdocs_izsam_search.search_index.SearchIndex must be a subclass of mkdocs.plugins.BasePlugin. Changed search_index.py
+
+## [0.1.6] - 2021-11-10
+
+### Configuration error
+- Configuration error: mkdocs_izsam_search.search_index.SearchIndex must be a subclass of mkdocs.plugins.BasePlugin. Changed entry_points in setup.py
+
+## [0.1.5] - 2021-11-10
+
+### Setup
+- different syntax for setup()
+
+## [0.1.4] - 2021-11-10
+
+### Setup
+- entry_points declaration in setup()
+
+## [0.1.3] - 2021-11-10
+
+### Debug on MANIFEST.in
+- Modified `MANIFEST.in` there was an error causing import data issues
+
+## [0.1.2] - 2021-11-10
+
+### Edited
+- `README.md`
+
+## [0.0.1] - 2021-11-10
+
+### Added
+- `HISTORY.md`
+
+
+
+
+%package help
+Summary: Development documents and examples for mkdocs-izsam-search
+Provides: python3-mkdocs-izsam-search-doc
+%description help
+# mkdocs-search-izsam
+
+This is a MkDocs plugin that extends native search plugin in order to allow searches work locally. It will write two .js files (one storing a variable for `config` and one storing a variable for `docs`) that can be loaded in the theme using:
+
+```html
+<script src="{{ 'search/search_config.js'|url }}"></script>
+<script src="{{ 'search/search_docs.js'|url }}"></script>
+```
+
+This will allow to avoid CORS problem caused by `loadJSON` functions and native `worker.js` model.
+
+#### Important!
+
+To use .js features and bypass the native `worker.js` model, the theme should be configured to use the `search_index_only` option as `true`:
+
+```yaml
+theme:
+ name: null
+ custom_dir: your_custom_theme
+ include_search_page: true
+ search_index_only: true
+```
+
+and then manage search with your favourite js library (in our project we still use `lunr.js` loaded in a script tag in the theme). For additional information please refer to [https://www.mkdocs.org/dev-guide/themes/#search-and-themes](https://www.mkdocs.org/dev-guide/themes/#search-and-themes).
+
+## Setup
+
+Install the plugin using pip:
+
+`pip install mkdocs-izsam-search`
+
+Activate the plugin in `mkdocs.yml`:
+```yaml
+plugins:
+ - izsam-search
+```
+
+It is possible to use same config options of the native search plugin:
+
+```yaml
+- izsam-search:
+ lang: en
+```
+
+More information about plugins in the [MkDocs documentation][mkdocs-plugins].
+
+## See Also
+
+[mkdocs-plugins]: http://www.mkdocs.org/user-guide/plugins/
+[mkdocs-template]: https://www.mkdocs.org/user-guide/custom-themes/#template-variables
+[mkdocs-block]: https://www.mkdocs.org/user-guide/styling-your-docs/#overriding-template-blocks
+
+
+# Change log
+
+## [0.1.8] - 2021-11-10
+
+### Implementation of the main feature: build .js files to allow local search and avoid CORS problems
+- Added necessary code in plugin.py
+- Added instruction on README.md
+
+## [0.1.7] - 2021-11-10
+
+### Configuration error
+- Configuration error: mkdocs_izsam_search.search_index.SearchIndex must be a subclass of mkdocs.plugins.BasePlugin. Changed search_index.py
+
+## [0.1.6] - 2021-11-10
+
+### Configuration error
+- Configuration error: mkdocs_izsam_search.search_index.SearchIndex must be a subclass of mkdocs.plugins.BasePlugin. Changed entry_points in setup.py
+
+## [0.1.5] - 2021-11-10
+
+### Setup
+- different syntax for setup()
+
+## [0.1.4] - 2021-11-10
+
+### Setup
+- entry_points declaration in setup()
+
+## [0.1.3] - 2021-11-10
+
+### Debug on MANIFEST.in
+- Modified `MANIFEST.in` there was an error causing import data issues
+
+## [0.1.2] - 2021-11-10
+
+### Edited
+- `README.md`
+
+## [0.0.1] - 2021-11-10
+
+### Added
+- `HISTORY.md`
+
+
+
+
+%prep
+%autosetup -n mkdocs-izsam-search-0.1.8
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-mkdocs-izsam-search -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Mon May 29 2023 Python_Bot <Python_Bot@openeuler.org> - 0.1.8-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..0059889
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+83b080d9f97c99c74bafffc134f0713e mkdocs-izsam-search-0.1.8.tar.gz