Skip to content

Instantly share code, notes, and snippets.

View sudomakecoffee's full-sized avatar

Mike sudomakecoffee

  • Baltimore, MD
  • 06:25 (UTC -04:00)
View GitHub Profile
@sudomakecoffee
sudomakecoffee / parse-xml-to-json.py
Last active March 8, 2022 04:14
Parses XML into JSON, pretty-printed
#!/usr/bin/env python
# General process
# 1. Parse any command-line arguments
# 2. Parse XML into memory
# 3. Separate items into lists based on type
# a. Add item type to each item record
# 4. Merge lists and sort
# 5. Write uber-list to JSON file
from typing import Final
import xml.etree.ElementTree as et
@sudomakecoffee
sudomakecoffee / spritesheet-generator.py
Last active March 7, 2022 19:57
Spritesheet generator in Python
#!/usr/bin/evn python
# General process
# 1. Parse any arguments
# a. Parse args into values
# b. Provide default value if arg not specified
# 2. Find images in specified/default location
# a. Index files
# b. Read files
# c. Store files in memory
# 3. Merge images into single image