ansys.tools.meilisearch.cli#

PyMeilisearch CLI module.

Functions#

main()

Provides the CLI tool for scraping documents or a website for uploading to Meilisearch.

upload(template, index, source, location, cname, port, ...)

Upload documents or a website using a template and index.

version()

Get the version of your PyMeilisearch installation.

Module Contents#

ansys.tools.meilisearch.cli.main()#

Provides the CLI tool for scraping documents or a website for uploading to Meilisearch.

ansys.tools.meilisearch.cli.upload(template, index, source, location, cname, port, orgs, stop_urls)#

Upload documents or a website using a template and index.

Parameters:
templatestr

Name of the template to use or the path to where the template file is located. Available templates are sphinx_pydata and default.

indexstr

Name of the Meilisearch index to use to identify the content.

sourcestr

Format type for the documents to upload. Options are html, url, and github.

locationstr

Location of the documents or website to upload.

cnamestr

CNAME that hosts the documents. While supplying a CNAME is optional, doing so is recommended for scraping documents on the local host.

portint

Port that the localhost is connected on.

orgsstr or list[str]

One or more GitHub organizations to scrape public GitHub pages from.

stop_urlsstr or list[str], default: None

A list of stop points when scraping URLs. If specified, crawling will stop when encountering any URL containing any of the strings in this list.

Notes

Ensure that these environment variables are set:

  • MEILISEARCH_HOST_URL: URL for the Meilisearch host

  • MEILISEARCH_API_KEY: API key (admin) for the Meilisearch host

  • GH_PUBLIC_TOKEN: GitHub token for the organization (if running in a GitHub CI/CD environment)

ansys.tools.meilisearch.cli.version()#

Get the version of your PyMeilisearch installation.