From 70ed1dcf05aa9cd7e3c03afd47625dc8a75ab556 Mon Sep 17 00:00:00 2001 From: Elena ``of Valhalla'' Grandi Date: Sun, 25 Feb 2024 20:11:51 +0100 Subject: Modernize packaging with pyproject.toml and setuptool_scm. --- scripts/lesana | 6 +++++- scripts/openlibrary2lesana | 6 +++++- scripts/tellico2lesana | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/lesana b/scripts/lesana index 6d7e4c0..177ca9b 100755 --- a/scripts/lesana +++ b/scripts/lesana @@ -8,7 +8,8 @@ import hazwaz import lesana.command -if __name__ == "__main__": + +def main(): # setup logging for lesana cli logger = logging.getLogger('lesana') ch = logging.StreamHandler() @@ -18,3 +19,6 @@ if __name__ == "__main__": logger.setLevel(logging.INFO) lesana.command.Lesana().run() + +if __name__ == "__main__": + main() diff --git a/scripts/openlibrary2lesana b/scripts/openlibrary2lesana index 8394a3d..c3d38e3 100755 --- a/scripts/openlibrary2lesana +++ b/scripts/openlibrary2lesana @@ -101,5 +101,9 @@ class OL2L(lesana.command.Command): print(saved_entry) -if __name__ == '__main__': +def main(): OL2L().main() + + +if __name__ == '__main__': + main() diff --git a/scripts/tellico2lesana b/scripts/tellico2lesana index f432946..c4dfdde 100755 --- a/scripts/tellico2lesana +++ b/scripts/tellico2lesana @@ -129,5 +129,9 @@ class T2L: self.collection.update_cache() -if __name__ == '__main__': +def main(): T2L().main() + + +if __name__ == '__main__': + main() -- cgit v1.2.3