aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5/txt_shared.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v5/txt_shared.rb')
-rw-r--r--lib/sisu/v5/txt_shared.rb95
1 files changed, 48 insertions, 47 deletions
diff --git a/lib/sisu/v5/txt_shared.rb b/lib/sisu/v5/txt_shared.rb
index 31a976d2..0b6c1953 100644
--- a/lib/sisu/v5/txt_shared.rb
+++ b/lib/sisu/v5/txt_shared.rb
@@ -8,7 +8,8 @@
* Author: Ralph Amissah
* Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013 Ralph Amissah, All Rights Reserved.
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
+ All Rights Reserved.
* License: GPL 3 or later:
@@ -176,52 +177,52 @@ module SiSU_TextUtils
end
def start_is_match
case @p
- when /^#{Mx[:meta_o]}(title)#{Mx[:meta_c]}\s*(.+?)$/; header($1,@md.title.full,'meta','dc') #dc 1
- when /^#{Mx[:meta_o]}(creator|author)#{Mx[:meta_c]}\s*(.+?)$/; header('creator',$2,'meta','dc') #dc 2
- when /^#{Mx[:meta_o]}(subject)#{Mx[:meta_c]}\s*(.+?)$/; header($1,$2,'meta','dc') #dc 3
- when /^#{Mx[:meta_o]}(description)#{Mx[:meta_c]}\s*(.+?)$/; header($1,$2,'meta','dc') #dc 4
- when /^#{Mx[:meta_o]}(publisher)#{Mx[:meta_c]}\s*(.+?)$/; header($1,$2,'meta','dc') #dc 5
- when /^#{Mx[:meta_o]}(contributor)#{Mx[:meta_c]}\s*(.+?)$/; header($1,$2,'meta','dc') #dc 6
- when /^#{Mx[:meta_o]}(date)#{Mx[:meta_c]}\s*(.+?)$/; header($1,$2,'meta','dc') #dc 7
- when /^#{Mx[:meta_o]}(date\.created)#{Mx[:meta_c]}\s*(.+?)$/; header($1,$2,'meta','extra')
- when /^#{Mx[:meta_o]}(date\.issued)#{Mx[:meta_c]}\s*(.+?)$/; header($1,$2,'meta','extra')
- when /^#{Mx[:meta_o]}(date\.available)#{Mx[:meta_c]}\s*(.+?)$/; header($1,$2,'meta','extra')
- when /^#{Mx[:meta_o]}(date\.valid)#{Mx[:meta_c]}\s*(.+?)$/; header($1,$2,'meta','extra')
- when /^#{Mx[:meta_o]}(date\.modified)#{Mx[:meta_c]}\s*(.+?)$/; header($1,$2,'meta','extra')
- when /^#{Mx[:meta_o]}(type)#{Mx[:meta_c]}\s*(.+?)$/; header($1,$2,'meta','dc') #dc 8
- when /^#{Mx[:meta_o]}(format)#{Mx[:meta_c]}\s*(.+?)$/; header($1,$2,'meta','dc') #dc 9
- when /^#{Mx[:meta_o]}(identifier)#{Mx[:meta_c]}\s*(.+?)$/; header($1,$2,'meta','dc') #dc 10
- when /^#{Mx[:meta_o]}(source)#{Mx[:meta_c]}\s*(.+?)$/; header($1,$2,'meta','dc') #dc 11
- when /^#{Mx[:meta_o]}(language)#{Mx[:meta_c]}\s*(.+?)$/; header($1,$2,'meta','dc') #dc 12
- when /^#{Mx[:meta_o]}(relation)#{Mx[:meta_c]}\s*(.+?)$/; header($1,$2,'meta','dc') #dc 13
- when /^#{Mx[:meta_o]}(coverage)#{Mx[:meta_c]}\s*(.+?)$/; header($1,$2,'meta','dc') #dc 14
- when /^#{Mx[:meta_o]}(rights)#{Mx[:meta_c]}\s*(.+?)$/; header($1,$2,'meta','dc') #dc 15
- when /^#{Mx[:meta_o]}(keywords)#{Mx[:meta_c]}\s*(.+?)$/; header($1,$2,'meta','extra')
- when /^#{Mx[:meta_o]}(copyright)#{Mx[:meta_c]}\s*(.+?)$/; header($1,$2,'meta','extra')
- when /^#{Mx[:meta_o]}(translator|translated_by)#{Mx[:meta_c]}\s*(.+?)$/; header('translator',$2)
- when /^#{Mx[:meta_o]}(illustrator|illustrated_by)#{Mx[:meta_c]}\s*(.+?)$/; header('illustrator',$2)
- when /^#{Mx[:meta_o]}(prepared_by)#{Mx[:meta_c]}\s*(.+?)$/; header($1,$2,'meta','extra')
- when /^#{Mx[:meta_o]}(digitized_by)#{Mx[:meta_c]}\s*(.+?)$/; header($1,$2,'meta','extra')
- when /^#{Mx[:meta_o]}(comments?)#{Mx[:meta_c]}\s*(.+?)$/; header($1,$2,'meta','extra')
- when /^#{Mx[:meta_o]}(abstract)#{Mx[:meta_c]}\s*(.+?)$/; header($1,$2,'meta','extra')
- when /^#{Mx[:meta_o]}(tags?)#{Mx[:meta_c]}\s*(.+?)$/; header($1,$2,'meta','extra')
- when /^#{Mx[:meta_o]}(catalogue)#{Mx[:meta_c]}\s*(.+?)$/; header($1,$2,'meta','extra')
- when /^#{Mx[:meta_o]}(class(?:ify)?_loc)#{Mx[:meta_c]}\s*(.+?)$/; header('classify_loc',$2,'meta','extra')
- when /^#{Mx[:meta_o]}(class(?:ify)?_dewey)#{Mx[:meta_c]}\s*(.+?)$/; header('classify_dewey',$2,'meta','extra')
- when /^#{Mx[:meta_o]}(class(?:ify)?_pg)#{Mx[:meta_c]}\s*(.+?)$/; header('classify_pg',$2,'meta','extra')
- when /^#{Mx[:meta_o]}(class(?:ify)?_isbn)#{Mx[:meta_c]}\s*(.+?)$/; header('classify_isbn',$2,'meta','extra')
- when /^#{Mx[:meta_o]}(toc|structure)#{Mx[:meta_c]}\s*(.+?)$/; header('structure',$2,'process','instruct')
- when /^#{Mx[:meta_o]}(level|page|markup)#{Mx[:meta_c]}\s*(.+?)$/; header('markup',$2,'process','instruct')
- when /^#{Mx[:meta_o]}(bold)#{Mx[:meta_c]}\s*(.+?)$/; header($1,$2,'process','instruct')
- when /^#{Mx[:meta_o]}(italics|itali[sz]e)#{Mx[:meta_c]}\s*(.+?)$/; header('italicize',$2,'process','instruct')
- when /^#{Mx[:meta_o]}(vocabulary|wordlist)#{Mx[:meta_c]}\s*(.+?)$/; header('vocabulary',$2,'process','instruct')
- when /^#{Mx[:meta_o]}(css|stylesheet)#{Mx[:meta_c]}\s*(.+?)$/; header('css',$2,'process','instruct')
- when /^#{Mx[:meta_o]}(links)#{Mx[:meta_c]}\s*(.+?)$/; header($1,$2,'process','instruct')
- when /^#{Mx[:meta_o]}(prefix)#{Mx[:meta_c]}\s*(.+?)$/; header($1,$2,'process','instruct') #add a & b
- when /^#{Mx[:meta_o]}(suffix)#{Mx[:meta_c]}\s*(.+?)$/; header($1,$2,'process','instruct')
- when /^#{Mx[:meta_o]}(information)#{Mx[:meta_c]}\s*(.+?)$/; header($1,$2,'process','instruct')
- when /^#{Mx[:meta_o]}(contact)#{Mx[:meta_c]}\s*(.+?)$/; header($1,$2,'process','instruct')
- when /^#{Mx[:meta_o]}(rcs|cvs)#{Mx[:meta_c]}\s*(.+?)$/; header('version',$2,'process','instruct')
+ when /^#{Mx[:meta_o]}(title)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,@md.title.full,'meta','dc') #dc 1
+ when /^#{Mx[:meta_o]}(creator|author)#{Mx[:meta_c]}\s*(.+?)$/ then header('creator',$2,'meta','dc') #dc 2
+ when /^#{Mx[:meta_o]}(subject)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','dc') #dc 3
+ when /^#{Mx[:meta_o]}(description)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','dc') #dc 4
+ when /^#{Mx[:meta_o]}(publisher)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','dc') #dc 5
+ when /^#{Mx[:meta_o]}(contributor)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','dc') #dc 6
+ when /^#{Mx[:meta_o]}(date)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','dc') #dc 7
+ when /^#{Mx[:meta_o]}(date\.created)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','extra')
+ when /^#{Mx[:meta_o]}(date\.issued)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','extra')
+ when /^#{Mx[:meta_o]}(date\.available)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','extra')
+ when /^#{Mx[:meta_o]}(date\.valid)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','extra')
+ when /^#{Mx[:meta_o]}(date\.modified)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','extra')
+ when /^#{Mx[:meta_o]}(type)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','dc') #dc 8
+ when /^#{Mx[:meta_o]}(format)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','dc') #dc 9
+ when /^#{Mx[:meta_o]}(identifier)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','dc') #dc 10
+ when /^#{Mx[:meta_o]}(source)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','dc') #dc 11
+ when /^#{Mx[:meta_o]}(language)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','dc') #dc 12
+ when /^#{Mx[:meta_o]}(relation)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','dc') #dc 13
+ when /^#{Mx[:meta_o]}(coverage)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','dc') #dc 14
+ when /^#{Mx[:meta_o]}(rights)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','dc') #dc 15
+ when /^#{Mx[:meta_o]}(keywords)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','extra')
+ when /^#{Mx[:meta_o]}(copyright)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','extra')
+ when /^#{Mx[:meta_o]}(translator|translated_by)#{Mx[:meta_c]}\s*(.+?)$/ then header('translator',$2)
+ when /^#{Mx[:meta_o]}(illustrator|illustrated_by)#{Mx[:meta_c]}\s*(.+?)$/ then header('illustrator',$2)
+ when /^#{Mx[:meta_o]}(prepared_by)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','extra')
+ when /^#{Mx[:meta_o]}(digitized_by)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','extra')
+ when /^#{Mx[:meta_o]}(comments?)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','extra')
+ when /^#{Mx[:meta_o]}(abstract)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','extra')
+ when /^#{Mx[:meta_o]}(tags?)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','extra')
+ when /^#{Mx[:meta_o]}(catalogue)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','extra')
+ when /^#{Mx[:meta_o]}(class(?:ify)?_loc)#{Mx[:meta_c]}\s*(.+?)$/ then header('classify_loc',$2,'meta','extra')
+ when /^#{Mx[:meta_o]}(class(?:ify)?_dewey)#{Mx[:meta_c]}\s*(.+?)$/ then header('classify_dewey',$2,'meta','extra')
+ when /^#{Mx[:meta_o]}(class(?:ify)?_pg)#{Mx[:meta_c]}\s*(.+?)$/ then header('classify_pg',$2,'meta','extra')
+ when /^#{Mx[:meta_o]}(class(?:ify)?_isbn)#{Mx[:meta_c]}\s*(.+?)$/ then header('classify_isbn',$2,'meta','extra')
+ when /^#{Mx[:meta_o]}(toc|structure)#{Mx[:meta_c]}\s*(.+?)$/ then header('structure',$2,'process','instruct')
+ when /^#{Mx[:meta_o]}(level|page|markup)#{Mx[:meta_c]}\s*(.+?)$/ then header('markup',$2,'process','instruct')
+ when /^#{Mx[:meta_o]}(bold)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'process','instruct')
+ when /^#{Mx[:meta_o]}(italics|itali[sz]e)#{Mx[:meta_c]}\s*(.+?)$/ then header('italicize',$2,'process','instruct')
+ when /^#{Mx[:meta_o]}(vocabulary|wordlist)#{Mx[:meta_c]}\s*(.+?)$/ then header('vocabulary',$2,'process','instruct')
+ when /^#{Mx[:meta_o]}(css|stylesheet)#{Mx[:meta_c]}\s*(.+?)$/ then header('css',$2,'process','instruct')
+ when /^#{Mx[:meta_o]}(links)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'process','instruct')
+ when /^#{Mx[:meta_o]}(prefix)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'process','instruct') #add a & b
+ when /^#{Mx[:meta_o]}(suffix)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'process','instruct')
+ when /^#{Mx[:meta_o]}(information)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'process','instruct')
+ when /^#{Mx[:meta_o]}(contact)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'process','instruct')
+ when /^#{Mx[:meta_o]}(rcs|cvs)#{Mx[:meta_c]}\s*(.+?)$/ then header('version',$2,'process','instruct')
else nil
end
end