=begin
* Name: SiSU
* Description: a framework for document structuring, publishing and search
* Author: Ralph Amissah
* Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
2007 Ralph Amissah All Rights Reserved.
* License: GPL 3 or later:
SiSU, a framework for document structuring, publishing and search
Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
2007 Ralph Amissah
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option)
any later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.
You should have received a copy of the GNU General Public License along with
this program. If not, see .
If you have Internet connection, the latest version of the GPL should be
available at these locations:
* SiSU uses:
* Standard SiSU markup syntax,
* Standard SiSU meta-markup syntax, and the
* Standard SiSU object citation numbering and system
* Hompages:
* Download:
* Ralph Amissah
** Description: summary of generated outputs and metadata
=end
module SiSU_Manifest
require "#{SiSU_lib}/sysenv"
require "#{SiSU_lib}/i18n"
include SiSU_Env
include SiSU_Param
include SiSU_Viz
class Source
def initialize(opt)
@opt=opt
l=SiSU_Env::Standardise_language.new.file_to_language(@opt.fns)
@doc_language=l[:l]
end
def read
begin
@env=SiSU_Env::Info_env.new(@opt.fns)
@md=SiSU_Param::Parameters.new(@opt).get
SiSU_Env::Info_skin.new(@md).select
xbrowser=@env.program.web_browser
browser=@env.program.console_web_browser
webserv_url=@env.path.url.output_tell
url_html="#{webserv_url}/#{@md.fnb}/#{@md.fn[:manifest]}"
tell=SiSU_Screen::Ansi.new(@opt.cmd,'Manifest',"#{xbrowser} #{url_html}")
tell.green_hi_blue unless @opt.cmd =~/q/
tell=SiSU_Screen::Ansi.new(@opt.cmd,"#{browser} #{url_html}")
tell.grey_tab if @opt.cmd =~/v/i
Output_Info.new(@md).check_output
rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error
ensure
end
end
private
class Output_Info