aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/v0/dal.rb2
-rw-r--r--lib/sisu/v0/help.rb16
-rw-r--r--lib/sisu/v0/html.rb2
-rw-r--r--lib/sisu/v0/html_segments.rb29
-rw-r--r--lib/sisu/v0/hub.rb17
-rw-r--r--lib/sisu/v0/sysenv.rb16
6 files changed, 50 insertions, 32 deletions
diff --git a/lib/sisu/v0/dal.rb b/lib/sisu/v0/dal.rb
index f5da8b05..270c46b2 100644
--- a/lib/sisu/v0/dal.rb
+++ b/lib/sisu/v0/dal.rb
@@ -827,7 +827,7 @@ module SiSU_DAL
ocnm=ocnd=ocnv=0
ocnm+=1
header0='<:pn>'
- header1="\n1~ Document Information (metadata) <~0;0:0;m#{ocnm}>"
+ header1="\n1~meta Document Information (metadata) <~0;0:0;m#{ocnm}>"
ocnm+=1
header4="\n4~metadata Metadata <~0;m#{ocnm};m#{ocnm}>"
ocnm+=1; ocnd+=1
diff --git a/lib/sisu/v0/help.rb b/lib/sisu/v0/help.rb
index 4805f6ad..0cd100f4 100644
--- a/lib/sisu/v0/help.rb
+++ b/lib/sisu/v0/help.rb
@@ -160,6 +160,8 @@ module SiSU_Help
This is free software, and you are welcome to redistribute it under the conditions of the GPL3 or later.
For more license detail type/enter: "sisu --help license"
+for help type 'sisu --help', 'sisu --help [help request]', 'man sisu', (or see the system or online documentation)
+
typing "sisu" on its own or "sisu --help", should give you this sisu help summary and the sisu (interactive help mode) help prompt, from which help on each keyword can be obtained.
alternatively typing #{@cX.orange}sisu --help#{@cX.off} #{@cX.green}[keyword]#{@cX.off} at the command prompt will provide the sisu help page requested and return to the command prompt (if nothing is found it will print this page and return to the command prompt)
@@ -184,6 +186,8 @@ alternatively typing #{@cX.orange}sisu --help#{@cX.off} #{@cX.green}[keyword]#{@
------------------------------------------
SiSU's License
#{@cX.green}license#{@cX.off} sisu --help license
+
+for help type 'sisu --help', 'sisu --help [help request]', 'man sisu', (or see the system or online documentation)
WOK
# #{@cX.cyan}sisu_convert#{@cX.off} program for initial (very basic and partial) conversion to sisu file format (html and word97 supported)
end
@@ -1002,8 +1006,18 @@ WOK
else "bin: #{@cX.brown}#{bin}#{@cX.off} rc: #{@cX.brown}#{rc}#{@cX.off}"
end
end
+ def sisu_version
+ version=SiSU_Env::Info_version.new.get_version
+ rb_ver=SiSU_Env::Info_version.new.rbversion
+ if version[:version]
+ tell=SiSU_Screen::Ansi.new('-v',version[:project],version[:version],version[:date_stamp],version[:date],rb_ver)
+ tell.version
+ else puts 'SiSU version information not available'
+ end
+ end
def environment
cf_defaults=SiSU_Env::Info_processing_flag.new
+ sisu_version
x =<<WOK
#{@cX.green}current and output directories#{@cX.off}
user: #{@cX.blue}#{@env.user}#{@cX.off}
@@ -1064,6 +1078,8 @@ WOK
zap (delete output directories) #{@cX.blue}#{SiSU_Env::Info_settings.new.permission?('zap')}#{@cX.off}
css copy (copy over css files) #{@cX.blue}#{SiSU_Env::Info_settings.new.permission?('css_modify')}#{@cX.off}
(true/false defaults may be changed in active sisurc.yml file under permissions_set:)
+
+NOTE: for HELP type 'sisu --help', 'sisu --help [help request]', 'man sisu', (or see the system or online documentation)
WOK
print x
end
diff --git a/lib/sisu/v0/html.rb b/lib/sisu/v0/html.rb
index b23a24b9..bdfd98ee 100644
--- a/lib/sisu/v0/html.rb
+++ b/lib/sisu/v0/html.rb
@@ -108,7 +108,7 @@ module SiSU_HTML
links_guide=SiSU_HTML::Source::Links_guide.new(data,@md).toc
data=@tuned_file_array
scr_toc=SiSU_HTML::Source::Scroll_head_and_segtoc.new(data,@md,toc,links_guide).in_common #watch
- SiSU_HTML::Source::Seg.new(data,@md).songsheet #if not_scroll_only
+ SiSU_HTML::Source::Seg.new(data,@md).songsheet
data=@tuned_file_array
scr=SiSU_HTML::Source::Scroll.new(data,@md).songsheet
scroll=SiSU_HTML::Source::Scroll_output.new(scr_toc,scr[:body],scr_endnotes,scr[:metadata],scr[:owner_details],scr[:tails],@md).publish
diff --git a/lib/sisu/v0/html_segments.rb b/lib/sisu/v0/html_segments.rb
index 7c97925e..fe2966df 100644
--- a/lib/sisu/v0/html_segments.rb
+++ b/lib/sisu/v0/html_segments.rb
@@ -70,6 +70,7 @@ module SiSU_HTML_seg
@@tablehead,@@number_of_cols=0,0
@@flag_group=false
@@dp,@@segtocband=nil,nil
+ @@fns_previous=''
attr_reader :seg_name_html,:seg_name_html_tracker
def initialize(data='',md='')
@data,@md=data,md
@@ -396,18 +397,24 @@ module SiSU_HTML_seg
@@seg_endnotes[@@fn]=[]
@@seg_endnotes[@@fn] << @@seg_endnotes_array
@@seg_endnotes_array=[] if para=~/^4~/
+ @@fns_previous=@md.fns if para=~/^1~meta/
end
- end
- if para =~/^4~/ #% EXTRACTION OF SUB-TOCs
- @@seg_subtoc[@@fn]=@@seg_subtoc_array
- @@seg_subtoc_array=[]
- end
- if para =~/^4~/ #% SEGMENT NAME, after EXTRACTION OF ENDNOTES & SUB-TOCs
- m=para[/^4~(\S+).+?<~(\d+);(?:[oh]|4:)\d+;\w\d+><#@dp:#@dp>$/]
- if m; @@fn,@@to_lev4=$1,$2 if m # changed 2004w07 #endnotes and sub-tocs
- else
- m=para[/^4~(\S+)/]
- @@fn,@@to_lev4=$1,'nonum' if m # changed 2005w13
+ if para =~/^4~/ #% EXTRACTION OF SUB-TOCs
+ @@seg_subtoc[@@fn]=@@seg_subtoc_array
+ @@seg_subtoc_array=[]
+ end
+ if para =~/^4~/ #% SEGMENT NAME, after EXTRACTION OF ENDNOTES & SUB-TOCs
+ if para !~/^4~metadata/
+ m=para[/^4~(\S+).+?<~(\d+);(?:[oh]|4:)\d+;\w\d+><#@dp:#@dp>$/]
+ end
+ if m; @@fn,@@to_lev4=$1,$2 if m # changed 2004w07 #endnotes and sub-tocs
+ else
+ if para !~/^4~metadata/
+ m=para[/^4~(\S+)/]
+ @@fn,@@to_lev4=$1,'nonum' if m # changed 2005w13
+ else @@fn=''
+ end
+ end
end
end
if para =~/^[56]~\S*\s+(.+)?<~(\d+);(?:h|[56]:)\d+;\w\d+><#@dp:#@dp>$/
diff --git a/lib/sisu/v0/hub.rb b/lib/sisu/v0/hub.rb
index 52937b8e..47326b88 100644
--- a/lib/sisu/v0/hub.rb
+++ b/lib/sisu/v0/hub.rb
@@ -315,13 +315,9 @@ p "here #{__FILE__} #{__LINE__}" if @opt =~/M/
end
@opt.cmd=@opt.cmd + extra
if @opt.cmd =~/[vVM]/ #% version information
- version=SiSU_Env::Info_version.new.get_version
- rb_ver=SiSU_Env::Info_version.new.rbversion
- if version[:version]
- tell=SiSU_Screen::Ansi.new(@opt.cmd,version[:project],version[:version],version[:date_stamp],version[:date],rb_ver)
- tell.version
- SiSU_Help::Help.new('env',@opt).environment if @opt.cmd =~/V/ and @opt.files.empty? #% environment
- else puts 'SiSU version information not available'
+ if @opt.cmd =~/V/ and @opt.files.empty? #% environment
+ SiSU_Help::Help.new('env',@opt).environment
+ else SiSU_Help::Help.new('env',@opt).sisu_version
end
end
if @opt.cmd =~/^-L$/; SiSU_Help::Help.new('license',@opt).help_request #% version information
@@ -528,8 +524,7 @@ p "here #{__FILE__} #{__LINE__}" if @opt =~/M/
if defined? @@env.path.processing and FileTest.directory?(@@env.path.processing) and @@env.path.processing =~/#{@@env.user}$/ #clean temporary processing directory of content as is located in public area
cd(@@env.path.processing_base_tmp) do
rm_rf(@@env.user) unless @opt.cmd =~/M/
- end
- end
+ end end
elsif @opt.mod.inspect =~/--query/
require "#{SiSU_lib}/sst_identify_markup"
puts SiSU_Markup::Markup_history.new(@opt).query
@@ -550,7 +545,9 @@ p "here #{__FILE__} #{__LINE__}" if @opt =~/M/
else #% help instructions
unless @opt.mod.inspect =~/--convert|--to|--from/
if @opt.mod.inspect =~/--help/ and not @opt.what.empty?; SiSU_Help::Help.new(@opt.what).help_request
- else SiSU_Help::Help.new('list').help_request
+ elsif @opt.mod.inspect =~/--help/; SiSU_Help::Help.new('list').help_request
+ else SiSU_Help::Help.new('env',@opt).sisu_version
+ puts " for HELP type:\n\tsisu --help [help request]\n\tman sisu\n or see the system or online documentation"
end
end
end
diff --git a/lib/sisu/v0/sysenv.rb b/lib/sisu/v0/sysenv.rb
index 15dbeba5..58ad1bf8 100644
--- a/lib/sisu/v0/sysenv.rb
+++ b/lib/sisu/v0/sysenv.rb
@@ -734,7 +734,7 @@ module SiSU_Env
include FileUtils
attr_accessor :filename,:sys,:home,:hostname,:user,:env,:rc,:www,:fnb,:fnn,:fnt,:flv,:webserv_path,:stub_pwd,:webserv_host_cgi,:webserv_port_cgi,:processing,:etc,:yamlrc_dir
@@image_flag,@@local_image=true,true #warning on @@image_flag
- @@fb=nil
+ @@fb=@@man_path=nil,nil
def initialize(fns='',md=nil)
super() #you may not want to re-execute this tatic info so frequently!
@fns,@md=fns,md
@@ -1141,14 +1141,12 @@ WOK
@webserv_path
end
def webserv #separation required for webrick which cannot use path.output (different requirements as no file is passed)
- man_path=if defined? @rc['webserv']['path'] and @rc['webserv']['path'] =~/\S\S+/
- man_path=case @rc['webserv']['path']
- when /^\/\S+/; @rc['webserv']['path']
- when /^\.\/(\S+)/; "#{pwd}/#{$1}"
- when /^~\/(\S+)/; "#{home}/#{$1}"
- else "#{home}/#{@rc['webserv']['path']}"
+ man_path=if @@man_path.nil?
+ man_path=if defined? @rc['webserv']['path'] and @rc['webserv']['path'] =~/\S\S+/
+ man_path=@@man_path=File.expand_path(@rc['webserv']['path'])
+ else nil
end
- else nil
+ else manpath=@@man_path
end
@webserv_path=if defined? man_path and File.writable?("#{man_path}/."); man_path #web server path as configured in rc file
elsif FileTest.directory?(defaults[:webserv_path]) and File.writable?("#{defaults[:webserv_path]}/.") #web server path default
@@ -2097,7 +2095,7 @@ WOK
end
def images
File.mkpath("#{@env.path.output}/_sisu") unless FileTest.directory?("#{@env.path.output}/_sisu")
- File.symlink("../../_sisu/image", "#{@env.path.output}/_sisu/image") unless File.symlink?("#{@env.path.output}/_sisu/image")
+ File.symlink("../../_sisu/image", "#{@env.path.output}/_sisu/image") unless File.exist?("#{@env.path.output}/_sisu/image") or File.symlink?("#{@env.path.output}/_sisu/image")
end
def man_forms
#File.symlink("../../man/form", "#{@env.path.output}/man/form") unless File.symlink?("#{@env.path.output}/man/form") == true