Skip to content

Instantly share code, notes, and snippets.

Avatar
🎮
Playing Scarlet Nexus

Xzonn Xzonn

🎮
Playing Scarlet Nexus
View GitHub Profile
@Xzonn
Xzonn / World's End Club - Extract Text.py
Created May 8, 2021
This script can be used to extract text content from <World's End Club>.
View World's End Club - Extract Text.py
# This script can be used to extract text content from <World's End Club>.
# You should firstly extract ".bin" files from your game, by tools such as AssetStudioGUI.
import os
import struct
def padFile(f):
return f.seek((f.tell() + 3) // 4 * 4)
def readString(f):
View kup2txt.py
import os
import xml.dom.minidom as xmldom
w = os.walk("./")
f = open("export.txt", "w", 1024 * 16, "utf-8")
for root, dirs, files in w:
for file in files:
if file.endswith(".kup"):
dom = xmldom.parse(os.path.join(root, file))
@Xzonn
Xzonn / .gitignore
Last active Jun 10, 2021
FixPageLinkNames
View .gitignore
MediaWiki.py
Data.py
__pycache__
in.txt
out.txt
View MyContribsInMoegirlpedia.py
#!/usr/bin/python3
# -*- coding: UTF-8 -*-
import datetime
import json
import os
import requests
os.chdir(os.path.dirname(__file__))
View CNKI-pdf.user.js
// ==UserScript==
// @id CNKI-PDF-Special
// @name CNKI 中国知网 PDF 全文下载(特制版)
// @version 3.2.0.20170210
// @namespace http://yuelong.info
// @author YUE Long
// @description 参见 http://blog.yuelong.info/post/cnki-pdf-js.html
// @include http://*.cnki.net/*
// @include http://*.cnki.net.*/*
// @exclude http://image.cnki.net/*
View Bravely Default II - Extract Text.py
import os
import struct
walk = os.walk("./")
data = {}
for root, dirs, files in walk:
for fileName in files:
fullName = os.path.join(root, fileName)
@Xzonn
Xzonn / extract_ptd.py
Created Oct 3, 2020 — forked from NWPlayer123/extract_ptd.py
Astral Chain PTD text
View extract_ptd.py
#Forked from NWPlayer123/extract_ptd.py
#thanks Simon for being a smartie
#unfinished, need to parse all the tables
#string_offset starts at +0x20 (header)
from struct import unpack
import sys
sys.argv.append("Hud_text_CNzh.bin")
def read16(f):
return unpack("<H", f.read(2))[0]
View pngToBin.py
import math
def ZOrderX(tileSize, count):
div = tileSize // 2;
x_in = count // div & div;
while div > 1:
div = div // 2;
x_in |= count // div & div;
return x_in;
View main.enlarge - EOJ.py
import struct
import re
import random
import json
import os
import time
from PIL import Image, ImageDraw, ImageFont
from pngToBin import getPointSequence
with open("../main.gzf", "rb") as f:
@Xzonn
Xzonn / bvtest.py
Created Mar 24, 2020 — forked from abc1763613206/bvtest.py
BVID Validate
View bvtest.py
import requests
import json
import random
Back_URL = 'https://api.bilibili.com/x/web-interface/archive/stat?aid='
headers = {
'Cookie': "Replace Me With REAL COOKIE" ,
'Pragma': 'no-cache',