aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5/manpage.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v5/manpage.rb')
-rw-r--r--lib/sisu/v5/manpage.rb22
1 files changed, 2 insertions, 20 deletions
diff --git a/lib/sisu/v5/manpage.rb b/lib/sisu/v5/manpage.rb
index 0873e3f3..62aa9456 100644
--- a/lib/sisu/v5/manpage.rb
+++ b/lib/sisu/v5/manpage.rb
@@ -70,7 +70,6 @@ module SiSU_Manpage
include SiSU_ManpageFormat
require_relative 'shared_metadata' # shared_metadata.rb
require_relative 'shared_txt' # shared_txt.rb
- pwd=Dir.pwd
@@alt_id_count,@@alt_id_count,@@tablehead,@@number_of_cols=0,0,0,0
@@tablefoot=''
class Source
@@ -86,7 +85,6 @@ module SiSU_Manpage
begin
@md=SiSU_Param::Parameters.new(@opt).get
@env=SiSU_Env::InfoEnv.new(@opt.fns)
- path=@env.path.output_tell
tool=(@opt.cmd =~/[MVv]/) \
? "#{@env.program.text_editor} #{@md.file.output_path.manpage.dir}/#{@md.file.base_filename.manpage}"
: "[#{@opt.f_pth[:lng_is]}] #{@opt.fno}"
@@ -170,14 +168,6 @@ GSUB
@manpage[:metadata]=SiSU_Metadata::Summary.new(@md).manpage.metadata
end
def manpage_tail
- vz=SiSU_Viz::Defaults.new
- generator="Generated by: #{@md.sisu_version[:project]} #{@md.sisu_version[:version]} of #{@md.sisu_version[:date_stamp]} (#{@md.sisu_version[:date]})" if @md.sisu_version[:version]
- lastdone="Last Generated on: #{Time.now}"
- rubyv="Ruby version: #{@md.ruby_version}"
- sc=if @md.sc_info
- "Source file: #{@md.sc_filename}#{@br}Version number: #{@md.sc_number}#{@br}Version date: #{@md.sc_date}#{@br}"
- else ''
- end
@manpage[:tail] <<<<WOK
#{@br}
.TP
@@ -206,8 +196,7 @@ WOK
def manpage_structure(dob='',hname='') #% Used to extract the structure of a document
if dob.is==:heading
lv=dob.ln
- n=dob.ln - 1
- n3=dob.ln + 2
+ dob.ln + 2
else lv=nil
end
wrapped=if dob.is==:para \
@@ -260,13 +249,12 @@ WOK
@@endnotes[:para]=[]
end
def markup(data) # Used for major markup instructions
- dir=SiSU_Env::InfoEnv.new(@md.fns)
+ SiSU_Env::InfoEnv.new(@md.fns)
@data_mod,@endnotes,@level,@cont,@copen,@manpage_contents_close=Array.new(6){[]}
(0..6).each { |x| @cont[x]=@level[x]=false }
(4..6).each { |x| @manpage_contents_close[x]='' }
#manpage_tail # stop call
table_message='[table omitted, see other document formats]'
- fix=[]
#manpage_metadata
data.each do |dob|
if dob.is==:comment \
@@ -325,8 +313,6 @@ WOK
gsub(/\A(.+?)\s*\Z/m,".nf\n\\1\n.fi")
end
dob.obj=dob.obj.gsub(/(?:#{Mx[:br_line]}|#{Mx[:br_nl]})+\s*/m,"\n\n") # watch
- blit=dob.obj.scan(/\[[^\]]+\]|[^\[]+/)
- blit_array=[]
dob.obj=dob.obj.gsub(/#{Mx[:gl_o]}:name#\S+?#{Mx[:gl_c]}/mi,''). #added
gsub(/#{Mx[:br_page]}\s*|#{Mx[:br_page_new]}|#{Mx[:br_page_line]}/,''). # remove page breaks, you may wish to have a line across the page break instead
gsub(/(^|#{Mx[:gl_c]}|\s)#{Mx[:url_o]}_(\S+?)#{Mx[:url_c]}/,'\1\2').
@@ -336,7 +322,6 @@ WOK
gsub(/(?:^|[^_\\])#{Mx[:lnk_o]}\s*(\S+?\.(?:png|jpg|gif)) .+?#{Mx[:lnk_c]}#{Mx[:url_o]}\S+?#{Mx[:url_c]}/,' [ \1 ]'). #"[ #{dir.url.images_local}\/\\1 ]")
gsub(/(?:^|[^_\\])#{Mx[:lnk_o]}\s*(\S+?\.(?:png|jpg|gif)) .+?#{Mx[:lnk_c]}image/,' [ \1 ]'). #"[ #{dir.url.images_local}\/\\1 ]")
gsub(/^(?:^|[^_\\])#{Mx[:lnk_o]}\s*\S+?\.(?:png|jpg|gif)\s+.+?"(.*?)"\s*#{Mx[:lnk_c]}\S+/,'[image: "\1"]')
- wordlist=dob.obj.scan(/\S+/)
if dob.obj !~/(^#{Rx[:meta]}|#{Mx[:br_eof]}|#{Mx[:br_endnotes]})/
if dob.obj =~@regx #/.+?<~\d+;\w\d+;\w\d+>.*/ #watch change
paranum=dob.obj[@regx,3]
@@ -380,7 +365,6 @@ WOK
@manpage
end
def publish(manpage)
- divider='='
content=[]
date=if defined? @md.date.modified \
and @md.date.modified
@@ -390,8 +374,6 @@ WOK
@md.date.published
else SiSU_Env::InfoDate.new.year #date missing decide on action
end
- manpage_name,manpage_synopsis='',''
- manpg={}
proj=SiSU_Env::InfoVersion.instance.get_version
manpage[:open] = %{.TH "#{@md.fnb}" "#{@md.make.manpage['section']}" "#{date}" "#{proj[:version]}" "#{@md.title.main}"#{@md.make.manpage['name']}#{@md.make.manpage['synopsis']}}
content << manpage[:open]