Change content.minetest.net to content.luanti.org

This commit is contained in:
rubenwardy 2024-10-29 22:53:28 +00:00
parent a5ac4f38cf
commit dd2e73b40f
15 changed files with 41 additions and 41 deletions

2
.github/SECURITY.md vendored

@ -2,7 +2,7 @@
## Supported Versions
We only support the latest production version, deployed to <https://content.minetest.net>.
We only support the latest production version, deployed to <https://content.luanti.org>.
This is usually the latest `master` commit.
## Reporting a Vulnerability

@ -30,9 +30,9 @@ def _make_feed(title: str, feed_url: str, items: list):
"version": "https://jsonfeed.org/version/1",
"title": title,
"description": gettext("Welcome to the best place to find Luanti mods, games, and texture packs"),
"home_page_url": "https://content.minetest.net/",
"home_page_url": "https://content.luanti.org/",
"feed_url": feed_url,
"icon": "https://content.minetest.net/favicon-128.png",
"icon": "https://content.luanti.org/favicon-128.png",
"expired": False,
"items": items,
}

@ -54,7 +54,7 @@ The response will be a dictionary with the following keys:
Not all endpoints require authentication, but it is done using Bearer tokens:
```bash
curl https://content.minetest.net/api/whoami/ \
curl https://content.luanti.org/api/whoami/ \
-H "Authorization: Bearer YOURTOKEN"
```
@ -68,7 +68,7 @@ Tokens can be attained by visiting [Settings > API Tokens](/user/tokens/).
```bash
# Logout
curl -X DELETE https://content.minetest.net/api/delete-token/ \
curl -X DELETE https://content.luanti.org/api/delete-token/ \
-H "Authorization: Bearer YOURTOKEN"
```
@ -167,20 +167,20 @@ curl -X DELETE https://content.minetest.net/api/delete-token/ \
You can download a package by building one of the two URLs:
```
https://content.minetest.net/packages/${author}/${name}/download/`
https://content.minetest.net/packages/${author}/${name}/releases/${release}/download/`
https://content.luanti.org/packages/${author}/${name}/download/`
https://content.luanti.org/packages/${author}/${name}/releases/${release}/download/`
```
Examples:
```bash
# Edit package
curl -X PUT https://content.minetest.net/api/packages/username/name/ \
curl -X PUT https://content.luanti.org/api/packages/username/name/ \
-H "Authorization: Bearer YOURTOKEN" -H "Content-Type: application/json" \
-d '{ "title": "Foo bar", "tags": ["pvp", "survival"], "license": "MIT" }'
# Remove website URL
curl -X PUT https://content.minetest.net/api/packages/username/name/ \
curl -X PUT https://content.luanti.org/api/packages/username/name/ \
-H "Authorization: Bearer YOURTOKEN" -H "Content-Type: application/json" \
-d '{ "website": null }'
```
@ -271,7 +271,7 @@ Examples:
```bash
# Create release from Git
curl -X POST https://content.minetest.net/api/packages/username/name/releases/new/ \
curl -X POST https://content.luanti.org/api/packages/username/name/releases/new/ \
-H "Authorization: Bearer YOURTOKEN" -H "Content-Type: application/json" \
-d '{
"method": "git",
@ -282,17 +282,17 @@ curl -X POST https://content.minetest.net/api/packages/username/name/releases/ne
}'
# Create release from zip upload
curl -X POST https://content.minetest.net/api/packages/username/name/releases/new/ \
curl -X POST https://content.luanti.org/api/packages/username/name/releases/new/ \
-H "Authorization: Bearer YOURTOKEN" \
-F title="My Release" -F file=@path/to/file.zip
# Create release from zip upload with commit hash
curl -X POST https://content.minetest.net/api/packages/username/name/releases/new/ \
curl -X POST https://content.luanti.org/api/packages/username/name/releases/new/ \
-H "Authorization: Bearer YOURTOKEN" \
-F title="My Release" -F commit="8ef74deec170a8ce789f6055a59d43876d16a7ea" -F file=@path/to/file.zip
# Delete release
curl -X DELETE https://content.minetest.net/api/packages/username/name/releases/3/ \
curl -X DELETE https://content.luanti.org/api/packages/username/name/releases/3/ \
-H "Authorization: Bearer YOURTOKEN"
```
@ -333,26 +333,26 @@ Examples:
```bash
# Create screenshot
curl -X POST https://content.minetest.net/api/packages/username/name/screenshots/new/ \
curl -X POST https://content.luanti.org/api/packages/username/name/screenshots/new/ \
-H "Authorization: Bearer YOURTOKEN" \
-F title="My Release" -F file=@path/to/screnshot.png
# Create screenshot and set it as the cover image
curl -X POST https://content.minetest.net/api/packages/username/name/screenshots/new/ \
curl -X POST https://content.luanti.org/api/packages/username/name/screenshots/new/ \
-H "Authorization: Bearer YOURTOKEN" \
-F title="My Release" -F file=@path/to/screnshot.png -F is_cover_image="true"
# Delete screenshot
curl -X DELETE https://content.minetest.net/api/packages/username/name/screenshots/3/ \
curl -X DELETE https://content.luanti.org/api/packages/username/name/screenshots/3/ \
-H "Authorization: Bearer YOURTOKEN"
# Reorder screenshots
curl -X POST https://content.minetest.net/api/packages/username/name/screenshots/order/ \
curl -X POST https://content.luanti.org/api/packages/username/name/screenshots/order/ \
-H "Authorization: Bearer YOURTOKEN" -H "Content-Type: application/json" \
-d "[13, 2, 5, 7]"
# Set cover image
curl -X POST https://content.minetest.net/api/packages/username/name/screenshots/cover-image/ \
curl -X POST https://content.luanti.org/api/packages/username/name/screenshots/cover-image/ \
-H "Authorization: Bearer YOURTOKEN" -H "Content-Type: application/json" \
-d "{ 'cover_image': 123 }"
```

@ -36,7 +36,7 @@ The target audience of your package page is end users.
The long description should explain what your package is about,
why the user should choose it, and how to use it if they download it.
[NodeCore](https://content.minetest.net/packages/Warr1024/nodecore/) is a good
[NodeCore](https://content.luanti.org/packages/Warr1024/nodecore/) is a good
example of what to do. For inspiration, you might want to look at how games on
Steam write their descriptions.

@ -48,7 +48,7 @@ It's common to do this in README.md or LICENSE.md like so:
* conquer_arrow_*.png from [Simple Shooter](https://github.com/stujones11/shooter) by Stuart Jones, CC0 1.0.
* conquer_arrow.b3d from [Simple Shooter](https://github.com/stujones11/shooter) by Stuart Jones, CC-BY-SA 3.0.
* conquer_arrow_head.png from MTG, CC-BY-SA 3.0.
* health_*.png from [Gauges](https://content.minetest.net/packages/Calinou/gauges/) by Calinou, CC0.
* health_*.png from [Gauges](https://content.luanti.org/packages/Calinou/gauges/) by Calinou, CC0.
```
if you have a lot of media, then you can split it up by author like so:

