aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v2/db_import.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v2/db_import.rb')
-rw-r--r--lib/sisu/v2/db_import.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/sisu/v2/db_import.rb b/lib/sisu/v2/db_import.rb
index 0e2db8e3..3b5c1cc9 100644
--- a/lib/sisu/v2/db_import.rb
+++ b/lib/sisu/v2/db_import.rb
@@ -118,10 +118,8 @@ module SiSU_DB_import
def marshal_load
require "#{SiSU_lib}/dal" # dal.rb
@dal_array=SiSU_DAL::Source.new(@opt).get # dal file drawn here
- tell=SiSU_Screen::Ansi.new(@opt.cmd,"#{@db.psql.db}::#{@opt.fns}")
- tell.puts_blue unless @opt.cmd =~/q/
- tell=SiSU_Screen::Ansi.new(@opt.cmd,'Marshal Load',@fnc)
- tell.print_grey if @opt.cmd =~/v/
+ SiSU_Screen::Ansi.new(@opt.cmd,"#{@db.psql.db}::#{@opt.fns}").puts_blue if @opt.cmd =~/vVM/
+ SiSU_Screen::Ansi.new(@opt.cmd,'Marshal Load',@fnc).puts_grey if @opt.cmd =~/v/
select_first_match=%{ SELECT metadata_and_text.tid FROM metadata_and_text WHERE metadata_and_text.src_filename = '#{@opt.fns}'; }
file_exist=@sql_type=~/sqlite/ \
? @conn.get_first_value(select_first_match) \
@@ -198,7 +196,7 @@ module SiSU_DB_import
def pf_db_import_transaction_close
end
def db_import_metadata #% import documents - populate database
- print %{ #{@cX.grey}import documents dbi_unit #{@cX.off} } unless @opt.cmd =~/q/
+ print %{ #{@cX.grey}import documents dbi_unit #{@cX.off} } if @opt.cmd =~/vVM/
@tp={}
@md=SiSU_Param::Parameters.new(@opt).get
#% sisutxt & fulltxt
@@ -230,7 +228,7 @@ module SiSU_DB_import
end
@@id_t =0 if @col[:lid].nil? or @col[:lid].to_s.empty?
@@id_t+=1 #bug related, needs to be performed once at start of file, but consider moving, as, placed here it means program will fail if document header lacks @title:
- puts %{\n#{@cX.grey}Processing file number#{@cX.off}: #{@cX.green}#{@@id_t}#{@@cX.off}} unless @opt.cmd =~/q/
+ puts %{\n#{@cX.grey}Processing file number#{@cX.off}: #{@cX.green}#{@@id_t}#{@@cX.off}} if @opt.cmd =~/vVM/
end
################ CLEAR ##############
SiSU_DB_DBI::Test.new(self,@opt).verify #% import title names, filenames (tuple)