Skip to content

Commit

Permalink
Dev QoL (#5)
Browse files Browse the repository at this point in the history
* dev QoL: proper requirements.txt & gitignore, removed useless output on every run

* Added more global help options, and a top-level version option to replace the print statement.

---------

Co-authored-by: ilonachan <[email protected]>
Co-authored-by: ilonachan <[email protected]>
  • Loading branch information
3 people authored Sep 1, 2024
1 parent d2cc89c commit 39b353f
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
__pycache__/
*.pyc
.vscode/
/venv/

releases/
scripts/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Some unused variants of puzzles can't be extracted yet through Flora, as well as
* [pillow](https://pypi.org/project/pillow/)
* [ndspy](https://pypi.org/project/ndspy/)

To install all modules, use: `pip install click pillow ndspy` &nbsp;/ &nbsp;`py -m pip install click pillow ndspy`
To install all modules, use: `pip install -r requirements.txt`

### Special thanks to:
* [pleonex](https://github.com/pleonex/) for his tool [Tinke](https://github.com/pleonex/Tinke), which gave me a base for file formats
Expand Down
2 changes: 1 addition & 1 deletion formats/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from formats import gds, bg, pcm, puzzle, rom
from formats import gds, bg, pcm, puzzle, ndsrom
2 changes: 1 addition & 1 deletion formats/puzzle.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def cli(romfile, puzzle, out_dir, lang):
except FileExistsError:
pass

print("") #newline lol
# print("") #newline lol

if id.startswith("A5F"): #Curious Village
#TODO: get files called from the script?
Expand Down
8 changes: 5 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
import formats
from version import v

@click.group(name=f"flora")
CONTEXT_SETTINGS = dict(help_option_names = ['--help', '-h', '-?'])

@click.group(name="flora", context_settings=CONTEXT_SETTINGS)
@click.version_option(v, '--version', '-v', prog_name="flora", message=f"Flora v{v} by patataofcourse")
def cli():
pass

Expand All @@ -13,5 +16,4 @@ def cli():
cli.add_command(formats.puzzle.cli, "puzzle")

if __name__ == "__main__":
print(f"Flora v{v} by patataofcourse\n")
cli() #TODO: managing exceptions, -v
cli() #TODO: managing exceptions
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
click
pillow
ndspy

0 comments on commit 39b353f

Please sign in to comment.