@ -11,6 +11,6 @@ You can follow updates from ContentDB in your RSS feed reader. If in doubt, copy
Follow new releases for a package:
```
https://content.minetest.net/packages/AUTHOR/NAME/releases_feed.atom
https://content.minetest.net/packages/AUTHOR/NAME/releases_feed.json
https://content.luanti.org/packages/AUTHOR/NAME/releases_feed.atom
https://content.luanti.org/packages/AUTHOR/NAME/releases_feed.json
```

@ -27,7 +27,7 @@ ContentDB supports the Authorization Code OAuth2 method.
Get the user to open the following URL in a web browser:
```
https://content.minetest.net/oauth/authorize/
https://content.luanti.org/oauth/authorize/
?response_type=code
&client_id={CLIENT_ID}
&redirect_uri={REDIRECT_URL}
@ -52,7 +52,7 @@ Next, you'll need to exchange the auth for an access token.
Do this by making a POST request to the `/oauth/token/` API:
```bash
curl -X POST https://content.minetest.net/oauth/token/ \
curl -X POST https://content.luanti.org/oauth/token/ \
-F grant_type=authorization_code \
-F client_id="CLIENT_ID" \
-F client_secret="CLIENT_SECRET" \
@ -98,6 +98,6 @@ Possible errors:
Next, you should check the access token works by getting the user information:
```bash
curl https://content.minetest.net/api/whoami/ \
curl https://content.luanti.org/api/whoami/ \
-H "Authorization: Bearer YOURTOKEN"
```

