ansys.tools.meilisearch.cli#
PyMeilisearch CLI module.
Functions#
|
Provides the CLI tool for scraping documents or a website for uploading to Meilisearch. |
|
Upload documents or a website using a template and index. |
|
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:
- template
str Name of the template to use or the path to where the template file is located. Available templates are
sphinx_pydataanddefault.- index
str Name of the Meilisearch index to use to identify the content.
- source
str Format type for the documents to upload. Options are
html,url, andgithub.- location
str Location of the documents or website to upload.
- cname
str CNAME that hosts the documents. While supplying a CNAME is optional, doing so is recommended for scraping documents on the local host.
- port
int Port that the localhost is connected on.
- orgs
strorlist[str] One or more GitHub organizations to scrape public GitHub pages from.
- stop_urls
strorlist[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.
- template
Notes
Ensure that these environment variables are set:
MEILISEARCH_HOST_URL: URL for the Meilisearch hostMEILISEARCH_API_KEY: API key (admin) for the Meilisearch hostGH_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.