aboutsummaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
Diffstat (limited to 'data')
-rw-r--r--data/banlist-cn.json1
-rw-r--r--data/banlist-md.json1
-rw-r--r--data/banlist-tcg.json200
-rw-r--r--data/banlist.json1
-rw-r--r--data/tcg-genbanlist.py33
-rw-r--r--data/update.sh1
6 files changed, 234 insertions, 3 deletions
diff --git a/data/banlist-cn.json b/data/banlist-cn.json
index c566503..1c63a8b 100644
--- a/data/banlist-cn.json
+++ b/data/banlist-cn.json
@@ -1,5 +1,4 @@
{
- "date": "2025-01-01",
"regulation": {
"4426": 0,
"4678": 1,
diff --git a/data/banlist-md.json b/data/banlist-md.json
index a82e603..67a31e1 100644
--- a/data/banlist-md.json
+++ b/data/banlist-md.json
@@ -1,5 +1,4 @@
{
- "date": "2025-03-06",
"regulation": {
"4023": 1,
"4024": 1,
diff --git a/data/banlist-tcg.json b/data/banlist-tcg.json
new file mode 100644
index 0000000..0f741e6
--- /dev/null
+++ b/data/banlist-tcg.json
@@ -0,0 +1,200 @@
+{
+ "regulation": {
+ "4023": 1,
+ "4024": 1,
+ "4025": 1,
+ "4026": 1,
+ "4027": 1,
+ "4426": 0,
+ "4597": 1,
+ "4678": 1,
+ "4812": 0,
+ "4821": 1,
+ "4842": 1,
+ "4844": 0,
+ "4851": 0,
+ "4860": 1,
+ "4885": 0,
+ "4891": 0,
+ "4898": 1,
+ "4900": 0,
+ "4901": 0,
+ "4907": 0,
+ "4910": 0,
+ "4911": 0,
+ "4913": 2,
+ "4960": 0,
+ "4966": 0,
+ "5008": 1,
+ "5123": 0,
+ "5127": 0,
+ "5236": 1,
+ "5247": 0,
+ "5328": 1,
+ "5371": 0,
+ "5389": 0,
+ "5399": 0,
+ "5406": 0,
+ "5433": 0,
+ "5446": 0,
+ "5530": 1,
+ "5537": 1,
+ "5539": 0,
+ "5576": 1,
+ "5605": 0,
+ "5622": 1,
+ "5657": 0,
+ "5671": 0,
+ "5724": 0,
+ "5740": 1,
+ "5788": 1,
+ "5868": 0,
+ "5906": 0,
+ "5916": 0,
+ "5945": 0,
+ "5980": 1,
+ "6078": 0,
+ "6161": 1,
+ "6444": 1,
+ "6654": 0,
+ "6885": 0,
+ "6901": 1,
+ "6904": 1,
+ "7384": 1,
+ "7386": 0,
+ "7561": 1,
+ "7601": 1,
+ "7652": 0,
+ "7714": 0,
+ "7934": 1,
+ "8085": 0,
+ "8159": 0,
+ "8197": 1,
+ "8318": 0,
+ "8440": 0,
+ "8472": 0,
+ "8515": 0,
+ "8602": 1,
+ "8733": 0,
+ "8809": 0,
+ "8823": 1,
+ "8824": 1,
+ "9095": 0,
+ "9153": 0,
+ "9350": 1,
+ "9455": 0,
+ "9554": 1,
+ "9778": 1,
+ "9821": 0,
+ "9822": 1,
+ "9860": 0,
+ "9874": 0,
+ "9918": 0,
+ "9957": 0,
+ "10001": 1,
+ "10216": 1,
+ "10458": 1,
+ "10463": 1,
+ "10480": 0,
+ "10695": 0,
+ "11015": 1,
+ "11159": 0,
+ "11195": 0,
+ "11207": 0,
+ "11296": 0,
+ "11408": 1,
+ "11518": 0,
+ "11651": 0,
+ "11840": 0,
+ "11851": 1,
+ "11932": 0,
+ "12070": 1,
+ "12074": 1,
+ "12080": 0,
+ "12108": 0,
+ "12111": 2,
+ "12412": 0,
+ "12433": 0,
+ "12441": 0,
+ "12466": 1,
+ "12749": 1,
+ "12763": 1,
+ "12786": 0,
+ "12788": 0,
+ "12794": 1,
+ "12801": 1,
+ "12825": 0,
+ "12906": 1,
+ "12938": 0,
+ "12960": 0,
+ "12967": 1,
+ "12978": 1,
+ "13077": 0,
+ "13166": 0,
+ "13346": 0,
+ "13349": 2,
+ "13447": 1,
+ "13492": 0,
+ "13500": 0,
+ "13507": 0,
+ "13508": 0,
+ "13554": 0,
+ "13597": 0,
+ "13598": 0,
+ "13616": 1,
+ "13619": 1,
+ "13622": 0,
+ "13674": 1,
+ "13814": 1,
+ "13836": 0,
+ "13981": 2,
+ "14070": 2,
+ "14114": 0,
+ "14128": 0,
+ "14130": 0,
+ "14314": 0,
+ "14337": 0,
+ "14496": 0,
+ "14721": 1,
+ "14876": 2,
+ "14932": 0,
+ "14935": 0,
+ "14940": 0,
+ "14944": 0,
+ "14994": 1,
+ "15035": 0,
+ "15277": 0,
+ "15478": 1,
+ "15528": 0,
+ "15756": 1,
+ "15861": 1,
+ "15866": 1,
+ "16386": 0,
+ "17066": 1,
+ "17381": 2,
+ "17414": 1,
+ "17415": 1,
+ "17416": 1,
+ "17430": 0,
+ "17444": 0,
+ "17451": 0,
+ "17472": 0,
+ "17603": 1,
+ "17604": 1,
+ "17605": 0,
+ "17606": 0,
+ "17762": 1,
+ "18013": 2,
+ "18191": 0,
+ "18524": 2,
+ "18806": 1,
+ "19149": 1,
+ "19199": 0,
+ "19467": 1,
+ "19859": 1,
+ "19900": 1,
+ "19901": 1,
+ "20037": 1,
+ "20214": 0
+ }
+}
diff --git a/data/banlist.json b/data/banlist.json
index 2a6c275..c640694 100644
--- a/data/banlist.json
+++ b/data/banlist.json
@@ -1,5 +1,4 @@
{
- "date": "2025-01-01",
"regulation": {
"4023": 1,
"4024": 1,
diff --git a/data/tcg-genbanlist.py b/data/tcg-genbanlist.py
new file mode 100644
index 0000000..6bef1f6
--- /dev/null
+++ b/data/tcg-genbanlist.py
@@ -0,0 +1,33 @@
+import json
+
+cardId = dict()
+cards = None
+with open('cards.json', 'r') as fp:
+ cards = json.load(fp)
+
+result = dict()
+result['ban'] = []
+result['limit'] = []
+result['semiLimit'] = []
+
+for k in cards:
+ cardId[k] = cards[k]['id']
+ if 'en_name' not in cards[k]:
+ result['ban'].append(str(cardId[k]))
+
+banlist = None
+with open('banlist-tcg.json', 'r') as fp:
+ banlist = json.load(fp)
+
+regulation = banlist['regulation']
+for cid in regulation:
+ sid = str(cardId[cid])
+ if regulation[cid] == 0:
+ result['ban'].append(sid)
+ if regulation[cid] == 1:
+ result['limit'].append(sid)
+ if regulation[cid] == 2:
+ result['semiLimit'].append(sid)
+result['ban'] = list(set(result['ban']))
+print(json.dumps(result, indent=4))
+
diff --git a/data/update.sh b/data/update.sh
index 153bcc8..f9a6f81 100644
--- a/data/update.sh
+++ b/data/update.sh
@@ -5,6 +5,7 @@ python3 build-card-info.py
python3 split.py
python3 genbanlist.py > ../src/ocg_banlist.json
python3 cn-genbanlist.py > ../src/cnocg_banlist.json
+python3 tcg-genbanlist.py > ../src/tcg_banlist.json
python3 md-genbanlist.py > ../src/md_banlist.json
rsync -avz ./card_db_parts/ root@raye:/volume/webroot/card_db_parts/