aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5/sst_convert_markup.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v5/sst_convert_markup.rb')
-rw-r--r--lib/sisu/v5/sst_convert_markup.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/sisu/v5/sst_convert_markup.rb b/lib/sisu/v5/sst_convert_markup.rb
index 6002e2fc..2ce0fc7f 100644
--- a/lib/sisu/v5/sst_convert_markup.rb
+++ b/lib/sisu/v5/sst_convert_markup.rb
@@ -201,22 +201,22 @@ WOK
and @opt.files.length > 0
mr=nil
#%% changes to make m match, r replace -------------------------->
- if @opt.mod.inspect =~/--help/ then help
- elsif @opt.mod.inspect =~/(?:convert|to)[=-](?:xml |sxs|sax|sxd|dom|sxn|node)/
- ext=case @opt.mod.inspect
+ if @opt.selections.str =~/--help/ then help
+ elsif @opt.selections.str =~/(?:convert|to)[=-](?:xml |sxs|sax|sxd|dom|sxn|node)/
+ ext=case @opt.selections.str
when /(?:convert|to)[=-](?:xml|sxs|sax)/ then '.sxs.xml'
when /(?:convert|to)[=-](?:sxd|dom)/ then '.sxd.xml'
when /(?:convert|to)[=-](?:sxn|node)/ then '.sxn.xml'
end
message("#{@opt.files.inspect}\n\nWARNING, PROCEED AT YOUR OWN RISK,\noverwriting any equivalent file with the extension #{ext}")
- mr=case @opt.mod.inspect
+ mr=case @opt.selections.str
when /(?:convert|to)[=-](?:sxs|sax|xml )/ then convert_to_simple_xml_model_sax
when /(?:convert|to)[=-](?:sxd|dom)/ then convert_to_simple_xml_model_dom
when /(?:convert|to)[=-](?:sxn|node)/ then convert_to_simple_xml_model_node
else help
end
else
- mr=case @opt.mod.inspect
+ mr=case @opt.selections.str
when /(?:(?:37)?to-?38|--(?:convert|to)[=-](?:current|0.38))/ then convert_37_to_38
when /(?:(?:38)?to-?37|--(?:convert|to)[=-](?:0.37))/ then convert_38_to_37
when /(?:36to37)/ then convert_filename_36_to_37
@@ -227,7 +227,7 @@ WOK
else help
end
end
- unless @opt.mod.inspect =~/kdi/
+ unless @opt.selections.str =~/kdi/
match_and_replace=mr
#start_processing =/not used in this example/i
end_processing =/END\s+OF\s+FILE/
@@ -236,8 +236,8 @@ WOK
@new,@matched,@flag_start,@flag_end,@empty1,@empty2=true,false,false,false,false,false
o="#{i}.bk" #o is for old
markup_version=SiSU_Markup::MarkupIdentify.new(@opt).markup_version?
- if (@opt.mod.inspect=~/37/ and markup_version=~/0.38/) \
- or (@opt.mod.inspect=~/current|38/ and markup_version=~/0.37/)
+ if (@opt.selections.str=~/37/ and markup_version=~/0.38/) \
+ or (@opt.selections.str=~/current|38/ and markup_version=~/0.37/)
puts "#{i} #{markup_version}"
file=File.open(i,'r')
cont=file.readlines
@@ -300,7 +300,7 @@ WOK
if (@opt.act[:verbose][:set]==:on \
|| @opt.act[:verbose_plus][:set]==:on \
|| @opt.act[:maintenance][:set]==:on)
- puts "Requested conversion #{@opt.mod.inspect} markup #{markup_version} identified in #{i}"
+ puts "Requested conversion #{@opt.selections.str} markup #{markup_version} identified in #{i}"
end
end
end
@@ -315,7 +315,7 @@ require_relative 'hub_options' # hub_options.rb
argv=$*
base_path=Dir.pwd
@opt=SiSU_Commandline::Options.new(argv,base_path)
-case @opt.mod.inspect
+case @opt.selections.str
when /=kdi/
SiSU_Modify::ConvertMarkup.new(@opt).conversion
when /(?:36|37|38)?to-?(?:37|38)|--convert|--to|--from|default/
@@ -324,7 +324,7 @@ when /(?:36|37|38)?to-?(?:37|38)|--convert|--to|--from|default/
SiSU_Modify::ConvertMarkup.new(@opt).conversion
end
else
- @opt.mod='--help'
+ @opt.selections.str='--help'
SiSU_Modify::ConvertMarkup.new(@opt).help
end
__END__