aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3/sst_identify_markup.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2012-03-19 22:07:29 -0400
committerRalph Amissah <ralph@amissah.com>2012-03-19 22:07:33 -0400
commit6811ac91f21a434fc7d967c11e1b20f33918c6ea (patch)
tree30f39674ca96a79f8a604a9f02d571f24320e221 /lib/sisu/v3/sst_identify_markup.rb
parentv3: 3.2.0 version & changelog "opened" (diff)
v3: 3.2 branch is main (v3dv --> v3); dev (v3dv) branch directories removed
* v3dv (3.2) "merged" into v3 (previously 3.1) (& removed) * conf/sisu/v3dv --> conf/sisu/v3 * data/sisu/v3dv --> data/sisu/v3 * lib/sisu/v3dv --> lib/sisu/v3 * bin/sisu* (v3dv references changed to v3) * (--dev modifier (superfluous for the time being) runs main v3 branch)
Diffstat (limited to 'lib/sisu/v3/sst_identify_markup.rb')
-rw-r--r--lib/sisu/v3/sst_identify_markup.rb36
1 files changed, 18 insertions, 18 deletions
diff --git a/lib/sisu/v3/sst_identify_markup.rb b/lib/sisu/v3/sst_identify_markup.rb
index 2089a9a8..af30f19b 100644
--- a/lib/sisu/v3/sst_identify_markup.rb
+++ b/lib/sisu/v3/sst_identify_markup.rb
@@ -59,7 +59,7 @@
=end
module SiSU_Markup
- class Markup_inform
+ class MarkupInform
attr_accessor :version
def initialize(version,message,declared_markup='',declared_type='')
@version,@message,@declared_markup,@declared_type=version,message,declared_markup,declared_type
@@ -77,10 +77,10 @@ module SiSU_Markup
@declared_type
end
def history
- Markup_history.new(@version).query
+ MarkupHistory.new(@version).query
end
end
- class Markup_identify
+ class MarkupIdentify
def initialize(opt)
@opt=opt
@description='This is a script attempts to identify the version of markup used in SiSU (and provides information on changes in markup)'
@@ -121,14 +121,14 @@ WOK
if @flag_2_0 \
or y =~/^@make:|^@classify|^\s\s?:[a-z_-]+?:\s+\S/
version=2.0.to_f
- markup=Markup_inform.new(version,'2.0' + oldlinks,@declared_markup,@declared_type)
+ markup=MarkupInform.new(version,'2.0' + oldlinks,@declared_markup,@declared_type)
@flag_2_0=true
break
end
unless @flag_38
if (y =~/^:?A~/ and f =~/(?:\.sst|\.ssm|\.ssi)/)
version='0.38'
- markup=Markup_inform.new(version,'0.38' + oldlinks,@declared_markup,@declared_type)
+ markup=MarkupInform.new(version,'0.38' + oldlinks,@declared_markup,@declared_type)
@flag_38=true
end
end
@@ -136,14 +136,14 @@ WOK
if @flag_1_0 \
or y =~/^=\{.+?\}\s*$/
version='0.69'
- markup=Markup_inform.new(version,'0.69' + oldlinks,@declared_markup,@declared_type)
+ markup=MarkupInform.new(version,'0.69' + oldlinks,@declared_markup,@declared_type)
@flag_1_0=true
break
end
if @flag_66 \
or y =~/[a-z+][:;]\{.+?\}[:;][a-z+]/
version='0.66'
- markup=Markup_inform.new(version,'0.66' + oldlinks,@declared_markup,@declared_type)
+ markup=MarkupInform.new(version,'0.66' + oldlinks,@declared_markup,@declared_type)
@flag_66=true
break
end
@@ -162,26 +162,26 @@ WOK
if @flag_57 \
or (y =~/^:?A~\?? @title/ and f =~/(?:\.sst|\.ssm|\.ssi)/)
version='0.57'
- markup=Markup_inform.new(version,'0.57' + oldlinks,@declared_markup,@declared_type)
+ markup=MarkupInform.new(version,'0.57' + oldlinks,@declared_markup,@declared_type)
@flag_57=true
break
end
if @flag_38 \
or (y =~/^:?A~/ and f =~/(?:\.sst|\.ssm|\.ssi)/)
version='0.38'
- markup=Markup_inform.new(version,'0.38' + oldlinks,@declared_markup,@declared_type)
+ markup=MarkupInform.new(version,'0.38' + oldlinks,@declared_markup,@declared_type)
@flag_38=true
break if i >= 200
if y =~ /(?:~{\*+|~\[\*|~\[\+)\s/
version='0.42'
- markup=Markup_inform.new(version,'0.42' + oldlinks,@declared_markup,@declared_type)
+ markup=MarkupInform.new(version,'0.42' + oldlinks,@declared_markup,@declared_type)
break
end
end
if (y =~/^1~/ and f =~/(?:\.sst|\.ssm|\.ssi)/) \
and not @flag_38
version='0.37'
- markup=Markup_inform.new(version,'0.37 is substantially 0.16 - 0.36 markup with new file-extension' + oldlinks,@declared_markup,@declared_type)
+ markup=MarkupInform.new(version,'0.37 is substantially 0.16 - 0.36 markup with new file-extension' + oldlinks,@declared_markup,@declared_type)
break
end
if y =~/^1~/ \
@@ -193,31 +193,31 @@ WOK
" (change file extension from .#{t}#{n} to .ssm)"
else " (change file extension from .#{t}#{n} to .sst)"
end
- markup=Markup_inform.new(version,'0.16 - 0.36' + instruct + links,@declared_markup,@declared_type)
+ markup=MarkupInform.new(version,'0.16 - 0.36' + instruct + links,@declared_markup,@declared_type)
break
end
if y =~/^0\{~/ \
and not @flag_38
version='0.1'
- markup=Markup_inform.new(version,'0.1 - 0.15',@declared_markup,@declared_type)
+ markup=MarkupInform.new(version,'0.1 - 0.15',@declared_markup,@declared_type)
break
end
if y =~/^0\{{3}/ \
and not @flag_38
- markup=Markup_inform.new('circa. 1997','old, check date',@declared_markup,@declared_type)
+ markup=MarkupInform.new('circa. 1997','old, check date',@declared_markup,@declared_type)
break
end
markup='Not a recognised file type '
end
end
markup
- else Markup_history.new(@opt).help_query
+ else MarkupHistory.new(@opt).help_query
end
end
def determine_markup_version
if @opt.fns.nil? \
or @opt.fns.empty?
- Markup_history.new(@opt).help_identify
+ MarkupHistory.new(@opt).help_identify
end
if File.exist?(@opt.fns)
if @opt.fns =~/\.(?:sst|ssm|ssi|s[123i]|r[123])/
@@ -251,7 +251,7 @@ WOK
end
end
end
- class Markup_history
+ class MarkupHistory
def initialize(opt)
@opt=opt
end
@@ -470,5 +470,5 @@ end
puts "SiSU files:"
puts f
f.each do |x|
- SiSU_Markup::Markup_identify.new(x).markup_version?
+ SiSU_Markup::MarkupIdentify.new(x).markup_version?
end