Skip to content

Commit 18cb941

Browse files
committed
deppth -> deppth2
1 parent c6ac39c commit 18cb941

17 files changed

Lines changed: 2183 additions & 2183 deletions

DEV.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
python -m build --wheel
22
python setup.py bdist_wheel
33

4-
pip install .\dist\deppth-0.1.5.0-py3-none-any.whl
4+
pip install .\dist\deppth2-0.1.5.0-py3-none-any.whl

README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
# deppth
2-
Decompress, Extract, and Pack for Pyre, Transistor, and Hades.
1+
# deppth2
2+
Decompress, Extract, and Pack for Pyre, Transistor, Hades and Hades 2.
33

4-
Deppth is a high-level I/O interface for package files in the games Transistor, Pyre, and Hades. Deppth provides both command-line and programmer interfaces.
4+
Deppth2 is a high-level I/O interface for package files in the games Transistor, Pyre, Hades and Hades 2. Deppth provides both command-line and programmer interfaces.
55

66
## Installation
77

8-
To install Deppth, download the latest [wheel](https://github.com/SGG-Modding/deppth/releases) and `pip install` it. Then read the following instructions to install dependencies.
8+
To install Deppth2, download the latest [wheel](https://github.com/SGG-Modding/deppth/releases) and `pip install` it. Then read the following instructions to install dependencies.
99

1010
### Dependencies
1111

12-
Deppth technically has no required dependencies outside of Python's core modules, but you may find its functionality very limited without also installing the following optional dependencies. If an optional dependency is missing, Deppth will abort an operation dependent on that module informing you of the missing module.
12+
Deppth2 technically has no required dependencies outside of Python's core modules, but you may find its functionality very limited without also installing the following optional dependencies. If an optional dependency is missing, Deppth2 will abort an operation dependent on that module informing you of the missing module.
1313

14-
Packages primarily contain sprite sheets. Deppth uses Pillow to work with the image data within. If you plan to export/import sprite sheets to/from image files, you'll need to install that: `pip install pillow`.
14+
Packages primarily contain sprite sheets. Deppth2 uses Pillow to work with the image data within. If you plan to export/import sprite sheets to/from image files, you'll need to install that: `pip install pillow`.
1515

1616
Hades uses LZ4 compression on its packages. If you plan to work with these packages, you'll want to install the LZ4 module: `pip install lz4`.
1717

@@ -21,29 +21,29 @@ Transistor and Pyre both use LZF compression on their packages. If you plan to w
2121

2222
Let's say we want to edit a spritesheet in Launch.pkg. First, we'll want to **extract** the package to get the individual assets out.
2323

24-
deppth ex Launch.pkg
24+
deppth2 ex Launch.pkg
2525

2626
This will create a folder called Launch in the current working directory. The texture atlases will be in the textures/atlases directory within there.
2727

2828
Let's say I edit Launch_Textures02.png. Now, to rebuild the package, I'll want to **pack** this folder into a package again.
2929

30-
deppth pk -s Launch -t Launch.pkg
30+
deppth2 pk -s Launch -t Launch.pkg
3131

3232
If I then replace the package file in the game files with this package file, it should use my updated asset. But, suppose I'm trying to distribute a mod. I probably only want to distribute my change to the package, not the entire package. In that case, you probably want to build a patch for someone else to apply.
3333

3434
To do this, you can use the **pack** command with the **entries** flag to only include any items you changed (this works similar to patterns in other CLI tools).
3535

36-
deppth pk -s Launch -t Launch_patch.pkg -e *Launch_Textures02*
36+
deppth2 pk -s Launch -t Launch_patch.pkg -e *Launch_Textures02*
3737

3838
I can then distribute Launch_patch.pkg and Launch_patch.pkg_manifest. To apply this patch to the actual package, one would need to place these files in the same folder and then use the **patch** command to perform the patching.
3939

40-
deppth pt Launch.pkg Launch_patch.pkg
40+
deppth2 pt Launch.pkg Launch_patch.pkg
4141

4242
This will replace any entries in the package with any matching entries in the patches and append any new entries in the patches. More than one patch can be applied at a time (later ones take precedence if there are conflicts).
4343

44-
## Deppth API
44+
## Deppth2 API
4545

46-
The Deppth module exposes functions that perform the actions described above, plus a fourth (which is also part of the CLI) to list the contents of a package. It's basically just a programmer interface for the same things the CLI does -- the latter is just a wrapper for the former.
46+
The Deppth2 module exposes functions that perform the actions described above, plus a fourth (which is also part of the CLI) to list the contents of a package. It's basically just a programmer interface for the same things the CLI does -- the latter is just a wrapper for the former.
4747

4848
list(name, *patterns, logger=lambda s: None)
4949
extract(package, target_dir, *entries, subtextures=False, logger=lambda s: None)
@@ -89,9 +89,9 @@ For example, here is a directory tree.
8989

9090
Using the command line in order to create your package for your mod, the package name must include the ``Mod-GUID`` (ThunderstoreTeamName-ModName) in order to work with Hell2Modding.
9191

92-
deppth hpk -s NewDeppthPackage -t ThunderstoreTeamName-NewIconPackage
92+
deppth2 hpk -s NewDeppthPackage -t ThunderstoreTeamName-NewIconPackage
9393

94-
This will generate a folder called ThunderstoreTeamName-NewIconPackage in the parent directory that will be correctly formatted for deppth packaging, as well as 2 package files to use for your mod.
94+
This will generate a folder called ThunderstoreTeamName-NewIconPackage in the parent directory that will be correctly formatted for deppth2 packaging, as well as 2 package files to use for your mod.
9595

9696
This will also generate the paths needed to be used in the game.
9797

@@ -109,7 +109,7 @@ For example, if the package was in the folder by itself its file path in-game wo
109109
### Args
110110

111111
-s or --source is the name of the folder in which to recursively search for images
112-
-t or --target is the name of the resulting folder to be packed by deppth, must be in the form of a mod GUID (ModAuthor-ModName).
112+
-t or --target is the name of the resulting folder to be packed by deppth2, must be in the form of a mod GUID (ModAuthor-ModName).
113113
-c or --codec is to specify the image codec to use for packing, default is RGBA, often used is BC7 because of max chunk size being 32MB.
114-
-dp or --deppthpack (not used above) set to anything but "True" to disable automatic Deppth Packing.
114+
-dp or --deppthpack (not used above) set to anything but "True" to disable automatic Deppth2 Packing.
115115
-iH or --includehulls (not used above) set to anything but "False" to calculate hull points.

deppth-runner.py

Lines changed: 0 additions & 6 deletions
This file was deleted.

deppth/__main__.py

Lines changed: 0 additions & 4 deletions
This file was deleted.

deppth/img.py

Whitespace-only changes.

deppth2-runner.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
"""Convenience wrapper for running deppth2 directly from source tree."""
2+
3+
from deppth2.cli import main
4+
5+
if __name__ == '__main__':
6+
main()
File renamed without changes.

deppth2/__main__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
"""__main__: executed when deppth2 directory is called as a script."""
2+
3+
from .deppth2 import main
4+
main()

deppth/cli.py renamed to deppth2/cli.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
"""Command-line interface for deppth functionality"""
1+
"""Command-line interface for deppth2 functionality"""
22
import os
33
import argparse
44
import sys
55

6-
from .deppth import list_contents, pack, patch, extract
6+
from .deppth2 import list_contents, pack, patch, extract
77
from .texpacking import build_atlases_hades
88

99
def main():
10-
parser = argparse.ArgumentParser(prog='deppth', description='Decompress, Extract, Pack for Pyre, Transistor, and Hades')
10+
parser = argparse.ArgumentParser(prog='deppth2', description='Decompress, Extract, Pack for Pyre, Transistor, and Hades')
1111
subparsers = parser.add_subparsers(help='The action to perform', dest='action')
1212

1313
# List parser
@@ -39,11 +39,11 @@ def main():
3939
patch_parser.set_defaults(func=cli_patch)
4040

4141
# Pack textures
42-
hadespack_parser = subparsers.add_parser('hadespack', help='Format images into an atlas and manifest for packing with deppth', aliases=['hpk'])
42+
hadespack_parser = subparsers.add_parser('hadespack', help='Format images into an atlas and manifest for packing with deppth2', aliases=['hpk'])
4343
hadespack_parser.add_argument('-s', '--source', metavar='source', default='MyPackage', type=str, help='The directory to recursively search for images in, default is current folder')
4444
hadespack_parser.add_argument('-t', '--target', metavar='target', default='ThunderstoreTeamName-MyPackage', help='Filenames created will start with this plus a number')
4545
hadespack_parser.add_argument('-c', '--codec', metavar='codec', default = "RGBA", help='Specify the image codec to use for packing, default is RGBA, often used is BC7 because of max chunk size being 32MB')
46-
hadespack_parser.add_argument('-dP', '--deppthpack', metavar='deppthpack', default='True', help='Automatically Pack your images and Manifest using deppth')
46+
hadespack_parser.add_argument('-dP', '--deppthpack', metavar='deppthpack', default='True', help='Automatically Pack your images and Manifest using deppth2')
4747
hadespack_parser.add_argument('-iH', '--includehulls', metavar='includehulls', default = "False", help='Set to anything if you want hull points computed and added')
4848
hadespack_parser.set_defaults(func=cli_hadespack)
4949

@@ -84,15 +84,15 @@ def cli_hadespack(args):
8484
target = args.target
8585
codec = args.codec
8686

87-
deppth = True
87+
deppth2 = True
8888
if args.deppthpack != "True":
89-
deppth = False
89+
deppth2 = False
9090

9191
hulls = False
9292
if args.includehulls != "False":
9393
hulls = True
9494

95-
build_atlases_hades(source, target, deppth, hulls, codec=codec)
95+
build_atlases_hades(source, target, deppth2, hulls, codec=codec)
9696

9797
def cli_patch(args):
9898
package = args.package

0 commit comments

Comments
 (0)