A wrapper for some of Bethesda's popular plugin/archive file formats
Project description
Usage
Inspect and extract Bethesda’s TES4, TES5, BSA, and BA2 filetypes…
Read about more complex usage in the documentation.
Extracting a BSA archive
import os
import bethesda_structs
BSA_ARCHIVE_PATH = 'C:/Users/me/Desktop/Archive.bsa'
EXTRACT_TO_DIR = 'C:/Users/me/Desktop/ArchiveContents/'
archive = bethesda_structs.archive.BSAArchive(BSA_ARCHIVE_PATH)
if not os.path.isdir(EXTRACT_TO_DIR):
os.makedirs(EXTRACT_TO_DIR)
archive.extract(EXTRACT_TO_DIR)
Getting masters of a TES4 plugin
import os
import bethesda_structs
TES_PLUGIN_PATH = 'C:/Users/me/Desktop/Archive.esp'
plugin = bethesda_structs.plugin.get_plugin(TES_PLUGIN_PATH)
print([
field.data
for field in plugin.header.fields
if feild.type == b'MAST'
])
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
bethesda-structs-0.0.1.tar.gz
(30.4 kB
view hashes)