Multi-thread the parsing of books to speed up loading.
[quanlib.git] / main.rb
diff --git a/main.rb b/main.rb
index b0c4b795c714410162fc23c0953601b0fce12ab8..e294b4a15e3391a0e4b84d41235b2eee1265ca31 100644 (file)
--- a/main.rb
+++ b/main.rb
@@ -1,11 +1,10 @@
 require_relative 'navigator'
 require_relative 'page'
 require_relative 'store'
-require_relative 'walkdir'
+require_relative 'walk_dir'
 
 @outputDir = 'output'
 
-book_ids = []
 @config_file = 'quanlib.ini'
 @skip_class = false
 
@@ -39,8 +38,8 @@ end
 for arg in ARGV
   if ! arg.start_with?("--")
     puts 'Scanning directory "' + arg + '"...'
-    w = WalkDir.new(@store, arg)
-    book_ids += (w.books)
+    w = WalkDir.new(@config_file, arg)
+    w.books
   end
 end