Skip to content

Instantly share code, notes, and snippets.

@Suudy
Suudy / txt2xp.py
Last active April 5, 2025 15:40 — forked from mtvee/txt2xp.py
Convert plain text to XP format used by REXPaint
#
# translate a plain text file into the REXPaint file format
import argparse
import sys
import struct
import gzip
def doit(INFILE, OUTFILE):
fp = open(INFILE)
lines = fp.readlines()