Skip to main content

SirAnthony's SLPP, but modernized code (also, trailing comma's)

Project description

Big-SLPP

Big-SLPP is a simple lua-python data structures parser that also has trailing comma's.

It also has two helper functions to help me re-create the files, as created by WoW.

Example input

-- This is a lua file from the game World of Warcraft: Wrath of the Lich King
-- I need those keys sorted, because WoW/Lua keeps moving around the keys for
-- no good damn reason >:(
-- HOW DO YOU EXPECT ME TO TRACK MY SETTINGS IN A REPO, BLIZZARD!?
-- jk, I know Wrath is still relatively rough around the edges.

_NPCScanOptionsCharacter = {
	["Achievements"] = {
		[1312] = true,
		[2257] = true,
	},
	["NPCs"] = {
		[18684] = "Bro'Gaz the Clanless",
		[32491] = "Time-Lost Proto Drake",
	},
	["Version"] = "3.3.5.5",
	["NPCWorldIDs"] = {
		[18684] = 3,
		[32491] = 4,
	},
}

SLPP.decode() output (not what I was looking for)

-- This is a lua file from the game World of Warcraft: Wrath of the Lich King
-- I need those keys sorted, because WoW/Lua keeps moving around the keys for
-- no good damn reason >:(
-- HOW DO YOU EXPECT ME TO TRACK MY SETTINGS IN A REPO, BLIZZARD!?
-- jk, I know Wrath is still relatively rough around the edges.


["_NPCScanOptionsCharacter"] = {
	["Achievements"] = {
		[1312] = true,
		[2257] = true
	},
	["NPCWorldIDs"] = {
		[18684] = 3,
		[32491] = 4
	},
	["NPCs"] = {
		[18684] = "Bro'Gaz the Clanless",
		[32491] = "Time-Lost Proto Drake"
	},
	["Version"] = "3.3.5.5"
}

Note the lack of trailing comma's, and _NPCScanOptionsCharacter being wrapped in quotes and brackets.

big_slpp.utils.unwrap()'s output

_NPCScanOptionsCharacter = {
	["Achievements"] = {
		[1312] = true,
		[2257] = true,
	},
	["NPCWorldIDs"] = {
		[18684] = 3,
		[32491] = 4,
	},
	["NPCs"] = {
		[18684] = "Bro'Gaz the Clanless",
		[32491] = "Time-Lost Proto Drake",
	},
	["Version"] = "3.3.5.5",
}

Practically the same, but sorted! :D Also, trailing comma's!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

big-slpp-1.0.2.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

big_slpp-1.0.2-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file big-slpp-1.0.2.tar.gz.

File metadata

  • Download URL: big-slpp-1.0.2.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.8.10 Linux/5.10.102.1-microsoft-standard-WSL2

File hashes

Hashes for big-slpp-1.0.2.tar.gz
Algorithm Hash digest
SHA256 f834f0c46291ee90d54890494b36380ee728b7914e3fdbc08ea4794b22cec004
MD5 dcec0bcf49d41e793d2ae1e68d8db9ba
BLAKE2b-256 094ac260637084bf1898a32f8ecdd293e67a39f39d82624e7178f8eac8d66ca2

See more details on using hashes here.

File details

Details for the file big_slpp-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: big_slpp-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.8.10 Linux/5.10.102.1-microsoft-standard-WSL2

File hashes

Hashes for big_slpp-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8a9ce8cb5c5d8b37c78331f2eb53fe5e4579a4a91748f82fc929b4fb9a80cb65
MD5 8c308cc434a63c9634515cacd1732a2e
BLAKE2b-256 2902cc5aef517866fff73b68640a57ef07074bec2e8637d700e3842b40665a86

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page