]> git.phdru.name Git - m_librarian.git/commitdiff
Rename data -> glst
authorOleg Broytman <phd@phdru.name>
Fri, 25 Dec 2015 19:40:50 +0000 (22:40 +0300)
committerOleg Broytman <phd@phdru.name>
Fri, 25 Dec 2015 19:41:29 +0000 (22:41 +0300)
m_librarian/glst.py
m_librarian/glst/.gitattributes [moved from m_librarian/data/.gitattributes with 100% similarity]
m_librarian/glst/License.txt [moved from m_librarian/data/License.txt with 100% similarity]
m_librarian/glst/README.rus.txt [moved from m_librarian/data/README.rus.txt with 100% similarity]
m_librarian/glst/genres_fb2.glst [moved from m_librarian/data/genres_fb2.glst with 100% similarity]
m_librarian/glst/genres_nonfb2.glst [moved from m_librarian/data/genres_nonfb2.glst with 100% similarity]
setup.py

index 867d4136590e2a0f4ccee0c429e0e7e270f065bf..44ec6121cbeaf6038730f3a5f9c17abf0a99a0d4 100755 (executable)
@@ -1,6 +1,6 @@
 #! /usr/bin/env python
 
-__all__ = ['import_data']
+__all__ = ['import_glst']
 
 import codecs
 import os
@@ -42,23 +42,23 @@ def import_glst_file(glst_filename):
     return old, new
 
 
-def _import_data():
+def _import_glst():
     ml_dir = os.path.dirname(__file__)
     old_fb2, new_fb2 = import_glst_file(
-        os.path.join(ml_dir, 'data', 'genres_fb2.glst'))
+        os.path.join(ml_dir, 'glst', 'genres_fb2.glst'))
     old_nonfb2, new_nonfb2 = import_glst_file(
-        os.path.join(ml_dir, 'data', 'genres_nonfb2.glst'))
+        os.path.join(ml_dir, 'glst', 'genres_nonfb2.glst'))
     sqlhub.processConnection.query("VACUUM %s" % Genre.sqlmeta.table)
     return old_fb2 + old_nonfb2, new_fb2 + new_nonfb2
 
 
-def import_data():
-    return sqlhub.doInTransaction(_import_data)
+def import_glst():
+    return sqlhub.doInTransaction(_import_glst)
 
 
 def test():
     ml_dir = os.path.dirname(__file__)
-    print parse_glst_file(os.path.join(ml_dir, 'data', 'genres_fb2.glst'))
+    print parse_glst_file(os.path.join(ml_dir, 'glst', 'genres_fb2.glst'))
 
 if __name__ == '__main__':
     test()
index 7d293ce43bb550c11ae52c90281901bf5e6a6b97..d61682026e881dee896806bd2b15e0575f9c47e3 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -42,7 +42,7 @@ setup(name='m_librarian',
           'Programming Language :: Python :: 2 :: Only',
       ],
       packages=['m_librarian'],
-      package_data={'m_librarian': ['data/*.txt', 'data/genres_*.glst']},
+      package_data={'m_librarian': ['glst/*.txt', 'glst/genres_*.glst']},
       scripts=['scripts/ml-import.py', 'scripts/ml-initdb.py'],
       requires=['SQLObject'],
       )