From 7475e34f316cb15b880c4f257c19ca5f84bc1c33 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 28 Sep 2007 21:31:24 +0100 Subject: param parsing changed to multi-line (affects regex matching, watch); manpage related changes, manpage header @man: added in param and used in manpage --- CHANGELOG | 14 +++++++++++ .../sisu/sisu_markup_samples/sisu_manual/Rantfile | 3 ++- .../sisu/sisu_markup_samples/sisu_manual/sisu.ssm | 6 +++++ lib/sisu/v0/manpage.rb | 3 ++- lib/sisu/v0/param.rb | 29 +++++++++++++++++----- 5 files changed, 47 insertions(+), 8 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 9dc35163..ed8f23d7 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -29,6 +29,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.60.0.orig.tar.gz * sysenv, sisurc.yml allow use of relative output paths, expand to absolute + * param, behavior changed to take in multi-lines, affects regex matching, + watch + * html segmented, bugfix: footnotes for headings levels :A,:B and :C correctly placed in first segment when batch-processing files/output @@ -37,6 +40,17 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.60.0.orig.tar.gz * sysenv, syslink issue, additional check + * sisu markup, header @man: accepting manpage parameters for: man_section, + man_name and man_synopsis + + * REVERT to manually constructed man-pages, sisu auto-generated man-pages + pretty good, but not ready without discussion for automatic inclusion in + package, sisu -i [filename] + + * NOTE you may be better off doing any diffs between 0.60 and 0.58 branch + than against 0.59 which includes a lot of generated within the package + documentation, 0.60 adds source only + %% sisu_0.59.1.orig.tar.gz (2007-09-25:39/2) http://www.jus.uio.no/sisu/pkg/src/sisu_0.59.1.orig.tar.gz cf512ec871aeb7cdabc0b3b35b7e6d05 10952059 sisu_0.59.1.orig.tar.gz diff --git a/data/doc/sisu/sisu_markup_samples/sisu_manual/Rantfile b/data/doc/sisu/sisu_markup_samples/sisu_manual/Rantfile index f62b7f5e..e9cba974 100644 --- a/data/doc/sisu/sisu_markup_samples/sisu_manual/Rantfile +++ b/data/doc/sisu/sisu_markup_samples/sisu_manual/Rantfile @@ -163,7 +163,8 @@ def man_section(files_array,man_no='1') unless man_no =~/^1$/ system("mv -v #{path_man_sisu_output}/#{x} #{path_man_sisu_output}/#{y}") end - system("cp -v #{path_man_sisu_output}/#{y} #{path_man_sisu_package}/man#{man_no}/#{y}") + puts "cp -v #{path_man_sisu_output}/#{y} #{path_man_sisu_package}/man#{man_no}/#{y}" + #system("cp -v #{path_man_sisu_output}/#{y} #{path_man_sisu_package}/man#{man_no}/#{y}") end end def manpage_move diff --git a/data/doc/sisu/sisu_markup_samples/sisu_manual/sisu.ssm b/data/doc/sisu/sisu_markup_samples/sisu_manual/sisu.ssm index 7e7a1add..50bd7dc9 100644 --- a/data/doc/sisu/sisu_markup_samples/sisu_manual/sisu.ssm +++ b/data/doc/sisu/sisu_markup_samples/sisu_manual/sisu.ssm @@ -26,6 +26,12 @@ @skin: skin_sisu_manual +@man: 8; +name=sisu - documents: structuring, publishing in multiple formats, and search; +synopsis=sisu [-abcDdFHhIiMmNnopqRrSsTtUuVvwXxYyZz0-9] [filename/wildcard ] +sisu [-Ddcv] [instruction] +sisu [-CcFLSVvW] + @bold: /Gnu|Debian|Ruby|SiSU/ @links: { SiSU Manual }http://www.jus.uio.no/sisu/sisu_manual/ diff --git a/lib/sisu/v0/manpage.rb b/lib/sisu/v0/manpage.rb index 5b2cef6f..768fbc48 100644 --- a/lib/sisu/v0/manpage.rb +++ b/lib/sisu/v0/manpage.rb @@ -473,7 +473,7 @@ WOK else '2007' #date missing decide on action end proj=SiSU_Env::Info_version.new.get_version - manpage[:open] = %{.TH "#{@md.fnb}" "1" "#{date}" "#{proj[:version]}" "#{@md.title}"} + manpage[:open] = %{.TH "#{@md.fnb}" "1" "#{date}" "#{proj[:version]}" "#{@md.title}"#{@md.man_name}#{@md.man_synopsis}} content << manpage[:open] content << manpage[:head] content << manpage[:body] @@ -493,6 +493,7 @@ WOK end def manpage #%manpage output SiSU_Env::SiSU_file.new(@md).mkdir + #filename_manpage=SiSU_Env::SiSU_file.new(@md,"#{@md.fnb}.#{@md.man_section}").mkfile_man filename_manpage=SiSU_Env::SiSU_file.new(@md,@md.fn[:manpage]).mkfile_man @sisu=[] @content.each do |para| # this is a hack diff --git a/lib/sisu/v0/param.rb b/lib/sisu/v0/param.rb index 446c2d46..a2036b8a 100644 --- a/lib/sisu/v0/param.rb +++ b/lib/sisu/v0/param.rb @@ -113,9 +113,11 @@ module SiSU_Param @doc={ :lv=>[] } @doc[:fns],@doc[:fnb],@doc[:scr_suffix]='','','' @@publisher='SiSU scribe' - attr_accessor :cmd,:mod,:env,:fn,:fns,:fnb,:fnn,:fnt,:fnl,:flv,:fnstex,:ocn,:sfx_src,:sfx,:pdf,:file_type,:dir_out,:dir_tex,:dir_lout,:txt_path,:site_skin,:sisu,:sisu_version,:ruby_version,:title,:dc_title,:html_title,:subtitle,:subtitle_tex,:creator_home,:dc_creator,:translator,:illustrator,:prepared_by,:digitized_by,:dc_subject,:dc_description,:dc_publisher,:dc_contributor,:dc_date,:dc_date_created,:dc_date_issued,:dc_date_available,:dc_date_valid,:dc_date_modified,:date_scheme,:date_created_scheme,:date_issued_scheme,:date_available_scheme,:date_valid_scheme,:date_modified_scheme,:dc_type,:dc_format,:dc_identifier,:dc_source,:dc_language,:language_original,:dc_relation,:dc_coverage,:dc_rights,:keywords,:comments,:abstract,:cls_loc,:cls_dewey,:cls_pg,:cls_isbn,:papersize,:toc,:lv1,:lv2,:lv3,:lv4,:lv5,:lv6,:pagenew,:pagebreak,:num_top,:toc_lev_limit,:flag_endnotes,:flag_auto_endnotes,:flag_separate_endnotes,:flag_separate_endnotes_make,:flag_auto_heading_num,:markup,:markup_instruction,:markup_version,:markup_declared,:make_bold,:make_italic,:flag_pdf,:flag_tables,:vocabulary,:doc_skin,:doc_css,:yaml,:lnk,:prefix_a,:prefix_b,:suffix,:information,:contact,:icon,:image,:ad_url,:ad_png,:ad_alt,:ad_began,:flag_promo,:promo,:ad_home,:stmp,:stmpd,:sc_filename,:sc_number,:sc_date,:sc_time,:sc_info,:yamladdr,:locale,:wc_lines,:wc_words,:wc_bytes,:file_encoding,:file_size,:user,:home,:hostname,:pwd,:firstseg,:programs,:creator_copymark,:lang,:en,:dgst,:dgst_skin,:generated,:tags,:tag_array,:concord_make,:seg_names,:seg_autoname_safe,:set_header_title,:set_heading_top,:set_heading_seg,:heading_seg_first,:heading_seg_first_flag,:base_program + attr_accessor :cmd,:mod,:env,:fn,:fns,:fnb,:fnn,:fnt,:fnl,:flv,:fnstex,:ocn,:sfx_src,:sfx,:pdf,:file_type,:dir_out,:dir_tex,:dir_lout,:txt_path,:site_skin,:sisu,:sisu_version,:ruby_version,:title,:dc_title,:html_title,:subtitle,:subtitle_tex,:creator_home,:dc_creator,:translator,:illustrator,:prepared_by,:digitized_by,:dc_subject,:dc_description,:dc_publisher,:dc_contributor,:dc_date,:dc_date_created,:dc_date_issued,:dc_date_available,:dc_date_valid,:dc_date_modified,:date_scheme,:date_created_scheme,:date_issued_scheme,:date_available_scheme,:date_valid_scheme,:date_modified_scheme,:dc_type,:dc_format,:dc_identifier,:dc_source,:dc_language,:language_original,:dc_relation,:dc_coverage,:dc_rights,:keywords,:comments,:abstract,:cls_loc,:cls_dewey,:cls_pg,:cls_isbn,:papersize,:toc,:lv1,:lv2,:lv3,:lv4,:lv5,:lv6,:pagenew,:pagebreak,:num_top,:toc_lev_limit,:flag_endnotes,:flag_auto_endnotes,:flag_separate_endnotes,:flag_separate_endnotes_make,:flag_auto_heading_num,:markup,:markup_instruction,:markup_version,:markup_declared,:make_bold,:make_italic,:flag_pdf,:flag_tables,:vocabulary,:doc_skin,:doc_css,:yaml,:lnk,:prefix_a,:prefix_b,:suffix,:information,:contact,:icon,:image,:ad_url,:ad_png,:ad_alt,:ad_began,:flag_promo,:promo,:ad_home,:stmp,:stmpd,:sc_filename,:sc_number,:sc_date,:sc_time,:sc_info,:yamladdr,:locale,:wc_lines,:wc_words,:wc_bytes,:file_encoding,:file_size,:user,:home,:hostname,:pwd,:firstseg,:programs,:creator_copymark,:lang,:en,:dgst,:dgst_skin,:generated,:tags,:tag_array,:concord_make,:seg_names,:seg_autoname_safe,:set_header_title,:set_heading_top,:set_heading_seg,:heading_seg_first,:heading_seg_first_flag,:base_program,:man_section,:man_name,:man_synopsis def initialize(fns_array,opt) - @env=@fn=@fns=@fnb=@fnn=@fnt=@fnl=@flv=@fnstex=@ocn=@sfx_src=@sfx=@pdf=@file_type=@dir_out=@dir_tex=@dir_lout=@txt_path=@flag_endnotes=@flag_auto_endnotes=@flag_separate_endnotes=@flag_separate_endnotes_make=@site_skin=@sisu=@sisu_version=@ruby_version=@title=@dc_title=@html_title=@subtitle=@subtitle_tex=@creator_home=@dc_creator=@translator=@illustrator=@prepared_by=@digitized_by=@dc_subject=@dc_description=@dc_publisher=@dc_contributor=@dc_date=@dc_date_created=@dc_date_issued=@dc_date_available=@dc_date_valid=@dc_date_modified=@date_scheme=@date_created_scheme=@date_issued_scheme=@date_available_scheme=@date_valid_scheme=@date_modified_scheme=@dc_type=@dc_format=@dc_identifier=@dc_source=@dc_language=@language_original=@dc_relation=@dc_coverage=@dc_rights=@keywords=@comments=@abstract=@cls_loc=@cls_dewey=@cls_pg=@cls_isbn=@papersize=@toc=@lv1=@lv2=@lv3=@lv4=@lv5=@lv6=@pagenew=@pagebreak=@num_top=@toc_lev_limit=@flag_auto_heading_num=@make_bold=@make_italic=@flag_pdf=@flag_tables=@vocabulary=@doc_skin=@doc_css=@yaml=@lnk=@prefix_a=@prefix_b=@suffix=@information=@contact=@icon=@ad_url=@ad_png=@ad_alt=@ad_began=@promo=@ad_home=@stmp=@stmpd=@sc_filename=@sc_number=@sc_date=@sc_time=@sc_info=@yamladdr=@locale=@wc_lines=@wc_words=@wc_bytes=@file_encoding=@file_size=@firstseg=@programs=@creator_copymark=@lang=@en=@dgst=@dgst_skin=@generated=@heading_seg_first=@base_program=nil + @env=@fn=@fns=@fnb=@fnn=@fnt=@fnl=@flv=@fnstex=@ocn=@sfx_src=@sfx=@pdf=@file_type=@dir_out=@dir_tex=@dir_lout=@txt_path=@flag_endnotes=@flag_auto_endnotes=@flag_separate_endnotes=@flag_separate_endnotes_make=@site_skin=@sisu=@sisu_version=@ruby_version=@title=@dc_title=@html_title=@subtitle=@subtitle_tex=@creator_home=@dc_creator=@translator=@illustrator=@prepared_by=@digitized_by=@dc_subject=@dc_description=@dc_publisher=@dc_contributor=@dc_date=@dc_date_created=@dc_date_issued=@dc_date_available=@dc_date_valid=@dc_date_modified=@date_scheme=@date_created_scheme=@date_issued_scheme=@date_available_scheme=@date_valid_scheme=@date_modified_scheme=@dc_type=@dc_format=@dc_identifier=@dc_source=@dc_language=@language_original=@dc_relation=@dc_coverage=@dc_rights=@keywords=@comments=@abstract=@cls_loc=@cls_dewey=@cls_pg=@cls_isbn=@papersize=@toc=@lv1=@lv2=@lv3=@lv4=@lv5=@lv6=@pagenew=@pagebreak=@num_top=@toc_lev_limit=@flag_auto_heading_num=@make_bold=@make_italic=@flag_pdf=@flag_tables=@vocabulary=@doc_skin=@doc_css=@yaml=@lnk=@prefix_a=@prefix_b=@suffix=@information=@contact=@icon=@ad_url=@ad_png=@ad_alt=@ad_began=@promo=@ad_home=@stmp=@stmpd=@sc_filename=@sc_number=@sc_date=@sc_time=@sc_info=@yamladdr=@locale=@wc_lines=@wc_words=@wc_bytes=@file_encoding=@file_size=@firstseg=@programs=@creator_copymark=@lang=@en=@dgst=@dgst_skin=@generated=@heading_seg_first=@base_program=@man_synopsis=nil + @man_section=1 + @man_name='man page "name/whatis" information not provided, set in header @man: name=[whatis information]' @data,@fns,@cmd,@mod,@opt=fns_array,opt.fns,opt.cmd,opt.mod,opt #@data used as data @flag_tables,@set_header_title,@set_heading_top,@set_heading_seg,@heading_seg_first_flag,@flag_promo=false,false,false,false,false,false @seg_autoname_safe=true @@ -235,12 +237,11 @@ module SiSU_Param tell.warn unless @cmd =~/q/ end @code_flag=false - fns_array.each do |par| #% Scan document - para=par.gsub(/\n/,' ') + fns_array.each do |para| #% Scan document if para !~/^\%+\s/ and para =~/