-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from rysuds/refactor
refactored and added cli command + group samples as an example
- Loading branch information
Showing
10 changed files
with
68 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,8 @@ __pycache__/ | |
*.py[cod] | ||
*$py.class | ||
|
||
*.DS_Store | ||
|
||
# C extensions | ||
*.so | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
# exsprite | ||
A CLI tool for extracting sprites from spritesheets! | ||
|
||
## Setup | ||
This will install all required packages and create the cli command for use | ||
``` | ||
python setup.py install | ||
``` | ||
|
||
## Example usage | ||
|
||
If you want to group your sprite sheet by rows do | ||
|
||
``` | ||
~$ python exprite.py --filename <filename> save | ||
exsprite --filename <path to sprite sheet> save | ||
``` |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from exsprite.core import SpriteSheet | ||
|
||
import fire | ||
|
||
def main(): | ||
fire.Fire(SpriteSheet) | ||
|
||
if __name__ == '__main__': | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from exsprite.core.sprite_sheet import SpriteSheet | ||
|
||
__all__ = ["SpriteSheet"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from exsprite.utils.utils import * |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
|
||
"""The setup script.""" | ||
|
||
from setuptools import setup, find_packages | ||
|
||
with open('README.md') as readme_file: | ||
readme = readme_file.read() | ||
|
||
requirements = ['numpy', | ||
'Pillow', | ||
'scikit-image', | ||
'scipy', | ||
'opencv-python', | ||
'fire', | ||
'matplotlib' | ||
] | ||
|
||
setup( | ||
author="Ryan Sudhakaran", | ||
python_requires='>=3.8', | ||
classifiers=[ | ||
'Programming Language :: Python :: 3.7', | ||
'Programming Language :: Python :: 3.8', | ||
], | ||
description="A CLI tool for extracting sprites from spritesheets!", | ||
entry_points={ | ||
'console_scripts': [ | ||
'exsprite=exsprite.cli:main', | ||
], | ||
}, | ||
install_requires=requirements, | ||
license="Apache Software License 2.0", | ||
long_description=readme, | ||
include_package_data=True, | ||
keywords='exsprite', | ||
name='exsprite', | ||
packages=find_packages(include=['exsprite', 'exsprite.*']), | ||
url='https://github.com/rysuds/exsprite', | ||
version='0.1.0', | ||
zip_safe=False, | ||
) |