mirror of
https://github.com/mon/ifstools.git
synced 2025-02-20 03:51:14 +01:00
pip installable and globally runnable
This commit is contained in:
parent
1767a83033
commit
34a400d022
3
.gitignore
vendored
3
.gitignore
vendored
@ -2,3 +2,6 @@ __pycache__/
|
|||||||
*.ifs
|
*.ifs
|
||||||
*_ifs
|
*_ifs
|
||||||
*.pyc
|
*.pyc
|
||||||
|
build/
|
||||||
|
dist/
|
||||||
|
ifstools.egg-info/
|
||||||
|
@ -12,11 +12,11 @@ Extractor for Konmai IFS files.
|
|||||||
- Dumps the ifs manifest so you can explore the format
|
- Dumps the ifs manifest so you can explore the format
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
`pip install -r requirements.txt`
|
`pip install git+https://github.com/mon/kbinxml/ git+https://github.com/mon/ifstools/`
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
```
|
```
|
||||||
usage: ifstools.py [-h] [-y] [-o OUT_DIR] [--tex-only] [--nocache] [-s] [-r]
|
usage: ifstools [-h] [-y] [-o OUT_DIR] [--tex-only] [--nocache] [-s] [-r]
|
||||||
file.ifs|folder_ifs [file.ifs|folder_ifs ...]
|
file.ifs|folder_ifs [file.ifs|folder_ifs ...]
|
||||||
|
|
||||||
Unpack/pack IFS files and textures
|
Unpack/pack IFS files and textures
|
||||||
|
@ -1 +0,0 @@
|
|||||||
from .ifs import IFS
|
|
2
ifstools/__init__.py
Normal file
2
ifstools/__init__.py
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
from .ifstools import main
|
||||||
|
from .ifs import IFS
|
@ -7,7 +7,7 @@ except NameError:
|
|||||||
# py 3
|
# py 3
|
||||||
pass
|
pass
|
||||||
|
|
||||||
from ifs import IFS
|
from .ifs import IFS
|
||||||
|
|
||||||
def get_choice(prompt):
|
def get_choice(prompt):
|
||||||
while True:
|
while True:
|
||||||
@ -21,7 +21,7 @@ def get_choice(prompt):
|
|||||||
else:
|
else:
|
||||||
print('Please answer y/n')
|
print('Please answer y/n')
|
||||||
|
|
||||||
if __name__ == '__main__':
|
def main():
|
||||||
parser = argparse.ArgumentParser(description='Unpack/pack IFS files and textures')
|
parser = argparse.ArgumentParser(description='Unpack/pack IFS files and textures')
|
||||||
parser.add_argument('files', metavar='file.ifs|folder_ifs', type=str, nargs='+',
|
parser.add_argument('files', metavar='file.ifs|folder_ifs', type=str, nargs='+',
|
||||||
help='files/folders to process. Files will be unpacked, folders will be repacked')
|
help='files/folders to process. Files will be unpacked, folders will be repacked')
|
||||||
@ -55,3 +55,7 @@ if __name__ == '__main__':
|
|||||||
i.extract(args.progress, args.use_cache, args.recurse, args.tex_only, path)
|
i.extract(args.progress, args.use_cache, args.recurse, args.tex_only, path)
|
||||||
else:
|
else:
|
||||||
i.repack(args.progress, args.use_cache, path)
|
i.repack(args.progress, args.use_cache, path)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
24
setup.py
Normal file
24
setup.py
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
from setuptools import setup
|
||||||
|
import sys
|
||||||
|
|
||||||
|
|
||||||
|
requires = [
|
||||||
|
'lxml',
|
||||||
|
'tqdm',
|
||||||
|
'pillow',
|
||||||
|
]
|
||||||
|
if sys.version_info < (3,0):
|
||||||
|
requires.append('future')
|
||||||
|
|
||||||
|
setup(
|
||||||
|
name='ifstools',
|
||||||
|
version='1.0',
|
||||||
|
entry_points = {
|
||||||
|
'console_scripts': ['ifstools=ifstools:main'],
|
||||||
|
},
|
||||||
|
packages=['ifstools', 'ifstools.handlers'],
|
||||||
|
url='https://github.com/mon/ifstools/',
|
||||||
|
author='mon',
|
||||||
|
author_email='me@mon.im',
|
||||||
|
install_requires=requires,
|
||||||
|
)
|
Loading…
x
Reference in New Issue
Block a user