peertube-instance-index-filter/templates/index.tmpl
2025-06-23 09:15:58 +03:00

53 lines
2.9 KiB
Cheetah

<html>
<head>
<meta charset="utf-8">
<title>Peertube instance index</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<h1>Peertube instance index filter</h1>
<p>By using global index of instances and auto-subscribing there are problem by removing from your instance following because it comes back after next sync.</p>
<p>This filter is middleware to collect removed instances and list global index without them</p>
<p>Source code is available on <a href="https://g.arns.lt/zordsdavini/peertube-instance-index-filter">g.arns.lt/zordsdavini/peertube-instance-index-filter</a></p>
<p>Contact on Fediverse: <a href="https://s.arns.lt/@zordsdavini">@zordsdavini@s.arns.lt</a></p>
<table>
<tr>
<th>Filtered instances</th>
<td>{{ .FilteredInstancesCount }}</td>
</tr>
<tr>
<th>Rejected instances</th>
<td>{{ .RejectedInstancesCount }}</td>
</tr>
</table>
<h2>Commands</h2>
<p>App can be called directly and do management in console. For now it is the only way.</p>
<ul>
<li><code>peertube-instance-index-filter -command index -url https://instances.joinpeertube.org/api/v1/instances/hosts -instance-url https://instances.joinpeertube.org/api/v1/instances</code> - add url to index of hosts. Later it will be used to collect instances</li>
<li><code>peertube-instance-index-filter -command collect</code> - collect instances from index of hosts urls</li>
<li><code>peertube-instance-index-filter -command reject -host www.example.com</code> - reject instance from index to exclude it from global index</li>
</ul>
<h2>Links</h2>
<ul>
<li><a href="/">/</a> - some html information about this filter (this page)</li>
<li><a href="/instances">/instances</a> - list of instances in json format with more information. Supports pagination, filter by instance creation date: <code>?start=3&amp;count=100&amp;since=2024-01-10</code>. Sorted by descending creation date. Also it can be used as search by host: <code>?search=www.example.com</code></li>
<li><a href="/instances/hosts">/instances/hosts</a> - list of hosts in json format. Supports pagination, filter by instance creation date: <code>?start=3&amp;count=100&amp;since=2024-01-10</code>. Sorted by descending creation date. <b>This should be given to Peertube instance</b></li>
</ul>
<h2>Setup</h2>
<p>Added docker files as example. See <code>/docker</code> folder.</p>
<p><code>./instances-joinpeertube.db</code> is prepared datebase from <em>instances.joinpeertube.org</em> on 2025-06-20. It can be copied to <code>./instances.db</code> to be used.</p>
<h2>License</h2>
<p>GPLv3</p>
</body>
</html>