From fd22b8f3743c7216e2fefa265214b3315cd60bf4 Mon Sep 17 00:00:00 2001 From: nea Date: Wed, 5 Oct 2022 01:54:45 +0200 Subject: Make stuff more palatable --- NotEnoughUpdates-REPO | 2 +- README.md | 7 +++++++ sbdata/__main__.py | 6 +++--- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/NotEnoughUpdates-REPO b/NotEnoughUpdates-REPO index d93e124..e4cf71c 160000 --- a/NotEnoughUpdates-REPO +++ b/NotEnoughUpdates-REPO @@ -1 +1 @@ -Subproject commit d93e124a64dd4da6dcae45f8c1857b2c4ad6a1d7 +Subproject commit e4cf71cc7641e450a05b13f70109d85ebd8df9ce diff --git a/README.md b/README.md index fce8e37..8de277b 100644 --- a/README.md +++ b/README.md @@ -2,3 +2,10 @@ Hi, jani, i will automate your job, and, when you are jobless, poor and homeless, i will take you in from the streets, feed you, put you in a little cage and pet you, because you have done an amazing job so far. + + +## Setup + + - Make sure the NEU repo is set up. When in doubt you can always use `git submodule update --init` to redownload it + - Set up your pipenv with `pipenv install` + - Run either `pipenv run python -m sbdata -explore` or `pipenv run python -m sbdata -json` in the main directory. diff --git a/sbdata/__main__.py b/sbdata/__main__.py index 5453611..211e971 100644 --- a/sbdata/__main__.py +++ b/sbdata/__main__.py @@ -45,14 +45,14 @@ def main(): keys = list(data[0].__dict__.keys()) query = '' while True: - table = rich.table.Table() + table = rich.table.Table(show_footer=True) for k in keys: - table.add_column(k) + table.add_column(header=k, footer=k) for item in data: if any(query in render_thing(val).casefold() for val in item.__dict__.values()): table.add_row(*[render_thing(getattr(item, k)) for k in keys]) console.print(table) - query = console.input("Search: ") + query = console.input("Search: ").casefold() if __name__ == '__main__': -- cgit