lodfile 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,56 @@
1
+ Metadata-Version: 2.4
2
+ Name: lodfile
3
+ Version: 0.1.0
4
+ Summary: Read and write Heroes of Might and Magic III .lod archives with a zipfile-like API
5
+ Keywords: lod,homm3,hota,heroes3,archive
6
+ Requires-Python: >=3.8
7
+ Description-Content-Type: text/markdown
8
+ Provides-Extra: core
9
+
10
+ # lodfile
11
+
12
+ Read and write Heroes of Might and Magic III (incl. HotA) `.lod` archives, such as
13
+ `H3Bitmap.lod`, with an API modelled on `zipfile` / `tarfile`.
14
+
15
+ ## Install
16
+
17
+ ```bash
18
+ pip install lodfile[core]
19
+ ```
20
+
21
+ The core is pure standard library, no dependencies.
22
+
23
+ ## Usage
24
+
25
+ ```python
26
+ import lodfile
27
+
28
+ with lodfile.LodFile("H3Bitmap.lod") as lod:
29
+ print(lod.namelist())
30
+ data = lod.read("Adventure.def")
31
+ lod.extract("Adventure.def", "out/")
32
+ lod.extractall("out/")
33
+
34
+ # Create / append
35
+ with lodfile.LodFile("my.lod", "w") as lod:
36
+ lod.write("hero.pcx")
37
+ lod.writestr("notes.txt", "hello")
38
+
39
+ with lodfile.LodFile("my.lod", "a") as lod:
40
+ lod.write("extra.pcx")
41
+ ```
42
+
43
+ CLI:
44
+
45
+ ```bash
46
+ lodfile list H3Bitmap.lod
47
+ lodfile extract H3Bitmap.lod -d out/
48
+ lodfile create my.lod a.pcx b.pcx
49
+ ```
50
+
51
+ ## Format
52
+
53
+ Little endian. 92-byte header (`LOD\0`, type, entry count, 80 bytes padding), then
54
+ 32-byte entries (16-byte name, offset, size, type, compressed size), then data.
55
+ Compressed entries are zlib streams (compressed size `0` means stored raw).
56
+ Names are case-insensitive and limited to 16 bytes.
@@ -0,0 +1,5 @@
1
+ lodfile-0.1.0.dist-info/METADATA,sha256=FmXCWS7DJCyQwGJfXnHZB8mfEpM6rBJFDK0s232wJq8,1366
2
+ lodfile-0.1.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
3
+ lodfile-0.1.0.dist-info/entry_points.txt,sha256=Z_9ZRx0IGcVk65AENbkr0fN09qz7-973d3QJ8FxKgUs,46
4
+ lodfile-0.1.0.dist-info/top_level.txt,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
5
+ lodfile-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.2.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ lodfile = src.__main__:main
@@ -0,0 +1 @@
1
+