Skip to content

Commit

Permalink
Version 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
b-morgan committed Apr 11, 2024
1 parent f76f2dc commit 0092f07
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
Binary file modified clean_enshrouded.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion clean_enshrouded.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
C12F51F2EB03FAB91F613400B127D854 clean_enshrouded.exe
F4F1340ECFFF66E3DE438A00819C2941 clean_enshrouded.exe
18 changes: 11 additions & 7 deletions clean_enshrouded.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/python3
#
# clean_enshrouded.py V0.2
# clean_enshrouded.py V1.0
#
# A python3 program written by: Brad Morgan
#
Expand Down Expand Up @@ -29,8 +29,9 @@
# Configure command line arguments (in addition to the default -h, --help)
# The -c, --clean argument is required to take any action on the files.
#
parser = argparse.ArgumentParser(description='Process Enshrouded world files.')
parser.add_argument('-b', '--backup', action='store_true', help='backup all the world files first')
parser = argparse.ArgumentParser(description='V1.0 - Clean Enshrouded world file directory.')
parser.add_argument('-b', '--backup', action='store_true', help='backup all the world files first (using 7z)')
parser.add_argument('-p', '--powershell', action='store_true', help='backup all the world files first (using powershell)')
parser.add_argument('-c', '--clean', action='store_true', help='remove all but the base world files')
parser.add_argument('-w', '--wait', help='wait N seconds before exiting')
parser.add_argument('-d', '--directory', help='directory to process')
Expand All @@ -42,18 +43,21 @@

#
# Backup all the Enshrouded world files (filenames that start with 3)
# requires the program 7-zip, https://www.7-zip.org/
# or use 'powershell Compress-Archive -Path ".\3*" -DestinationPath ".\backup.zip" -Force'
# uses the program 7-zip, https://www.7-zip.org/
# or 'powershell Compress-Archive -Path ".\3*" -DestinationPath ".\backup.zip" -Force'
#
if args.backup:
if args.backup or args.powershell:
try:
f = open("backup.zip")
except:
pass
else:
f.close()
os.remove("backup.zip")
subprocess.run("7z a -x!*.* backup.zip 3*", stdout = subprocess.DEVNULL)
if args.powershell:
subprocess.run('powershell Compress-Archive -Path ".\3*" -DestinationPath ".\backup.zip" -Force', stdout = subprocess.DEVNULL)
else:
subprocess.run("7z a -x!*.* backup.zip 3*", stdout = subprocess.DEVNULL)
print("Created backup.zip\n")

#
Expand Down
8 changes: 4 additions & 4 deletions clean_enshrouded_version_info.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ VSVersionInfo(
ffi=FixedFileInfo(
# filevers and prodvers should be always a tuple with four items: (1, 2, 3, 4)
# Set not needed items to zero 0.
filevers=(0, 2, 0, 0),
prodvers=(0, 2, 0, 0),
filevers=(1, 0, 0, 0),
prodvers=(1, 0, 0, 0),
# Contains a bitmask that specifies the valid bits 'flags'r
mask=0x3f,
# Contains a bitmask that specifies the Boolean attributes of the file.
Expand All @@ -30,11 +30,11 @@ VSVersionInfo(
StringTable(
'040904b0',
[StringStruct('FileDescription', 'clean_enshrouded'),
StringStruct('FileVersion', '0.2'),
StringStruct('FileVersion', '1.0'),
StringStruct('InternalName', 'clean_enshrouded.py'),
StringStruct('OriginalFilename', 'clean_enshrouded.py'),
StringStruct('ProductName', 'clean_enshrouded'),
StringStruct('ProductVersion', '0.2')])
StringStruct('ProductVersion', '1.0')])
]),
VarFileInfo([VarStruct('Translation', [1033, 1200])])
]
Expand Down

0 comments on commit 0092f07

Please sign in to comment.