Sure, here are the step-by-step instructions on how to create a snap and nextcloud module for Xearch meta-search engine for Ubuntu 22.04 server:

1. Install the necessary dependencies:

```
sudo apt install snapcraft nextcloud-client
```

2. Create a directory for your snap:

```
mkdir xearch-snap
```

3. Change directory to the newly created directory:

```
cd xearch-snap
```

4. Create a snapcraft.yaml file:

```
snapcraft.yaml
```

```
name: xearch
version: 1.0.0
summary: Xearch meta-search engine snap
description: A snap for the Xearch meta-search engine.

grade: stable
confinement: strict

apps:
  xearch:
    command: xearch
    plugs:
      - network
      - home
```

5. Build the snap:

```
snapcraft build
```

6. Install the snap:

```
sudo snap install xearch
```

7. Create a Nextcloud module for Xearch:

```
cd /var/www/nextcloud/apps/xearch
```

8. Create a file called index.php:

```
index.php
```

```
<?php

// Include the Xearch library
require_once '/usr/share/xearch/lib/xearch.php';

// Create a Xearch search object
$search = new Xearch();

// Set the search query
$query = $_GET['query'];

// Perform the search
$results = $search->search($query);

// Output the search results
echo '<ul>';
foreach ($results as $result) {
  echo '<li><a href="' . $result['url'] . '">' . $result['title'] . '</a></li>';
}
echo '</ul>';

?>
```

9. Enable the Xearch module in Nextcloud:

```
sudo php occ enable:app xearch
```

10. Restart Nextcloud:

```
sudo systemctl restart nextcloud
```

You should now be able to use Xearch to search your Nextcloud files.
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence