.oO SearXNG Developer Documentation Oo.
|
Public Member Functions | |
__init__ (self, typing.Optional[typing.Type[InfoPage]] page_class=None, typing.Optional[str] info_folder=None) | |
get_page (self, str pagename, typing.Optional[str] locale=None) | |
iter_pages (self, typing.Optional[str] locale=None, fallback_to_default=False) | |
Public Attributes | |
page_class = page_class or InfoPage | |
str | folder = info_folder or _INFO_FOLDER |
dict | CACHE = {} |
str | locale_default = 'en' |
list | locales |
list | toc |
tuple | locales = (pagename, locale) |
str | CACHE = os.path.join(self.folder, locale.replace('-', '_'), pagename) + '.md' |
Cached rendering of the online documentation a SearXNG instance has. :param page_class: render online documentation by :py:obj:`InfoPage` parser. :type page_class: :py:obj:`InfoPage` :param info_folder: information directory :type info_folder: str
Definition at line 117 of file __init__.py.
searx.infopage.InfoPageSet.__init__ | ( | self, | |
typing.Optional[typing.Type[InfoPage]] | page_class = None, | ||
typing.Optional[str] | info_folder = None ) |
Definition at line 127 of file __init__.py.
searx.infopage.InfoPageSet.get_page | ( | self, | |
str | pagename, | ||
typing.Optional[str] | locale = None ) |
Return ``pagename`` instance of :py:obj:`InfoPage` :param pagename: name of the page, a value from :py:obj:`InfoPageSet.toc` :type pagename: str :param locale: language of the page, e.g. ``en``, ``zh_Hans_CN`` (default: :py:obj:`InfoPageSet.i18n_origin`) :type locale: str
Definition at line 151 of file __init__.py.
References searx.infopage.InfoPageSet.locale_default, and searx.infopage.InfoPageSet.toc.
Referenced by searx.infopage.InfoPageSet.iter_pages().
searx.infopage.InfoPageSet.iter_pages | ( | self, | |
typing.Optional[str] | locale = None, | ||
fallback_to_default = False ) |
Iterate over all pages of the TOC
Definition at line 186 of file __init__.py.
References searx.infopage.InfoPageSet.get_page(), searx.infopage.InfoPageSet.locale_default, and searx.infopage.InfoPageSet.toc.
dict searx.infopage.InfoPageSet.CACHE = {} |
Definition at line 134 of file __init__.py.
str searx.infopage.InfoPageSet.CACHE = os.path.join(self.folder, locale.replace('-', '_'), pagename) + '.md' |
Definition at line 171 of file __init__.py.
str searx.infopage.InfoPageSet.folder = info_folder or _INFO_FOLDER |
Definition at line 131 of file __init__.py.
str searx.infopage.InfoPageSet.locale_default = 'en' |
Definition at line 136 of file __init__.py.
Referenced by searx.infopage.InfoPageSet.get_page(), and searx.infopage.InfoPageSet.iter_pages().
list searx.infopage.InfoPageSet.locales |
Definition at line 139 of file __init__.py.
tuple searx.infopage.InfoPageSet.locales = (pagename, locale) |
Definition at line 166 of file __init__.py.
searx.infopage.InfoPageSet.page_class = page_class or InfoPage |
Definition at line 130 of file __init__.py.
searx.infopage.InfoPageSet.toc |
Definition at line 144 of file __init__.py.
Referenced by searx.infopage.InfoPageSet.get_page(), and searx.infopage.InfoPageSet.iter_pages().