lodfile 0.1.0__tar.gz

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.
lodfile-0.1.0/PKG-INFO ADDED
@@ -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,47 @@
1
+ # lodfile
2
+
3
+ Read and write Heroes of Might and Magic III (incl. HotA) `.lod` archives, such as
4
+ `H3Bitmap.lod`, with an API modelled on `zipfile` / `tarfile`.
5
+
6
+ ## Install
7
+
8
+ ```bash
9
+ pip install lodfile[core]
10
+ ```
11
+
12
+ The core is pure standard library, no dependencies.
13
+
14
+ ## Usage
15
+
16
+ ```python
17
+ import lodfile
18
+
19
+ with lodfile.LodFile("H3Bitmap.lod") as lod:
20
+ print(lod.namelist())
21
+ data = lod.read("Adventure.def")
22
+ lod.extract("Adventure.def", "out/")
23
+ lod.extractall("out/")
24
+
25
+ # Create / append
26
+ with lodfile.LodFile("my.lod", "w") as lod:
27
+ lod.write("hero.pcx")
28
+ lod.writestr("notes.txt", "hello")
29
+
30
+ with lodfile.LodFile("my.lod", "a") as lod:
31
+ lod.write("extra.pcx")
32
+ ```
33
+
34
+ CLI:
35
+
36
+ ```bash
37
+ lodfile list H3Bitmap.lod
38
+ lodfile extract H3Bitmap.lod -d out/
39
+ lodfile create my.lod a.pcx b.pcx
40
+ ```
41
+
42
+ ## Format
43
+
44
+ Little endian. 92-byte header (`LOD\0`, type, entry count, 80 bytes padding), then
45
+ 32-byte entries (16-byte name, offset, size, type, compressed size), then data.
46
+ Compressed entries are zlib streams (compressed size `0` means stored raw).
47
+ Names are case-insensitive and limited to 16 bytes.
@@ -0,0 +1,23 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "lodfile"
7
+ version = "0.1.0"
8
+ description = "Read and write Heroes of Might and Magic III .lod archives with a zipfile-like API"
9
+ readme = "README.md"
10
+ requires-python = ">=3.8"
11
+ dependencies = []
12
+ keywords = ["lod", "homm3", "hota", "heroes3", "archive"]
13
+
14
+ [project.optional-dependencies]
15
+ # The core is pure standard library; this extra is intentionally empty so
16
+ # that `pip install lodfile[core]` works and stays dependency-free.
17
+ core = []
18
+
19
+ [project.scripts]
20
+ lodfile = "src.__main__:main"
21
+
22
+ [tool.setuptools.packages.find]
23
+ where = ["src"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -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,8 @@
1
+ README.md
2
+ pyproject.toml
3
+ src/lodfile.egg-info/PKG-INFO
4
+ src/lodfile.egg-info/SOURCES.txt
5
+ src/lodfile.egg-info/dependency_links.txt
6
+ src/lodfile.egg-info/entry_points.txt
7
+ src/lodfile.egg-info/requires.txt
8
+ src/lodfile.egg-info/top_level.txt
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ lodfile = src.__main__:main
@@ -0,0 +1,2 @@
1
+
2
+ [core]