aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2011-05-17 18:12:11 -0400
committerRalph Amissah <ralph@amissah.com>2011-05-17 18:12:11 -0400
commite28ee29ba60d6a97598eeb93d67ae36256c69697 (patch)
tree21243fcd58f773f38d0613dba47f2bf597953609
parentdebian/changelog (3.0.8-1) (diff)
parentv3: po4a re-enabled, related fixes (issues persist) (diff)
Merge branch 'upstream' into debian/sid
-rw-r--r--bin/sisu2131
l---------copyright1
-rw-r--r--data/doc/sisu/CHANGELOG_v211
-rw-r--r--data/doc/sisu/CHANGELOG_v348
-rw-r--r--data/doc/sisu/copyright10
-rw-r--r--data/sisu/v2/conf/editor-syntax-etc/vim/colors/8.vim6
-rw-r--r--data/sisu/v2/conf/editor-syntax-etc/vim/colors/frugal-cterm-ruby.vim6
-rw-r--r--data/sisu/v2/conf/editor-syntax-etc/vim/colors/frugal-cterm-sisu.vim6
-rw-r--r--data/sisu/v2/conf/editor-syntax-etc/vim/colors/slate.vim6
-rw-r--r--data/sisu/v2/conf/editor-syntax-etc/vim/colors/sparse-cterm-ruby.vim6
-rw-r--r--data/sisu/v2/conf/editor-syntax-etc/vim/colors/sparse-cterm-sisu.vim6
-rw-r--r--data/sisu/v2/v/version.yml6
-rw-r--r--data/sisu/v3/conf/editor-syntax-etc/vim/colors/8.vim6
-rw-r--r--data/sisu/v3/conf/editor-syntax-etc/vim/colors/frugal-cterm-ruby.vim6
-rw-r--r--data/sisu/v3/conf/editor-syntax-etc/vim/colors/frugal-cterm-sisu.vim6
-rw-r--r--data/sisu/v3/conf/editor-syntax-etc/vim/colors/slate.vim6
-rw-r--r--data/sisu/v3/conf/editor-syntax-etc/vim/colors/sparse-cterm-ruby.vim6
-rw-r--r--data/sisu/v3/conf/editor-syntax-etc/vim/colors/sparse-cterm-sisu.vim6
-rw-r--r--data/sisu/v3/v/version.yml6
-rw-r--r--lib/sisu/v3/cgi.rb1
-rw-r--r--lib/sisu/v3/cgi_pgsql.rb6
-rw-r--r--lib/sisu/v3/cgi_sql_common.rb74
-rw-r--r--lib/sisu/v3/cgi_sqlite.rb6
-rw-r--r--lib/sisu/v3/concordance.rb8
-rw-r--r--lib/sisu/v3/dal_expand_insertions.rb59
-rw-r--r--lib/sisu/v3/digests.rb4
-rw-r--r--lib/sisu/v3/embedded.rb7
-rw-r--r--lib/sisu/v3/epub.rb8
-rw-r--r--lib/sisu/v3/git.rb6
-rw-r--r--lib/sisu/v3/html.rb4
-rw-r--r--lib/sisu/v3/html_segments.rb6
-rw-r--r--lib/sisu/v3/hub.rb2
-rw-r--r--lib/sisu/v3/manifest.rb194
-rw-r--r--lib/sisu/v3/odf.rb10
-rw-r--r--lib/sisu/v3/options.rb50
-rw-r--r--lib/sisu/v3/param.rb153
-rw-r--r--lib/sisu/v3/plaintext.rb4
-rw-r--r--lib/sisu/v3/po4a.rb13
-rw-r--r--lib/sisu/v3/share_src.rb12
-rw-r--r--lib/sisu/v3/sisupod_make.rb12
-rw-r--r--lib/sisu/v3/sitemaps.rb4
-rw-r--r--lib/sisu/v3/sysenv.rb839
-rw-r--r--lib/sisu/v3/texpdf.rb18
-rw-r--r--lib/sisu/v3/urls.rb40
-rw-r--r--lib/sisu/v3/xhtml.rb8
-rw-r--r--lib/sisu/v3/xml.rb8
-rw-r--r--lib/sisu/v3/xml_dom.rb8
47 files changed, 1336 insertions, 513 deletions
diff --git a/bin/sisu2 b/bin/sisu2
new file mode 100644
index 00000000..9facda87
--- /dev/null
+++ b/bin/sisu2
@@ -0,0 +1,131 @@
+#!/usr/bin/env ruby
+# encoding: utf-8
+#SiSU: copyright (C) 1997 - 2011 Ralph Amissah; License GPL, see appended program information
+begin
+ def ruby_version_ok?(base_version)
+ @v ||=RUBY_VERSION.scan(/\d+/)
+ vb=base_version.scan(/\d+/)
+ if @v[0].to_i < vb[0].to_i \
+ or @v[0].to_i == vb[0].to_i \
+ && @v[1].to_i < vb[1].to_i \
+ or @v[0].to_i == vb[0].to_i \
+ && @v[1].to_i == vb[1].to_i \
+ && @v[1].to_i < vb[2].to_i
+ raise "Please, use Ruby#{vb} or later, current Ruby #{RUBY_VERSION}"
+ else check_incompatible_ruby_build?
+ end
+ end
+ def check_incompatible_ruby_build?
+ require 'rbconfig'
+ e=Config::CONFIG
+ if RUBY_VERSION == '1.9.2' \
+ && e['PATCHLEVEL'].to_i < 180
+ raise <<WOK
+There are known issues with early versions of ruby1.9.2.
+Please, use Ruby 1.9.2p180 or later,
+current version #{e['RUBY_PROGRAM_VERSION']}p#{e['PATCHLEVEL']}
+#{%x{ruby -v}.strip.to_s}
+
+WOK
+ end
+ end
+ def check_sisu_stable_ruby_version?
+ rbv_sisu_stable='1.8.7'
+ ruby_version_ok?(rbv_sisu_stable)
+ end
+ def check_sisu_dev_ruby_version?
+ rbv_sisu_dev='1.9.2'
+ ruby_version_ok?(rbv_sisu_dev)
+ end
+ $VERBOSE=nil
+ $KCODE='u' if RUBY_VERSION < '1.9'
+ argv=$*
+ SiSU_version_dir=case argv.inspect
+ when /--v2/
+ check_sisu_stable_ruby_version?
+ 'v2'
+ when /--v3/
+ check_sisu_dev_ruby_version?
+ 'v3'
+ when /--dev/
+ check_sisu_dev_ruby_version?
+ 'v3'
+ else
+ check_sisu_stable_ruby_version?
+ 'v2'
+ end
+ SiSU_lib="sisu/#{SiSU_version_dir}"
+ require "#{SiSU_lib}/hub"
+rescue
+ STDERR.puts 'ERROR'
+ STDERR.puts $!
+ STDERR.puts $@
+ require 'rbconfig'
+ e=Config::CONFIG
+ puts %{
+ #{%x{ruby -v}.strip.to_s}
+ #{RUBY_VERSION}
+ ruby version: #{e['RUBY_PROGRAM_VERSION']}p#{e['PATCHLEVEL']}
+ ruby named: #{e['ruby_version']}
+ rubylib: #{e['rubylibdir']}
+ rubylib local: #{e['sitelibdir']}
+ }
+ system(%{echo "
+ system RUBYPATH: ${RUBYPATH}
+ system RUBYLIB: ${RUBYLIB}
+ "})
+end
+__END__
+
+ * 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, 2008, 2009, 2010, 2011 Ralph Amissah All Rights Reserved.
+
+ * License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) 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 <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.jus.uio.no/sisu/gpl.fsf/toc.html>
+ <http://www.jus.uio.no/sisu/gpl.fsf/doc.html>
+ <http://www.jus.uio.no/sisu/gpl.fsf/plain.txt>
+
+ * SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+ * Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+ * Download:
+ <http://www.jus.uio.no/sisu/SiSU/download.html>
+
+ * Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
diff --git a/copyright b/copyright
new file mode 120000
index 00000000..c7a27337
--- /dev/null
+++ b/copyright
@@ -0,0 +1 @@
+data/doc/sisu/copyright \ No newline at end of file
diff --git a/data/doc/sisu/CHANGELOG_v2 b/data/doc/sisu/CHANGELOG_v2
index 1420cfe6..d892910d 100644
--- a/data/doc/sisu/CHANGELOG_v2
+++ b/data/doc/sisu/CHANGELOG_v2
@@ -12,6 +12,17 @@ Reverse Chronological:
%% STABLE Branch
+%% 2.9.4.orig.tar.gz (2011-05-15:19/7) [see 3.0.9]
+http://git.sisudoc.org/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/3.0.9-1
+
+ * bin/sisu2 introduced (to complement bin/sisu3), currently same as bin/sisu
+ (later switch bin/sisu to bin/sisu3; consider using update-alternatives)
+
+ * vim, cterm colorschemes, touch search color
+
+ * copyright file, softlink, make more visible in tarball and update
+ * sisu-mode.el assigned to FSF (GNU EMACS)
+
%% 2.9.3.orig.tar.gz (2011-04-27:17/3) [see 3.0.8]
http://git.sisudoc.org/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/3.0.8-1
diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3
index 2fdc9575..682db1a9 100644
--- a/data/doc/sisu/CHANGELOG_v3
+++ b/data/doc/sisu/CHANGELOG_v3
@@ -13,12 +13,54 @@ Reverse Chronological:
%% Development branch UNSTABLE
v3 branch once stable will supersede & replace current stable v2 branch
+%% 3.0.9.orig.tar.gz (2011-05-17:20/2)
+http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/debian/3.0.9-1
+http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.9.orig.tar.gz
+ sisu_3.0.9.orig.tar.gz
+ sisu_3.0.9-1.dsc
+ sisu_3.0.9-1.debian.tar.gz
+
+ * bin/sisu2 introduced (to complement bin/sisu3), currently same as bin/sisu
+ (later switch bin/sisu to bin/sisu3; consider using update-alternatives)
+
+ * vim, cterm colorschemes, touch search color
+
+ * copyright file, softlink, make more visible in tarball and update
+ * sisu-mode.el assigned to FSF (GNU EMACS)
+
+ * options, expand name of file for selected language directories
+ * only use for single file(name) available in multiple languages e.g.
+ sisu3 -hv en/free_culture.lawrence_lessig.sst es fr
+ * english assumed as default language, make default configurable later
+ * particularly useful for po4a
+
+ * sysenv
+ * output directory structure check, fix & start testing alternatives
+ sisurc.yml output_by: (language|filetype|filename)
+ * output paths restructured, to have dir, url rel(ative) & rcp (for rsync or scp)
+ * url paths to output files (requires setup in sisurc.yml)
+ * consolidated output paths, directory & url, affecting many files
+
+ * rsync of output must cope with alternative file structures
+
+ * scp, disable until looked at
+
+ * dal_expand_insertions, fix resulting urls for shortcut for sisu generated
+ document in same output directory
+
+ * cgi sample search form generated to provide different links depending on
+ output structure, now links only to manifest and html toc
+
+ * manifest, url path, fix
+
+ * po4a, re-enabled, numerous issues
+
%% 3.0.8.orig.tar.gz (2011-05-05:18/4)
http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/debian/3.0.8-1
http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.8.orig.tar.gz
- sisu_3.0.8.orig.tar.gz
- sisu_3.0.8-1.dsc
- sisu_3.0.8-1.debian.tar.gz
+ 87b595cc6e108e325d80e7ef78e58463ab3cdd0d7036fd943224114c8eb9b897 1936305 sisu_3.0.8.orig.tar.gz
+ d3114d3aeba230501c79ab478c30985438ad1bf4a5cde628cb82ab7717028623 286421 sisu_3.0.8-1.dsc
+ 43bc0459adb7174f03b91c67efd10d053a39da07dd1319f26fd2928f80876d03 1216 sisu_3.0.8-1.debian.tar.gz
* bin/sisu3 bin/sisu /bin/sisu_webrick bin/sisu_termsheet
* improved ruby version check
diff --git a/data/doc/sisu/copyright b/data/doc/sisu/copyright
index 84e8f311..5974c3fc 100644
--- a/data/doc/sisu/copyright
+++ b/data/doc/sisu/copyright
@@ -1,8 +1,12 @@
Author: Ralph Amissah <ralph@amissah.com>
-Download: http://www.jus.uio.no/sisu/
+Download: <http://www.sisudoc.org> <http://www.jus.uio.no/sisu/>
-Files: *
-Copyright: (C) 1997-2009, Ralph Amissah
+Files: SiSU *
+Copyright: (C) 1997-2011, Ralph Amissah
+License: GPL-3+
+Files: sisu-mode.el
+Copyright: (C) 1997-2011, Ambrose Kofi Laing, Ralph Amissah
+ assigned to FSF 2011-04-08 (GNU EMACS)
License: GPL-3+
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
diff --git a/data/sisu/v2/conf/editor-syntax-etc/vim/colors/8.vim b/data/sisu/v2/conf/editor-syntax-etc/vim/colors/8.vim
index 773f87cb..9f1e7222 100644
--- a/data/sisu/v2/conf/editor-syntax-etc/vim/colors/8.vim
+++ b/data/sisu/v2/conf/editor-syntax-etc/vim/colors/8.vim
@@ -1,7 +1,7 @@
" Vim color file
" Name: 8
" Maintainer: Ralph Amissah <ralph@amissah.com>
-" Last Change: 2011-04-25
+" Last Change: 2011-05-10
" URL: <http://git.sisudoc.org/?p=code/sisu.git;a=blob;f=data/sisu/v3/conf/editor-syntax-etc/vim/colors/8.vim;hb=HEAD>
" Note: 8 color cterm, related colorschemes frugal & sparse
:set background=dark
@@ -16,8 +16,8 @@ endif
:hi lCursor term=reverse cterm=reverse
:hi StatusLine term=bold,reverse cterm=bold,reverse
:hi StatusLineNC term=reverse cterm=reverse
-:hi Search term=reverse ctermbg=2
-:hi IncSearch term=reverse cterm=reverse
+:hi Search term=reverse cterm=none ctermbg=2 ctermfg=0
+:hi IncSearch term=reverse cterm=bold ctermbg=2 ctermfg=7
:hi SpecialKey term=bold ctermfg=4
:hi Visual term=reverse cterm=reverse
:hi VisualNOS term=bold,underline cterm=bold,underline
diff --git a/data/sisu/v2/conf/editor-syntax-etc/vim/colors/frugal-cterm-ruby.vim b/data/sisu/v2/conf/editor-syntax-etc/vim/colors/frugal-cterm-ruby.vim
index 38197f2d..c8d7333b 100644
--- a/data/sisu/v2/conf/editor-syntax-etc/vim/colors/frugal-cterm-ruby.vim
+++ b/data/sisu/v2/conf/editor-syntax-etc/vim/colors/frugal-cterm-ruby.vim
@@ -1,7 +1,7 @@
" Vim color file
" Name: frugal-cterm-ruby
" Maintainer: Ralph Amissah <ralph@amissah.com>
-" Last Change: 2011-05-04
+" Last Change: 2011-05-10
" URL: <http://git.sisudoc.org/?p=code/sisu.git;a=blob;f=data/sisu/v3/conf/editor-syntax-etc/vim/colors/frugal-cterm-ruby.vim;hb=HEAD>
" Note: 8 color cterm, related colorschemes 8 & sparse
:set background=dark
@@ -16,8 +16,8 @@ endif
:hi lCursor term=reverse cterm=reverse
:hi StatusLine term=reverse cterm=reverse
:hi StatusLineNC term=reverse cterm=reverse
-:hi Search term=reverse cterm=bold ctermbg=2 ctermfg=7
-:hi IncSearch term=reverse cterm=reverse
+:hi Search term=reverse cterm=none ctermbg=2 ctermfg=0
+:hi IncSearch term=reverse cterm=bold ctermbg=2 ctermfg=7
:hi SpecialKey term=bold ctermfg=4
:hi Visual term=reverse cterm=reverse
:hi VisualNOS term=bold,underline cterm=bold,underline
diff --git a/data/sisu/v2/conf/editor-syntax-etc/vim/colors/frugal-cterm-sisu.vim b/data/sisu/v2/conf/editor-syntax-etc/vim/colors/frugal-cterm-sisu.vim
index b15cd3a6..0190c699 100644
--- a/data/sisu/v2/conf/editor-syntax-etc/vim/colors/frugal-cterm-sisu.vim
+++ b/data/sisu/v2/conf/editor-syntax-etc/vim/colors/frugal-cterm-sisu.vim
@@ -1,7 +1,7 @@
" Vim color file
" Name: frugal-cterm-sisu
" Maintainer: Ralph Amissah <ralph@amissah.com>
-" Last Change: 2011-05-04
+" Last Change: 2011-05-10
" URL: <http://git.sisudoc.org/?p=code/sisu.git;a=blob;f=data/sisu/v3/conf/editor-syntax-etc/vim/colors/frugal-cterm-sisu.vim;hb=HEAD>
" Note: 8 color cterm, related colorschemes 8 & sparse
:set background=dark
@@ -16,8 +16,8 @@ endif
:hi lCursor term=reverse cterm=reverse
:hi StatusLine term=reverse cterm=bold,reverse
:hi StatusLineNC term=reverse cterm=reverse
-:hi Search term=reverse cterm=bold ctermbg=2 ctermfg=7
-:hi IncSearch term=reverse cterm=reverse
+:hi Search term=reverse cterm=none ctermbg=2 ctermfg=0
+:hi IncSearch term=reverse cterm=bold ctermbg=2 ctermfg=7
:hi SpecialKey term=bold ctermfg=4
:hi Visual term=reverse cterm=reverse
:hi VisualNOS term=bold,underline cterm=bold,underline
diff --git a/data/sisu/v2/conf/editor-syntax-etc/vim/colors/slate.vim b/data/sisu/v2/conf/editor-syntax-etc/vim/colors/slate.vim
index 2aad27ca..9648534e 100644
--- a/data/sisu/v2/conf/editor-syntax-etc/vim/colors/slate.vim
+++ b/data/sisu/v2/conf/editor-syntax-etc/vim/colors/slate.vim
@@ -1,7 +1,7 @@
"%% SiSU Vim color file
" Name: Slate
" Maintainer: Ralph Amissah <ralph@amissah.com>
-" Last Change: 2011-05-04
+" Last Change: 2011-05-10
" URL: <http://git.sisudoc.org/?p=code/sisu.git;a=blob;f=data/sisu/v3/conf/editor-syntax-etc/vim/colors/slate.vim;hb=HEAD>
" Notes: cterm now uses frugal-sisu 8 colors for term
" (for gui originally looked at desert Hans Fugal <hans@fugal.net>
@@ -18,8 +18,8 @@ endif
:hi lCursor term=reverse cterm=reverse
:hi StatusLine term=reverse cterm=bold,reverse gui=none guibg=#c2bfa5 guifg=black
:hi StatusLineNC term=reverse cterm=reverse gui=none guibg=#c2bfa5 guifg=grey40
-:hi Search term=reverse cterm=bold ctermbg=2 ctermfg=7 guibg=peru guifg=wheat
-:hi IncSearch term=reverse cterm=reverse guibg=black guifg=green
+:hi Search term=reverse cterm=none ctermbg=2 ctermfg=0 guibg=peru guifg=wheat
+:hi IncSearch term=reverse cterm=bold ctermbg=2 ctermfg=7 guibg=black guifg=green
:hi SpecialKey term=bold ctermfg=4 guifg=yellowgreen
:hi Visual term=reverse cterm=reverse gui=none guibg=olivedrab guifg=khaki
:hi VisualNOS term=bold,underline cterm=bold,underline
diff --git a/data/sisu/v2/conf/editor-syntax-etc/vim/colors/sparse-cterm-ruby.vim b/data/sisu/v2/conf/editor-syntax-etc/vim/colors/sparse-cterm-ruby.vim
index 17b67557..d17c3e5e 100644
--- a/data/sisu/v2/conf/editor-syntax-etc/vim/colors/sparse-cterm-ruby.vim
+++ b/data/sisu/v2/conf/editor-syntax-etc/vim/colors/sparse-cterm-ruby.vim
@@ -1,7 +1,7 @@
" Vim color file
" Name: sparse-cterm-ruby
" Maintainer: Ralph Amissah <ralph@amissah.com>
-" Last Change: 2011-05-04
+" Last Change: 2011-05-10
" URL: <http://git.sisudoc.org/?p=code/sisu.git;a=blob;f=data/sisu/v3/conf/editor-syntax-etc/vim/colors/sparse-cterm-ruby.vim;hb=HEAD>
" Note: 8 color cterm, related colorschemes 8 & frugal
:set background=dark
@@ -16,8 +16,8 @@ endif
:hi lCursor term=reverse cterm=reverse
:hi StatusLine term=reverse cterm=reverse
:hi StatusLineNC term=reverse cterm=reverse
-:hi Search term=reverse cterm=bold ctermbg=2 ctermfg=7
-:hi IncSearch term=reverse cterm=reverse
+:hi Search term=reverse cterm=none ctermbg=2 ctermfg=0
+:hi IncSearch term=reverse cterm=bold ctermbg=2 ctermfg=7
:hi SpecialKey term=bold ctermfg=4
:hi Visual term=reverse cterm=reverse
:hi VisualNOS term=bold,underline cterm=bold,underline
diff --git a/data/sisu/v2/conf/editor-syntax-etc/vim/colors/sparse-cterm-sisu.vim b/data/sisu/v2/conf/editor-syntax-etc/vim/colors/sparse-cterm-sisu.vim
index 3d1b8bad..13d9f02f 100644
--- a/data/sisu/v2/conf/editor-syntax-etc/vim/colors/sparse-cterm-sisu.vim
+++ b/data/sisu/v2/conf/editor-syntax-etc/vim/colors/sparse-cterm-sisu.vim
@@ -1,7 +1,7 @@
" Vim color file
" Name: sparse-cterm-sisu
" Maintainer: Ralph Amissah <ralph@amissah.com>
-" Last Change: 2011-05-04
+" Last Change: 2011-05-10
" URL: <http://git.sisudoc.org/?p=code/sisu.git;a=blob;f=data/sisu/v3/conf/editor-syntax-etc/vim/colors/sparse-cterm-sisu.vim;hb=HEAD>
" Note: 8 color cterm, related colorschemes 8 & frugal
:set background=dark
@@ -16,8 +16,8 @@ endif
:hi lCursor term=reverse cterm=reverse
:hi StatusLine term=reverse cterm=bold,reverse
:hi StatusLineNC term=reverse cterm=reverse
-:hi Search term=reverse cterm=bold ctermbg=2 ctermfg=7
-:hi IncSearch term=reverse cterm=reverse
+:hi Search term=reverse cterm=none ctermbg=2 ctermfg=0
+:hi IncSearch term=reverse cterm=bold ctermbg=2 ctermfg=7
:hi SpecialKey term=bold ctermfg=4
:hi Visual term=reverse cterm=reverse
:hi VisualNOS term=bold,underline cterm=bold,underline
diff --git a/data/sisu/v2/v/version.yml b/data/sisu/v2/v/version.yml
index 9a5dd08a..85cdd471 100644
--- a/data/sisu/v2/v/version.yml
+++ b/data/sisu/v2/v/version.yml
@@ -1,5 +1,5 @@
---
-:version: 2.9.3
-:date_stamp: 2011w17/3
-:date: "2011-04-27"
+:version: 2.9.4
+:date_stamp: 2011w19/7
+:date: "2011-05-15"
:project: SiSU
diff --git a/data/sisu/v3/conf/editor-syntax-etc/vim/colors/8.vim b/data/sisu/v3/conf/editor-syntax-etc/vim/colors/8.vim
index 773f87cb..9f1e7222 100644
--- a/data/sisu/v3/conf/editor-syntax-etc/vim/colors/8.vim
+++ b/data/sisu/v3/conf/editor-syntax-etc/vim/colors/8.vim
@@ -1,7 +1,7 @@
" Vim color file
" Name: 8
" Maintainer: Ralph Amissah <ralph@amissah.com>
-" Last Change: 2011-04-25
+" Last Change: 2011-05-10
" URL: <http://git.sisudoc.org/?p=code/sisu.git;a=blob;f=data/sisu/v3/conf/editor-syntax-etc/vim/colors/8.vim;hb=HEAD>
" Note: 8 color cterm, related colorschemes frugal & sparse
:set background=dark
@@ -16,8 +16,8 @@ endif
:hi lCursor term=reverse cterm=reverse
:hi StatusLine term=bold,reverse cterm=bold,reverse
:hi StatusLineNC term=reverse cterm=reverse
-:hi Search term=reverse ctermbg=2
-:hi IncSearch term=reverse cterm=reverse
+:hi Search term=reverse cterm=none ctermbg=2 ctermfg=0
+:hi IncSearch term=reverse cterm=bold ctermbg=2 ctermfg=7
:hi SpecialKey term=bold ctermfg=4
:hi Visual term=reverse cterm=reverse
:hi VisualNOS term=bold,underline cterm=bold,underline
diff --git a/data/sisu/v3/conf/editor-syntax-etc/vim/colors/frugal-cterm-ruby.vim b/data/sisu/v3/conf/editor-syntax-etc/vim/colors/frugal-cterm-ruby.vim
index 38197f2d..c8d7333b 100644
--- a/data/sisu/v3/conf/editor-syntax-etc/vim/colors/frugal-cterm-ruby.vim
+++ b/data/sisu/v3/conf/editor-syntax-etc/vim/colors/frugal-cterm-ruby.vim
@@ -1,7 +1,7 @@
" Vim color file
" Name: frugal-cterm-ruby
" Maintainer: Ralph Amissah <ralph@amissah.com>
-" Last Change: 2011-05-04
+" Last Change: 2011-05-10
" URL: <http://git.sisudoc.org/?p=code/sisu.git;a=blob;f=data/sisu/v3/conf/editor-syntax-etc/vim/colors/frugal-cterm-ruby.vim;hb=HEAD>
" Note: 8 color cterm, related colorschemes 8 & sparse
:set background=dark
@@ -16,8 +16,8 @@ endif
:hi lCursor term=reverse cterm=reverse
:hi StatusLine term=reverse cterm=reverse
:hi StatusLineNC term=reverse cterm=reverse
-:hi Search term=reverse cterm=bold ctermbg=2 ctermfg=7
-:hi IncSearch term=reverse cterm=reverse
+:hi Search term=reverse cterm=none ctermbg=2 ctermfg=0
+:hi IncSearch term=reverse cterm=bold ctermbg=2 ctermfg=7
:hi SpecialKey term=bold ctermfg=4
:hi Visual term=reverse cterm=reverse
:hi VisualNOS term=bold,underline cterm=bold,underline
diff --git a/data/sisu/v3/conf/editor-syntax-etc/vim/colors/frugal-cterm-sisu.vim b/data/sisu/v3/conf/editor-syntax-etc/vim/colors/frugal-cterm-sisu.vim
index b15cd3a6..0190c699 100644
--- a/data/sisu/v3/conf/editor-syntax-etc/vim/colors/frugal-cterm-sisu.vim
+++ b/data/sisu/v3/conf/editor-syntax-etc/vim/colors/frugal-cterm-sisu.vim
@@ -1,7 +1,7 @@
" Vim color file
" Name: frugal-cterm-sisu
" Maintainer: Ralph Amissah <ralph@amissah.com>
-" Last Change: 2011-05-04
+" Last Change: 2011-05-10
" URL: <http://git.sisudoc.org/?p=code/sisu.git;a=blob;f=data/sisu/v3/conf/editor-syntax-etc/vim/colors/frugal-cterm-sisu.vim;hb=HEAD>
" Note: 8 color cterm, related colorschemes 8 & sparse
:set background=dark
@@ -16,8 +16,8 @@ endif
:hi lCursor term=reverse cterm=reverse
:hi StatusLine term=reverse cterm=bold,reverse
:hi StatusLineNC term=reverse cterm=reverse
-:hi Search term=reverse cterm=bold ctermbg=2 ctermfg=7
-:hi IncSearch term=reverse cterm=reverse
+:hi Search term=reverse cterm=none ctermbg=2 ctermfg=0
+:hi IncSearch term=reverse cterm=bold ctermbg=2 ctermfg=7
:hi SpecialKey term=bold ctermfg=4
:hi Visual term=reverse cterm=reverse
:hi VisualNOS term=bold,underline cterm=bold,underline
diff --git a/data/sisu/v3/conf/editor-syntax-etc/vim/colors/slate.vim b/data/sisu/v3/conf/editor-syntax-etc/vim/colors/slate.vim
index 2aad27ca..9648534e 100644
--- a/data/sisu/v3/conf/editor-syntax-etc/vim/colors/slate.vim
+++ b/data/sisu/v3/conf/editor-syntax-etc/vim/colors/slate.vim
@@ -1,7 +1,7 @@
"%% SiSU Vim color file
" Name: Slate
" Maintainer: Ralph Amissah <ralph@amissah.com>
-" Last Change: 2011-05-04
+" Last Change: 2011-05-10
" URL: <http://git.sisudoc.org/?p=code/sisu.git;a=blob;f=data/sisu/v3/conf/editor-syntax-etc/vim/colors/slate.vim;hb=HEAD>
" Notes: cterm now uses frugal-sisu 8 colors for term
" (for gui originally looked at desert Hans Fugal <hans@fugal.net>
@@ -18,8 +18,8 @@ endif
:hi lCursor term=reverse cterm=reverse
:hi StatusLine term=reverse cterm=bold,reverse gui=none guibg=#c2bfa5 guifg=black
:hi StatusLineNC term=reverse cterm=reverse gui=none guibg=#c2bfa5 guifg=grey40
-:hi Search term=reverse cterm=bold ctermbg=2 ctermfg=7 guibg=peru guifg=wheat
-:hi IncSearch term=reverse cterm=reverse guibg=black guifg=green
+:hi Search term=reverse cterm=none ctermbg=2 ctermfg=0 guibg=peru guifg=wheat
+:hi IncSearch term=reverse cterm=bold ctermbg=2 ctermfg=7 guibg=black guifg=green
:hi SpecialKey term=bold ctermfg=4 guifg=yellowgreen
:hi Visual term=reverse cterm=reverse gui=none guibg=olivedrab guifg=khaki
:hi VisualNOS term=bold,underline cterm=bold,underline
diff --git a/data/sisu/v3/conf/editor-syntax-etc/vim/colors/sparse-cterm-ruby.vim b/data/sisu/v3/conf/editor-syntax-etc/vim/colors/sparse-cterm-ruby.vim
index 17b67557..d17c3e5e 100644
--- a/data/sisu/v3/conf/editor-syntax-etc/vim/colors/sparse-cterm-ruby.vim
+++ b/data/sisu/v3/conf/editor-syntax-etc/vim/colors/sparse-cterm-ruby.vim
@@ -1,7 +1,7 @@
" Vim color file
" Name: sparse-cterm-ruby
" Maintainer: Ralph Amissah <ralph@amissah.com>
-" Last Change: 2011-05-04
+" Last Change: 2011-05-10
" URL: <http://git.sisudoc.org/?p=code/sisu.git;a=blob;f=data/sisu/v3/conf/editor-syntax-etc/vim/colors/sparse-cterm-ruby.vim;hb=HEAD>
" Note: 8 color cterm, related colorschemes 8 & frugal
:set background=dark
@@ -16,8 +16,8 @@ endif
:hi lCursor term=reverse cterm=reverse
:hi StatusLine term=reverse cterm=reverse
:hi StatusLineNC term=reverse cterm=reverse
-:hi Search term=reverse cterm=bold ctermbg=2 ctermfg=7
-:hi IncSearch term=reverse cterm=reverse
+:hi Search term=reverse cterm=none ctermbg=2 ctermfg=0
+:hi IncSearch term=reverse cterm=bold ctermbg=2 ctermfg=7
:hi SpecialKey term=bold ctermfg=4
:hi Visual term=reverse cterm=reverse
:hi VisualNOS term=bold,underline cterm=bold,underline
diff --git a/data/sisu/v3/conf/editor-syntax-etc/vim/colors/sparse-cterm-sisu.vim b/data/sisu/v3/conf/editor-syntax-etc/vim/colors/sparse-cterm-sisu.vim
index 3d1b8bad..13d9f02f 100644
--- a/data/sisu/v3/conf/editor-syntax-etc/vim/colors/sparse-cterm-sisu.vim
+++ b/data/sisu/v3/conf/editor-syntax-etc/vim/colors/sparse-cterm-sisu.vim
@@ -1,7 +1,7 @@
" Vim color file
" Name: sparse-cterm-sisu
" Maintainer: Ralph Amissah <ralph@amissah.com>
-" Last Change: 2011-05-04
+" Last Change: 2011-05-10
" URL: <http://git.sisudoc.org/?p=code/sisu.git;a=blob;f=data/sisu/v3/conf/editor-syntax-etc/vim/colors/sparse-cterm-sisu.vim;hb=HEAD>
" Note: 8 color cterm, related colorschemes 8 & frugal
:set background=dark
@@ -16,8 +16,8 @@ endif
:hi lCursor term=reverse cterm=reverse
:hi StatusLine term=reverse cterm=bold,reverse
:hi StatusLineNC term=reverse cterm=reverse
-:hi Search term=reverse cterm=bold ctermbg=2 ctermfg=7
-:hi IncSearch term=reverse cterm=reverse
+:hi Search term=reverse cterm=none ctermbg=2 ctermfg=0
+:hi IncSearch term=reverse cterm=bold ctermbg=2 ctermfg=7
:hi SpecialKey term=bold ctermfg=4
:hi Visual term=reverse cterm=reverse
:hi VisualNOS term=bold,underline cterm=bold,underline
diff --git a/data/sisu/v3/v/version.yml b/data/sisu/v3/v/version.yml
index 65a09a0e..e2f62d8c 100644
--- a/data/sisu/v3/v/version.yml
+++ b/data/sisu/v3/v/version.yml
@@ -1,5 +1,5 @@
---
-:version: 3.0.8-beta-rb1.9.2p180
-:date_stamp: 2011w18/4
-:date: "2011-05-05"
+:version: 3.0.9-beta-rb1.9.2p180
+:date_stamp: 2011w20/2
+:date: "2011-05-17"
:project: SiSU
diff --git a/lib/sisu/v3/cgi.rb b/lib/sisu/v3/cgi.rb
index 357a4332..f1d628d2 100644
--- a/lib/sisu/v3/cgi.rb
+++ b/lib/sisu/v3/cgi.rb
@@ -60,7 +60,6 @@
module SiSU_CGI #% database building documents
require_relative 'sysenv' # sysenv.rb
require_relative 'cgi_pgsql' # cgi_pgsql.rb
- include SiSU_CGI_pgsql
require_relative 'cgi_sqlite' # cgi_sqlite.rb
class SiSU_search
def initialize(opt)
diff --git a/lib/sisu/v3/cgi_pgsql.rb b/lib/sisu/v3/cgi_pgsql.rb
index fc802f03..4afda106 100644
--- a/lib/sisu/v3/cgi_pgsql.rb
+++ b/lib/sisu/v3/cgi_pgsql.rb
@@ -66,9 +66,9 @@ module SiSU_CGI_pgsql
@env=SiSU_Env::Info_env.new('',opt)
@sys=SiSU_Env::System_call.new
@image_src="#{@env.url.webserv_cgi}/_sisu/image_sys"
- @common=SiSU_CGI_sql::SiSU_CGI_common.new(@webserv,@opt.cmd,@image_src,@env)
+ @common=SiSU_CGI_sql::SiSU_CGI_common.new(@webserv,@opt,@image_src,@env)
@db=SiSU_Env::Info_db.new
- @cgi_file_name="#{Db[:name_prefix_db]}pgsql.cgi"
+ @cgi_file_name="#{Db[:name_prefix_db]}by_#{opt.dir_structure_by}_pgsql.cgi"
end
def pgsql
serve=[]
@@ -95,7 +95,7 @@ module SiSU_CGI_pgsql
f2 << " end\n"
if FileTest.writable?('.')
output=File.open(@cgi_file_name,'w')
- output << header0 << header1 << header_desc << header2 << f1 << buttons1 << buttons1_pgsql << buttons2 << search_request << search_statement << search_statement_common << search_query1 << @common.pages << search_query2 << @common.tail << @common.main1 << f2 << dbi_connect << @common.main2
+ output << header0 << header1 << header_desc << header2 << f1 << buttons1 << buttons1_pgsql << buttons2 << search_request << search_statement << search_statement_common << search_query1 << @common.pages << search_query2 << @common.tail << @common.main1 << f2 << dbi_connect << @common.main2 << @common.dir_structure << @common.main3
a=%{ generated sisu_pgsql.cgi,
BASED ON ALREADY EXISTING directories that could potentially be used to populate postgresql db, (-D)
}
diff --git a/lib/sisu/v3/cgi_sql_common.rb b/lib/sisu/v3/cgi_sql_common.rb
index 1174be6e..0f56f77f 100644
--- a/lib/sisu/v3/cgi_sql_common.rb
+++ b/lib/sisu/v3/cgi_sql_common.rb
@@ -58,8 +58,9 @@
=end
module SiSU_CGI_sql
class SiSU_CGI_common
- def initialize(webserv,cmd,image_src,dir)
- @webserv,@cmd,@image_src,@env=webserv,cmd,image_src,dir
+ def initialize(webserv,opt,image_src,dir)
+ @webserv,@opt,@image_src,@env=webserv,opt,image_src,dir
+ @cmd=opt.cmd
end
def about
<<-'WOK_SQL'
@@ -829,45 +830,50 @@ module SiSU_CGI_sql
end
@hostpath="#{@hosturl_files}/#{@stub}"
@ln='en'
- def output_dir_structure
- def by_language_code?
- true
- end
- def by_filetype?
- false
- end
- def by_filename?
- false
- end
- self
+ WOK_SQL
+ end
+ def dir_structure
+ case @opt.dir_structure_by
+ when /language/
+ <<-'WOK_SQL'
+ def path_manifest(fn,ln=nil)
+ "#{@hostpath}/#{ln}/manifest/#{fn}.manifest.html"
end
+ def path_html_seg(fn,ln=nil)
+ "#{@hostpath}/#{ln}/html/#{fn}"
+ end
+ def path_html_doc(fn,ln=nil)
+ "#{@hostpath}/#{ln}/html/#{fn}.html"
+ end
+ WOK_SQL
+ when /filetype/
+ <<-'WOK_SQL'
def path_manifest(fn,ln=nil)
- if output_dir_structure.by_language_code?
- manifest_at="#{@hostpath}/#{ln}/manifest/#{fn}.manifest.html"
- elsif output_dir_structure.by_filetype?
- manifest_at="#{@hostpath}/manifest/#{fn}.manifest.html"
- elsif output_dir_structure.by_filename?
- manifest_at="#{@hostpath}/#{fn}/manifest.html"
- end
+ "#{@hostpath}/manifest/#{fn}.manifest.html"
end
def path_html_seg(fn,ln=nil)
- if output_dir_structure.by_language_code?
- html_at="#{@hostpath}/#{ln}/html/#{fn}"
- elsif output_dir_structure.by_filetype?
- html_at="#{@hostpath}/html/#{fn}"
- elsif output_dir_structure.by_filename?
- html_at="#{@hostpath}/#{fn}"
- end
+ "#{@hostpath}/html/#{fn}"
end
def path_html_doc(fn,ln=nil)
- if output_dir_structure.by_language_code?
- html_at="#{@hostpath}/#{ln}/html/#{fn}.html"
- elsif output_dir_structure.by_filetype?
- html_at="#{@hostpath}/html/#{fn}.html"
- elsif output_dir_structure.by_filename?
- html_at="#{@hostpath}/#{fn}/doc.html"
- end
+ "#{@hostpath}/html/#{fn}.html"
+ end
+ WOK_SQL
+ else
+ <<-'WOK_SQL'
+ def path_manifest(fn,ln=nil)
+ "#{@hostpath}/#{fn}/manifest.html"
+ end
+ def path_html_seg(fn,ln=nil)
+ "#{@hostpath}/#{fn}"
end
+ def path_html_doc(fn,ln=nil)
+ "#{@hostpath}/#{fn}/doc.html"
+ end
+ WOK_SQL
+ end
+ end
+ def main3
+ <<-'WOK_SQL'
#% text_objects_body
s_contents.each do |c| #% text body
location=c['src_filename'][/(.+?)\.(?:ssm\.sst|sst)$/,1]
diff --git a/lib/sisu/v3/cgi_sqlite.rb b/lib/sisu/v3/cgi_sqlite.rb
index 4a5838ab..92178b4e 100644
--- a/lib/sisu/v3/cgi_sqlite.rb
+++ b/lib/sisu/v3/cgi_sqlite.rb
@@ -65,8 +65,8 @@ module SiSU_CGI_sqlite
@opt,@webserv=opt,webserv
@env=SiSU_Env::Info_env.new('',opt)
@image_src="#{@env.url.webserv_cgi}/_sisu/image_sys"
- @common=SiSU_CGI_sql::SiSU_CGI_common.new(@webserv,@opt.cmd,@image_src,@env)
- @cgi_file_name="#{Db[:name_prefix_db]}sqlite.cgi"
+ @common=SiSU_CGI_sql::SiSU_CGI_common.new(@webserv,@opt,@image_src,@env)
+ @cgi_file_name="#{Db[:name_prefix_db]}by_#{opt.dir_structure_by}_sqlite.cgi"
end
def sqlite
serve=[]
@@ -97,7 +97,7 @@ module SiSU_CGI_sqlite
f3 << %{ else '#{@env.path.webserv}/#{serve[0]}/sisu_sqlite.db'\n end\n}
if FileTest.writable?('.')
output=File.open(@cgi_file_name,'w')
- output << header0 << header1 << header_desc << header2 << f1 << buttons1 << buttons2 << search_request << search_statement << search_statement_common << search_query1 << @common.pages << search_query2 << @common.tail << @common.main1 << f2 << f3 << dbi_connect << @common.main2
+ output << header0 << header1 << header_desc << header2 << f1 << buttons1 << buttons2 << search_request << search_statement << search_statement_common << search_query1 << @common.pages << search_query2 << @common.tail << @common.main1 << f2 << f3 << dbi_connect << @common.main2 << @common.dir_structure << @common.main3
a=%{ generated sisu_sqlite.cgi,
BASED ON ALREADY CREATED sisu_sqlite.db OUTPUT, (-d)
}
diff --git a/lib/sisu/v3/concordance.rb b/lib/sisu/v3/concordance.rb
index d97c7786..72031419 100644
--- a/lib/sisu/v3/concordance.rb
+++ b/lib/sisu/v3/concordance.rb
@@ -77,7 +77,7 @@ module SiSU_Concordance
@env,@md=@particulars.env,@particulars.md
loc=@env.url.output_tell
unless @md.opt.cmd =~/q/
- tool=(@md.opt.cmd =~/[MVv]/) ? "#{@env.program.web_browser} #{@md.file.output_path.html_concordance}/#{@md.file.base_filename.html_concordance}" : @md.fns
+ tool=(@md.opt.cmd =~/[MVv]/) ? "#{@env.program.web_browser} #{@md.file.output_path.html_concordance.dir}/#{@md.file.base_filename.html_concordance}" : @md.fns
@md.opt.cmd=~/[MVvz]/ \
? SiSU_Screen::Ansi.new(@md.opt.cmd,"Concordance",tool).grey_title_hi \
: SiSU_Screen::Ansi.new(@md.opt.cmd,'Concordance',tool).green_title_hi
@@ -202,8 +202,8 @@ WOK
end
def songsheet
begin
- mkdir_p(@file.output_path.html_concordance) unless FileTest.directory?(@file.output_path.html_concordance)
- @file_concordance=File.open(@file.place_file.html_concordance,'w')
+ mkdir_p(@file.output_path.html_concordance.dir) unless FileTest.directory?(@file.output_path.html_concordance.dir)
+ @file_concordance=File.open(@file.place_file.html_concordance.dir,'w')
map_para
rescue; SiSU_Errors::Info_error.new($!,$@,@md.opt.cmd,@md.fns).error
ensure
@@ -337,7 +337,7 @@ WOK
end
credits=@vz.credits_sisu
@file_concordance << %{</div></body>\n</html>} # footer
- SiSU_Screen::Ansi.new(@opt.cmd,@md.fns,"#{@md.file.output_path.html_concordance}/#{@md.file.base_filename.html_concordance}").flow if @md.opt.cmd =~/[MV]/
+ SiSU_Screen::Ansi.new(@opt.cmd,@md.fns,"#{@md.file.output_path.html_concordance.dir}/#{@md.file.base_filename.html_concordance}").flow if @md.opt.cmd =~/[MV]/
end
end
end
diff --git a/lib/sisu/v3/dal_expand_insertions.rb b/lib/sisu/v3/dal_expand_insertions.rb
index 0f925bc0..e6b586aa 100644
--- a/lib/sisu/v3/dal_expand_insertions.rb
+++ b/lib/sisu/v3/dal_expand_insertions.rb
@@ -131,58 +131,41 @@ module SiSU_insertions
output_filetypes=output_filetypes_in_cmd(cmd,source)
output_filetypes[:gen].each do |o_f|
describe = case o_f
- when /sisu_manifest.html/; '~^ document manifest'
- when /toc.html/; ' html, segmented text'
- when /doc.html/; ' html, scroll, document in one'
- when /\.epub/; ' epub'
- when /landscape.pdf/; ' pdf, landscape'
- when /portrait.pdf/; ' pdf, portrait'
- when /opendocument.odt/; ' odf:odt, open document text'
- when /scroll.xhtml/; ' xhtml scroll'
- when /sax.xml/; ' xml, sax'
- when /dom.xml/; ' xml, dom'
- when /plain.txt/; ' plain text utf-8'
- #when /manpage.1/; ' man, 1'
- when /wiki.txt/; ' wiki text'
- when /concordance.html/; ' concordance'
- when /digest.txt/; ' dcc, document content certificate (digests)'
+ when /sisu_manifest.html/; "~^ { document manifest }#{@md.file.output_path.manifest.url}/#{@md.file.base_filename.manifest}"
+ when /toc.html/; " { html, segmented text }#{@md.file.output_path.html_seg.url}/#{@md.file.base_filename.html_segtoc}"
+ when /doc.html/; " { html, scroll, document in one }#{@md.file.output_path.html_scroll.url}/#{@md.file.base_filename.html_scroll}"
+ when /\.epub/; " { epub }#{@md.file.output_path.epub.url}/#{@md.file.base_filename.epub}"
+ when /landscape.pdf/; " { pdf, landscape }#{@md.file.output_path.pdf.url}/#{@md.file.base_filename.pdf_l_a4}" #chose a default pdf
+ when /portrait.pdf/; " { pdf, portrait }#{@md.file.output_path.pdf.url}/#{@md.file.base_filename.pdf_p_a4}" #chose a default pdf
+ when /opendocument.odt/; " { odf:odt, open document text }#{@md.file.output_path.odt.url}/#{@md.file.base_filename.odt}"
+ when /scroll.xhtml/; " { xhtml scroll }#{@md.file.output_path.xhtml.url}/#{@md.file.base_filename.xhtml}"
+ when /sax.xml/; " { xml, sax }#{@md.file.output_path.xml_sax.url}/#{@md.file.base_filename.xml_sax}"
+ when /dom.xml/; " { xml, dom }#{@md.file.output_path.xml_dom.url}/#{@md.file.base_filename.xml_dom}"
+ when /plain.txt/; " { plain text utf-8 }#{@md.file.output_path.txt.url}/#{@md.file.base_filename.txt}"
+ #when /manpage.1/; " man, 1"
+ when /concordance.html/; " { concordance }#{@md.file.output_path.html_concordance.url}/#{@md.file.base_filename.html_concordance}"
+ when /digest.txt/; " { dcc, document content certificate (digests) }#{@md.file.output_path.hash_digest.url}/#{@md.file.base_filename.hash_digest}"
else nil
end
if describe
tuned_file_tmp << if @u.remote #to double space <:br> at beginning of entry
- if describe =~/epub/
- "#{Mx[:nbsp]*4} { #{describe} }#{@u.remote}/epub/#{url_dir}#{o_f} "
- elsif describe =~/^~\^ /
- "#{Mx[:nbsp]*4} {#{describe} }#{@u.remote}/#{url_dir}/#{o_f} "
- else "#{Mx[:nbsp]*4} { #{describe} }#{@u.remote}/#{url_dir}/#{o_f} "
- end
- else
- if describe =~/epub/
- "#{Mx[:nbsp]*4} { #{describe} }../epub/#{url_dir}#{o_f} "
- elsif describe =~/^~\^ /
- "#{Mx[:nbsp]*4} {#{describe} }../#{url_dir}/#{o_f} "
- else "#{Mx[:nbsp]*4} { #{describe} }../#{url_dir}/#{o_f} "
- end
+ "#{Mx[:nbsp]*4} #{describe} "
+ else # remove ...
+ "[provide document placement host location]"
end
end
end
output_filetypes[:src].each do |o_f|
describe=case o_f
- when /#{source}\.zip/; ' markup source (zipped) pod'
- when /#{source}/; ' markup source text'
+ when /#{source}\.zip/; " { markup source (zipped) pod }#{@md.file.output_path.sisupod.url}/#{@md.file.base_filename.sisupod}"
+ when /#{source}/; " { markup source text }#{@md.file.output_path.src.url}/#{@md.file.base_filename.src}"
else nil
end
if describe
tuned_file_tmp << if @u.remote
- x=if describe =~/zip/
- "#{Mx[:nbsp]*4} {#{describe} }#{@u.src_pod}/#{o_f} "
- else "#{Mx[:nbsp]*4} {#{describe} }#{@u.src_txt}/#{o_f} "
- end
+ "#{Mx[:nbsp]*4} #{describe} "
else
- x=if describe =~/zip/
- "#{Mx[:nbsp]*4} { #{describe} }../pod/#{o_f} "
- else "#{Mx[:nbsp]*4} { #{describe} }../zip/#{o_f} "
- end
+ "[provide document placement host location]"
end
end
end
diff --git a/lib/sisu/v3/digests.rb b/lib/sisu/v3/digests.rb
index e7b303ba..8f89bbe3 100644
--- a/lib/sisu/v3/digests.rb
+++ b/lib/sisu/v3/digests.rb
@@ -76,12 +76,12 @@ module SiSU_Digest_view
@env,@md,@dal_array=@particulars.env,@particulars.md,@particulars.dal_array
unless @opt.cmd =~/q/
tool=(@opt.cmd =~/[MVv]/) \
- ? "#{@env.program.text_editor} file://#{@md.file.output_path.hash_digest}/#{@md.file.base_filename.hash_digest}" \
+ ? "#{@env.program.text_editor} file://#{@md.file.output_path.hash_digest.dir}/#{@md.file.base_filename.hash_digest}" \
: @opt.fns
@opt.cmd=~/[MVvz]/ \
? SiSU_Screen::Ansi.new(@opt.cmd,"Document #{@dg} Digests",tool).green_hi_blue \
: SiSU_Screen::Ansi.new(@opt.cmd,"Document #{@dg} Digests",tool).green_title_hi
- SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"file://#{@md.file.output_path.hash_digest}/#{@md.file.base_filename.hash_digest}").flow if @opt.cmd =~/[MV]/
+ SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"file://#{@md.file.output_path.hash_digest.dir}/#{@md.file.base_filename.hash_digest}").flow if @opt.cmd =~/[MV]/
end
SiSU_Digest_view::Source::Scroll.new(@particulars).songsheet
SiSU_Env::Info_skin.new(@md).select
diff --git a/lib/sisu/v3/embedded.rb b/lib/sisu/v3/embedded.rb
index f60ed85f..f6049cec 100644
--- a/lib/sisu/v3/embedded.rb
+++ b/lib/sisu/v3/embedded.rb
@@ -69,6 +69,7 @@ module SiSU_Embedded
@md=SiSU_Param::Parameters.new(@opt).get
@env=SiSU_Env::Info_env.new(@md.fns)
@rhost=SiSU_Env::Info_remote.new(@opt).remote_host_base
+ @base_src_dir=@opt.f_pth[:pth].sub(/\/#{@opt.f_pth[:lng]}$/,'')
end
def read
songsheet
@@ -83,7 +84,7 @@ module SiSU_Embedded
end
end
def images
- src="#{Dir.pwd}/_sisu/image"
+ src="#{@base_src_dir}/_sisu/image"
ldest="#{@env.path.webserv}/#{@env.path.stub_pwd}/_sisu/image"
@rhost.each do |remote_conn|
rdest="#{remote_conn[:name]}/#{@env.path.stub_pwd}/_sisu/image"
@@ -102,7 +103,7 @@ module SiSU_Embedded
end
def audio
#p @md.ec[:audio]
- src="#{Dir.pwd}/_sisu/mm/audio"
+ src="#{@base_src_dir}/_sisu/mm/audio"
ldest="#{@env.path.webserv}/#{@env.path.stub_pwd}/_sisu/mm/audio"
@rhost.each do |remote_conn|
rdest="#{remote_conn[:name]}/#{@env.path.stub_pwd}/_sisu/mm/audio"
@@ -119,7 +120,7 @@ module SiSU_Embedded
end
def multimedia
#p @md.ec[:multimedia]
- src="#{Dir.pwd}/_sisu/mm/video"
+ src="#{@base_src_dir}/_sisu/mm/video"
ldest="#{@env.path.webserv}/#{@env.path.stub_pwd}/_sisu/mm/video"
@rhost.each do |remote_conn|
rdest="#{remote_conn[:name]}/#{@env.path.stub_pwd}/_sisu/mm/video"
diff --git a/lib/sisu/v3/epub.rb b/lib/sisu/v3/epub.rb
index 8b2b2d1d..422c1e68 100644
--- a/lib/sisu/v3/epub.rb
+++ b/lib/sisu/v3/epub.rb
@@ -85,13 +85,13 @@ module SiSU_EPUB
@env=@particulars.env
loc=@env.path.url.output_tell
unless @opt.cmd =~/q/
- tool=if @opt.cmd =~/[MVvz]/; "#{@env.program.epub_viewer} #{@md.file.output_path.epub}/#{@md.file.base_filename.epub}"
+ tool=if @opt.cmd =~/[MVvz]/; "#{@env.program.epub_viewer} #{@md.file.output_path.epub.dir}/#{@md.file.base_filename.epub}"
else @opt.fns
end
@opt.cmd=~/[MVvz]/ \
? SiSU_Screen::Ansi.new(@opt.cmd,'EPUB',tool).green_hi_blue \
: SiSU_Screen::Ansi.new(@opt.cmd,'EPUB',tool).green_title_hi
- SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@md.file.output_path.epub}/#{@md.file.base_filename.epub}").flow if @opt.cmd =~/[MV]/
+ SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@md.file.output_path.epub.dir}/#{@md.file.base_filename.epub}").flow if @opt.cmd =~/[MV]/
end
@env.processing_path.epub_bld #(@md)
@env.processing_path.epub_cp_images(@md)
@@ -639,11 +639,11 @@ module SiSU_EPUB
SiSU_EPUB_Concordance::Source.new(@md.opt).read
end
def output_zip
- mkdir_p(@md.file.output_path.epub) unless FileTest.directory?(@md.file.output_path.epub)
+ mkdir_p(@md.file.output_path.epub.dir) unless FileTest.directory?(@md.file.output_path.epub.dir)
system("
cd #{@md.env.processing_path.epub}
zip -qXr9D #{@epub_doc} *
- mv #{@epub_doc} #{@md.file.place_file.epub}
+ mv #{@epub_doc} #{@md.file.place_file.epub.dir}
cd #{Dir.pwd}
")
unless @md.opt.cmd.inspect =~/M/
diff --git a/lib/sisu/v3/git.rb b/lib/sisu/v3/git.rb
index bef93bc3..45eb3f75 100644
--- a/lib/sisu/v3/git.rb
+++ b/lib/sisu/v3/git.rb
@@ -68,8 +68,8 @@ module SiSU_Git
@md=SiSU_Param::Parameters.new(@opt).get
@file=SiSU_Env::SiSU_file.new(@md)
l=SiSU_Env::Standardise_language.new(@md.opt.lng).language
- unless @md.i18n[0]==l[:c]
- p "using: #{@md.i18n[0]} (@make: :language:); filename #{@md.fns} filename language: #{l[:c]}, mismatch"
+ unless @opt.lng==l[:c] # @md.i18n[0]==l[:c]
+ p "using: #{@opt.lng} (@make: :language:); filename #{@md.fns} filename language: #{l[:c]}, mismatch"
end
if @env.output_dir_structure.multilingual?
m=/((.+?)(?:\~\w{2,3})?)\.((?:-|ssm\.)?sst|ssm)$/ #watch added match for sss
@@ -85,7 +85,7 @@ module SiSU_Git
# : SiSU_Screen::Ansi.new(@opt.cmd,'Git path',@git_path[:fnb]).green_title_hi
# SiSU_Screen::Ansi.new(@opt.cmd,"Git path","#{@opt.fns} -> #{@git_path[:fnb]}").warn if @opt.cmd =~/[MVv]/
#end
- lng=(@md.opt.f_pth[:lng]) ? (@md.opt.f_pth[:lng]) : (@md.i18n[0])
+ lng=(@md.opt.lng) ? (@md.opt.lng) : (@md.i18n[0])
@git_path={
fnb: git_path_fnb,
src: git_path_fnb + '/' + Gt[:src] + '/' + lng,
diff --git a/lib/sisu/v3/html.rb b/lib/sisu/v3/html.rb
index 5c044594..8d10b7da 100644
--- a/lib/sisu/v3/html.rb
+++ b/lib/sisu/v3/html.rb
@@ -87,13 +87,13 @@ module SiSU_HTML
@env=@particulars.env
loc=@env.url.output_tell
unless @opt.cmd =~/q/
- tool=if @opt.cmd =~/[MVvz]/; "#{@env.program.web_browser} file://#{@md.file.output_path.html_seg}/#{@md.file.base_filename.html_segtoc}"
+ tool=if @opt.cmd =~/[MVvz]/; "#{@env.program.web_browser} file://#{@md.file.output_path.html_seg.dir}/#{@md.file.base_filename.html_segtoc}"
else @opt.fns
end
@opt.cmd=~/[MVvz]/ \
? SiSU_Screen::Ansi.new(@opt.cmd,'HTML',tool).green_hi_blue \
: SiSU_Screen::Ansi.new(@opt.cmd,'HTML',tool).green_title_hi
- SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"file://#{@md.file.output_path.html_seg}/#{@md.file.base_filename.html_segtoc}").flow if @opt.cmd =~/[MV]/
+ SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"file://#{@md.file.output_path.html_seg.dir}/#{@md.file.base_filename.html_segtoc}").flow if @opt.cmd =~/[MV]/
end
SiSU_Env::Info_skin.new(@md).select
data=nil
diff --git a/lib/sisu/v3/html_segments.rb b/lib/sisu/v3/html_segments.rb
index 2ac89805..fb9b01cb 100644
--- a/lib/sisu/v3/html_segments.rb
+++ b/lib/sisu/v3/html_segments.rb
@@ -233,11 +233,11 @@ module SiSU_HTML_seg
dirout=SiSU_Env::Info_env.new(@md.fns)
dir_sisu=dirout.path.output
@file=SiSU_Env::SiSU_file.new(@md)
- unless FileTest.directory?(@file.output_path.html_seg)
- mkdir_p(@file.output_path.html_seg) if File.writable?("#{@file.output_path.base}/.")
+ unless FileTest.directory?(@file.output_path.html_seg.dir)
+ mkdir_p(@file.output_path.html_seg.dir) if File.writable?("#{@file.output_path.base.dir}/.")
end
Seg.new(@md).tail
- segfilename="#{@file.output_path.html_seg}/#{@md.fnl[:pre]}#{@@seg_name_html[tracking-1]}#{@md.fnl[:mid]}#{Sfx[:html]}#{@md.fnl[:post]}"
+ segfilename="#{@file.output_path.html_seg.dir}/#{@md.fnl[:pre]}#{@@seg_name_html[tracking-1]}#{@md.fnl[:mid]}#{Sfx[:html]}#{@md.fnl[:post]}"
output_seg_file=File.new(segfilename,'w') if @@seg_name_html[tracking-1]
minitoc=(@env.html_minitoc?) \
? @minitoc \
diff --git a/lib/sisu/v3/hub.rb b/lib/sisu/v3/hub.rb
index ed3aad1d..651276cd 100644
--- a/lib/sisu/v3/hub.rb
+++ b/lib/sisu/v3/hub.rb
@@ -141,7 +141,7 @@ module SiSU
# when /^source_kdissert$/; SiSU_Kdi_source::Source.new(@opt).read # -S share_src_kdissert.rb
when /^digests$/; SiSU_Digest_view::Source.new(@opt).read # -N digests.rb
when /^plaintext$/; SiSU_Plaintext::Source.new(@opt).read # -t -a plaintext.rb
-# when /^po4a$/; SiSU_po4a::Source.new(@opt).read # -P po4a.rb
+ when /^po4a$/; SiSU_po4a::Source.new(@opt).read # -P po4a.rb
#when /^wikispeak$/; SiSU_Wikispeak::Source.new(@opt).read # -g
when /^epub$/; SiSU_EPUB::Source.new(@opt).read # -e epub.rb
when /^odf$/; SiSU_ODF::Source.new(@opt).read # -o odf.rb
diff --git a/lib/sisu/v3/manifest.rb b/lib/sisu/v3/manifest.rb
index 4373ad26..90f8df55 100644
--- a/lib/sisu/v3/manifest.rb
+++ b/lib/sisu/v3/manifest.rb
@@ -84,7 +84,7 @@ module SiSU_Manifest
browser=@env.program.console_web_browser
# webserv_url=@env.path.url.output_tell #fix in sysenv
unless @opt.cmd =~/q/
- url_html="file://#{@md.file.output_path.manifest}/#{@md.file.base_filename.manifest}"
+ url_html="file://#{@md.file.output_path.manifest.dir}/#{@md.file.base_filename.manifest}"
@opt.cmd=~/[MVvz]/ \
? SiSU_Screen::Ansi.new(@opt.cmd,'Manifest',"#{xbrowser} #{url_html}").green_hi_blue \
: SiSU_Screen::Ansi.new(@opt.cmd,'Manifest',@opt.fns).green_title_hi
@@ -105,7 +105,7 @@ module SiSU_Manifest
@env=SiSU_Env::Info_env.new(@md.fns)
@fnb=@md.fnb
@base_url="#{@env.url.root}/#{@fnb}"
- @base_path=@md.file.output_path.manifest
+ @base_path=@md.file.output_path.manifest.dir
@@dg ||=SiSU_Env::Info_env.new.digest.type
@dg=@@dg
l=SiSU_Env::Standardise_language.new(@md.opt.lng).language
@@ -121,17 +121,17 @@ module SiSU_Manifest
manifest << x
end
end
- def summarize(id,file,pth='',img='● ')
+ def summarize(id,file,pth='',url='',img='● ')
size=(File.size("#{pth}/#{file}")/1024.00).to_s
kb=/([0-9]+\.[0-9]{0,1})/m.match(size)[1]
@manifest[:txt] << "#{file} #{id} #{kb}\n"
- @manifest[:html] << %{<tr><th class="left"><p class="norm"><a href="#{pth}/#{file}">#{img}#{id}</a></p></th><td><p class="small"><a href="#{pth}/#{file}">#{file}</a></p><p class="tiny">#{@brace_url.xml_open}<a href="#{@base_url}/#{file}">#{@base_url}/#{file}</a>#{@brace_url.xml_close}</p></td><td class="right"><p class="right">#{kb}</p></td></tr>\n}
+ @manifest[:html] << %{<tr><th class="left"><p class="norm"><a href="#{pth}/#{file}">#{img}#{id}</a></p></th><td><p class="small"><a href="#{pth}/#{file}">#{file}</a></p><p class="tiny">#{@brace_url.xml_open}<a href="#{url}/#{file}">#{url}/#{file}</a>#{@brace_url.xml_close}</p></td><td class="right"><p class="right">#{kb}</p></td></tr>\n}
end
- def summarize_html_seg(id,file,pth='',img='● ')
+ def summarize_html_seg(id,file,pth='',url='',img='● ')
size=(File.size("#{pth}/#{file}")/1024.00).to_s
kb=/([0-9]+\.[0-9]{0,1})/m.match(size)[1]
@manifest[:txt] << "#{file} #{id} #{kb}\n"
- @manifest[:html] << %{<tr><th class="left"><p class="norm"><a href="#{pth}/#{file}">#{img}#{id}</a></p></th><td><p class="small"><a href="#{pth}/#{file}">#{file}</a></p><p class="tiny">#{@brace_url.xml_open}<a href="#{@base_url}/#{file}">#{@base_url}/#{file}</a>#{@brace_url.xml_close}</p></td><td class="right"><p class="right">#{kb}</p></td></tr>\n}
+ @manifest[:html] << %{<tr><th class="left"><p class="norm"><a href="#{pth}/#{file}">#{img}#{id}</a></p></th><td><p class="small"><a href="#{pth}/#{file}">#{file}</a></p><p class="tiny">#{@brace_url.xml_open}<a href="#{url}/#{file}">#{url}/#{file}</a>#{@brace_url.xml_close}</p></td><td class="right"><p class="right">#{kb}</p></td></tr>\n}
end
def summarize_sources(id,file,pth,url)
sys=SiSU_Env::System_call.new
@@ -175,143 +175,163 @@ module SiSU_Manifest
@manifest[:html] << %{<tr><th class="right" width=5%><p class="norm">●</p></th><td class="left"><p class="norm"><a href="#{url}">#{lnk}</a></p><p class="tiny">&nbsp;&nbsp;#{@brace_url.xml_open}<a href="#{static}">#{static}</a>#{@brace_url.xml_close}</p></td></tr>\n}
end
def output_tests
- if FileTest.file?(@md.file.place_file.html_segtoc)==true
+ if FileTest.file?(@md.file.place_file.html_segtoc.dir)==true
img=%{<img border="0" height="18" width="15" src="#{@md.file.path_rel_links.html_scroll_2}_sisu/image_sys/b_toc.png" alt="TOC linked" /> }
- pth=@md.file.output_path.html_seg
+ pth=@md.file.output_path.html_seg.dir
+ url=@md.file.output_path.html_seg.url
id,file='HTML, table of contents (for segmented text)',@md.file.base_filename.html_segtoc
- summarize_html_seg(id,file,pth,img)
+ summarize_html_seg(id,file,pth,url,img)
end
- if FileTest.file?(@md.file.place_file.html_scroll)==true
+ if FileTest.file?(@md.file.place_file.html_scroll.dir)==true
img=%{<img border="0" height="15" width="15" src="#{@md.file.path_rel_links.html_scroll_2}_sisu/image_sys/b_doc.png" alt="Full Text" /> }
- pth=@md.file.output_path.html_scroll
+ pth=@md.file.output_path.html_scroll.dir
+ url=@md.file.output_path.html_scroll.url
id,file='HTML, full length document',@md.file.base_filename.html_scroll
- summarize(id,file,pth,img)
+ summarize(id,file,pth,url,img)
end
- if FileTest.file?(@md.file.place_file.html_book_index)==true
- pth=@md.file.output_path.html_seg
+ if FileTest.file?(@md.file.place_file.html_book_index.dir)==true
+ pth=@md.file.output_path.html_seg.dir
+ url=@md.file.output_path.html_seg.url
id,file='HTML, (book type) index',@md.file.base_filename.html_book_index
- summarize(id,file,pth)
+ summarize(id,file,pth,url)
end
- if FileTest.file?(@md.file.place_file.html_concordance)==true
- pth=@md.file.output_path.html_seg
+ if FileTest.file?(@md.file.place_file.html_concordance.dir)==true
+ pth=@md.file.output_path.html_seg.dir
+ url=@md.file.output_path.html_seg.url
id,file='HTML, concordance file',@md.file.base_filename.html_concordance
- summarize(id,file,pth)
+ summarize(id,file,pth,url)
end
- if FileTest.file?(@md.file.place_file.epub)==true
+ if FileTest.file?(@md.file.place_file.epub.dir)==true
img=%{<img border="0" height="18" width="18" src="#{@md.file.path_rel_links.html_scroll_2}_sisu/image_sys/b_epub.png" alt="EPUB" /> }
id,file='EPUB (Electronic Publication, e-book standard)',@md.file.base_filename.epub
- pth=@md.file.output_path.epub
- summarize(id,file,pth,img)
+ pth=@md.file.output_path.epub.dir
+ url=@md.file.output_path.epub.url
+ summarize(id,file,pth,url,img)
end
- if FileTest.file?("#{@md.file.output_path.pdf}/#{@md.file.base_filename.pdf_p_letter}")==true
+ if FileTest.file?("#{@md.file.output_path.pdf.dir}/#{@md.file.base_filename.pdf_p_letter}")==true
img=%{<img border="0" height="18" width="15" src="#{@md.file.path_rel_links.html_scroll_2}_sisu/image_sys/b_pdf.png" alt="PDF portrait" /> }
- pth=@md.file.output_path.pdf
+ pth=@md.file.output_path.pdf.dir
+ url=@md.file.output_path.pdf.url
id,file="PDF, U.S. letter size, portrait/vertical document (recommended for printing)","#{@md.file.base_filename.pdf_p_letter}"
- summarize(id,file,pth,img)
+ summarize(id,file,pth,url,img)
end
- if FileTest.file?("#{@md.file.output_path.pdf}/#{@md.file.base_filename.pdf_l_letter}")==true
+ if FileTest.file?("#{@md.file.output_path.pdf.dir}/#{@md.file.base_filename.pdf_l_letter}")==true
img=%{<img border="0" height="15" width="18" src="#{@md.file.path_rel_links.html_scroll_2}_sisu/image_sys/b_pdf.png" alt="PDF landscape" /> }
- pth=@md.file.output_path.pdf
+ pth=@md.file.output_path.pdf.dir
+ url=@md.file.output_path.pdf.url
id,file="PDF, U.S. letter size, landscape/horizontal document (recommended for screen viewing)","#{@md.file.base_filename.pdf_l_letter}"
- summarize(id,file,pth,img)
+ summarize(id,file,pth,url,img)
end
- if FileTest.file?("#{@md.file.output_path.pdf}/#{@md.file.base_filename.pdf_p_a4}")==true
+ if FileTest.file?("#{@md.file.output_path.pdf.dir}/#{@md.file.base_filename.pdf_p_a4}")==true
img=%{<img border="0" height="18" width="15" src="#{@md.file.path_rel_links.html_scroll_2}_sisu/image_sys/b_pdf.png" alt="PDF portrait" /> }
- pth=@md.file.output_path.pdf
+ pth=@md.file.output_path.pdf.dir
+ url=@md.file.output_path.pdf.url
id,file="PDF, A4 size, portrait/vertical document (recommended for printing)","#{@md.file.base_filename.pdf_p_a4}"
- summarize(id,file,pth,img)
+ summarize(id,file,pth,url,img)
end
- if FileTest.file?("#{@md.file.output_path.pdf}/#{@md.file.base_filename.pdf_l_a4}")==true
+ if FileTest.file?("#{@md.file.output_path.pdf.dir}/#{@md.file.base_filename.pdf_l_a4}")==true
img=%{<img border="0" height="15" width="18" src="#{@md.file.path_rel_links.html_scroll_2}_sisu/image_sys/b_pdf.png" alt="PDF landscape" /> }
- pth=@md.file.output_path.pdf
+ pth=@md.file.output_path.pdf.dir
+ url=@md.file.output_path.pdf.url
id,file="PDF, A4 size, landscape/horizontal document (recommended for screen viewing)","#{@md.file.base_filename.pdf_l_a4}"
- summarize(id,file,pth,img)
+ summarize(id,file,pth,url,img)
end
- if FileTest.file?("#{@md.file.output_path.pdf}/#{@md.file.base_filename.pdf_p_a5}")==true
+ if FileTest.file?("#{@md.file.output_path.pdf.dir}/#{@md.file.base_filename.pdf_p_a5}")==true
img=%{<img border="0" height="18" width="15" src="#{@md.file.path_rel_links.html_scroll_2}_sisu/image_sys/b_pdf.png" alt="PDF portrait" /> }
- pth=@md.file.output_path.pdf
+ pth=@md.file.output_path.pdf.dir
+ url=@md.file.output_path.pdf.url
id,file="PDF, A5 (book) size, portrait/vertical document (recommended for printing)","#{@md.file.base_filename.pdf_p_a5}"
- summarize(id,file,pth,img)
+ summarize(id,file,pth,url,img)
end
- if FileTest.file?("#{@md.file.output_path.pdf}/#{@md.file.base_filename.pdf_l_a5}")==true
+ if FileTest.file?("#{@md.file.output_path.pdf.dir}/#{@md.file.base_filename.pdf_l_a5}")==true
img=%{<img border="0" height="15" width="18" src="#{@md.file.path_rel_links.html_scroll_2}_sisu/image_sys/b_pdf.png" alt="PDF landscape" /> }
- pth=@md.file.output_path.pdf
+ pth=@md.file.output_path.pdf.dir
+ url=@md.file.output_path.pdf.url
id,file="PDF, A5 (book) size, landscape/horizontal document (recommended for screen viewing)","#{@md.file.base_filename.pdf_l_a5}"
- summarize(id,file,pth,img)
+ summarize(id,file,pth,url,img)
end
- if FileTest.file?("#{@md.file.output_path.pdf}/#{@md.file.base_filename.pdf_p_b5}")==true
+ if FileTest.file?("#{@md.file.output_path.pdf.dir}/#{@md.file.base_filename.pdf_p_b5}")==true
img=%{<img border="0" height="18" width="15" src="#{@md.file.path_rel_links.html_scroll_2}_sisu/image_sys/b_pdf.png" alt="PDF portrait" /> }
- pth=@md.file.output_path.pdf
+ pth=@md.file.output_path.pdf.dir
+ url=@md.file.output_path.pdf.url
id,file="PDF, B5 (book) size, portrait/vertical document (recommended for printing)","#{@md.file.base_filename.pdf_p_b5}"
- summarize(id,file,pth,img)
+ summarize(id,file,pth,url,img)
end
- if FileTest.file?("#{@md.file.output_path.pdf}/#{@md.file.base_filename.pdf_l_b5}")==true
+ if FileTest.file?("#{@md.file.output_path.pdf.dir}/#{@md.file.base_filename.pdf_l_b5}")==true
img=%{<img border="0" height="15" width="18" src="#{@md.file.path_rel_links.html_scroll_2}_sisu/image_sys/b_pdf.png" alt="PDF landscape" /> }
- pth=@md.file.output_path.pdf
+ pth=@md.file.output_path.pdf.dir
+ url=@md.file.output_path.pdf.url
id,file="PDF, B5 (book) size, landscape/horizontal document (recommended for screen viewing)","#{@md.file.base_filename.pdf_l_b5}"
- summarize(id,file,pth,img)
+ summarize(id,file,pth,url,img)
end
- if FileTest.file?("#{@md.file.output_path.pdf}/#{@md.file.base_filename.pdf_p_legal}")==true
+ if FileTest.file?("#{@md.file.output_path.pdf.dir}/#{@md.file.base_filename.pdf_p_legal}")==true
img=%{<img border="0" height="18" width="15" src="#{@md.file.path_rel_links.html_scroll_2}_sisu/image_sys/b_pdf.png" alt="PDF portrait" /> }
- pth=@md.file.output_path.pdf
+ pth=@md.file.output_path.pdf.dir
+ url=@md.file.output_path.pdf.url
id,file="PDF, U.S. legal size, portrait/vertical document (recommended for printing)","#{@md.file.base_filename.pdf_p_legal}"
- summarize(id,file,pth,img)
+ summarize(id,file,pth,url,img)
end
- if FileTest.file?("#{@md.file.output_path.pdf}/#{@md.file.base_filename.pdf_l_legal}")==true
+ if FileTest.file?("#{@md.file.output_path.pdf.dir}/#{@md.file.base_filename.pdf_l_legal}")==true
img=%{<img border="0" height="15" width="18" src="#{@md.file.path_rel_links.html_scroll_2}_sisu/image_sys/b_pdf.png" alt="PDF landscape" /> }
- pth=@md.file.output_path.pdf
+ pth=@md.file.output_path.pdf.dir
+ url=@md.file.output_path.pdf.url
id,file="PDF, U.S. legal size, landscape/horizontal document (recommended for screen viewing)","#{@md.file.base_filename.pdf_l_legal}"
- summarize(id,file,pth,img)
+ summarize(id,file,pth,url,img)
end
- if FileTest.file?(@md.file.place_file.odt)==true
+ if FileTest.file?(@md.file.place_file.odt.dir)==true
img=%{<img border="0" height="18" width="18" src="#{@md.file.path_rel_links.html_scroll_2}_sisu/image_sys/b_odf.png" alt="ODF/ODT" /> }
- pth=@md.file.output_path.odt
+ pth=@md.file.output_path.odt.dir
+ url=@md.file.output_path.odf.url
id,file='ODF:ODT (Open Document Format)',@md.file.base_filename.odt
- summarize(id,file,pth,img)
+ summarize(id,file,pth,url,img)
end
- if FileTest.file?(@md.file.place_file.xhtml)==true
- pth=@md.file.output_path.xhtml
+ if FileTest.file?(@md.file.place_file.xhtml.dir)==true
+ pth=@md.file.output_path.xhtml.dir
+ url=@md.file.output_path.xhtml.url
+ id,file='ODF:ODT (Open Document Format)',@md.file.base_filename.odt
id,file='XHTML',@md.file.base_filename.xhtml
- summarize(id,file,pth)
+ summarize(id,file,pth,url)
end
- if FileTest.file?(@md.file.place_file.xml_sax)==true
- pth=@md.file.output_path.xml_sax
+ if FileTest.file?(@md.file.place_file.xml_sax.dir)==true
+ pth=@md.file.output_path.xml_sax.dir
+ url=@md.file.output_path.xml_sax.url
id,file='XML SAX',@md.file.base_filename.xml_sax
- summarize(id,file,pth)
+ summarize(id,file,pth,url)
end
- if FileTest.file?(@md.file.place_file.xml_dom)==true
- pth=@md.file.output_path.xml_dom
+ if FileTest.file?(@md.file.place_file.xml_dom.dir)==true
+ pth=@md.file.output_path.xml_dom.dir
+ url=@md.file.output_path.xml_dom.url
id,file='XML DOM',@md.file.base_filename.xml_dom
- summarize(id,file,pth)
+ summarize(id,file,pth,url)
end
- if FileTest.file?(@md.file.place_file.txt)==true
+ if FileTest.file?(@md.file.place_file.txt.dir)==true
if @md.opt.cmd =~/a/; id='Plaintext (Unix (UTF-8) with footnotes)'
elsif @md.opt.cmd =~/e/; id='Plaintext (Unix (UTF-8) with endnotes)'
elsif @md.opt.cmd =~/A/; id='Plaintext (dos (UTF-8) with footnotes)'
elsif @md.opt.cmd =~/E/; id='Plaintext (dos (UTF-8) with endnotes)'
else id='Plaintext (UTF-8)'
end
- pth=@md.file.output_path.txt
+ pth=@md.file.output_path.txt.dir
+ url=@md.file.output_path.txt.url
file=@md.file.base_filename.txt
- summarize(id,file,pth)
+ summarize(id,file,pth,url)
end
if FileTest.file?("#{@base_path}/#{@md.fns}.tex")==true
id,file='LaTeX (portrait)',"#{@md.fns}.tex"
- #pth=@base_path
- pth=''
- summarize(id,file,pth)
+ pth,url='',''
+ summarize(id,file,pth,url)
end
if FileTest.file?("#{@base_path}/#{@md.fns}.tex")==true
id,file='LaTeX (landscape)',"#{@md.fns}.landscape.tex"
- #pth=@base_path
- pth=''
- summarize(id,file,pth)
+ pth,url='',''
+ summarize(id,file,pth,url)
end
if FileTest.file?("#{@base_path}/#{@md.fn[:digest]}")==true
id,file="Digest/DCC - Document Content Certificate (#{@dg})",@md.fn[:digest]
pth=@base_path
+ url=''
#pth=''
- summarize(id,file,pth)
+ summarize(id,file,pth,url)
end
end
def published_versions
@@ -321,7 +341,7 @@ module SiSU_Manifest
end
end
def language_versions
- if FileTest.file?(@md.file.place_file.manifest)==true
+ if FileTest.file?(@md.file.place_file.manifest.dir)==true
id,file='Markup (SiSU source)',@md.fns
published_languages(id,file)
end
@@ -329,29 +349,29 @@ module SiSU_Manifest
def source_tests
if @md.fns =~/\.ssm\.sst$/ #% decide whether to extract and include requested/required documents
req=@md.fns
- if FileTest.file?(@md.file.place_file.src)==true
- pth=@md.file.output_path.src
- url=@env.url.src_txt
+ if FileTest.file?(@md.file.place_file.src.dir)==true
+ pth=@md.file.output_path.src.dir
+ url=@md.file.output_path.src.url
id,file='Markup Composite File (SiSU source)',@md.file.base_filename.src
- summarize_sources(id,file,pth,url,url)
+ summarize_sources(id,file,pth,url)
end
else
- if FileTest.file?(@md.file.place_file.src)==true
- pth=@md.file.output_path.src
- url=@env.url.src_txt
+ if FileTest.file?(@md.file.place_file.src.dir)==true
+ pth=@md.file.output_path.src.dir
+ url=@md.file.output_path.src.url
id,file='Markup (SiSU source)',@md.file.base_filename.src
summarize_sources(id,file,pth,url)
end
end
- if FileTest.file?(@md.file.place_file.sisupod)==true
- pth=@md.file.output_path.sisupod
- url=@env.url.src_pod
+ if FileTest.file?(@md.file.place_file.sisupod.dir)==true
+ pth=@md.file.output_path.sisupod.dir
+ url=@md.file.output_path.sisupod.url
id,file='SiSU doc (zip)',@md.file.base_filename.sisupod
summarize_sources(id,file,pth,url)
end
- if FileTest.file?(@md.file.place_file.pot)==true
- pth=@md.file.output_path.pot
- url=@env.url.pot
+ if FileTest.file?(@md.file.place_file.pot.dir)==true
+ pth=@md.file.output_path.pot.dir
+ url=@md.file.output_path.pot.url
id,file='SiSU pot',@md.file.base_filename.pot
summarize_sources(id,file,pth,url)
end
diff --git a/lib/sisu/v3/odf.rb b/lib/sisu/v3/odf.rb
index 81344d4c..a223600e 100644
--- a/lib/sisu/v3/odf.rb
+++ b/lib/sisu/v3/odf.rb
@@ -84,12 +84,12 @@ module SiSU_ODF
@env.odf_structure
unless @opt.cmd =~/q/
tool=(@opt.cmd =~/[MVv]/) \
- ? "#{@env.program.odf_viewer} file://#{@md.file.output_path.odt}/#{@md.file.base_filename.odt}" \
+ ? "#{@env.program.odf_viewer} file://#{@md.file.output_path.odt.dir}/#{@md.file.base_filename.odt}" \
: @opt.fns
@opt.cmd=~/[MVvz]/ \
? SiSU_Screen::Ansi.new(@opt.cmd,'Opendocument (ODF:ODT)',tool).green_hi_blue \
: SiSU_Screen::Ansi.new(@opt.cmd,'Opendocument (ODF:ODT)',tool).green_title_hi
- SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"file://#{@md.file.output_path.odt}/#{@md.file.base_filename.odt}").flow if @opt.cmd =~/[MV]/
+ SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"file://#{@md.file.output_path.odt.dir}/#{@md.file.base_filename.odt}").flow if @opt.cmd =~/[MV]/
end
SiSU_ODF::Source::Scroll.new(@particulars).songsheet
SiSU_Env::Info_skin.new(@md).select
@@ -699,7 +699,7 @@ module SiSU_ODF
env=SiSU_Env::SiSU_file.new(@md)
env.mkdir
env.make_path(@env.processing_path.odt)
- env.make_path(@md.file.output_path.odt)
+ env.make_path(@md.file.output_path.odt.dir)
filename="#{@env.processing_path.odt}/content.xml"
od=File.new(filename,'w+')
@content.each do |para| # this is a hack
@@ -707,11 +707,11 @@ module SiSU_ODF
end
od.close
opendoc=@md.fn[:odf]
- mkdir_p(@md.file.output_path.odt) unless FileTest.directory?(@md.file.output_path.odt)
+ mkdir_p(@md.file.output_path.odt.dir) unless FileTest.directory?(@md.file.output_path.odt.dir)
system("
cd #{@env.processing_path.odf}
zip -qr #{opendoc} *
- mv #{opendoc} #{@md.file.place_file.odt}
+ mv #{opendoc} #{@md.file.place_file.odt.dir}
cd #{Dir.pwd}
")
end
diff --git a/lib/sisu/v3/options.rb b/lib/sisu/v3/options.rb
index 110ebd85..aabbd946 100644
--- a/lib/sisu/v3/options.rb
+++ b/lib/sisu/v3/options.rb
@@ -61,44 +61,37 @@ module SiSU_commandline
require "pathname"
require_relative 'sysenv' # sysenv.rb
class Options
- attr_accessor :cmd,:mod,:act,:f_pths,:files,:paths,:lngs,:f_pth,:pth,:fns,:fnb,:fnc,:fncb,:lng,:what
+ attr_accessor :cmd,:mod,:act,:dir_structure_by,:f_pths,:files,:paths,:lngs,:f_pth,:pth,:fns,:fnb,:fnc,:fncb,:lng,:what
def initialize(a)
- @a=a
+ @x=a
@cmd,@f_pth,@pth,@fns,@fnb,@fnc,@fncb,@what,@lng='','','','','','','','','',''
@f_pths,@files,@paths,@mod,@act=Array.new(5){[]}
@env=SiSU_Env::Info_env.new
+ @dir_structure_by=SiSU_Env::Env_call.new.output_dir_structure.by?
r=Px[:lng_lst].join('|')
- #r.gsub!(/\|en\|/,'|')
+ r.gsub!(/\|en\|/,'|')
@lang_regx=%r{(?:#{r})}
- if a.inspect =~/"(?:-\S|--\S+?)"/ \
- and a.inspect =~/"#{@lang_regx}"/ \
- and a.inspect =~/"en\/\S+?\.ss[tm]"/
- init_po
+ @a=if a.inspect =~/"(?:-\S+?|--\S+?)"/ \
+ && a.inspect =~/"#{@lang_regx}\/?"/ \
+ && a.inspect =~/"en\/\S+?\.ss[tm]"/
+ init_selected_lang_dirs(a)
+ else @x
end
+ @a.freeze
init
end
- def init_po
- a=@a
- if a.inspect =~/"(?:-\S|--\S+?)"/ \
- and a.inspect =~/"#{@lang_regx}"/ \
- and a.inspect =~/"en\/\S+?\.ss[tm]"/
- x,z=[],[]
- l=nil
- a.each do |y|
- if y =~/^(?:-\S|--\S+?)$/
- x << y
- elsif y =~/^en\/(\S+?\.ss[tm])$/
- l=$1
- x << y
- elsif y =~/^#{@lang_regx}$/
- z = x.dup
- z << y + '/' + l
- SiSU_commandline::Options.new(z)
- z=[]
- end
+ def init_selected_lang_dirs(a)
+ @z=[]
+ a.each do |y|
+ if y =~/^en\/(\S+?\.ss[tm])$/
+ @fn=$1
+ @z << y
+ elsif y =~/^#{@lang_regx}\/?$/
+ @z << "#{y}/#{@fn}"
+ else @z << y
end
end
- self
+ @z
end
def init
a=@a
@@ -413,7 +406,8 @@ module SiSU_commandline
true
else false
end
- act[:po4a]=if mod.inspect =~/"--po4a"|"--po"/
+ act[:po4a]=if cmd =~/P/ \
+ or mod.inspect =~/"--po4a"|"--pot?"/
true
else false
end
diff --git a/lib/sisu/v3/param.rb b/lib/sisu/v3/param.rb
index 87a556ec..5d93523e 100644
--- a/lib/sisu/v3/param.rb
+++ b/lib/sisu/v3/param.rb
@@ -79,8 +79,9 @@ module SiSU_Param
@opt=opt
@cX||=SiSU_Screen::Ansi.new(opt.cmd)
@cmd,@mod=opt.cmd,opt.mod
- unless @opt.cmd =~/P/
- @fns=opt.fns.gsub(/\.ssm$/,'.ssm.sst') #revisit CHECK
+ @fns=if @opt.cmd =~/P/ #revisit CHECK
+ opt.fns
+ else opt.fns.gsub(/\.ssm$/,'.ssm.sst')
end
Instantiate.new.param_instantiate
@env=SiSU_Env::Info_env.new(@fns)
@@ -258,12 +259,16 @@ module SiSU_Param
validate_length(s,l,n)
end
def short
- s=(@h['short'] ? @h['short'] : @h['main'])
+ s=@h['short'] \
+ ? @h['short'] \
+ : @h['main']
l,n=Db[:col_title_part],'title.short'
validate_length(s,l,n)
end
def full
- s=(@h['subtitle'] ? (@h['main'] + ' - ' + @h['subtitle']) : @h['main'])
+ s=@h['subtitle'] \
+ ? (@h['main'] + ' - ' + @h['subtitle']) \
+ : @h['main']
l,n=Db[:col_title],'title.full'
validate_length(s,l,n)
end
@@ -290,13 +295,19 @@ module SiSU_Param
validate_length(s,l,n)
end
def author_detail
- s=(@h['author'] ? @h['author'] : @h['main'])
+ s=@h['author'] \
+ ? @h['author'] \
+ : @h['main']
names=name_format(s)
names[:name_a_h]
end
def contributor
- names=(@h['contributor'] ? name_format(@h['contributor']) : nil)
- s=(names.class==Hash) ? names[:name_str] : nil
+ names=@h['contributor'] \
+ ? name_format(@h['contributor']) \
+ : nil
+ s=(names.class==Hash) \
+ ? names[:name_str] \
+ : nil
s=if s
l,n=Db[:col_name],'creator.author'
validate_length(s,l,n)
@@ -304,12 +315,20 @@ module SiSU_Param
end
end
def contributor_detail
- names=(@h['contributor'] ? name_format(@h['contributor']) : nil)
- (names.class==Hash) ? names[:name_a_h] : nil
+ names=@h['contributor'] \
+ ? name_format(@h['contributor']) \
+ : nil
+ (names.class==Hash) \
+ ? names[:name_a_h] \
+ : nil
end
def illustrator
- names=(@h['illustrator'] ? name_format(@h['illustrator']) : nil)
- s=(names.class==Hash) ? names[:name_str] : nil
+ names=@h['illustrator'] \
+ ? name_format(@h['illustrator']) \
+ : nil
+ s=(names.class==Hash) \
+ ? names[:name_str] \
+ : nil
s=if s
l,n=Db[:col_name],'creator.illustrator'
validate_length(s,l,n)
@@ -317,12 +336,20 @@ module SiSU_Param
end
end
def illustrator_detail
- names=(@h['illustrator'] ? name_format(@h['illustrator']) : nil)
- (names.class==Hash) ? names[:name_a_h] : nil
+ names=@h['illustrator'] \
+ ? name_format(@h['illustrator']) \
+ : nil
+ (names.class==Hash) \
+ ? names[:name_a_h] \
+ : nil
end
def photographer
- names=(@h['photographer'] ? name_format(@h['photographer']) : nil)
- s=(names.class==Hash) ? names[:name_str] : nil
+ names=@h['photographer'] \
+ ? name_format(@h['photographer']) \
+ : nil
+ s=(names.class==Hash) \
+ ? names[:name_str] \
+ : nil
s=if s
l,n=Db[:col_name],'creator.photographer'
validate_length(s,l,n)
@@ -330,12 +357,20 @@ module SiSU_Param
end
end
def photographer_detail
- names=(@h['photographer'] ? name_format(@h['photographer']) : nil)
- (names.class==Hash) ? names[:name_a_h] : nil
+ names=@h['photographer'] \
+ ? name_format(@h['photographer']) \
+ : nil
+ (names.class==Hash) \
+ ? names[:name_a_h] \
+ : nil
end
def translator
- names=(@h['translator'] ? name_format(@h['translator']) : nil)
- s=(names.class==Hash) ? names[:name_str] : nil
+ names=@h['translator'] \
+ ? name_format(@h['translator']) \
+ : nil
+ s=(names.class==Hash) \
+ ? names[:name_str] \
+ : nil
s=if s
l,n=Db[:col_name],'creator.translator'
validate_length(s,l,n)
@@ -343,12 +378,20 @@ module SiSU_Param
end
end
def translator_detail
- names=(@h['translator'] ? name_format(@h['translator']) : nil)
- (names.class==Hash) ? names[:name_a_h] : nil
+ names=@h['translator'] \
+ ? name_format(@h['translator']) \
+ : nil
+ (names.class==Hash) \
+ ? names[:name_a_h] \
+ : nil
end
def audio
- names=(@h['audio'] ? name_format(@h['audio']) : nil)
- s=(names.class==Hash) ? names[:name_str] : nil
+ names=@h['audio'] \
+ ? name_format(@h['audio']) \
+ : nil
+ s=(names.class==Hash) \
+ ? names[:name_str] \
+ : nil
s=if s
l,n=Db[:col_name],'creator.audio'
validate_length(s,l,n)
@@ -356,12 +399,20 @@ module SiSU_Param
end
end
def audio_detail
- names=(@h['audio'] ? name_format(@h['audio']) : nil)
- (names.class==Hash) ? names[:name_a_h] : nil
+ names=@h['audio'] \
+ ? name_format(@h['audio']) \
+ : nil
+ (names.class==Hash) \
+ ? names[:name_a_h] \
+ : nil
end
def digitized_by
- names=(@h['digitized_by'] ? name_format(@h['digitized_by']) : nil)
- s=(names.class==Hash) ? names[:name_str] : nil
+ names=@h['digitized_by'] \
+ ? name_format(@h['digitized_by']) \
+ : nil
+ s=(names.class==Hash) \
+ ? names[:name_str] \
+ : nil
s=if s
l,n=Db[:col_name],'creator.digitized_by'
validate_length(s,l,n)
@@ -369,12 +420,20 @@ module SiSU_Param
end
end
def digitized_by_detail
- names=(@h['digitized_by'] ? name_format(@h['digitized_by']) : nil)
- (names.class==Hash) ? names[:name_a_h] : nil
+ names=@h['digitized_by'] \
+ ? name_format(@h['digitized_by']) \
+ : nil
+ (names.class==Hash) \
+ ? names[:name_a_h] \
+ : nil
end
def prepared_by
- names=(@h['prepared_by'] ? name_format(@h['prepared_by']) : nil)
- s=(names.class==Hash) ? names[:name_str] : nil
+ names=@h['prepared_by'] \
+ ? name_format(@h['prepared_by']) \
+ : nil
+ s=(names.class==Hash) \
+ ? names[:name_str] \
+ : nil
s=if s
l,n=Db[:col_name],'creator.prepared_by'
validate_length(s,l,n)
@@ -382,9 +441,13 @@ module SiSU_Param
end
end
def prepared_by_detail
- names=(@h['prepared_by'] ? name_format(@h['prepared_by']) : nil)
+ names=@h['prepared_by'] \
+ ? name_format(@h['prepared_by']) \
+ : nil
names=name_format(@h['prepared_by'])
- (names.class==Hash) ? names[:name_a_h] : nil
+ (names.class==Hash) \
+ ? names[:name_a_h] \
+ : nil
end
self
end
@@ -407,34 +470,46 @@ module SiSU_Param
validate_length(s,l,n)
end
def translation
- s=(@h['translation'] ? @h['translation'] : nil)
+ s=@h['translation'] \
+ ? @h['translation'] \
+ : nil
l,n=Db[:col_info_note],'rights.copyright.translation'
validate_length(s,l,n)
end
def illustrations
- s=(@h['illustrations'] ? @h['illustrations'] : nil)
+ s=@h['illustrations'] \
+ ? @h['illustrations'] \
+ : nil
l,n=Db[:col_info_note],'rights.copyright.illustrations'
validate_length(s,l,n)
end
def photographs
- s=(@h['photographs'] ? @h['photographs'] : nil)
+ s=@h['photographs'] \
+ ? @h['photographs'] \
+ : nil
l,n=Db[:col_info_note],'rights.copyright.photographs'
validate_length(s,l,n)
end
def digitization
- s=(@h['digitization'] ? @h['digitization'] : nil)
+ s=@h['digitization'] \
+ ? @h['digitization'] \
+ : nil
l,n=Db[:col_info_note],'rights.copyright.digitization'
validate_length(s,l,n)
end
def audio
- s=(@h['audio'] ? @h['audio'] : nil)
+ s=@h['audio'] \
+ ? @h['audio'] \
+ : nil
l,n=Db[:col_info_note],'rights.copyright.audio'
validate_length(s,l,n)
end
self
end
def license
- s=(@h['license'] ? @h['license'] : nil)
+ s=@h['license'] \
+ ? @h['license'] \
+ : nil
l,n=Db[:col_info_note],'rights.license'
validate_length(s,l,n)
end
diff --git a/lib/sisu/v3/plaintext.rb b/lib/sisu/v3/plaintext.rb
index 74de7a0e..09ecf56c 100644
--- a/lib/sisu/v3/plaintext.rb
+++ b/lib/sisu/v3/plaintext.rb
@@ -84,12 +84,12 @@ module SiSU_Plaintext
unless @opt.cmd =~/q/
path=env.path.output_tell
tool=(@opt.cmd =~/[MVv]/) \
- ? "#{env.program.text_editor} #{md.file.output_path.txt}/#{md.file.base_filename.txt}" \
+ ? "#{env.program.text_editor} #{md.file.output_path.txt.dir}/#{md.file.base_filename.txt}" \
: @opt.fns
@opt.cmd=~/[MVvz]/ \
? SiSU_Screen::Ansi.new(@opt.cmd,'Plaintext',tool).green_hi_blue \
: SiSU_Screen::Ansi.new(@opt.cmd,'Plaintext',tool).green_title_hi
- SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{md.file.output_path.txt}/#{md.file.base_filename.txt}").flow if @opt.cmd =~/[MV]/
+ SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{md.file.output_path.txt.dir}/#{md.file.base_filename.txt}").flow if @opt.cmd =~/[MV]/
end
dal_array=SiSU_DAL::Source.new(@opt).get # dal file drawn here
wrap_width=if defined? md.make.plaintext_wrap \
diff --git a/lib/sisu/v3/po4a.rb b/lib/sisu/v3/po4a.rb
index d65191e0..dd2aff7a 100644
--- a/lib/sisu/v3/po4a.rb
+++ b/lib/sisu/v3/po4a.rb
@@ -69,7 +69,6 @@ module SiSU_po4a
class Source
@@opt_src,@@opt_trn,@@opt_src_,@@opt_trn_,@@md_src,@@md_trn=nil,nil,nil,nil,nil,nil
def initialize(opt,fn=nil)
- @opt=opt
@opt,@fn=opt,fn
#unless @opt.fns =~/(.+?\.(?:-|ssm\.)?sst)$/
# puts "#{@opt.fns} not a processed file type"
@@ -77,7 +76,6 @@ module SiSU_po4a
r=Px[:lng_lst].join('|')
r.gsub!(/\|en\|/,'|')
@lang_regx=%r{(?:#{r})}
-# @lang_regx=%r{(?:es|fr)}
if opt.fns =~/\S+?~#{@lang_regx}\.ss[mti]/ \
and opt.f_pth[:lng]!='en'
@@opt_src_=false
@@ -178,13 +176,8 @@ module SiSU_po4a
end
def songsheet
############## BUG @fn changes value
-#p __LINE__
-#p @fn
fn=@fn
pot=pot_markup(@data_src,@data_trn)
-#p __LINE__
-#p @fn
-#p fn
publish(fn,pot)
end
def extract_endnotes(dob='') #% Used for extraction of endnotes from paragraphs
@@ -946,11 +939,11 @@ GSUB
unless @md.opt.cmd =~/M/
require_relative 'git' # git.rb
git=SiSU_Git::Source.new(@md.opt)
- git.create_file_structure_git unless FileTest.directory?(@file.output_path.pot_git)
+ git.create_file_structure_git unless FileTest.directory?(@file.output_path.pot_git.dir)
if @md.opt.f_pth[:lng] =='en'
- cp(@file.place_file.pot, @file.output_path.pot_git)
+ cp(@file.place_file.pot.dir, @file.output_path.pot_git.dir)
else # naive, work on -->
- cp(@file.place_file.po, @file.output_path.po_git) #unless FileTest.file?(@file.place_file.po_git)
+ cp(@file.place_file.po.dir, @file.output_path.po_git.dir) #unless FileTest.file?(@file.place_file.po_git.dir)
end
git.read
end
diff --git a/lib/sisu/v3/share_src.rb b/lib/sisu/v3/share_src.rb
index 5a31f368..f1703b37 100644
--- a/lib/sisu/v3/share_src.rb
+++ b/lib/sisu/v3/share_src.rb
@@ -75,20 +75,20 @@ module SiSU_Markup
@opt.cmd=~/[MVvz]/ \
? SiSU_Screen::Ansi.new(@opt.cmd,'Share Document Source!',@opt.fns).green_hi_blue \
: SiSU_Screen::Ansi.new(@opt.cmd,'Share Document Source!',@opt.fns).green_title_hi
- SiSU_Screen::Ansi.new(@opt.cmd,"Copy sisu markup file to output directory","#{@opt.fns} -> #{@file.output_path.src}").warn if @opt.cmd =~/[MVv]/
+ SiSU_Screen::Ansi.new(@opt.cmd,"Copy sisu markup file to output directory","#{@opt.fns} -> #{@file.output_path.src.dir}").warn if @opt.cmd =~/[MVv]/
end
- mkdir_p(@file.output_path.src) unless FileTest.directory?(@file.output_path.src)
- if FileTest.directory?(@file.output_path.src)
- unless @opt.fns =~/\.ssm$/; cp(@opt.fns,@file.output_path.src)
+ mkdir_p(@file.output_path.src.dir) unless FileTest.directory?(@file.output_path.src.dir)
+ if FileTest.directory?(@file.output_path.src.dir)
+ unless @opt.fns =~/\.ssm$/; cp(@opt.fns,@file.output_path.src.dir)
else
req=@opt.fns.gsub(/(.+?\.ssm)$/,'\1.sst')
file="#{@env.processing_path.composite_file}/#{@opt.fnb}.ssm.sst"
- if FileTest.file?(file); cp(file,"#{@file.output_path.src}/#{req}")
+ if FileTest.file?(file); cp(file,"#{@file.output_path.src.dir}/#{req}")
else print "did not find #{file} to copy"
end
end
else
- SiSU_Screen::Ansi.new(@opt.cmd,"Output directory does not exist","#{@opt.fns} -> #{@file.output_path.src}").warn if @opt.cmd =~/[MVv]/
+ SiSU_Screen::Ansi.new(@opt.cmd,"Output directory does not exist","#{@opt.fns} -> #{@file.output_path.src.dir}").warn if @opt.cmd =~/[MVv]/
exit
end
end
diff --git a/lib/sisu/v3/sisupod_make.rb b/lib/sisu/v3/sisupod_make.rb
index 21255bb7..f54f43d9 100644
--- a/lib/sisu/v3/sisupod_make.rb
+++ b/lib/sisu/v3/sisupod_make.rb
@@ -77,7 +77,7 @@ module SiSU_Doc
end
@particulars=SiSU_Particulars::Combined_singleton.instance.get_all(opt)
@file=@particulars.file
- @local_path="#{@file.output_path.sisupod}" #@local_path="#{@env.path.output}/#{@env.fnb}"
+ @local_path="#{@file.output_path.sisupod.dir}" #@local_path="#{@env.path.output}/#{@env.fnb}"
@zipfile=if @opt.fns =~/\.ssm\.sst$/; @opt.fns.gsub(/(?:\~\S{2,3})?\.ssm\.sst$/,'.ssm')
else @opt.fns.gsub(/(?:\~\S{2,3})?(\.sst)$/,'\1')
end
@@ -92,7 +92,7 @@ module SiSU_Doc
end
unless @opt.fns.empty?
unless @opt.cmd =~/q/
- SiSU_Screen::Ansi.new(@opt.cmd,'Make sisu document (zip) and place in output directory',"#{@opt.fns} -> file://#{@file.output_path.sisupod}/#{@zipfile}.zip").warn if @opt.cmd =~/[MVv]/
+ SiSU_Screen::Ansi.new(@opt.cmd,'Make sisu document (zip) and place in output directory',"#{@opt.fns} -> file://#{@file.output_path.sisupod.dir}/#{@zipfile}.zip").warn if @opt.cmd =~/[MVv]/
end
directories
sisupod_build
@@ -266,7 +266,7 @@ module SiSU_Doc
end #NB not all possibilies met, revisit, also in case of composite file may wish to add README
end
def sisupod_7zip #look at later
- mkdir_p(@file.output_path.sisupod) unless FileTest.directory?(@file.output_path.sisupod)
+ mkdir_p(@file.output_path.sisupod.dir) unless FileTest.directory?(@file.output_path.sisupod.dir)
system(%{
cd #{@env.processing_path.processing}
echo "SiSU sisupod #{@ver[:version]}" > sisu_zip.txt
@@ -274,19 +274,19 @@ module SiSU_Doc
7zr a -t7z -m0=lzma -mx=9 -ms=on #{@zipfile}.7z sisu_zip.txt
7zr a -t7z -m0=lzma -mx=9 -ms=on #{@zipfile}.7z sisupod
#7zip -qr #{@zipfile}.7z sisupod
- mv #{@zipfile}.7z #{@file.place_file.sisupod} &
+ mv #{@zipfile}.7z #{@file.place_file.sisupod.dir} &
rm -r sisupod/* && cd #{@env.path.pwd}
})
SiSU_Screen::Ansi.new('',"#{@opt.fns}.7z").blue_tab unless @opt.cmd =~/q/
end
def sisupod_zip
- mkdir_p(@file.output_path.sisupod) unless FileTest.directory?(@file.output_path.sisupod)
+ mkdir_p(@file.output_path.sisupod.dir) unless FileTest.directory?(@file.output_path.sisupod.dir)
system(%{
cd #{@env.processing_path.processing}
echo "SiSU sisupod #{@ver[:version]}" > sisu_zip.txt
zip -qz #{@zipfile}.zip sisu_zip.txt < sisu_zip.txt
zip -qr #{@zipfile}.zip sisupod
- mv #{@zipfile}.zip #{@file.place_file.sisupod} &
+ mv #{@zipfile}.zip #{@file.place_file.sisupod.dir} &
rm -r sisupod/* && cd #{@env.path.pwd}
})
SiSU_Screen::Ansi.new('',"#{@zipfile}.zip").blue_tab if @opt.cmd =~/[MVv]/
diff --git a/lib/sisu/v3/sitemaps.rb b/lib/sisu/v3/sitemaps.rb
index c306ee99..1b7847da 100644
--- a/lib/sisu/v3/sitemaps.rb
+++ b/lib/sisu/v3/sitemaps.rb
@@ -103,9 +103,9 @@ module SiSU_Sitemaps
end
end
def output_map(sitemap)
- path=@md.file.output_path.sitemaps
+ path=@md.file.output_path.sitemaps.dir
filename=@fn[:sitemap]
- touch_path=@md.file.output_path.sitemaps
+ touch_path=@md.file.output_path.sitemaps.dir
touch_filename=@fn[:sitemap_touch]
SiSU_Env::SiSU_file.new(@md).make_path(path)
file=SiSU_Env::SiSU_file.new(@md).make_file(path,filename)
diff --git a/lib/sisu/v3/sysenv.rb b/lib/sisu/v3/sysenv.rb
index a1c6228b..5a59ebf8 100644
--- a/lib/sisu/v3/sysenv.rb
+++ b/lib/sisu/v3/sysenv.rb
@@ -405,11 +405,10 @@ module SiSU_Env
x=if defined? @rc['output_dir_structure_by'] \
and @rc['output_dir_structure_by'] =~/language/
true
- else defined? @rc['output_structure']['by_language']
- (defined? @rc['output_structure']['by_language'] \
- && @rc['output_structure']['by_language'] ==true) \
- ? true \
- : false
+ elsif defined? @rc['output_structure']['by_language'] \
+ and @rc['output_structure']['by_language'] ==true
+ true
+ else false
end
end
def by_filetype?
@@ -418,11 +417,10 @@ module SiSU_Env
elsif defined? @rc['output_dir_structure_by'] \
and @rc['output_dir_structure_by'] =~/filetype/
true
- else
- x=(defined? @rc['output_structure']['by_filetype'] \
- && @rc['output_structure']['by_filetype'] ==true) \
- ? true \
- : false
+ elsif defined? @rc['output_structure']['by_filetype'] \
+ and @rc['output_structure']['by_filetype'] ==true
+ true
+ else false
end
end
def by_filename?
@@ -436,13 +434,21 @@ module SiSU_Env
elsif defined? @rc['output_structure']['by_filename'] \
and @rc['output_structure']['by_filename'] ==true
true
- else
- true
+ else true
end
end
def multilingual?
by_language_code?
end
+ def by?
+ by=if by_language_code?
+ 'language'
+ elsif by_filetype?
+ 'filetype'
+ else
+ 'filename'
+ end
+ end
self
end
def document_language_versions_found #REVISIT
@@ -763,11 +769,12 @@ module SiSU_Env
def scp
program='scp'
puts "scp -Cr #{@input} #{@output}" if @cmd =~/[vVM]/
- (program_found?(program)) \
- ? system("scp -Cr #{@input} #{@output}") \
- : (puts "\tWARN: #{program} not found" )
+ puts "scp disabled"
+ #(program_found?(program)) \
+ #? system("scp -Cr #{@input} #{@output}") \
+ #: (puts "\tWARN: #{program} not found" )
end
- def rsync(action='')
+ def rsync(action='',chdir='.')
program='rsync'
if program_found?(program)
vb=if @cmd =~/q/; 'q'
@@ -776,8 +783,12 @@ module SiSU_Env
end
msg=''
msg=" && echo 'OK: #{@input} -> #{@output}'" unless @cmd =~/q/
- puts "rsync -az#{vb} #{action} #{@input} #{@output}" if @cmd =~/[vVM]/
- system("rsync -az#{vb} #{action} #{@input} #{@output} #{msg}")
+ puts "rsync -az#{vb} #{action} #{@input} #{@output}" if @cmd =~/[vVM]/
+ system("
+ cd #{chdir}
+ rsync -az#{vb} #{action} #{@input} #{@output} #{msg}
+ cd -
+ ")
else puts "\tWARN: #{program} not found"
end
end
@@ -1720,8 +1731,8 @@ WOK
else defaults[:processing_git]
end
unless FileTest.directory?(pth)
- mkdir_p(git)
- File.chmod(0700,git)
+ mkdir_p(pth)
+ File.chmod(0700,pth)
end
pth
end
@@ -2701,22 +2712,80 @@ WOK
and @@flag_remote==true \
and @opt.cmd !~/U/
delete_extra_files='--delete' # '--delete-after'
- System_call.new(local_gen,remote_gen,@opt.cmd).rsync(delete_extra_files)
+ inp=[]
+ begin
+ local_dirs=%{-f"+ */" -f"- *" #{@md.file.output_path.base.dir}/*}
+ System_call.new(local_dirs,remote_gen,@opt.cmd).rsync
+ rescue
+ local_dirs=%{--include='*/' --exclude='*' @md.file.output_path.base.dir}
+ System_call.new(local_dirs,remote_gen,@opt.cmd).rsync
+ end
+ if @opt.cmd =~/h/ \
+ && FileTest.file?(@md.file.place_file.html_scroll.dir)
+ inp << @md.file.output_path.html_seg.rel << @md.file.place_file.html_scroll.rel
+ end
+ if @opt.cmd =~/w/ \
+ && FileTest.file?(@md.file.place_file.html_concordance.dir)
+ inp << @md.file.place_file.html_concordance.rel
+ end
+ if @opt.cmd =~/e/ \
+ && FileTest.file?(@md.file.place_file.epub.dir)
+ inp << @md.file.place_file.epub.rel
+ end
+ if @opt.cmd =~/o/ \
+ && FileTest.file?(@md.file.place_file.odt.dir)
+ inp << @md.file.place_file.odt.rel
+ end
+ if @opt.cmd =~/b/ \
+ && FileTest.file?(@md.file.place_file.xhtml.dir)
+ inp << @md.file.place_file.xhtml.rel
+ end
+ if @opt.cmd =~/x/ \
+ && FileTest.file?(@md.file.place_file.xml_sax.dir)
+ inp << @md.file.place_file.xml_sax.rel
+ end
+ if @opt.cmd =~/X/ \
+ && FileTest.file?(@md.file.place_file.xml_dom.dir)
+ inp << @md.file.place_file.xml_dom.rel
+ end
+ if @opt.cmd =~/[at]/ \
+ && FileTest.file?(@md.file.place_file.txt.dir)
+ inp << @md.file.place_file.txt.rel
+ end
+ if @opt.cmd =~/N/ \
+ && FileTest.file?(@md.file.place_file.hash_digest.dir)
+ inp << @md.file.place_file.hash_digest.rel
+ end
+ if @opt.cmd =~/s/ \
+ && FileTest.file?(@md.file.place_file.src.dir)
+ inp << @md.file.place_file.src.rel
+ end
+ if @opt.cmd =~/S/ \
+ && FileTest.file?(@md.file.place_file.sisupod.dir)
+ inp << @md.file.place_file.sisupod.rel
+ end
+ if @opt.cmd =~/p/
+ inp << @md.file.output_path.pdf.rel + '/' + @opt.fnb + '*'
+ end
+ if @opt.cmd =~/y/ \
+ && FileTest.file?(@md.file.place_file.manifest.dir)
+ inp << @md.file.place_file.manifest.rel
+ end
+ if inp.length > 0
+ local_gen=inp.join(' ')
+ remote_rel=remote_conn[:name] + '/' + @md.file.output_path.stub.rcp
+ remote_rel='/home/ralph/tst'
+ System_call.new(local_gen,remote_rel,@opt.cmd).rsync('--relative',@md.file.output_path.base.dir)
+ end
if FileTest.file?("#{local_src}/#{src_txt}")
- System_call.new("#{local_src}/#{src_txt}",remote_src,@opt.cmd).rsync
+# System_call.new("#{local_src}/#{src_txt}",remote_src,@opt.cmd).rsync
if defined? @md.ec[:image] and not @md.ec[:image].empty?
images="#{local_gen_image}/" + @md.ec[:image].join(" #{local_gen_image}/")
- System_call.new(images,remote_images,@opt.cmd).rsync
+# System_call.new(images,remote_images,@opt.cmd).rsync
images_external="#{local_gen_image_external}/" + @md.ec[:image].join(" #{local_gen_image_external}/")
- System_call.new(images_external,remote_images_external,@opt.cmd).rsync
+# System_call.new(images_external,remote_images_external,@opt.cmd).rsync
end
end
- if FileTest.file?("#{local_epub}/#{@opt.fnb}.epub")
- System_call.new("#{local_epub}/#{@opt.fnb}.epub",remote_epub,@opt.cmd).rsync
- end
- if FileTest.file?("#{local_pod}/#{src_pod}")
- System_call.new("#{local_pod}/#{src_pod}",remote_pod,@opt.cmd).rsync
- end
elsif @opt.cmd =~/U/
puts "#{__FILE__} #{__LINE__}" if @opt.cmd =~/M/
puts "#{local_gen} -> #{remote_gen}"
@@ -3066,23 +3135,23 @@ WOK
self
end
def mkdir_initialize # not used but consider using
- mkdir_p(output_path.base) unless FileTest.directory?(output_path.base)
- mkdir_p("#{output_path.base}/#{@md.fnb}") unless FileTest.directory?("#{output_path.base}/#{@md.fnb}")
- mkdir_p("#{output_path.base}/#{@env.path.style}") unless FileTest.directory?("#{output_path.base}/#{@env.path.style}")
+ mkdir_p(output_path.base.dir) unless FileTest.directory?(output_path.base.dir)
+ mkdir_p("#{output_path.base.dir}/#{@md.fnb}") unless FileTest.directory?("#{output_path.base.dir}/#{@md.fnb}")
+ mkdir_p("#{output_path.base.dir}/#{@env.path.style}") unless FileTest.directory?("#{output_path.base.dir}/#{@env.path.style}")
mkdir_p(@env.processing_path.dal) unless FileTest.directory?(@env.processing_path.dal)
mkdir_p(@env.processing_path.tune) unless FileTest.directory?(@env.processing_path.tune)
end
def mkdir
- txt_path="#{output_path.base}/#{@md.fnb}"
+ txt_path="#{output_path.base.dir}/#{@md.fnb}"
def output
def base
- mkdir_p(output_path.base) unless FileTest.directory?(output_path.base)
+ mkdir_p(output_path.base.dir) unless FileTest.directory?(output_path.base.dir)
end
def css
- mkdir_p("#{output_path.base}/#{@env.path.style}") unless FileTest.directory?("#{output_path.base}/#{@env.path.style}")
+ mkdir_p("#{output_path.base.dir}/#{@env.path.style}") unless FileTest.directory?("#{output_path.base.dir}/#{@env.path.style}")
end
def epub
- path=output_path.epub
+ path=output_path.epub.dir
make_path(path)
end
self
@@ -3090,7 +3159,7 @@ WOK
self
end
def mkfile #consider using more
- path="#{output_path.base}/#{@md.fnb}"
+ path="#{output_path.base.dir}/#{@md.fnb}"
make_path(path)
filename=@fno
file=make_file(path,filename)
@@ -3102,73 +3171,73 @@ WOK
end
def write_file
def txt
- path=output_path.txt
+ path=output_path.txt.dir
make_path(path)
fn=base_filename.txt
make_file(path,fn)
end
def html_scroll
- pth=output_path.html
+ pth=output_path.html.dir
make_path(pth)
- p_fn=place_file.html_scroll
+ p_fn=place_file.html_scroll.dir
@@filename_html_scroll=File.new(p_fn,'w+')
end
def html_seg_index
- pth,fn="#{output_path.html}/#{@md.fnb}",base_filename.html_seg_index
+ pth,fn="#{output_path.html.dir}/#{@md.fnb}",base_filename.html_seg_index
make_path(pth)
- p_fn=place_file.html_seg_index
+ p_fn=place_file.html_seg_index.dir
@@filename_html_index=File.new(p_fn,'w+')
end
def html_segtoc
- pth,fn="#{output_path.html}/#{@md.fnb}",base_filename.html_segtoc
+ pth,fn="#{output_path.html.dir}/#{@md.fnb}",base_filename.html_segtoc
make_path(pth)
- p_fn=place_file.html_segtoc
+ p_fn=place_file.html_segtoc.dir
@@filename_html_index=File.new(p_fn,'w+')
end
def xhtml
- path=output_path.xhtml
+ path=output_path.xhtml.dir
make_path(path)
fn=base_filename.xhtml
file=make_file(path,fn)
end
def xml_sax
- path=output_path.xml
+ path=output_path.xml.dir
make_path(path)
fn=base_filename.xml_sax
file=make_file(path,fn)
end
def xml_dom
- path=output_path.xml
+ path=output_path.xml.dir
make_path(path)
fn=base_filename.xml_dom
file=make_file(path,fn)
end
def manpage
- path=output_path.manpage
+ path=output_path.manpage.dir
make_path(path)
fn=base_filename.manpage
file=make_file(path,fn)
end
def hash_digest
- path=output_path.hash_digest
+ path=output_path.hash_digest.dir
make_path(path)
fn=base_filename.hash_digest
file=make_file(path,fn)
end
def manifest
- path=output_path.manifest
+ path=output_path.manifest.dir
make_path(path)
fn=base_filename.manifest
make_file(path,fn)
end
def pot
- path=output_path.pot
+ path=output_path.pot.dir
make_path(path)
fn=base_filename.pot
make_file(path,fn)
end
def po
- path=output_path.po
+ path=output_path.po.dir
make_path(path)
fn=base_filename.po
make_file(path,fn)
@@ -3177,28 +3246,76 @@ WOK
end
def place_file
def txt
- output_path.txt + '/' + base_filename.txt
+ def dir
+ output_path.txt.dir + '/' + base_filename.txt
+ end
+ def rel
+ output_path.txt.rel + '/' + base_filename.txt
+ end
+ self
end
def html_scroll
- output_path.html_scroll + '/' + base_filename.html_scroll
+ def dir
+ output_path.html_scroll.dir + '/' + base_filename.html_scroll
+ end
+ def rel
+ output_path.html_scroll.rel + '/' + base_filename.html_scroll
+ end
+ self
end
def html_seg_index
- output_path.html_seg + '/' + base_filename.html_seg_index
+ def dir
+ output_path.html_seg.dir + '/' + base_filename.html_seg_index
+ end
+ def rel
+ output_path.html_seg.rel + '/' + base_filename.html_seg_index
+ end
+ self
end
def html_segtoc
- output_path.html_seg + '/' + base_filename.html_segtoc
+ def dir
+ output_path.html_seg.dir + '/' + base_filename.html_segtoc
+ end
+ def rel
+ output_path.html_seg.rel + '/' + base_filename.html_segtoc
+ end
+ self
end
def html_book_index
- output_path.html_seg + '/' + base_filename.html_book_index
+ def dir
+ output_path.html_seg.dir + '/' + base_filename.html_book_index
+ end
+ def rel
+ output_path.html_seg.rel + '/' + base_filename.html_book_index
+ end
+ self
end
def html_concordance
- output_path.html_seg + '/' + base_filename.html_concordance
+ def dir
+ output_path.html_seg.dir + '/' + base_filename.html_concordance
+ end
+ def rel
+ output_path.html_seg.rel + '/' + base_filename.html_concordance
+ end
+ self
end
def odt
- output_path.odt + '/' + base_filename.odt
+ def dir
+ output_path.odt.dir + '/' + base_filename.odt
+ end
+ def rel
+ output_path.odt.rel + '/' + base_filename.odt
+ end
+ self
end
def epub
- output_path.epub + '/' + base_filename.epub
+ def dir
+ output_path.epub.dir + '/' + base_filename.epub
+ end
+ def rel
+ output_path.epub.rel + '/' + base_filename.epub
+ end
+ self
end
def pdf_p
puts 'ERROR not available due to multiple page format sizes'
@@ -3207,37 +3324,103 @@ WOK
puts 'ERROR not available due to multiple page format sizes'
end
def xhtml
- output_path.xhtml + '/' + base_filename.xhtml
+ def dir
+ output_path.xhtml.dir + '/' + base_filename.xhtml
+ end
+ def rel
+ output_path.xhtml.rel + '/' + base_filename.xhtml
+ end
+ self
end
def xml_sax
- output_path.xml + '/' + base_filename.xml_sax
+ def dir
+ output_path.xml.dir + '/' + base_filename.xml_sax
+ end
+ def rel
+ output_path.xml.rel + '/' + base_filename.xml_sax
+ end
+ self
end
def xml_dom
- output_path.xml + '/' + base_filename.xml_dom
+ def dir
+ output_path.xml.dir + '/' + base_filename.xml_dom
+ end
+ def rel
+ output_path.xml.rel + '/' + base_filename.xml_dom
+ end
+ self
end
def hash_digest
- output_path.hash_digest + '/' + base_filename.hash_digest
+ def dir
+ output_path.hash_digest.dir + '/' + base_filename.hash_digest
+ end
+ def rel
+ output_path.hash_digest.rel + '/' + base_filename.hash_digest
+ end
+ self
end
def src
- output_path.src + '/' + base_filename.src
+ def dir
+ output_path.src.dir + '/' + base_filename.src
+ end
+ def rel
+ output_path.src.rel + '/' + base_filename.src
+ end
+ self
end
def sisupod
- output_path.sisupod + '/' + base_filename.sisupod
+ def dir
+ output_path.sisupod.dir + '/' + base_filename.sisupod
+ end
+ def rel
+ output_path.sisupod.rel + '/' + base_filename.sisupod
+ end
+ self
end
def po
- output_path.po + '/' + base_filename.po
+ def dir
+ output_path.po.dir + '/' + base_filename.po
+ end
+ def rel
+ output_path.po.rel + '/' + base_filename.po
+ end
+ self
end
def pot
- output_path.pot + '/' + base_filename.pot
+ def dir
+ output_path.pot.dir + '/' + base_filename.pot
+ end
+ def rel
+ output_path.pot.rel + '/' + base_filename.pot
+ end
+ self
end
def po_git
- output_path.po_git + '/' + base_filename.po
+ def dir
+ output_path.po_git + '/' + base_filename.po
+ end
+ def rel
+ #output_path.po_git + '/' + base_filename.po
+ end
+ self
end
def pot_git
- output_path.pot_git + '/' + base_filename.pot
+ def dir
+ output_path.pot_git + '/' + base_filename.pot
+ end
+ def rel
+ #output_path.pot_git + '/' + base_filename.pot
+ end
+ self
end
def manifest
- output_path.manifest + '/' + base_filename.manifest
+ def dir
+ output_path.manifest.dir + '/' + base_filename.manifest
+ end
+ def rel
+ output_path.manifest.rel + '/' + base_filename.manifest
+ end
+ self
end
self
end
@@ -3427,140 +3610,520 @@ WOK
: (@fno + '.pot')
end
def sisupod
- #@md.fn[:sisupod]
if @md.fns =~/\.ssm\.sst$/; @md.fns.gsub(/(?:\~\S{2,3})?\.ssm\.sst$/,'.ssm.zip')
else @md.fns.gsub(/(?:\~\S{2,3})?(\.sst)$/,'\1.zip')
end
end
self
end
- def set_path_abc(ft)
- if @env.output_dir_structure.by_language_code?
- "#{output_path.base}/#{@md.opt.lng}/#{ft}"
- elsif @env.output_dir_structure.by_filetype?
- "#{output_path.base}/#{ft}"
- else
- "#{output_path.base}/#{@md.fnb}"
+ def set_path(ft)
+ @ft=ft
+ def dir
+ def abc
+ if @env.output_dir_structure.by_language_code?
+ "#{output_path.base.dir}/#{@md.opt.lng}/#{@ft}"
+ elsif @env.output_dir_structure.by_filetype?
+ "#{output_path.base.dir}/#{@ft}"
+ else
+ "#{output_path.base.dir}/#{@md.fnb}"
+ end
+ end
+ def ab
+ if @env.output_dir_structure.by_language_code?
+ "#{output_path.base.dir}/#{@md.opt.lng}/#{@ft}"
+ else
+ "#{output_path.base.dir}/#{@ft}"
+ end
+ end
+ def ab_src
+ if @env.output_dir_structure.by_language_code?
+ "#{output_path.base.url}/#{@ft}/#{@md.opt.lng}"
+ else
+ "#{output_path.base.url}/#{@ft}"
+ end
+ end
+ self
end
- end
- def set_path_ab(ft)
- if @env.output_dir_structure.by_language_code?
- "#{output_path.base}/#{@md.opt.lng}/#{ft}"
- else
- "#{output_path.base}/#{ft}"
+ def url
+ def abc
+ if @env.output_dir_structure.by_language_code?
+ "#{output_path.base.url}/#{@md.opt.lng}/#{@ft}"
+ elsif @env.output_dir_structure.by_filetype?
+ "#{output_path.base.url}/#{@ft}"
+ else
+ "#{output_path.base.url}/#{@md.fnb}"
+ end
+ end
+ def ab
+ if @env.output_dir_structure.by_language_code?
+ "#{output_path.base.url}/#{@md.opt.lng}/#{@ft}"
+ else
+ "#{output_path.base.url}/#{@ft}"
+ end
+ end
+ def ab_src
+ if @env.output_dir_structure.by_language_code?
+ "#{output_path.base.dir}/#{@ft}/#{@md.opt.lng}"
+ else
+ "#{output_path.base.dir}/#{@ft}"
+ end
+ end
+ self
end
- end
- def set_path_ab_src(ft)
- if @env.output_dir_structure.by_language_code?
- "#{output_path.base}/#{ft}/#{@md.opt.lng}"
- else
- "#{output_path.base}/#{ft}"
+ def rel
+ def abc
+ if @env.output_dir_structure.by_language_code?
+ "#{@md.opt.lng}/#{@ft}"
+ elsif @env.output_dir_structure.by_filetype?
+ "#{@ft}"
+ else
+ "#{@md.fnb}"
+ end
+ end
+ def ab
+ if @env.output_dir_structure.by_language_code?
+ "#{@md.opt.lng}/#{@ft}"
+ else
+ "#{@ft}"
+ end
+ end
+ def ab_src
+ if @env.output_dir_structure.by_language_code?
+ "#{@ft}/#{@md.opt.lng}"
+ else
+ "#{@ft}"
+ end
+ end
+ self
end
+ def rcp
+ def abc
+ if @env.output_dir_structure.by_language_code?
+ "#{output_path.stub.rcp}/#{@md.opt.lng}/#{ft}"
+ elsif @env.output_dir_structure.by_filetype?
+ "#{output_path.stub.rcp}/#{ft}"
+ else
+ "#{output_path.stub.rcp}/#{@md.fnb}"
+ end
+ end
+ def ab
+ if @env.output_dir_structure.by_language_code?
+ "#{output_path.stub.rcp}/#{@md.opt.lng}/#{ft}"
+ else
+ "#{output_path.stub.rcp}/#{ft}"
+ end
+ end
+ self
+ end
+ self
end
def output_path
+ def stub
+ def dir
+ "#{@md.opt.f_pth[:pth_stub]}"
+ end
+ #def url
+ # "#{@env.url.root}"
+ #end
+ def rel
+ "./#{@md.opt.f_pth[:pth_stub]}"
+ end
+ def rcp
+ "#{@md.opt.f_pth[:pth_stub]}"
+ end
+ self
+ end
def base
- "#{@env.path.webserv}/#{@md.opt.f_pth[:pth_stub]}"
+ def dir
+ "#{@env.path.webserv}/#{@md.opt.f_pth[:pth_stub]}"
+ end
+ def url
+ "#{@env.url.root}"
+ #url: "#{@env.url.root}/#{@md.opt.f_pth[:pth_stub]}"
+ end
+ def rel
+ "./#{@md.opt.f_pth[:pth_stub]}"
+ end
+ def rcp
+ "./#{@md.opt.f_pth[:pth_stub]}"
+ end
+ self
end
def sisupod
- "#{output_path.base}/pod"
+ def dir
+ "#{output_path.base.dir}/pod"
+ end
+ def url
+ "#{output_path.base.url}/pod"
+ end
+ def rel
+ "#{output_path.base.rel}/pod"
+ end
+ def rcp
+ "#{output_path.base.rcp}/pod"
+ end
+ self
end
def sisugit
- "#{output_path.base}/git"
+ def dir
+ "#{output_path.base.dir}/git"
+ end
+ def url
+ "#{output_path.base.url}/git"
+ end
+ def rel
+ "#{output_path.base.rel}/git"
+ end
+ def rcp
+ "#{output_path.base.rcp}/git"
+ end
+ self
end
#def pod
# ft='pod'
- # path=set_path_ab(ft)
+ # path=set_path(ft).dir.ab
#end
def src
- ft=Gt[:src]
- path=set_path_ab_src(ft)
+ def ft
+ Gt[:src]
+ end
+ def dir
+ set_path(ft).dir.ab_src
+ end
+ def url
+ set_path(ft).url.ab_src
+ end
+ def rel
+ set_path(ft).rel.ab_src
+ end
+ def rcp
+ set_path(ft).rcp.ab_src
+ end
+ self
end
def po
- "#{output_path.base}/po4a/#{@md.fnb}/po/#{@md.opt.lng}"
+ def dir
+ "#{output_path.base.dir}/po4a/#{@md.fnb}/po/#{@md.opt.lng}"
+ end
+ def url
+ "#{output_path.base.url}/po4a/#{@md.fnb}/po/#{@md.opt.lng}"
+ end
+ self
end
def pot
- "#{output_path.base}/po4a/#{@md.fnb}/pot"
+ def dir
+ "#{output_path.base.dir}/po4a/#{@md.fnb}/pot"
+ end
+ def url
+ "#{output_path.base.url}/po4a/#{@md.fnb}/pot"
+ end
+ def rcp
+ p "#{output_path.base.dir}/po4a/#{@md.fnb}/pot"
+ end
+ self
end
- def po_git
- ft=Gt[:po]
- pth=@env.processing_path.git + '/' + @md.fnb + '/' + ft + '/' + @md.opt.lng
- mkdir_p(pth) unless FileTest.directory?(pth)
- pth
+ def po_git # consider !!!
+ def ft
+ Gt[:po]
+ end
+ def dir
+ pth=@env.processing_path.git + '/' + @md.fnb + '/' + ft + '/' + @md.opt.lng
+ mkdir_p(pth) unless FileTest.directory?(pth)
+ pth
+ end
+ self
end
- def pot_git
- ft=Gt[:pot]
- @env.processing_path.git + '/' + @md.fnb + '/' + ft
+ def pot_git # consider !!!
+ def ft
+ Gt[:pot]
+ end
+ def dir
+ @env.processing_path.git + '/' + @md.fnb + '/' + ft
+ end
+ self
end
def md_harvest
manifest
+ self
end
def txt
- ft='txt'
- path=set_path_abc(ft)
+ def ft
+ 'txt'
+ end
+ def dir
+ set_path(ft).dir.abc
+ end
+ def url
+ set_path(ft).url.abc
+ end
+ def rel
+ set_path(ft).rel.abc
+ end
+ def rcp
+ set_path(ft).rcp.abc
+ end
+ self
end
def html_scroll
- ft='html'
- path=set_path_abc(ft)
+ def ft
+ 'html'
+ end
+ def dir
+ set_path(ft).dir.abc
+ end
+ def url
+ set_path(ft).url.abc
+ end
+ def rel
+ set_path(ft).rel.abc
+ end
+ def rcp
+ set_path(ft).rcp.abc
+ end
+ self
end
def html_seg
- ft="html/#{@md.fnb}"
- path=set_path_abc(ft)
+ def ft
+ "html/#{@md.fnb}"
+ end
+ def dir
+ set_path(ft).dir.abc
+ end
+ def url
+ set_path(ft).url.abc
+ end
+ def rel
+ set_path(ft).rel.abc
+ end
+ def rcp
+ set_path(ft).rcp.abc
+ end
+ self
end
def html_concordance
html_seg
+ self
end
def html
- ft='html'
- path=set_path_abc(ft)
+ def ft
+ 'html'
+ end
+ def dir
+ set_path(ft).dir.abc
+ end
+ def url
+ set_path(ft).url.abc
+ end
+ def rel
+ set_path(ft).url.abc
+ end
+ def rcp
+ set_path(ft).rcp.abc
+ end
+ self
end
def xhtml
- ft='xhtml'
- path=set_path_abc(ft)
+ def ft
+ 'xhtml'
+ end
+ def dir
+ set_path(ft).dir.abc
+ end
+ def url
+ set_path(ft).url.abc
+ end
+ def rel
+ set_path(ft).rel.abc
+ end
+ def rcp
+ set_path(ft).rcp.abc
+ end
+ self
end
def epub
- ft='epub'
- path=set_path_ab(ft)
+ def ft
+ 'epub'
+ end
+ def dir
+ set_path(ft).dir.ab
+ end
+ def url
+ set_path(ft).url.ab
+ end
+ def rel
+ set_path(ft).rel.ab
+ end
+ def rcp
+ set_path(ft).rcp.ab
+ end
+ self
end
def odt
- ft='odt'
- path=set_path_abc(ft)
+ def ft
+ 'odt'
+ end
+ def dir
+ set_path(ft).dir.abc
+ end
+ def url
+ set_path(ft).url.abc
+ end
+ def rel
+ set_path(ft).rel.abc
+ end
+ def rcp
+ set_path(ft).rcp.abc
+ end
+ self
end
def xml
- ft='xml'
- path=set_path_abc(ft)
+ def ft
+ 'xml'
+ end
+ def dir
+ set_path(ft).dir.abc
+ end
+ def url
+ set_path(ft).url.abc
+ end
+ def rel
+ set_path(ft).rel.abc
+ end
+ def rcp
+ set_path(ft).rcp.abc
+ end
+ self
end
def xml_sax
xml
+ self
end
def xml_dom
xml
+ self
end
def pdf
- ft='pdf'
- path=set_path_abc(ft)
+ def ft
+ 'pdf'
+ end
+ def dir
+ set_path(ft).dir.abc
+ end
+ def url
+ set_path(ft).url.abc
+ end
+ def rel
+ set_path(ft).rel.abc
+ end
+ def rcp
+ set_path(ft).rcp.abc
+ end
+ self
end
def hash_digest
- ft='hashes'
- path=set_path_abc(ft)
+ def ft
+ 'hashes'
+ end
+ def dir
+ set_path(ft).dir.abc
+ end
+ def url
+ set_path(ft).url.abc
+ end
+ def rel
+ set_path(ft).rel.abc
+ end
+ def rcp
+ set_path(ft).rcp.abc
+ end
+ self
end
def manifest
- ft='manifest'
- path=set_path_abc(ft)
+ def ft
+ 'manifest'
+ end
+ def dir
+ set_path(ft).dir.abc
+ end
+ def url
+ set_path(ft).url.abc
+ end
+ def rel
+ set_path(ft).rel.abc
+ end
+ def rcp
+ set_path(ft).rcp.abc
+ end
+ self
end
def harvest
- ft='site_metadata'
- path=set_path_ab(ft)
+ def ft
+ 'site_metadata'
+ end
+ def dir
+ set_path(ft).dir.ab
+ end
+ def url
+ set_path(ft).url.ab
+ end
+ def rel
+ set_path(ft).rel.ab
+ end
+ def rcp
+ set_path(ft).rcp.ab
+ end
+ self
end
def manpage
- ft='man'
- path=set_path_ab(ft)
+ def ft
+ 'man'
+ end
+ def dir
+ set_path(ft).dir.ab
+ end
+ def url
+ set_path(ft).url.ab
+ end
+ def rel
+ set_path(ft).rel.ab
+ end
+ def rcp
+ set_path(ft).rcp.ab
+ end
+ self
end
def sitemaps
- ft='sitemaps'
- path=set_path_ab(ft)
+ def ft
+ 'sitemaps'
+ end
+ def dir
+ set_path(ft).dir.ab
+ end
+ def url
+ set_path(ft).url.ab
+ end
+ def rel
+ set_path(ft).rel.ab
+ end
+ def rcp
+ set_path(ft).rcp.ab
+ end
+ self
end
- def sqlite
- path=output_path.base
+ def sqlite #check url
+ def dir
+ output_path.base.dir
+ end
+ def url
+ output_path.base.url
+ end
+ def rel
+ output_path.base.rel
+ end
+ def rcp
+ output_path.base.rcp
+ end
+ self
end
self
end
diff --git a/lib/sisu/v3/texpdf.rb b/lib/sisu/v3/texpdf.rb
index 42c565b7..ebd68d6d 100644
--- a/lib/sisu/v3/texpdf.rb
+++ b/lib/sisu/v3/texpdf.rb
@@ -106,8 +106,8 @@ module SiSU_TeX
SiSU_Screen::Ansi.new(@opt.cmd,'LaTeX/PDF',@md.fns).green_title_hi unless @opt.cmd =~/q/
if @opt.cmd =~/[MVv]/
path=@env.url.output_tell
- SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.program.pdf_viewer} #{@md.file.output_path.pdf}/#{@md.file.base_filename.pdf_l}pdf").flow
- SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.program.pdf_viewer} #{@md.file.output_path.pdf}/#{@md.file.base_filename.pdf_p}pdf").flow
+ SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.program.pdf_viewer} #{@md.file.output_path.pdf.dir}/#{@md.file.base_filename.pdf_l}pdf").flow
+ SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.program.pdf_viewer} #{@md.file.output_path.pdf.dir}/#{@md.file.base_filename.pdf_p}pdf").flow
end
@md=@particulars.md
$flag=@md.opt.cmd #introduced to pass 0 for no object citation numbers... to texpdf_format
@@ -182,14 +182,14 @@ module SiSU_TeX
when /legal/; pdf_p=@md.file.base_filename.pdf_p_legal; pdf_l=@md.file.base_filename.pdf_l_legal
else pdf_p=@md.file.base_filename.pdf_p_a4; pdf_l=@md.file.base_filename.pdf_l_a4
end
- Dir.mkdir(@md.file.output_path.pdf) unless FileTest.directory?(@md.file.output_path.pdf)
+ Dir.mkdir(@md.file.output_path.pdf.dir) unless FileTest.directory?(@md.file.output_path.pdf.dir)
if FileTest.file?(portrait_pdf)
- cp(portrait_pdf,"#{@md.file.output_path.pdf}/#{pdf_p}")
+ cp(portrait_pdf,"#{@md.file.output_path.pdf.dir}/#{pdf_p}")
rm(portrait_pdf)
else p "#{__FILE__}:#{__LINE__} NOT FOUND: #{portrait_pdf}" if @md.opt.cmd.inspect =~/M/
end
if FileTest.file?(landscape_pdf)
- cp(landscape_pdf,"#{@md.file.output_path.pdf}/#{pdf_l}")
+ cp(landscape_pdf,"#{@md.file.output_path.pdf.dir}/#{pdf_l}")
rm(landscape_pdf)
else p "#{__FILE__}:#{__LINE__} NOT FOUND: #{landscape_pdf}" if @md.opt.cmd.inspect =~/M/
end
@@ -230,26 +230,26 @@ module SiSU_TeX
when /legal/; pdf_p=@md.file.base_filename.pdf_p_legal; pdf_l=@md.file.base_filename.pdf_l_legal
else pdf_p=@md.file.base_filename.pdf_p_a4; pdf_l=@md.file.base_filename.pdf_l_a4
end
- if FileTest.file?("#{@md.file.output_path.pdf}/#{pdf_p}")
+ if FileTest.file?("#{@md.file.output_path.pdf.dir}/#{pdf_p}")
mklnk=if @md.file.output_dir_structure.by_language_code? \
or @md.file.output_dir_structure.by_filetype?
"#{@md.fnb}.portrait.pdf"
else 'portrait.pdf'
end
system("
- cd #{@md.file.output_path.pdf}
+ cd #{@md.file.output_path.pdf.dir}
rm #{mklnk}
ln -s #{pdf_p} #{mklnk}
")
end
- if FileTest.file?("#{@md.file.output_path.pdf}/#{pdf_l}")
+ if FileTest.file?("#{@md.file.output_path.pdf.dir}/#{pdf_l}")
mklnk=if @md.file.output_dir_structure.by_language_code? \
or @md.file.output_dir_structure.by_filetype?
"#{@md.fnb}.landscape.pdf"
else 'landscape.pdf'
end
system("
- cd #{@md.file.output_path.pdf}
+ cd #{@md.file.output_path.pdf.dir}
rm #{mklnk}
ln -s #{pdf_l} #{mklnk}
")
diff --git a/lib/sisu/v3/urls.rb b/lib/sisu/v3/urls.rb
index c963c97e..ee81786c 100644
--- a/lib/sisu/v3/urls.rb
+++ b/lib/sisu/v3/urls.rb
@@ -131,7 +131,7 @@ module SiSU_urls
def show
def source
def src(x,y)
- SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.text_editor} #{@md.file.output_path.src}/#{y}").result
+ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.text_editor} #{@md.file.output_path.src.dir}/#{y}").result
end
def pod(x,y)
SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} #{@env.url.output_tell}/pod/#{y}").result
@@ -145,70 +145,70 @@ module SiSU_urls
SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.text_editor} ~#{y}/#{@fnb}.#{y}").result
end
def text(x)
- SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.txt}/#{@md.file.base_filename.txt}").result
+ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.txt.dir}/#{@md.file.base_filename.txt}").result
end
def epub(x)
- SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.epub_viewer} #{@md.file.output_path.epub}/#{@md.file.base_filename.epub}").result
+ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.epub_viewer} #{@md.file.output_path.epub.dir}/#{@md.file.base_filename.epub}").result
end
def html
def scroll(x)
- SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.html_scroll}/#{@md.file.base_filename.html_scroll}").result
+ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.html_scroll.dir}/#{@md.file.base_filename.html_scroll}").result
end
def toc(x)
- SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.html_seg}/#{@md.file.base_filename.html_segtoc}").result
+ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.html_seg.dir}/#{@md.file.base_filename.html_segtoc}").result
end
def concordance(x)
- SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.html_concordance}/#{@md.file.base_filename.html_concordance}").result
+ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.html_concordance.dir}/#{@md.file.base_filename.html_concordance}").result
end
def manifest(x)
- SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.manifest}/#{@md.file.base_filename.manifest}").result
+ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.manifest.dir}/#{@md.file.base_filename.manifest}").result
end
self
end
def odt(x)
- SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.odf_viewer} file://#{@md.file.output_path.odt}/#{@md.file.base_filename.odt}").result
+ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.odf_viewer} file://#{@md.file.output_path.odt.dir}/#{@md.file.base_filename.odt}").result
end
def pdf
def portrait(x)
- SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.pdf_viewer} #{@md.file.output_path.pdf}/#{@md.file.base_filename.pdf_p}pdf").result
+ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.pdf_viewer} #{@md.file.output_path.pdf.dir}/#{@md.file.base_filename.pdf_p}pdf").result
end
def landscape(x)
- SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.pdf_viewer} #{@md.file.output_path.pdf}/#{@md.file.base_filename.pdf_l}pdf").result
+ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.pdf_viewer} #{@md.file.output_path.pdf.dir}/#{@md.file.base_filename.pdf_l}pdf").result
end
self
end
def manpage(x)
- SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.manpage_viewer} #{@md.file.output_path.manpage}/#{@md.file.base_filename.manpage}").result
+ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.manpage_viewer} #{@md.file.output_path.manpage.dir}/#{@md.file.base_filename.manpage}").result
end
def pinfo(x,y)
SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","cd #{@env.processing_path.texinfo}; pinfo ./#{@fnb}.#{y}; cd -").result
end
def po4a
def po(x,y)
- SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.text_editor} #{@md.file.output_path.po}/#{y}").result
+ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.text_editor} #{@md.file.output_path.po.dir}/#{y}").result
end
def pot(x,y)
- SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.text_editor} #{@md.file.output_path.pot}/#{y}").result
+ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.text_editor} #{@md.file.output_path.pot.dir}/#{y}").result
end
self
end
def xhtml(x)
- SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.xhtml}/#{@md.file.base_filename.xhtml}").result
+ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.xhtml.dir}/#{@md.file.base_filename.xhtml}").result
end
def xml
def sax(x)
- SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.xml_sax}/#{@md.file.base_filename.xml_sax}").result
+ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.xml_sax.dir}/#{@md.file.base_filename.xml_sax}").result
end
def dom(x)
- SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.xml_dom}/#{@md.file.base_filename.xml_dom}").result
+ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.xml_dom.dir}/#{@md.file.base_filename.xml_dom}").result
end
def sitemap(x) #BROKEN
- SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.sitemap}/#{@md.file.base_filename.sitemap}").result
+ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.sitemaps.dir}/#{@md.file.base_filename.sitemap}").result
end
self
end
def hash_digest(x)
- SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.hash_digest}/#{@md.file.base_filename.hash_digest}").result
+ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.hash_digest.dir}/#{@md.file.base_filename.hash_digest}").result
end
def db
def psql(x,y)
@@ -272,11 +272,11 @@ module SiSU_urls
end
def urls_select
unless @opt.cmd =~/q/
- i="(output manifest) #{@md.file.output_path.manifest}/#{@md.file.base_filename.manifest}"
+ i="(output manifest) #{@md.file.output_path.manifest.dir}/#{@md.file.base_filename.manifest}"
@opt.cmd=~/[MVvz]/ \
? SiSU_Screen::Ansi.new(@opt.cmd,'URLs').grey_title_hi \
: SiSU_Screen::Ansi.new(@opt.cmd,'URL',i).green_hi_blue
- SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@md.file.output_path.manifest}/#{@md.file.base_filename.manifest}").flow if @opt.cmd =~/[MVv]/
+ SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@md.file.output_path.manifest.dir}/#{@md.file.base_filename.manifest}").flow if @opt.cmd =~/[MVv]/
end
m=/.+\/(?:src\/)?(\S+)/im # m=/.+?\/(?:src\/)?([^\/]+)$/im # m=/.+\/(\S+)/m
@pwd_stub="#{@env.url.output_tell}"[m,1]
diff --git a/lib/sisu/v3/xhtml.rb b/lib/sisu/v3/xhtml.rb
index 0871170a..a1b393f2 100644
--- a/lib/sisu/v3/xhtml.rb
+++ b/lib/sisu/v3/xhtml.rb
@@ -84,14 +84,14 @@ module SiSU_XHTML
path=@env.path.output_tell
loc=@env.url.output_tell
- tool=if @opt.cmd =~/[MV]/; "#{@env.program.web_browser} file://#{@md.file.output_path.xhtml}/#{@md.file.base_filename.xhtml}#{path}/#{@md.fnb}/#{@md.fn[:xhtml]}\n\t#{@env.program.xml_viewer} file://#{@md.file.output_path.xhtml}/#{@md.file.base_filename.xhtml}#{path}/#{@md.fnb}/#{@md.fn[:xhtml]}"
- elsif @opt.cmd =~/v/; "#{@env.program.web_browser} file://#{@md.file.output_path.xhtml}/#{@md.file.base_filename.xhtml}"
+ tool=if @opt.cmd =~/[MV]/; "#{@env.program.web_browser} file://#{@md.file.output_path.xhtml.dir}/#{@md.file.base_filename.xhtml}#{path}/#{@md.fnb}/#{@md.fn[:xhtml]}\n\t#{@env.program.xml_viewer} file://#{@md.file.output_path.xhtml.dir}/#{@md.file.base_filename.xhtml}#{path}/#{@md.fnb}/#{@md.fn[:xhtml]}"
+ elsif @opt.cmd =~/v/; "#{@env.program.web_browser} file://#{@md.file.output_path.xhtml.dir}/#{@md.file.base_filename.xhtml}"
else @opt.fns
end
@opt.cmd=~/[MVvz]/ \
? SiSU_Screen::Ansi.new(@opt.cmd,'invert','XHTML',tool).colorize \
: SiSU_Screen::Ansi.new(@opt.cmd,'XHTML',tool).green_title_hi
- SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"/#{@md.file.output_path.xhtml}/#{@md.file.base_filename.xhtml}").flow if @opt.cmd =~/[MV]/
+ SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"/#{@md.file.output_path.xhtml.dir}/#{@md.file.base_filename.xhtml}").flow if @opt.cmd =~/[MV]/
end
SiSU_XHTML::Source::Songsheet.new(@particulars).song
rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error
@@ -108,7 +108,7 @@ module SiSU_XHTML
begin
SiSU_XHTML::Source::Scroll.new(@particulars).songsheet
SiSU_XHTML::Source::Tidy.new(@md,@env).xml if @md.opt.cmd =~/[vVM]/ # test wellformedness, comment out when not in use
- SiSU_Rexml::Rexml.new(@md,@file.place_file.xhtml).xml if @md.opt.cmd =~/M/ # test rexml parsing, comment out when not in use #debug
+ SiSU_Rexml::Rexml.new(@md,@file.place_file.xhtml.dir).xml if @md.opt.cmd =~/M/ # test rexml parsing, comment out when not in use #debug
rescue; SiSU_Errors::Info_error.new($!,$@,@md.opt.cmd,@md.fns).error
ensure
end
diff --git a/lib/sisu/v3/xml.rb b/lib/sisu/v3/xml.rb
index 1e68000b..e821cfd4 100644
--- a/lib/sisu/v3/xml.rb
+++ b/lib/sisu/v3/xml.rb
@@ -83,14 +83,14 @@ module SiSU_XML_SAX
unless @opt.cmd =~/q/
path=@env.path.output_tell
loc=@env.url.output_tell
- tool=if @opt.cmd =~/[MV]/; "#{@env.program.web_browser} file://#{@md.file.output_path.xml_sax}/#{@md.file.base_filename.xml_sax}\n\t#{@env.program.xml_viewer} file://#{@md.file.output_path.xml_sax}/#{@md.file.base_filename.xml_sax}"
- elsif @opt.cmd =~/v/; "#{@env.program.web_browser} file://#{@md.file.output_path.xml_sax}/#{@md.file.base_filename.xml_sax}"
+ tool=if @opt.cmd =~/[MV]/; "#{@env.program.web_browser} file://#{@md.file.output_path.xml_sax.dir}/#{@md.file.base_filename.xml_sax}\n\t#{@env.program.xml_viewer} file://#{@md.file.output_path.xml_sax.dir}/#{@md.file.base_filename.xml_sax}"
+ elsif @opt.cmd =~/v/; "#{@env.program.web_browser} file://#{@md.file.output_path.xml_sax.dir}/#{@md.file.base_filename.xml_sax}"
else @opt.fns
end
@opt.cmd=~/[MVvz]/ \
? SiSU_Screen::Ansi.new(@opt.cmd,'invert','XML SAX',tool).colorize \
: SiSU_Screen::Ansi.new(@opt.cmd,'XML SAX',tool).green_title_hi
- SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"file://#{@md.file.output_path.xml_sax}/#{@md.file.base_filename.xml_sax}").flow if @opt.cmd =~/[MV]/
+ SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"file://#{@md.file.output_path.xml_sax.dir}/#{@md.file.base_filename.xml_sax}").flow if @opt.cmd =~/[MV]/
end
SiSU_XML_SAX::Source::Songsheet.new(@particulars).song
rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error
@@ -108,7 +108,7 @@ module SiSU_XML_SAX
begin
SiSU_XML_SAX::Source::Scroll.new(@particulars).songsheet
SiSU_XML_SAX::Source::Tidy.new(@md,@env).xml if @md.opt.cmd =~/[vVM]/ # test wellformedness, comment out when not in use
- SiSU_Rexml::Rexml.new(@md,@file.place_file.xml_sax).xml if @md.opt.cmd =~/M/ # test rexml parsing, comment out when not in use #debug
+ SiSU_Rexml::Rexml.new(@md,@file.place_file.xml_sax.dir).xml if @md.opt.cmd =~/M/ # test rexml parsing, comment out when not in use #debug
rescue; SiSU_Errors::Info_error.new($!,$@,@md.opt.cmd,@md.fns).error
ensure
end
diff --git a/lib/sisu/v3/xml_dom.rb b/lib/sisu/v3/xml_dom.rb
index 3f18a1b8..db6a8786 100644
--- a/lib/sisu/v3/xml_dom.rb
+++ b/lib/sisu/v3/xml_dom.rb
@@ -81,14 +81,14 @@ module SiSU_XML_DOM
unless @opt.cmd =~/q/
path=@env.path.output_tell
loc=@env.url.output_tell
- tool=if @opt.cmd =~/[MV]/; "#{@env.program.web_browser} file://#{@md.file.output_path.xml_dom}/#{@md.file.base_filename.xml_dom}\n\t#{@env.program.xml_viewer} file://#{@md.file.output_path.xml_dom}/#{@md.file.base_filename.xml_dom}"
- elsif @opt.cmd =~/v/; "#{@env.program.web_browser} file://#{@md.file.output_path.xml_dom}/#{@md.file.base_filename.xml_dom}"
+ tool=if @opt.cmd =~/[MV]/; "#{@env.program.web_browser} file://#{@md.file.output_path.xml_dom.dir}/#{@md.file.base_filename.xml_dom}\n\t#{@env.program.xml_viewer} file://#{@md.file.output_path.xml_dom.dir}/#{@md.file.base_filename.xml_dom}"
+ elsif @opt.cmd =~/v/; "#{@env.program.web_browser} file://#{@md.file.output_path.xml_dom.dir}/#{@md.file.base_filename.xml_dom}"
else @opt.fns
end
@opt.cmd=~/[MVvz]/ \
? SiSU_Screen::Ansi.new(@opt.cmd,'invert','XML DOM',tool).colorize \
: SiSU_Screen::Ansi.new(@opt.cmd,'XML DOM',tool).green_title_hi
- SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"file://#{@md.file.output_path.xml_dom}/#{@md.file.base_filename.xml_dom}").flow if @opt.cmd =~/[MV]/
+ SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"file://#{@md.file.output_path.xml_dom.dir}/#{@md.file.base_filename.xml_dom}").flow if @opt.cmd =~/[MV]/
end
SiSU_XML_DOM::Source::Songsheet.new(@particulars).songsheet
rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error
@@ -105,7 +105,7 @@ module SiSU_XML_DOM
begin
SiSU_XML_DOM::Source::Scroll.new(@particulars).songsheet
SiSU_XML_DOM::Source::Tidy.new(@md,@env).xml if @md.opt.cmd =~/[vVM]/ # test wellformedness, comment out when not in use
- SiSU_Rexml::Rexml.new(@md,@file.place_file.xml_dom).xml if @md.opt.cmd =~/M/ # test rexml parsing, comment out when not in use #debug
+ SiSU_Rexml::Rexml.new(@md,@file.place_file.xml_dom.dir).xml if @md.opt.cmd =~/M/ # test rexml parsing, comment out when not in use #debug
rescue; SiSU_Errors::Info_error.new($!,$@,@md.opt.cmd,@md.fns).error
ensure
end