Metadata-Version: 2.1
Name: sc-file
Version: 1.3.2
Summary: 
License: MIT
Author: onejeuu
Author-email: bloodtrail@beber1k.ru
Requires-Python: >=3.11,<3.13
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: lz4[block] (>=4.3.2,<5.0.0)
Description-Content-Type: text/markdown

# Converting STALCRAFT Files Library

Library for converting encrypted stalcraft game files, such as models and textures into well-known formats. \
You can use compiled utility from [Releases](https://github.com/onejeuu/sc-file/releases) page.


### Formats

`.mcsa` `->` `.obj` \
`.mic` `->` `.png` \
`.ol` `->` `.dds`


## Install:

### Pip
```console
pip install scfile -U
```

<details>
<summary>Manual</summary>

```console
git clone git@github.com:onejeuu/sc-file.git
```

```console
cd sc-file
```

```console
poetry install
```

Or

```console
pip install -r requirements.txt
```
</details>

## Usage:

### Simple
```python
from scfile import mcsa_to_obj, mic_to_png, ol_to_dds

mcsa_to_obj("path/to/file.mcsa", "path/to/file.obj")
mic_to_png("path/to/file.mic", "path/to/file.png")
ol_to_dds("path/to/file.ol", "path/to/file.dds")
```

### Advanced
```python
from scfile import McsaFile, MicFile, OlFile
from scfile import BinaryReader

with BinaryReader("path/to/file.ol") as reader:
    ol = OlFile(reader).to_dds()

with open("path/to/file.dds", "wb") as fp:
    fp.write(ol)
```

### CLI Utility

```console
SCF.exe --source path/to/file.mcsa
```

```console
SCF.exe --source path/to/file.ol --output path/to/file.dds
```


## Build:
```console
poetry run build
```

