mirror of
https://git.ugnet.gay/CrossTalk/azul.git
synced 2026-05-27 22:59:49 +00:00
production init
This commit is contained in:
@@ -0,0 +1 @@
|
||||
from .impl import DB
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"id": 10351359,
|
||||
"kids": true,
|
||||
"page": 1,
|
||||
"category_id": 102,
|
||||
"name": "Nine Men's Morris",
|
||||
"description": "A 9 pieces Tic-Tac-Toe spin-off. Originally developed by Doron for games.mess.be",
|
||||
"url": "http://mactivities.msgrsvcs.ctsrv.gay/static/app-data/messbe/morris/index.en-us.html",
|
||||
"icon_url": "http://mactivities.msgrsvcs.ctsrv.gay/static/app-data/messbe/morris/imgs/icon.png",
|
||||
"type": "dir",
|
||||
"height": 500,
|
||||
"width": 500,
|
||||
"location": "side",
|
||||
"min_users": 2,
|
||||
"max_users": 2,
|
||||
"enable_ip": false,
|
||||
"activex": false,
|
||||
"send_file": false,
|
||||
"send_im": false,
|
||||
"receive_im": false,
|
||||
"replace_im": false,
|
||||
"windows": true,
|
||||
"max_packet_rate": 120,
|
||||
"user_properties": true,
|
||||
"minimum_client_version": null,
|
||||
"app_type": 0,
|
||||
"hidden": false
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"id": 10361359,
|
||||
"kids": true,
|
||||
"page": 1,
|
||||
"category_id": 102,
|
||||
"name": "Nine Men's Morris",
|
||||
"description": "A 9 pieces Tic-Tac-Toe spin-off (Hebrew). Originally developed by Doron for games.mess.be",
|
||||
"url": "http://mactivities.msgrsvcs.ctsrv.gay/static/app-data/messbe/morris/index.he-il.html",
|
||||
"icon_url": "http://mactivities.msgrsvcs.ctsrv.gay/static/app-data/messbe/morris/imgs/icon.png",
|
||||
"type": "dir",
|
||||
"height": 500,
|
||||
"width": 500,
|
||||
"location": "side",
|
||||
"min_users": 2,
|
||||
"max_users": 2,
|
||||
"enable_ip": false,
|
||||
"activex": false,
|
||||
"send_file": false,
|
||||
"send_im": false,
|
||||
"receive_im": false,
|
||||
"replace_im": false,
|
||||
"windows": true,
|
||||
"max_packet_rate": 120,
|
||||
"user_properties": true,
|
||||
"minimum_client_version": null,
|
||||
"app_type": 0,
|
||||
"hidden": false
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"id": 20701359,
|
||||
"kids": true,
|
||||
"page": 1,
|
||||
"category_id": 102,
|
||||
"name": "Backgammon",
|
||||
"description": "The game of luck and skill. Originally developed by Koen for games.mess.be",
|
||||
"url": "http://mactivities.msgrsvcs.ctsrv.gay/static/app-data/messbe/backgammon/backgammon.htm",
|
||||
"icon_url": "http://mactivities.msgrsvcs.ctsrv.gay/static/app-data/messbe/backgammon/images/icon.png",
|
||||
"type": "dir",
|
||||
"height": 500,
|
||||
"width": 500,
|
||||
"location": "side",
|
||||
"min_users": 2,
|
||||
"max_users": 2,
|
||||
"enable_ip": false,
|
||||
"activex": false,
|
||||
"send_file": false,
|
||||
"send_im": false,
|
||||
"receive_im": false,
|
||||
"replace_im": false,
|
||||
"windows": true,
|
||||
"max_packet_rate": 120,
|
||||
"user_properties": true,
|
||||
"minimum_client_version": null,
|
||||
"app_type": 0,
|
||||
"hidden": false
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"id": 10311359,
|
||||
"kids": true,
|
||||
"page": 1,
|
||||
"category_id": 102,
|
||||
"name": "Battleships",
|
||||
"description": "Sink your opponent's fleet. Originally developed by Koen for games.mess.be",
|
||||
"url": "http://mactivities.msgrsvcs.ctsrv.gay/static/app-data/messbe/battleships/battleships.htm",
|
||||
"icon_url": "http://mactivities.msgrsvcs.ctsrv.gay/static/app-data/messbe/battleships/images/icon.png",
|
||||
"type": "dir",
|
||||
"height": 500,
|
||||
"width": 500,
|
||||
"location": "side",
|
||||
"min_users": 2,
|
||||
"max_users": 2,
|
||||
"enable_ip": false,
|
||||
"activex": false,
|
||||
"send_file": false,
|
||||
"send_im": false,
|
||||
"receive_im": false,
|
||||
"replace_im": false,
|
||||
"windows": true,
|
||||
"max_packet_rate": 120,
|
||||
"user_properties": true,
|
||||
"minimum_client_version": null,
|
||||
"app_type": 0,
|
||||
"hidden": false
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"id": 10321359,
|
||||
"kids": true,
|
||||
"page": 1,
|
||||
"category_id": 102,
|
||||
"name": "Chess",
|
||||
"description": "The king's game. Originally developed by Koen for games.mess.be",
|
||||
"url": "http://mactivities.msgrsvcs.ctsrv.gay/static/app-data/messbe/chess/chess.htm",
|
||||
"icon_url": "http://mactivities.msgrsvcs.ctsrv.gay/static/app-data/messbe/chess/images/icon.png",
|
||||
"type": "dir",
|
||||
"height": 500,
|
||||
"width": 500,
|
||||
"location": "side",
|
||||
"min_users": 2,
|
||||
"max_users": 2,
|
||||
"enable_ip": false,
|
||||
"activex": false,
|
||||
"send_file": false,
|
||||
"send_im": false,
|
||||
"receive_im": false,
|
||||
"replace_im": false,
|
||||
"windows": true,
|
||||
"max_packet_rate": 120,
|
||||
"user_properties": true,
|
||||
"minimum_client_version": null,
|
||||
"app_type": 0,
|
||||
"hidden": false
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"id": 10531359,
|
||||
"kids": true,
|
||||
"page": 1,
|
||||
"category_id": 102,
|
||||
"name": "Connect 4",
|
||||
"description": "Four in a row. Originally developed by Koen for games.mess.be",
|
||||
"url": "http://mactivities.msgrsvcs.ctsrv.gay/static/app-data/messbe/connect4/connect4.htm",
|
||||
"icon_url": "http://mactivities.msgrsvcs.ctsrv.gay/static/app-data/messbe/connect4/images/icon.png",
|
||||
"type": "dir",
|
||||
"height": 500,
|
||||
"width": 500,
|
||||
"location": "side",
|
||||
"min_users": 2,
|
||||
"max_users": 2,
|
||||
"enable_ip": false,
|
||||
"activex": false,
|
||||
"send_file": false,
|
||||
"send_im": false,
|
||||
"receive_im": false,
|
||||
"replace_im": false,
|
||||
"windows": true,
|
||||
"max_packet_rate": 120,
|
||||
"user_properties": true,
|
||||
"minimum_client_version": null,
|
||||
"app_type": 0,
|
||||
"hidden": false
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"id": 10601359,
|
||||
"kids": true,
|
||||
"page": 1,
|
||||
"category_id": 102,
|
||||
"name": "Memory",
|
||||
"description": "Find the matching pairs. Originally developed by Koen for games.mess.be",
|
||||
"url": "http://mactivities.msgrsvcs.ctsrv.gay/static/app-data/messbe/memory/memory.htm",
|
||||
"icon_url": "http://mactivities.msgrsvcs.ctsrv.gay/static/app-data/messbe/memory/images/icon.png",
|
||||
"type": "dir",
|
||||
"height": 500,
|
||||
"width": 500,
|
||||
"location": "side",
|
||||
"min_users": 2,
|
||||
"max_users": 2,
|
||||
"enable_ip": false,
|
||||
"activex": false,
|
||||
"send_file": false,
|
||||
"send_im": false,
|
||||
"receive_im": false,
|
||||
"replace_im": false,
|
||||
"windows": true,
|
||||
"max_packet_rate": 120,
|
||||
"user_properties": true,
|
||||
"minimum_client_version": null,
|
||||
"app_type": 0,
|
||||
"hidden": false
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"id": 10291359,
|
||||
"kids": true,
|
||||
"page": 1,
|
||||
"category_id": 102,
|
||||
"name": "Reversi",
|
||||
"description": "Also known as Othello. Originally developed by Koen for games.mess.be",
|
||||
"url": "http://mactivities.msgrsvcs.ctsrv.gay/static/app-data/messbe/reversi/reversi.htm",
|
||||
"icon_url": "http://mactivities.msgrsvcs.ctsrv.gay/static/app-data/messbe/reversi/images/icon.png",
|
||||
"type": "dir",
|
||||
"height": 500,
|
||||
"width": 500,
|
||||
"location": "side",
|
||||
"min_users": 2,
|
||||
"max_users": 2,
|
||||
"enable_ip": false,
|
||||
"activex": false,
|
||||
"send_file": false,
|
||||
"send_im": false,
|
||||
"receive_im": false,
|
||||
"replace_im": false,
|
||||
"windows": true,
|
||||
"max_packet_rate": 120,
|
||||
"user_properties": true,
|
||||
"minimum_client_version": null,
|
||||
"app_type": 0,
|
||||
"hidden": false
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"id": 20601359,
|
||||
"kids": true,
|
||||
"page": 1,
|
||||
"category_id": 102,
|
||||
"name": "Tetris",
|
||||
"description": "The simple, highly addictive, real-time puzzle game. Originally developed by Koen for games.mess.be",
|
||||
"url": "http://mactivities.msgrsvcs.ctsrv.gay/static/app-data/messbe/tetris/tetris.htm",
|
||||
"icon_url": "http://mactivities.msgrsvcs.ctsrv.gay/static/app-data/messbe/tetris/images/icon.png",
|
||||
"type": "dir",
|
||||
"height": 500,
|
||||
"width": 500,
|
||||
"location": "side",
|
||||
"min_users": 2,
|
||||
"max_users": 2,
|
||||
"enable_ip": false,
|
||||
"activex": false,
|
||||
"send_file": false,
|
||||
"send_im": false,
|
||||
"receive_im": false,
|
||||
"replace_im": false,
|
||||
"windows": true,
|
||||
"max_packet_rate": 120,
|
||||
"user_properties": true,
|
||||
"minimum_client_version": null,
|
||||
"app_type": 0,
|
||||
"hidden": false
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"id": 10301359,
|
||||
"kids": true,
|
||||
"page": 1,
|
||||
"category_id": 102,
|
||||
"name": "Yahtzee",
|
||||
"description": "The famous dice game. Originally developed by Koen of games.mess.be",
|
||||
"url": "http://mactivities.msgrsvcs.ctsrv.gay/static/app-data/messbe/yahtzee/yahtzee.htm",
|
||||
"icon_url": "http://mactivities.msgrsvcs.ctsrv.gay/static/app-data/messbe/yahtzee/images/icon.png",
|
||||
"type": "dir",
|
||||
"height": 500,
|
||||
"width": 500,
|
||||
"location": "side",
|
||||
"min_users": 2,
|
||||
"max_users": 2,
|
||||
"enable_ip": false,
|
||||
"activex": false,
|
||||
"send_file": false,
|
||||
"send_im": false,
|
||||
"receive_im": false,
|
||||
"replace_im": false,
|
||||
"windows": true,
|
||||
"max_packet_rate": 120,
|
||||
"user_properties": false,
|
||||
"minimum_client_version": null,
|
||||
"app_type": 0,
|
||||
"hidden": false
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"id": 101,
|
||||
"kids": true,
|
||||
"page": 1,
|
||||
"category_id": 101,
|
||||
"name": "Tic Tac Toe",
|
||||
"description": "Play against your friends in a game of Tic Tac Toe. Originally developed by Microsoft.",
|
||||
"url": "http://mactivities.msgrsvcs.ctsrv.gay/static/app-data/tic-tac-toe/tictactoe.htm",
|
||||
"icon_url": null,
|
||||
"type": "dir",
|
||||
"height": 500,
|
||||
"width": 500,
|
||||
"location": "side",
|
||||
"min_users": 2,
|
||||
"max_users": 2,
|
||||
"enable_ip": false,
|
||||
"activex": false,
|
||||
"send_file": false,
|
||||
"send_im": false,
|
||||
"receive_im": false,
|
||||
"replace_im": false,
|
||||
"windows": false,
|
||||
"max_packet_rate": 120,
|
||||
"user_properties": false,
|
||||
"minimum_client_version": null,
|
||||
"app_type": 0,
|
||||
"hidden": false
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
[
|
||||
{
|
||||
"id": 100,
|
||||
"app_type": 1,
|
||||
"name": "CrossTalk",
|
||||
"description": null
|
||||
},
|
||||
{
|
||||
"id": 101,
|
||||
"app_type": 0,
|
||||
"name": "Microsoft",
|
||||
"description": null
|
||||
},
|
||||
{
|
||||
"id": 102,
|
||||
"app_type": 0,
|
||||
"name": "Mess.be Games",
|
||||
"description": null
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,30 @@
|
||||
from typing import Dict, Any
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
class DB:
|
||||
def __init__(self):
|
||||
dir_path = Path(__file__).parent # Change 'dir' to 'dir_path'
|
||||
|
||||
self.categories = [
|
||||
Category(c)
|
||||
for c in json.loads((dir_path / 'category.json').read_text())
|
||||
]
|
||||
|
||||
app_dir = dir_path / 'app' # Change 'dir' to 'dir_path'
|
||||
self.apps = {
|
||||
locale.name: [
|
||||
App(json.loads(f.read_text()), locale.name)
|
||||
for f in (app_dir / locale).glob('*.json')
|
||||
] for locale in (app_dir).iterdir() if locale.is_dir()
|
||||
}
|
||||
|
||||
class Base:
|
||||
def __init__(self, json: Dict[str, Any]) -> None:
|
||||
self.__dict__.update(json)
|
||||
|
||||
class Category(Base): pass
|
||||
class App(Base):
|
||||
def __init__(self, json: Dict[str, Any], locale: str) -> None:
|
||||
super().__init__(json)
|
||||
self.locale = (None if locale == 'none' else locale)
|
||||
Reference in New Issue
Block a user