aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/lesana6
-rwxr-xr-xscripts/openlibrary2lesana6
-rwxr-xr-xscripts/tellico2lesana6
3 files changed, 15 insertions, 3 deletions
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()