@ -39,7 +39,7 @@ Tag-based webhooks are accepted on any branch.
1. Create a ContentDB API Token at [Profile > API Tokens: Manage](/user/tokens/).
2. Copy the access token that was generated.
3. Go to the GitLab repository's settings > Webhooks > Add Webhook.
4. Set the payload URL to `https://content.minetest.net/github/webhook/`
4. Set the payload URL to `https://content.luanti.org/github/webhook/`
5. Set the content type to JSON.
6. Set the secret to the access token that you copied.
7. Set the events
@ -53,7 +53,7 @@ Tag-based webhooks are accepted on any branch.
1. Create a ContentDB API Token at [Profile > API Tokens: Manage](/user/tokens/).
2. Copy the access token that was generated.
3. Go to the GitLab repository's settings > Webhooks.
4. Set the URL to `https://content.minetest.net/gitlab/webhook/`
4. Set the URL to `https://content.luanti.org/gitlab/webhook/`
6. Set the secret token to the ContentDB access token that you copied.
7. Set the events
* If you want a rolling release, choose "Push events".

@ -260,7 +260,7 @@ class User(db.Model, UserMixin):
return "/static/bot_avatar.png"
else:
from app.utils.gravatar import get_gravatar
return get_gravatar(self.email or f"{self.username}@content.minetest.net")
return get_gravatar(self.email or f"{self.username}@content.luanti.org")
def check_perm(self, user, perm):
if not user.is_authenticated:

@ -5,5 +5,5 @@
<InputEncoding>UTF-8</InputEncoding>
<Description>Search mods, games, and textures for Luanti.</Description>
<Tags>Luanti Minetest Mod Game Subgame Search</Tags>
<Url type="text/html" method="get" template="https://content.minetest.net/packages?q={searchTerms}"/>
<Url type="text/html" method="get" template="https://content.luanti.org/packages?q={searchTerms}"/>
</OpenSearchDescription>

@ -111,7 +111,7 @@ def clear_removed_packages(all_packages: bool):
def _url_exists(url: str) -> str:
try:
headers = {
"User-Agent": "Mozilla/5.0 (compatible; ContentDB link checker; +https://content.minetest.net/)",
"User-Agent": "Mozilla/5.0 (compatible; ContentDB link checker; +https://content.luanti.org/)",
}
with requests.get(url, stream=True, headers=headers, timeout=10) as response:
response.raise_for_status()

@ -13,10 +13,10 @@
{
"@context": "https://schema.org",
"@type": "WebSite",
"url": "https://content.minetest.net/",
"url": "https://content.luanti.org/",
"potentialAction": {
"@type": "SearchAction",
"target": "https://content.minetest.net/packages?q={search_term_string}",
"target": "https://content.luanti.org/packages?q={search_term_string}",
"query-input": "required name=search_term_string"
}
}

@ -3,4 +3,4 @@
This folder only contains technical documentation for those interested in the ContentDB source code.
Documentation for using ContentDB, whether through the interface or API, is available at
<https://content.minetest.net/help/>.
<https://content.luanti.org/help/>.

@ -6,14 +6,14 @@ or for implementing ContentDB compatible servers.
## Package List API call
The client makes a single [API](https://content.minetest.net/help/api/) request to `/api/packages/`.
The client makes a single [API](https://content.luanti.org/help/api/) request to `/api/packages/`.
The query arguments will include a list of supported types, the current
[engine version](https://content.minetest.net/api/minetest_versions/),
and any hidden [Content Flags](https://content.minetest.net/help/content_flags/).
[engine version](https://content.luanti.org/api/minetest_versions/),
and any hidden [Content Flags](https://content.luanti.org/help/content_flags/).
Example URL:
<https://content.minetest.net/api/packages/?type=mod&type=game&type=txp&protocol_version=39&engine_version=5.3.0&hide=nonfree&hide=desktop_default>
<https://content.luanti.org/api/packages/?type=mod&type=game&type=txp&protocol_version=39&engine_version=5.3.0&hide=nonfree&hide=desktop_default>
Example response:
@ -24,7 +24,7 @@ Example response:
"name": "nodecore",
"release": 1234,
"short_description": "A short description",
"thumbnail": "https://content.minetest.net/thumbnails/1/abcdef.jpg",
"thumbnail": "https://content.luanti.org/thumbnails/1/abcdef.jpg",
"title": "NodeCore",
"type": "game"
}
@ -50,7 +50,7 @@ The client can simply download the URL mentioned in `thumbnail`.
The client downloads packages by constructing a URL for the release and downloading it:
```
https://content.minetest.net/packages/<author>/<name>/releases/<release>/download/
https://content.luanti.org/packages/<author>/<name>/releases/<release>/download/
```
This supports redirects.
@ -104,5 +104,5 @@ response for Mobs Monster.
The client will open the package in a browser by constructing the following URL
```
https://content.minetest.net/packages/<author>/<name>/
https://content.luanti.org/packages/<author>/<name>/
```

@ -6,7 +6,7 @@ from typing import List
import requests
base_url = "https://content.minetest.net"
base_url = "https://content.luanti.org"
translations = []