mirror of
https://github.com/mon/ifstools.git
synced 2024-11-12 04:30:50 +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
|
||||
*.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
|
||||
|
||||
## Install
|
||||
`pip install -r requirements.txt`
|
||||
`pip install git+https://github.com/mon/kbinxml/ git+https://github.com/mon/ifstools/`
|
||||
|
||||
## 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 ...]
|
||||
|
||||
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
|
||||
pass
|
||||
|
||||
from ifs import IFS
|
||||
from .ifs import IFS
|
||||
|
||||
def get_choice(prompt):
|
||||
while True:
|
||||
@ -21,7 +21,7 @@ def get_choice(prompt):
|
||||
else:
|
||||
print('Please answer y/n')
|
||||
|
||||
if __name__ == '__main__':
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description='Unpack/pack IFS files and textures')
|
||||
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')
|
||||
@ -55,3 +55,7 @@ if __name__ == '__main__':
|
||||
i.extract(args.progress, args.use_cache, args.recurse, args.tex_only, path)
|
||||
else:
|
||||
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…
Reference in New Issue
Block a user