diff options
| author | Ralph Amissah <ralph@amissah.com> | 2007-09-28 21:31:24 +0100 | 
|---|---|---|
| committer | Ralph Amissah <ralph@amissah.com> | 2007-09-28 21:31:24 +0100 | 
| commit | 7475e34f316cb15b880c4f257c19ca5f84bc1c33 (patch) | |
| tree | dd64ec2e500f320361d9f2a5d18c216c1bae1c4c | |
| parent | hub, help info provided on typing sisu change (diff) | |
param parsing changed to multi-line (affects regex matching, watch); manpage related changes, manpage header @man: added in param and used in manpage
| -rw-r--r-- | CHANGELOG | 14 | ||||
| -rw-r--r-- | data/doc/sisu/sisu_markup_samples/sisu_manual/Rantfile | 3 | ||||
| -rw-r--r-- | data/doc/sisu/sisu_markup_samples/sisu_manual/sisu.ssm | 6 | ||||
| -rw-r--r-- | lib/sisu/v0/manpage.rb | 3 | ||||
| -rw-r--r-- | lib/sisu/v0/param.rb | 29 | 
5 files changed, 47 insertions, 8 deletions
| @@ -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 =~/<![abcdeghijklmnopqrstuvwxyz]/i # <!f not included              raise "Old markup style in file #@fns, current version #{@sisu_version[:project]} #{@sisu_version[:version]} #{@sisu_version[:date_stamp]} #{@sisu_version[:date]}:\n\t\t#{para}\n\n"            end -          @code_flag=case par +          @code_flag=case para            when /^code\{\s*$/; true            when /^\}code\s*$/; false            else @code_flag @@ -364,7 +365,7 @@ module SiSU_Param              when /^(?:0~comments?|@comments?:?)\s+(.+?)$/m;  @comments=$1                           #% metainfo DC              when /^(?:0~abstract|@abstract)\s+(.+?)$/m;      @abstract=$1                           #% metainfo DC              when /^(?:0~tags?|@tags?:)\s+\S/m                                                       #% metainfo -              tags=par.match(/^(?:0~tags?|@tags?:)\s+(.+)$/m)[1] +              tags=para.match(/^(?:0~tags?|@tags?:)\s+(.+)$/m)[1]                tags.split(/,|$/).each do |tag|                  tag.strip!                  @tags << tag @@ -511,6 +512,14 @@ module SiSU_Param                @sc_info=true if para[/(?:0~(?:rcs|cvs)|@(?:rcs|cvs):)\+/]              when /^@base_program:\s+(.+?)$/;                   @base_program=$1                                       #% processing                #% break - break, not necessary to process headers further :-) but necessary to extract endnotes etc. ;-( +            when /^(?:0~man|@man:)\s+(.+?)\Z/m                                           #% man pages +              maninfo_str=$1 +              maninfo=maninfo_str.split(/;\s*/m) +              maninfo.each do |x| +                @man_section= x[/^([1-8])/] if x =~/^([1-8])/ +                @man_name= x[/name=(.+)/,1] if x =~/name=.+/ +                @man_synopsis= x[/synopsis=(.+)/m,1] if x =~/synopsis=.+/ +              end              end              @lv1 ||=/^1~/              @lv2 ||=/^2~/ @@ -583,6 +592,14 @@ module SiSU_Param              end            end          end #% here endeth the document loop +        @man_name.gsub!(/(-)/,"\\\\\\1") +        @man_name.gsub!(/\n/,"\n.BR\n") +        @man_name.gsub!(/\A/,"\n.SH NAME\n") +        unless @man_synopsis.nil? +          @man_synopsis.gsub!(/(-)/,"\\\\\\1") +          @man_synopsis.gsub!(/\n/,"\n.BR\n") +          @man_synopsis.gsub!(/\A/,"\n.SH SYNOPSIS\n") +        end          unless @dc_rights            if @dc_creator              @dc_rights ||=if @dc_date =~/([12][890]\d{2})/                     #matches years 1800 through 20\d\d 2004w19 | 
