From 9ad72b06d42a5fe803bd85ce99653113dd256bc3 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Sun, 14 Jul 2019 13:29:02 +1000 Subject: [PATCH] describe: add some minimal documentation --- describe.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/describe.py b/describe.py index 1989616..3a23caf 100755 --- a/describe.py +++ b/describe.py @@ -1,14 +1,23 @@ #!/usr/bin/env python3 +""" +This script prints some basic recipe information useful for debugging the +database. +""" + import satisfactory import os + if __name__ == '__main__': - root = os.path.dirname(__file__) - recipe_root = os.path.join(root, 'data', 'recipes') - cookbook = satisfactory.Cookbook(recipe_root) + def main(): + root = os.path.dirname(__file__) + recipe_root = os.path.join(root, 'data', 'recipes') + cookbook = satisfactory.Cookbook(recipe_root) - for i in cookbook.resources(): - print(i) + print("Resources:") + for i in cookbook.resources(): + print(i) + main()