diff options
Diffstat (limited to 'lib/sisu/v0/help.rb')
-rw-r--r-- | lib/sisu/v0/help.rb | 98 |
1 files changed, 67 insertions, 31 deletions
diff --git a/lib/sisu/v0/help.rb b/lib/sisu/v0/help.rb index 23cccc04..9c10c27e 100644 --- a/lib/sisu/v0/help.rb +++ b/lib/sisu/v0/help.rb @@ -988,15 +988,22 @@ WOK help_env end def program_found?(program) - rc=if SiSU_Env::Info_settings.new.program?(program) - "rc: #{SiSU_Env::Info_settings.new.program?(program)} " - else '' + if program + rc=if SiSU_Env::Info_settings.new.program?(program) + SiSU_Env::Info_settings.new.program?(program) + else '' + end + if program =='rmagick'; program='identify' #rmagick is ruby lib uses imagemagick's identify + end + bin=if SiSU_Env::System_call.new.program_found?(program) + SiSU_Env::System_call.new.program_found?(program) + else 'false' + end + else bin,rc='false','false' end - bin=if SiSU_Env::System_call.new.program_found?(program) - "bin: #{SiSU_Env::System_call.new.program_found?(program)}" - else '' + if program; "#{@cX.blue}#{program}#{@cX.off} bin: #{@cX.brown}#{bin}#{@cX.off} rc: #{@cX.brown}#{rc}#{@cX.off}" + else "bin: #{@cX.brown}#{bin}#{@cX.off} rc: #{@cX.brown}#{rc}#{@cX.off}" end - "#{@cX.brown}#{rc}#{bin}#{@cX.off}" end def environment cf_defaults=SiSU_Env::Info_processing_flag.new @@ -1010,7 +1017,6 @@ WOK current directory: #{@cX.blue}#{@env.path.pwd}#{@cX.off} document output root directory set to: #{@cX.blue}#{@env.path.webserv}#{@cX.off} documents from current directory placed in: #{@cX.blue}#{@env.path.output}#{@cX.off} - sisurc.yml used: #{@cX.blue}#{@env.path.yamlrc}#{@cX.off} webrick url: #{@cX.blue}#{@env.url.webserv_base_cgi}#{@cX.off} (to start webrick server 'sisu -W') sqlite db for present directory: #{@cX.blue}sqlite #{@env.path.output}/sisu_sqlite.db#{@cX.off} @@ -1022,7 +1028,7 @@ WOK [generated postgresql cgi search form]: #{@cX.blue}#{@env.url.webserv_base_cgi}/cgi-bin/sisu_pgsql.cgi#{@cX.off} (to generate 'sisu -F' or 'sisu -F webrick') #{@cX.green}configuration files#{@cX.off} - sisurc.yml used: #{@cX.blue}#{@env.path.yamlrc}#{@cX.off} + sisurc.yml used: #{@cX.blue}#{@env.path.yamlrc}#{@cX.off} configuration information search path: #{@cX.blue}#{@env.path.rc.join(', ')}#{@cX.off} (directory also relevant for skins and images) digest (md5 or sha256): #{@cX.blue}#{@env.digest.type}#{@cX.off} @@ -1040,13 +1046,13 @@ WOK odf viewer: #{@cX.blue}#{@env.program.odf_viewer}#{@cX.off} (default selections can be changed in sisurc.yml under program_select:) #{@cX.green}programs used if available#{@cX.off} - word count: #{@cX.blue}#{@env.program.wc}#{@cX.off} #{program_found?(@env.program.wc)} - imagemagick/rmagick: #{program_found?('rmagick')} - tidy: #{@cX.blue}#{@env.program.tidy}#{@cX.off} #{program_found?(@env.program.tidy)} - rexml: #{@cX.blue}#{@env.program.rexml}#{@cX.off} #{program_found?(@env.program.rexml)} - latex to pdf: #{@cX.blue}#{@env.program.pdflatex}#{@cX.off} #{program_found?(@env.program.pdflatex)} - postgresql: #{@cX.blue}#{@env.program.postgresql}#{@cX.off} #{program_found?(@env.program.postgresql)} - sqlite: #{@cX.blue}#{@env.program.sqlite}#{@cX.off} #{program_found?(@env.program.sqlite)} + word count: #{program_found?(@env.program.wc)} + imagemagick/rmagick: #{program_found?(@env.program.rmagick)} + tidy: #{program_found?(@env.program.tidy)} + rexml: #{program_found?(@env.program.rexml)} + latex to pdf: #{program_found?(@env.program.pdflatex)} + postgresql: #{program_found?(@env.program.postgresql)} + sqlite: #{program_found?(@env.program.sqlite)} (these can be turned off if unavailable in sisurc.yaml under program_set:) #{@cX.green}processing shortcut defaults set to:#{@cX.off} color defaut set (on==true) #{@cX.blue}#{cf_defaults.color}#{@cX.off} @@ -1349,9 +1355,25 @@ WOK print <<WOK #{@cX.green}Install SiSU#{@cX.off} - SiSU does require setup, the file sisu is placed in the equivalent of #{@cX.blue}/usr/bin#{@cX.off} or #{@cX.blue}/usr/local/bin#{@cX.off} and the REWRITE files where ruby libraries are kept, on my debian system #{@cX.blue}/usr/local/lib/site_ruby/1.8#{@cX.off} + Presumably if you are reading this interactively you have a copy of SiSU already installed, nevertheless here are a few notes. - For information on download and installation, see #{@cX.blue}http://www.jus.uio.no/sisu/sisu_download/download#{@cX.off} or #{@cX.blue}http://www.jus.uio.no/sisu/SiSU/download#{@cX.off} + SiSU does require setup, the executable file #{@cX.blue}sisu#{@cX.off} is placed in #{@cX.blue}#{Config::CONFIG['bindir']}#{@cX.off} or #{@cX.blue}#{Config::CONFIG['sitelibdir']}#{@cX.off} and the library files, in #{@cX.blue}#{Config::CONFIG['rubylibdir']}/#{SiSU_lib}#{@cX.off} + or in #{@cX.blue}#{Config::CONFIG['sitelibdir']}/#{SiSU_lib}#{@cX.off} + + SiSU comes with a number of installers, including #{@cX.blue}setup.rb#{@cX.off}, #{@cX.blue}install#{@cX.off} and a #{@cX.blue}Rantfile#{@cX.off} if rant is installed on your system, you may need to be root to install sisu on your system. After unpacking the tarball, in the top directory of the tarball which contains the named files type, one of: + sudo ./sisu-install base + sudo ./sisu-install setup + if that does not work try + sudo ruby ./sisu-install setup + if rant is installed on your system you may instead run: + sudo rant base + + for further options: + ./sisu-install -T + + SiSU is pre-packaged for some GNU/Linux distributions such as Debian. + + For information on download and installation, see #{@cX.blue}http://www.jus.uio.no/sisu/SiSU/download#{@cX.off} For post installation help it is best you refer to '#{@cX.blue}man 8 sisu#{@cX.off}' @@ -1360,18 +1382,17 @@ WOK arch: #{@cX.blue}#{@env.arch}#{@cX.off} Directories for installation - bin: #{@cX.blue}[FIX]#{@cX.off} - lib (site-ruby): #{@cX.blue}#{Config::CONFIG['sitelibdir']}/#{SiSU_lib}#{@cX.off} - conf [etc]: #{@cX.blue}#{@env.path.etc}/sisu{@cX.off} - data (document samples, images, README): #{@cX.blue}#{@env.path.sample_data}/sisu#{@cX.off} and #{@cX.blue}#{@env.path.sample_data}/doc/sisu#{@cX.off} - man (manual pages): #{@cX.blue}#{@env.path.man}#{@cX.off} - processing: #{@cX.blue}#{@env.path.processing}#{@cX.off} - output www: #{@cX.blue}#{@env.path.output}#{@cX.off} + bin: #{@cX.blue}#{Config::CONFIG['bindir']}#{@cX.off} or #{@cX.blue}#{Config::CONFIG['sitelibdir']}#{@cX.off} + lib (site-ruby): #{@cX.blue}#{Config::CONFIG['rubylibdir']}/#{SiSU_lib}#{@cX.off} or #{@cX.blue}#{Config::CONFIG['sitelibdir']}/#{SiSU_lib}#{@cX.off} + conf [etc]: #{@cX.blue}#{@env.path.etc}/sisu#{@cX.off} + data (document samples, images, README): #{@cX.blue}#{@env.path.sample_data}#{@cX.off} + processing: #{@cX.blue}#{@env.path.processing}#{@cX.off} + output www: #{@cX.blue}#{@env.path.output}#{@cX.off} Output files, are currently set to be produced in: - processed document output: #{@cX.blue}#{@env.path.output}#{@cX.off} - a document in the current directory #{@cX.blue}#{Dir.pwd}#{@cX.off} - will have its output placed in: #{@cX.blue}#{@env.path.output}/#@output_stub#{@cX.off} + processed document output: #{@cX.blue}#{@env.path.output}#{@cX.off} + a document in the current directory #{@cX.blue}#{Dir.pwd}#{@cX.off} + will have its output placed in: #{@cX.blue}#{@env.path.output}/#@output_stub#{@cX.off} Install any additional programs of interest (that SiSU makes use of, that are not already on your system) @@ -1393,10 +1414,25 @@ WOK def setup print <<WOK - [provide some setup information] + #{@cX.green}configuration files#{@cX.off} + sisurc.yml used: + #{@cX.blue}#{@env.path.yamlrc}#{@cX.off} + configuration information search path: + #{@cX.blue}#{@env.path.rc.join(', ')}#{@cX.off} + (directory also relevant for skins and images) + + to initialise the mapped output directory, from within the markup document directory type: + #{@cX.blue}sisu -CC#{@cX.off} - also see http://www.jus.uio.no/sisu/SiSU + for information on your current sisu configuration settings, type: + #{@cX.blue}sisu --help env#{@cX.off} + or + #{@cX.blue}sisu -V#{@cX.off} + see also + #{@cX.blue}man 8 sisu#{@cX.off} + and + #{@cX.blue}http://www.jus.uio.no/sisu/SiSU#{@cX.off} WOK end def termsheet @@ -1587,7 +1623,7 @@ WOK def texinfo print <<WOK - sisu -i [filename] produces texinfo and info files + sisu -I [filename] produces texinfo and info files info and texinfo files are currently left in a separate work/output directory... have not decided what to do with them |