diff options
author | Ralph Amissah <ralph@amissah.com> | 2012-04-05 14:50:11 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2012-04-05 14:50:11 -0400 |
commit | be4009ac43cf1fac13f7879ee76f67eaf52a8dcd (patch) | |
tree | 57bc0a23cbf54d32ad822d76471aa11ec704b8b4 | |
parent | debian/changelog (3.2.1-1) (diff) | |
parent | v3: sql creation -v reporting reduced (diff) |
Merge tag 'sisu_3.2.2' into debian/sid
-rw-r--r-- | data/doc/sisu/CHANGELOG_v3 | 23 | ||||
-rw-r--r-- | data/sisu/v3/v/version.yml | 6 | ||||
-rw-r--r-- | lib/sisu/v3/db_create.rb | 12 | ||||
-rw-r--r-- | lib/sisu/v3/db_indexes.rb | 4 | ||||
-rw-r--r-- | lib/sisu/v3/dbi_discreet.rb | 1 | ||||
-rw-r--r-- | lib/sisu/v3/options.rb | 11 | ||||
-rw-r--r-- | lib/sisu/v3/sysenv.rb | 12 | ||||
-rw-r--r-- | lib/sisu/v3/urls.rb | 93 |
8 files changed, 99 insertions, 63 deletions
diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index 27e07187..1509ec43 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -13,15 +13,30 @@ Reverse Chronological: %% Development branch UNSTABLE v3 branch once stable will supersede & replace current stable v2 branch +%% 3.2.2.orig.tar.xz (2012-04-05:14/4) +http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/sisu_3.2.2 +http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/debian/sisu_3.2.2-1 +http://www.jus.uio.no/sisu/pkg/src/sisu_3.2.2.orig.tar.xz + sisu_3.2.2.orig.tar.xz + sisu_3.2.2-1.dsc + sisu_3.2.2-1.debian.tar.gz + + * v3: reporting + * urls + * sql creation -v reporting reduced (to better suit use of + sqlite_discreet with other output types) for more use -V or -M + + * v3: sysenv, path.style (a quick fix, review) + %% 3.2.1.orig.tar.xz (2012-03-21:12/3) http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/sisu_3.2.1 http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/debian/sisu_3.2.1-1 http://www.jus.uio.no/sisu/pkg/src/sisu_3.2.1.orig.tar.xz - sisu_3.2.1.orig.tar.xz - sisu_3.2.1-1.dsc - sisu_3.2.1-1.debian.tar.gz + 802f173db7918c1b7cc8f75060561725c7366e1addda6fda2367a11bcd55ae07 1680956 sisu_3.2.1.orig.tar.xz + 99de0bf1930f7dae8feec4cc7d0809c81c89ac50c9a7c0e7974d6dc91770d82f 1382 sisu_3.2.1-1.dsc + ef8acf443ac79122fd0da79d25ea94c659bcf8bcd4f631d58e4c1f3b94b2c788 294764 sisu_3.2.1-1.debian.tar.gz -* v3, documentation sisu_commands, rearranged; update with regard to +* v3: documentation sisu_commands, rearranged; update with regard to excludes; & discreet sqlite output * manpage * html (man2html) diff --git a/data/sisu/v3/v/version.yml b/data/sisu/v3/v/version.yml index a7141997..0b0e9d69 100644 --- a/data/sisu/v3/v/version.yml +++ b/data/sisu/v3/v/version.yml @@ -1,5 +1,5 @@ --- -:version: 3.2.1 -:date_stamp: 2012w12/3 -:date: "2012-03-21" +:version: 3.2.2 +:date_stamp: 2012w14/4 +:date: "2012-04-05" :project: SiSU diff --git a/lib/sisu/v3/db_create.rb b/lib/sisu/v3/db_create.rb index 627f0ea5..02c33b99 100644 --- a/lib/sisu/v3/db_create.rb +++ b/lib/sisu/v3/db_create.rb @@ -99,7 +99,7 @@ module SiSU_DbCreate to be populated from document files create tables metadata_and_text data import through ruby transfer - } unless @opt.cmd =~/q/ + } if @opt.cmd =~/[VM]/ @conn.execute(%{ CREATE TABLE metadata_and_text ( tid BIGINT PRIMARY KEY, @@ -210,7 +210,7 @@ module SiSU_DbCreate to be populated from documents files create tables doc_objects data import through ruby transfer - } unless @opt.cmd =~/q/ + } if @opt.cmd =~/[VM]/ @conn.execute(%{ CREATE TABLE doc_objects ( lid BIGINT PRIMARY KEY, @@ -251,7 +251,7 @@ module SiSU_DbCreate to be populated from document files create tables endnotes data import through ruby transfer - } unless @opt.cmd =~/q/ + } if @opt.cmd =~/[VM]/ @conn.execute(%{ CREATE TABLE endnotes ( nid BIGINT PRIMARY KEY, @@ -273,7 +273,7 @@ module SiSU_DbCreate to be populated from document files create tables endnotes_asterisk data import through ruby transfer - } unless @opt.cmd =~/q/ + } if @opt.cmd =~/[VM]/ @conn.execute(%{ CREATE TABLE endnotes_asterisk ( nid BIGINT PRIMARY KEY, @@ -295,7 +295,7 @@ module SiSU_DbCreate to be populated from document files create tables endnotes_plus data import through ruby transfer - } unless @opt.cmd =~/q/ + } if @opt.cmd =~/[VM]/ @conn.execute(%{ CREATE TABLE endnotes_plus ( nid BIGINT PRIMARY KEY, @@ -318,7 +318,7 @@ module SiSU_DbCreate to be populated from doc_objects files create tables urls data import through ruby transfer - } unless @opt.cmd =~/q/ + } if @opt.cmd =~/[VM]/ @conn.execute(%{ CREATE TABLE urls ( metadata_tid BIGINT REFERENCES metadata_and_text, diff --git a/lib/sisu/v3/db_indexes.rb b/lib/sisu/v3/db_indexes.rb index f61c584f..0f41c5df 100644 --- a/lib/sisu/v3/db_indexes.rb +++ b/lib/sisu/v3/db_indexes.rb @@ -71,7 +71,7 @@ module SiSU_DbIndex end end def base - print "\n create documents common indexes\n" unless @opt.cmd =~/q/ + print "\n create documents common indexes\n" if @opt.cmd =~/[VM]/ sql_arr=[ %{CREATE INDEX idx_ocn ON doc_objects(ocn);}, %{CREATE INDEX idx_digest_clean ON doc_objects(digest_clean);}, @@ -99,7 +99,7 @@ module SiSU_DbIndex conn_execute_array(sql_arr) end def text - print "\n create documents TEXT indexes\n" unless @opt.cmd =~/q/ + print "\n create documents TEXT indexes\n" if @opt.cmd =~/[VM]/ sql_arr=[ %{CREATE INDEX idx_clean ON doc_objects(clean);}, %{CREATE INDEX idx_endnote ON endnotes(clean);} diff --git a/lib/sisu/v3/dbi_discreet.rb b/lib/sisu/v3/dbi_discreet.rb index d9ecd8e7..61ab3a3d 100644 --- a/lib/sisu/v3/dbi_discreet.rb +++ b/lib/sisu/v3/dbi_discreet.rb @@ -118,6 +118,7 @@ module SiSU_DBI_Discreet #% database building sdb_index=SiSU_DbDBI::Index.new(@opt,conn,@file,'sqlite') sdb.output_dir? begin + SiSU_Screen::Ansi.new(@opt.cmd,'SQLite',"[#{@opt.f_pth[:lng_is]}] #{@opt.fns}").green_title_hi unless @opt.cmd =~/q/ sdb.create_db sdb.create_table.metadata_and_text sdb.create_table.doc_objects diff --git a/lib/sisu/v3/options.rb b/lib/sisu/v3/options.rb index 11d03e1d..3db80231 100644 --- a/lib/sisu/v3/options.rb +++ b/lib/sisu/v3/options.rb @@ -357,7 +357,7 @@ module SiSU_Commandline when /^--(?:od[ft])$/; c=c+'o' when /^--(?:pdf)$/; c=c+'p' when /^--(?:concordance|wordmap)$/; c=c+'w' - when /^--(?:manpage)$/; c=c+'i' + when /^--(?:manpage|man)$/; c=c+'i' when /^--(?:texinfo)$/; c=c+'I' when /^--(?:xhtml)$/; c=c+'b' when /^--(?:xml-sax)$/; c=c+'x' @@ -379,6 +379,7 @@ module SiSU_Commandline when /^--(?:zap|delete)$/; c=c+'Z' when /^--(?:sample-search-form)$/; c=c+'F' when /^--(?:webserv|webrick)$/; c=c+'W' + when /^--(?:profile)$/; c=c+'E' when /^--(?:maintenance|keep-processing-files)$/; c=c+'M' when /^--(?:verbose[=-]3)$/; c=c+'VM' when /^--(?:verbose[=-]2|Verbose|VERBOSE)$/; c=c+'V' @@ -486,6 +487,10 @@ module SiSU_Commandline || mod.inspect =~/"--maintenance|--keep-processing-files"/) \ ? { bool: true, set: :on } : { bool: false, set: :na } + act[:profile]=(cmd =~/E/ \ + || mod.inspect =~/"--profile"/) \ + ? { bool: true, set: :on } + : { bool: false, set: :na } act[:switch]=if mod.inspect =~/"--switch-off=/ off_list=mod.join(';').gsub(/^.*--switch-off=['"]?(.+?)(?:['"];.+)?$/,'\1') off_list=off_list.scan(/[^,;\s]+/) @@ -625,7 +630,7 @@ module SiSU_Commandline ? { bool: true, set: :on } : { bool: false, set: :na } act[:odt]=(cmd =~/o/ \ - || mod.inspect =~/"--odf"/) \ + || mod.inspect =~/"--odt"|"--odf"/) \ ? { bool: true, set: :on } : { bool: false, set: :na } act[:xml_sax]=(cmd =~/x/ \ @@ -645,7 +650,7 @@ module SiSU_Commandline ? { bool: true, set: :on } : { bool: false, set: :na } act[:manpage]=(cmd =~/i/ \ - || mod.inspect =~/"--manpage"/) \ + || mod.inspect =~/"--manpage"|"--man"/) \ ? { bool: true, set: :on } : { bool: false, set: :na } act[:texinfo]=(cmd =~/I/ \ diff --git a/lib/sisu/v3/sysenv.rb b/lib/sisu/v3/sysenv.rb index 4383a893..442795c9 100644 --- a/lib/sisu/v3/sysenv.rb +++ b/lib/sisu/v3/sysenv.rb @@ -590,6 +590,7 @@ module SiSU_Env odf: filename(code,'','.odt'), epub: filename(code,'','.epub'), plain: filename(code,'','.txt'), + qrcode: filename(code,'','.jpg'), manpage: filename(code,'','.1'), #fix, section number wiki: filename(code,'wiki','.txt'), digest: filename(code,'digest','.txt'), @@ -848,7 +849,7 @@ module SiSU_Env elsif @cmd =~/V/; FileUtils::rm(@input) elsif @cmd !~/q/; FileUtils::rm(@input) elsif @cmd =~/q/; FileUtils::rm(@input) - else puts "\tWARN: operation ignored" + else puts "\tWARN: operation ignored" end end end @@ -1852,10 +1853,11 @@ WOK defaults[:sisu_share] end def style - if (@md.opt.opt_act[:dump][:bool] \ - && @md.opt.opt_act[:dump][:inst]) \ - || (@md.opt.opt_act[:redirect][:bool] \ - && @md.opt.opt_act[:redirect][:inst]) + if @md \ + && ((@md.opt.opt_act[:dump][:bool] \ + && @md.opt.opt_act[:dump][:inst]) \ + || (@md.opt.opt_act[:redirect][:bool] \ + && @md.opt.opt_act[:redirect][:inst])) 'css' else defaults[:stylesheet_stub] diff --git a/lib/sisu/v3/urls.rb b/lib/sisu/v3/urls.rb index 31614a37..ddb62fa7 100644 --- a/lib/sisu/v3/urls.rb +++ b/lib/sisu/v3/urls.rb @@ -93,20 +93,18 @@ module SiSU_Urls else 'not recognised file' end @u ||= { - 'a --txt (Plain-text (footnotes))'=>@fn[:plain], 'b --xhtml (XHTML)'=>@fn[:xhtml], 'D[iu] --psql (DBI import/update postgresql)'=>'dbi psql', - 'd[iu] --sqlite (DBI import/update sqlite)'=>'dbi sqlite3', + 'd --sqlite (DBI sqlite)'=>'dbi sqlite3', + 'd[iu] --sqlite (DBI sqlite)'=>'dbi sqlite3', 'e --epub (EPUB)'=>@fn[:epub], 'P --pot (Pot)'=>@fn[:pot], 'h --html (HTML segmented)'=>@fn[:toc], - 'H --html (HTML segmented)'=>@fn[:toc], 'h --html (HTML scroll)'=>@fn[:doc], - 'H --html (HTML scroll)'=>@fn[:doc], 'I --texinfo (Info file)'=>'info', - 'i --man (manpage)'=>'manpage', + 'i --manpage (manpage)'=>'manpage', 'm --dal (Document Abstraction)'=>'dal', - 'N (Digests md5/sha256)'=>@fn[:digest], + 'N --hash-digests (Digests md5/sha256)'=>@fn[:digest], 'o --odt (ODF:ODT - Open Document)'=>@fn[:odf], 'p --pdf (PDF landscape)'=>@fn[:pdf_l], 'p --pdf (PDF portrait)'=>@fn[:pdf_p], @@ -116,6 +114,7 @@ module SiSU_Urls 't --txt (Plain-text (endnotes))'=>@fn[:plain], 'x --xml-sax (XML sax type)'=>@fn[:sax], 'X --xml-dom (XML dom type)'=>@fn[:dom], + 'Q --qrcode (QR Code jpg)'=>@fn[:qrcode], 'y --manifest (Manifest, html)'=>@fn[:manifest], 'Y (Sitemap, xml)'=>@fn[:sitemap], 'w --concordance (Concordance, html)'=>@fn[:concordance], @@ -160,6 +159,9 @@ module SiSU_Urls def concordance(x) SiSU_Screen::Ansi.new(@opt.cmd,"[#{@opt.f_pth[:lng_is]}] -#{x}","#{@prog.web_browser} file://#{@md.file.output_path.html_concordance.dir}/#{@md.file.base_filename.html_concordance}").result end + def qrcode(x) + SiSU_Screen::Ansi.new(@opt.cmd,"[#{@opt.f_pth[:lng_is]}] -#{x}","#{@prog.web_browser} file://#{@md.file.output_path.manifest.dir}/#{@md.file.base_filename.manifest}").result + end def manifest(x) SiSU_Screen::Ansi.new(@opt.cmd,"[#{@opt.f_pth[:lng_is]}] -#{x}","#{@prog.web_browser} file://#{@md.file.output_path.manifest.dir}/#{@md.file.base_filename.manifest}").result end @@ -215,7 +217,10 @@ module SiSU_Urls SiSU_Screen::Ansi.new(@opt.cmd,"[#{@opt.f_pth[:lng_is]}] -#{x} DBI psql","#{@pwd_stub}::#{@opt.fns}",y).result end def sqlite(x,y) - SiSU_Screen::Ansi.new(@opt.cmd,"[#{@opt.f_pth[:lng_is]}] -#{x} DBI sqlite","sqlite3 #{@md.file.output_path.sqlite_discreet.dir}/#{@md.file.base_filename.sqlite_discreet}\n sqlite3 #{@env.path.webserv}/#{@md.opt.f_pth[:pth_stub]}/sisu_sqlite.db\n", "#{y}").result + SiSU_Screen::Ansi.new(@opt.cmd,"[#{@opt.f_pth[:lng_is]}] -#{x} DBI sqlite","sqlite3 #{@env.path.webserv}/#{@md.opt.f_pth[:pth_stub]}/sisu_sqlite.db").result + end + def sqlite_discreet(x,y) + SiSU_Screen::Ansi.new(@opt.cmd,"[#{@opt.f_pth[:lng_is]}] -#{x}","sqlite3 #{@md.file.output_path.sqlite_discreet.dir}/#{@md.file.base_filename.sqlite_discreet}").result end self end @@ -284,48 +289,52 @@ module SiSU_Urls @u.each do |x,y| if @opt.fns =~ @m_regular if @opt.cmd =~/[MVv]/ - if (x=~/^a/ and @opt.cmd =~/a/) \ - or (x=~/^t/ and @opt.cmd =~/t/) + if x=~/--txt\b/ \ + and @opt.act[:txt][:set]==:on show.text(x) end - if x=~/^b/ \ - and @opt.cmd =~/b/ + if x=~/--xhtml\b/ \ + and @opt.act[:xhtml][:set]==:on show.xhtml(x) end - if x=~/^D/ \ - and @opt.cmd =~/D/ + if x=~/--psql\b/ \ + and @opt.act[:psql][:set]==:on show.db.psql(x,y) end - if x=~/^d/ \ - and @opt.cmd =~/d/ + if x=~/d\s+--sqlite\b|--sql\b/ \ + and @opt.act[:sqlite_discreet][:set]==:on + show.db.sqlite_discreet(x,y) + end + if x=~/d\[iu\]\s+--sqlite\b/ \ + and @opt.act[:sqlite][:set]==:on show.db.sqlite(x,y) end - if x=~/^e/ \ - and @opt.cmd =~/e/ + if x=~/--epub\b/ \ + and @opt.act[:epub][:set]==:on show.epub(x) end - if x=~/^h/ \ - and @opt.cmd =~/h/ + if x=~/--html\b/ \ + and @opt.act[:html][:set]==:on if x =~/scroll/ show.html.scroll(x) else show.html.toc(x) end end - if x=~/^I/ \ + if x=~/--texinfo\b/ \ and @opt.cmd =~/I/ show.pinfo(x,y) end - if x=~/^i/ \ - and @opt.cmd =~/i/ + if x=~/--manpage\b/ \ + and @opt.act[:manpage][:set]==:on show.manpage(x) end - if x=~/^N/ \ + if x=~/--hash-digests\b/ \ and @opt.cmd =~/N/ show.hash_digest(x) end - if x=~/^o/ \ - and @opt.cmd =~/o/ + if x=~/--odt\b|--odf\b/ \ + and @opt.act[:odt][:set]==:on show.odt(x) end if x=~/^P/ \ @@ -337,43 +346,47 @@ module SiSU_Urls show.po4a.pot(x,f) end end - if x=~/^p/ \ - and @opt.cmd =~/p/ + if x=~/--pdf\b/ \ + and @opt.act[:pdf][:set]==:on if x =~/portrait/ show.pdf.portrait(x) else show.pdf.landscape(x) end end - if x=~/^S/ \ - and @opt.cmd =~/S/ + if x=~/--sisupod\b/ \ + and @opt.act[:sisupod][:set]==:on (@opt.fns =~/\.ssm\.sst$/) \ ? y.gsub(/(?:\~\S{2,3})?(\.ssm.sst\.txz)$/,'.ssm.txz') : y.gsub(/(?:\~\S{2,3})?(\.sst\.txz)$/,'\1') show.source.pod(x,y) end - if x=~/^s/ \ - and @opt.cmd =~/s/ + if x=~/--source\b/ \ + and @opt.act[:share_source][:set]==:on show.source.src(x,y) end - if x=~/^w/ \ - and @opt.cmd =~/w/ + if x=~/--concordance\b/ \ + and @opt.act[:concordance][:set]==:on show.html.concordance(x) end - if x=~/^X/ \ - and @opt.cmd =~/X/ + if x=~/--xml-dom\b/ \ + and @opt.act[:xml_dom][:set]==:on show.xml.dom(x) end - if x=~/^x/ \ - and @opt.cmd =~/x/ + if x=~/--xml-sax\b/ \ + and @opt.act[:xml_sax][:set]==:on show.xml.sax(x) end - if x=~/^Y/ \ + if x=~/--qrcode\b/ \ + and @opt.act[:qrcode][:set]==:on + show.qrcode(x) + end + if x=~/--sitemap\b/ \ and @opt.cmd =~/Y/ #BROKEN show.xml.sitemap(x) end - if x=~/^y/ \ - and @opt.cmd =~/y/ + if x=~/--manifest\b/ \ + and @opt.act[:manifest][:set]==:on show.html.manifest(x) end end |