]> git.phdru.name Git - m_librarian.git/commitdiff
Import many INPX
authorOleg Broytman <phd@phdru.name>
Thu, 24 Dec 2015 15:39:51 +0000 (18:39 +0300)
committerOleg Broytman <phd@phdru.name>
Thu, 24 Dec 2015 15:39:51 +0000 (18:39 +0300)
Add the script to setup.py.

scripts/ml-import.py
setup.py

index 0273ff67972e122b492947d5798b79ec837b0feb..5275d0b2bb34b54a37fb4435b275f6ff6b85c020 100755 (executable)
@@ -10,5 +10,6 @@ if __name__ == '__main__':
         sys.exit("Usage: %s file.inpx" % sys.argv[0])
     init_db()
     import_data()
-    import_inpx(sys.argv[1])
+    for inpx in sys.argv[1:]:
+        import_inpx(inpx)
     update_counters()
index 46541d9c62a87ea4a76d5aaed402f5ab5bb6388a..7d293ce43bb550c11ae52c90281901bf5e6a6b97 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -43,6 +43,6 @@ setup(name='m_librarian',
       ],
       packages=['m_librarian'],
       package_data={'m_librarian': ['data/*.txt', 'data/genres_*.glst']},
-      scripts=['scripts/ml-initdb.py'],
+      scripts=['scripts/ml-import.py', 'scripts/ml-initdb.py'],
       requires=['SQLObject'],
       )