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.4.tar.gz (7.1 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.4-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: big-slpp-1.0.4.tar.gz
  • Upload date:
  • Size: 7.1 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.4.tar.gz
Algorithm Hash digest
SHA256 ea380bc829353bd434e5224a507a18225b08dad53b88069999305d1850ae305a
MD5 4088217eb75c0e985713c8c5c0384d68
BLAKE2b-256 438bff7fa75afeef0a0d08b65249bb1205fc9b3a09689b13bf83124336390776

See more details on using hashes here.

File details

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

File metadata

  • Download URL: big_slpp-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 6.3 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 4307311511e19522a5561083200e3ba600d3404aa0afe8f36c95312a17abff94
MD5 712616e82bb12c3cf9e359b5466718f9
BLAKE2b-256 766845f2564534c8457d46c2a72e896debc4474ffa02bb2135800d6b00a3e553

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