aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/v3/cgi_pgsql.rb4
-rw-r--r--lib/sisu/v3/cgi_sql_common.rb18
-rw-r--r--lib/sisu/v3/cgi_sqlite.rb4
-rw-r--r--lib/sisu/v3/constants.rb371
-rw-r--r--lib/sisu/v3/hub.rb8
-rw-r--r--lib/sisu/v3/i18n.rb370
-rw-r--r--lib/sisu/v3/options.rb76
-rw-r--r--lib/sisu/v3/sysenv.rb16
8 files changed, 468 insertions, 399 deletions
diff --git a/lib/sisu/v3/cgi_pgsql.rb b/lib/sisu/v3/cgi_pgsql.rb
index 4afda106..aa4a02e8 100644
--- a/lib/sisu/v3/cgi_pgsql.rb
+++ b/lib/sisu/v3/cgi_pgsql.rb
@@ -186,7 +186,7 @@ module SiSU_CGI_pgsql
def sql_select_body
limit ||=@@limit
offset ||=@@offset
- @sql_statement[:body]=%{SELECT metadata_and_text.title, metadata_and_text.creator_author, metadata_and_text.src_filename, metadata_and_text.notes_suffix, doc_objects.body, doc_objects.seg, doc_objects.ocn, metadata_and_text.tid FROM doc_objects, metadata_and_text WHERE (#{@search_text}) AND doc_objects.metadata_tid = metadata_and_text.tid ORDER BY metadata_and_text.title, metadata_and_text.src_filename, doc_objects.ocn}
+ @sql_statement[:body]=%{SELECT metadata_and_text.title, metadata_and_text.creator_author, metadata_and_text.src_filename, metadata_and_text.language_document_char, metadata_and_text.notes_suffix, doc_objects.body, doc_objects.seg, doc_objects.ocn, metadata_and_text.tid FROM doc_objects, metadata_and_text WHERE (#{@search_text}) AND doc_objects.metadata_tid = metadata_and_text.tid ORDER BY metadata_and_text.language_document_char, metadata_and_text.title, metadata_and_text.src_filename, doc_objects.ocn}
@sql_statement[:range]=%{LIMIT #{limit} OFFSET #{offset} ;}
select=@sql_statement[:body] + ' ' + @sql_statement[:range]
select
@@ -194,7 +194,7 @@ module SiSU_CGI_pgsql
def sql_select_endnotes
limit ||=@@limit
offset ||=@@offset
- @sql_statement[:endnotes]=%{SELECT metadata_and_text.title, metadata_and_text.creator_author, metadata_and_text.src_filename, endnotes.body, endnotes.nr, endnotes.ocn, endnotes.metadata_tid FROM metadata_and_text, endnotes WHERE (#{@search_endnotes}) AND metadata_and_text.tid = endnotes.metadata_tid ORDER BY metadata_and_text.title, metadata_and_text.src_filename, endnotes.nr}
+ @sql_statement[:endnotes]=%{SELECT metadata_and_text.title, metadata_and_text.creator_author, metadata_and_text.src_filename, metadata_and_text.language_document_char, endnotes.body, endnotes.nr, endnotes.ocn, endnotes.metadata_tid FROM metadata_and_text, endnotes WHERE (#{@search_endnotes}) AND metadata_and_text.tid = endnotes.metadata_tid ORDER BY metadata_and_text.language_document_char, metadata_and_text.title, metadata_and_text.src_filename, endnotes.nr}
@sql_statement[:range]=%{LIMIT #{limit} OFFSET #{offset} ;}
select=@sql_statement[:endnotes] + ' ' + @sql_statement[:range]
select
diff --git a/lib/sisu/v3/cgi_sql_common.rb b/lib/sisu/v3/cgi_sql_common.rb
index 0f56f77f..c782d48f 100644
--- a/lib/sisu/v3/cgi_sql_common.rb
+++ b/lib/sisu/v3/cgi_sql_common.rb
@@ -406,7 +406,7 @@ module SiSU_CGI_sql
search[:text] << st[:search]
search[:endnotes] << st[:search]
end
- st=Dbi_search_string.new('metadata_and_text.title_language',search_for.language,q['lang'],cse).string
+ st=Dbi_search_string.new('metadata_and_text.language_document_char',search_for.language,q['lang'],cse).string
if st[:flag]
search[:text] << st[:search]
search[:endnotes] << st[:search]
@@ -837,7 +837,7 @@ module SiSU_CGI_sql
when /language/
<<-'WOK_SQL'
def path_manifest(fn,ln=nil)
- "#{@hostpath}/#{ln}/manifest/#{fn}.manifest.html"
+ "#{@hostpath}/#{ln}/manifest/#{fn}.html"
end
def path_html_seg(fn,ln=nil)
"#{@hostpath}/#{ln}/html/#{fn}"
@@ -849,7 +849,7 @@ module SiSU_CGI_sql
when /filetype/
<<-'WOK_SQL'
def path_manifest(fn,ln=nil)
- "#{@hostpath}/manifest/#{fn}.manifest.html"
+ "#{@hostpath}/manifest/#{fn}.html"
end
def path_html_seg(fn,ln=nil)
"#{@hostpath}/html/#{fn}"
@@ -888,9 +888,9 @@ module SiSU_CGI_sql
if c['tid'].to_i != oldtid.to_i
ti=c['title']
can_txt_srch=(cgi['view']=~/index/) \
- ? %{<a href="#{@canned_base_url}&fns=#{c['src_filename']}&view=text"><img border="0" width="24" height="16" src="#{@image_src}/b_search.png" alt="search"></a>&nbsp;} \
- : %{<a href="#{@canned_base_url}&fns=#{c['src_filename']}&view=index"><img border="0" width="24" height="16" src="#{@image_src}/b_search.png" alt="search"></a>&nbsp;}
- title=%{<span style="background-color: #{@color_heading}"><a href="#{path_html_seg(location,@ln)}/toc.html"><img border="0" width="15" height="18" src="#{@image_src}/b_toc.png" alt="toc html">&nbsp;#{ti}</a></span> by #{c['creator_author']} #{can_txt_srch}<a href="#{path_html_seg(location,@ln)}/toc.html"><img border="0" width="15" height="18" src="#{@image_src}/b_toc.png" alt="toc html"></a>&nbsp;<a href="#{path_manifest(location,@ln)}"><img border="0" width="15" height="15" src="#{@image_src}/b_info.png" alt="manifest"></a><br />} if file_suffix=~/s/ #hmm watch file_suffix
+ ? %{<a href="#{@canned_base_url}&fns=#{c['src_filename']}&lang=#{c['language_document_char']}&view=text"><img border="0" width="24" height="16" src="#{@image_src}/b_search.png" alt="search"></a>&nbsp;} \
+ : %{<a href="#{@canned_base_url}&fns=#{c['src_filename']}&lang=#{c['language_document_char']}&view=index"><img border="0" width="24" height="16" src="#{@image_src}/b_search.png" alt="search"></a>&nbsp;}
+ title=%{<span style="background-color: #{@color_heading}"><a href="#{path_html_seg(location,c['language_document_char'])}/toc.html"><img border="0" width="15" height="18" src="#{@image_src}/b_toc.png" alt="toc html">&nbsp;#{ti}</a></span> [#{c['language_document_char']}] by #{c['creator_author']} #{can_txt_srch}<a href="#{path_html_seg(location,c['language_document_char'])}/toc.html"><img border="0" width="15" height="18" src="#{@image_src}/b_toc.png" alt="toc html"></a>&nbsp;<a href="#{path_manifest(location,c['language_document_char'])}"><img border="0" width="15" height="15" src="#{@image_src}/b_info.png" alt="manifest"></a><br />} if file_suffix=~/s/ #hmm watch file_suffix
title=@text_search_flag \
? '<br /><hr>'+title \
: '<br />'+title
@@ -981,9 +981,9 @@ module SiSU_CGI_sql
if e['metadata_tid'].to_i != oldtid.to_i
ti=e['title']
can_txt_srch=(cgi['view']=~/index/) \
- ? %{<a href="#{@canned_base_url}&fns=#{e['src_filename']}&view=text"><img border="0" width="24" height="16" src="#{@image_src}/b_search.png" alt="search"></a>&nbsp;} \
- : %{<a href="#{@canned_base_url}&fns=#{e['src_filename']}&view=index"><img border="0" width="24" height="16" src="#{@image_src}/b_search.png" alt="search"></a>&nbsp;}
- title=%{<br /><hr><span style="background-color: #{@color_heading}"><a href="#{path_html_seg(location,@ln)}/toc.html"><img border="0" width="15" height="18" src="#{@image_src}/b_toc.png" alt="toc html">&nbsp;#{ti}</a></span> by #{e['creator_author']} #{can_txt_srch}<a href="#{path_html_seg(location,@ln)}/toc.html"><img border="0" width="15" height="18" src="#{@image_src}/b_toc.png" alt="toc html"></a>&nbsp;<a href="#{path_manifest(location,@ln)}"><img border="0" width="15" height="15" src="#{@image_src}/b_info.png" alt="manifest"></a><br />} if file_suffix=~/s/
+ ? %{<a href="#{@canned_base_url}&fns=#{e['src_filename']}&lang=#{c['language_document_char']}&view=text"><img border="0" width="24" height="16" src="#{@image_src}/b_search.png" alt="search"></a>&nbsp;} \
+ : %{<a href="#{@canned_base_url}&fns=#{e['src_filename']}&lang=#{c['language_document_char']}&view=index"><img border="0" width="24" height="16" src="#{@image_src}/b_search.png" alt="search"></a>&nbsp;}
+ title=%{<br /><hr><span style="background-color: #{@color_heading}"><a href="#{path_html_seg(location,@ln)}/toc.html"><img border="0" width="15" height="18" src="#{@image_src}/b_toc.png" alt="toc html">&nbsp;#{ti}</a></span> [#{c['language_document_char']}] by #{e['creator_author']} #{can_txt_srch}<a href="#{path_html_seg(location,@ln)}/toc.html"><img border="0" width="15" height="18" src="#{@image_src}/b_toc.png" alt="toc html"></a>&nbsp;<a href="#{path_manifest(location,@ln)}"><img border="0" width="15" height="15" src="#{@image_src}/b_info.png" alt="manifest"></a><br />} if file_suffix=~/s/
@counter_endn_doc+=1
oldtid=e['metadata_tid'].to_i
else title = ''
diff --git a/lib/sisu/v3/cgi_sqlite.rb b/lib/sisu/v3/cgi_sqlite.rb
index 92178b4e..c0ecaeb5 100644
--- a/lib/sisu/v3/cgi_sqlite.rb
+++ b/lib/sisu/v3/cgi_sqlite.rb
@@ -179,7 +179,7 @@ module SiSU_CGI_sqlite
def sql_select_body
limit ||=@@limit
offset ||=@@offset
- @sql_statement[:body]=%{SELECT metadata_and_text.title, metadata_and_text.creator_author, metadata_and_text.src_filename, metadata_and_text.notes_suffix, doc_objects.body, doc_objects.seg, doc_objects.ocn, metadata_and_text.tid FROM doc_objects, metadata_and_text WHERE #{@search_text} AND doc_objects.metadata_tid = metadata_and_text.tid ORDER BY metadata_and_text.title, metadata_and_text.src_filename, doc_objects.ocn}
+ @sql_statement[:body]=%{SELECT metadata_and_text.title, metadata_and_text.creator_author, metadata_and_text.src_filename, metadata_and_text.language_document_char, metadata_and_text.notes_suffix, doc_objects.body, doc_objects.seg, doc_objects.ocn, metadata_and_text.tid FROM doc_objects, metadata_and_text WHERE #{@search_text} AND doc_objects.metadata_tid = metadata_and_text.tid ORDER BY metadata_and_text.language_document_char, metadata_and_text.title, metadata_and_text.src_filename, doc_objects.ocn}
@sql_statement[:range]=%{LIMIT #{limit} OFFSET #{offset} ;}
select=@sql_statement[:body] + ' ' + @sql_statement[:range]
select
@@ -187,7 +187,7 @@ module SiSU_CGI_sqlite
def sql_select_endnotes
limit ||=@@limit
offset ||=@@offset
- @sql_statement[:endnotes]=%{SELECT metadata_and_text.title, metadata_and_text.creator_author, metadata_and_text.src_filename, endnotes.body, endnotes.nr, endnotes.ocn, endnotes.metadata_tid FROM metadata_and_text, endnotes WHERE #{@search_endnotes} AND metadata_and_text.tid = endnotes.metadata_tid ORDER BY metadata_and_text.title, metadata_and_text.src_filename, endnotes.nr}
+ @sql_statement[:endnotes]=%{SELECT metadata_and_text.title, metadata_and_text.creator_author, metadata_and_text.src_filename, metadata_and_text.language_document_char, endnotes.body, endnotes.nr, endnotes.ocn, endnotes.metadata_tid FROM metadata_and_text, endnotes WHERE #{@search_endnotes} AND metadata_and_text.tid = endnotes.metadata_tid ORDER BY metadata_and_text.language_document_char, metadata_and_text.title, metadata_and_text.src_filename, endnotes.nr}
@sql_statement[:range]=%{LIMIT #{limit} OFFSET #{offset} ;}
select=@sql_statement[:endnotes] + ' ' + @sql_statement[:range]
select
diff --git a/lib/sisu/v3/constants.rb b/lib/sisu/v3/constants.rb
index 57491a7c..5e268f4f 100644
--- a/lib/sisu/v3/constants.rb
+++ b/lib/sisu/v3/constants.rb
@@ -220,374 +220,3 @@ puts "#{__FILE__} #{__LINE__} #{t_o}" if @opt.cmd =~/M/
Iu ⌠ 8992 Il ⌡ <7 ⌈ 8968 >7 ⌉ 8969 7< ⌊ 8970 7> ⌋ 8971
<" 『 12302 >" 』 12303
<' 「 12300 >' 」 12301
-
-#% Language List po4a
-http://www.debian.org/international/l10n/po/
-see polyglossia for subset
-* CSB (Unknown language)
-* KAB (Unknown language)
-* TLH (Unknown language)
-* aa (Afar)
-* ab (Abkhazian)
-* af (Afrikaans)
-* af_ZA (Afrikaans, as spoken in South Africa)
-* am (Amharic)
-* an (Unknown language)
-* ang (Unknown language)
-* ar (Arabic)
-* ar_AR (Arabic, as spoken in Argentina)
-* ar_EG (Arabic, as spoken in Egypt)
-* ar_OM (Arabic, as spoken in Oman)
-* ar_PS (Arabic, as spoken in Palestinian Territory, Occupied)
-* ar_SA (Arabic, as spoken in Saudi Arabia)
-* ar_SY (Arabic, as spoken in Syrian Arab Republic)
-* as (Assamese)
-* ast (Unknown language)
-* ay (Aymara)
-* az (Azerbaijani)
-* az_IR (Azerbaijani, as spoken in Iran)
-* be (Belarusian)
-* be@latin (Unknown language)
-* be@tarask (Unknown language)
-* bem (Unknown language)
-* bg (Bulgarian)
-* bg_BG (Bulgarian, as spoken in Bulgaria)
-* bi (Bislama)
-* bn (Bengali)
-* bn_BD (Bengali, as spoken in Bangladesh)
-* bn_IN (Bengali, as spoken in India)
-* bo (Tibetan)
-* br (Breton)
-* bs (Bosnian)
-* bs_BA (Bosnian, as spoken in Bosnia and Herzegovina)
-* bs_BS (Bosnian, as spoken in Bahamas)
-* byn (Unknown language)
-* ca (Catalan)
-* ca@valencia (Unknown language)
-* ca_AD (Catalan, as spoken in Andorra)
-* ca_ES (Catalan, as spoken in Spain)
-* ca_ES@valencia (Unknown language)
-* ca_FR (Catalan, as spoken in France)
-* ca_IT (Catalan, as spoken in Italy)
-* co (Corsican)
-* crh (Unknown language)
-* cs (Czech)
-* cs_CZ (Czech, as spoken in Czech Republic)
-* csb (Unknown language)
-* cy (Welsh)
-* cy_GB (Welsh, as spoken in Great Britain)
-* cz (Unknown language)
-* da (Danish)
-* da_DK (Danish, as spoken in Denmark)
-* de (German)
-* de_AT (German, as spoken in Austria)
-* de_CH (German, as spoken in Switzerland)
-* de_DE (German, as spoken in Germany)
-* dk (Unknown language)
-* dz (Dzongkha)
-* el (Greek)
-* el_GR (Greek, as spoken in Greece)
-* en (English)
-* en@boldquot (Unknown language)
-* en@quot (Unknown language)
-* en@shaw (Unknown language)
-* en_AU (English, as spoken in Australia)
-* en_CA (English, as spoken in Canada)
-* en_GB (English, as spoken in Great Britain)
-* en_NZ (English, as spoken in New Zealand)
-* en_US (English, as spoken in United States)
-* en_US@piglatin (Unknown language)
-* en_ZA (English, as spoken in South Africa)
-* eo (Esperanto)
-* es (Spanish)
-* es_AR (Spanish, as spoken in Argentina)
-* es_CL (Spanish, as spoken in Chile)
-* es_CO (Spanish, as spoken in Colombia)
-* es_CR (Spanish, as spoken in Costa Rica)
-* es_DO (Spanish, as spoken in Dominican Republic)
-* es_EC (Spanish, as spoken in Ecuador)
-* es_ES (Spanish, as spoken in Spain)
-* es_GA (Spanish, as spoken in Gabon)
-* es_GT (Spanish, as spoken in Guatemala)
-* es_HN (Spanish, as spoken in Honduras)
-* es_LA (Spanish, as spoken in Lao People''s Democratic Republic)
-* es_MX (Spanish, as spoken in Mexico)
-* es_NI (Spanish, as spoken in Nicaragua)
-* es_PA (Spanish, as spoken in Panama)
-* es_PE (Spanish, as spoken in Peru)
-* es_PR (Spanish, as spoken in Puerto Rico)
-* es_SV (Spanish, as spoken in El Salvador)
-* es_UY (Spanish, as spoken in Uruguay)
-* es_VE (Spanish, as spoken in Venezuela)
-* et (Estonian)
-* et_EE (Estonian, as spoken in Estonia)
-* eu (Basque)
-* eu_ES (Basque, as spoken in Spain)
-* fa (Persian)
-* fa_AF (Persian, as spoken in Afghanistan)
-* fa_IR (Persian, as spoken in Iran)
-* fi (Finnish)
-* fi_FI (Finnish, as spoken in Finland)
-* fil (Unknown language)
-* fo (Faeroese)
-* fo_FO (Faeroese, as spoken in Faroe Islands)
-* fr (French)
-* fr_BE (French, as spoken in Belgium)
-* fr_CA (French, as spoken in Canada)
-* fr_CH (French, as spoken in Switzerland)
-* fr_FR (French, as spoken in France)
-* fr_FX (French, as spoken in France, Metropolitan)
-* fr_LU (French, as spoken in Luxembourg)
-* frp (Unknown language)
-* fur (Unknown language)
-* fy (Frisian)
-* fy_NL (Frisian, as spoken in Netherlands)
-* ga (Irish)
-* gd (Gaelic (Scots))
-* gez (Unknown language)
-* gl (Galician)
-* gl_ES (Galician, as spoken in Spain)
-* gn (Guarani)
-* gu (Gujarati)
-* gv (Manx)
-* ha (Hausa)
-* he (Hebrew)
-* he_IL (Hebrew, as spoken in Israel)
-* hi (Hindi)
-* hne (Unknown language)
-* hr (Croatian)
-* hr_HR (Croatian, as spoken in Croatia)
-* ht (Unknown language)
-* hu (Hungarian)
-* hu_HU (Hungarian, as spoken in Hungary)
-* hy (Armenian)
-* ia (Interlingua)
-* id (Indonesian)
-* id_ID (Indonesian, as spoken in Indonesia)
-* ig (Unknown language)
-* io (Unknown language)
-* is (Icelandic)
-* is_IS (Icelandic, as spoken in Iceland)
-* it (Italian)
-* it_CH (Italian, as spoken in Switzerland)
-* it_IT (Italian, as spoken in Italy)
-* iu (Inuktitut)
-* ja (Japanese)
-* ja_JP (Japanese, as spoken in Japan)
-* jv (Unknown language)
-* jv_ID (Unknown language)
-* ka (Georgian)
-* kab (Unknown language)
-* kk (Kazakh)
-* kl (Kalaallisut)
-* km (Khmer)
-* km_KH (Khmer, as spoken in Cambodia)
-* kn (Kannada)
-* ko (Korean)
-* ko_KR (Korean, as spoken in Korea)
-* ks (Kashmiri)
-* ku (Kurdish)
-* kw (Cornish)
-* ky (Kirghiz)
-* la (Latin)
-* lb (Letzeburgesch)
-* lg (Unknown language)
-* li (Unknown language)
-* ln (Lingala)
-* lo (Lao)
-* lt (Lithuanian)
-* lt_LT (Lithuanian, as spoken in Lithuania)
-* lv (Latvian)
-* lv_LV (Latvian, as spoken in Latvia)
-* mai (Unknown language)
-* mal (Unknown language)
-* mg (Malagasy)
-* mi (Maori)
-* mk (Macedonian)
-* mk_MK (Macedonian, as spoken in Macedonia, the Former Yugoslav Republic of)
-* ml (Malayalam)
-* ml_IN (Malayalam, as spoken in India)
-* ml_ML (Malayalam, as spoken in Mali)
-* mn (Mongolian)
-* mr (Marathi)
-* ms (Malay)
-* ms_MY (Malay, as spoken in Malaysia)
-* mt (Maltese)
-* my (Burmese)
-* my_MM (Burmese, as spoken in Myanmar)
-* na (Nauru)
-* nb (Norwegian Bokmål)
-* nb_NO (Norwegian Bokmål, as spoken in Norway)
-* nds (Unknown language)
-* ne (Nepali)
-* new (Unknown language)
-* nl (Dutch)
-* nl_BE (Dutch, as spoken in Belgium)
-* nl_NL (Dutch, as spoken in Netherlands)
-* nn (Norwegian Nynorsk)
-* nn_NO (Norwegian Nynorsk, as spoken in Norway)
-* no (Norwegian)
-* no_NO (Norwegian, as spoken in Norway)
-* nr (Ndebele, South)
-* nso (Unknown language)
-* oc (Occitan (post 1500))
-* oc_FR (Occitan (post 1500), as spoken in France)
-* om (Oromo)
-* or (Oriya)
-* pa (Panjabi)
-* pl (Polish)
-* pl_PL (Polish, as spoken in Poland)
-* pms (Unknown language)
-* ps (Pushto)
-* pt (Portuguese)
-* pt_BR (Portuguese, as spoken in Brazil)
-* pt_PT (Portuguese, as spoken in Portugal)
-* qu (Quechua)
-* rm (Rhaeto-Romance)
-* ro (Romanian)
-* ro_RO (Romanian, as spoken in Romania)
-* ru (Russian)
-* ru_RU (Russian, as spoken in Russia)
-* rw (Kinyarwanda)
-* sa (Sanskrit)
-* sc (Sardinian)
-* sd (Sindhi)
-* se (Sami)
-* se_NO (Sami, as spoken in Norway)
-* si (Sinhalese)
-* si_LK (Sinhalese, as spoken in Sri Lanka)
-* si_SI (Sinhalese, as spoken in Slovenia)
-* sk (Slovak)
-* sk_SK (Slovak, as spoken in Slovakia)
-* sl (Slovenian)
-* sl_SI (Slovenian, as spoken in Slovenia)
-* sl_SL (Slovenian, as spoken in Sierra Leone)
-* so (Somali)
-* sp (Unknown language)
-* sq (Albanian)
-* sq_AL (Albanian, as spoken in Albania)
-* sr (Serbian)
-* sr@Latn (Unknown language)
-* sr@ije (Unknown language)
-* sr@ijekavian (Unknown language)
-* sr@ijekavianlatin (Unknown language)
-* sr@latin (Unknown language)
-* sr_SR (Serbian, as spoken in Suriname)
-* sr_YU (Serbian, as spoken in Yugoslavia)
-* st (Sotho)
-* su (Sundanese)
-* su_ID (Sundanese, as spoken in Indonesia)
-* sv (Swedish)
-* sv_SE (Swedish, as spoken in Sweden)
-* sw (Swahili)
-* ta (Tamil)
-* ta_LK (Tamil, as spoken in Sri Lanka)
-* te (Telugu)
-* tg (Tajik)
-* th (Thai)
-* th_TH (Thai, as spoken in Thailand)
-* ti (Tigrinya)
-* tig (Unknown language)
-* tk (Turkmen)
-* tl (Tagalog)
-* tlh (Unknown language)
-* to (Tonga)
-* tr (Turkish)
-* tr_TR (Turkish, as spoken in Turkey)
-* tt (Tatar)
-* ug (Uighur)
-* ug_CN (Uighur, as spoken in China)
-* uk (Ukrainian)
-* uk_UA (Ukrainian, as spoken in Ukraine)
-* ur (Urdu)
-* ur_PK (Urdu, as spoken in Pakistan)
-* uz (Uzbek)
-* uz@cyrillic (Unknown language)
-* ve (Unknown language)
-* vi (Vietnamese)
-* vi_AR (Vietnamese, as spoken in Argentina)
-* vi_DE (Vietnamese, as spoken in Germany)
-* vi_PL (Vietnamese, as spoken in Poland)
-* vi_TR (Vietnamese, as spoken in Turkey)
-* vi_VN (Vietnamese, as spoken in Vietnam)
-* wa (Unknown language)
-* wal (Unknown language)
-* wo (Wolof)
-* xh (Xhosa)
-* yi (Yiddish)
-* yo (Yoruba)
-* zh (Chinese)
-* zh_CN (Chinese, as spoken in China)
-* zh_HK (Chinese, as spoken in Hong Kong)
-* zh_TW (Chinese, as spoken in Taiwan)
-* zu (Zulu)
-
- 'sq'; 'albanian'
- 'am'; 'amharic'
-#'ar'; 'arabic' # see polyglossia
- 'hy'; 'armenian'
-#''; 'asturian' # polyglossia
-#''; 'bahasai' # polyglossia
-#''; 'bahasam' # polyglossia
- 'eu'; 'basque'
- 'bn'; 'bengali'
- 'pt_BR'; 'brazilian'
- 'br'; 'breton'
- 'bg'; 'bulgarian'
- 'ca'; 'catalan' # see polyglossia
-#''; 'coptic' # polyglossia
- 'hr'; 'croatian'
- 'cs'; 'czech'
- 'da'; 'danish'
-#''; 'divehi' # polyglossia
- 'nl'; 'dutch' # see polyglossia
- 'en'; 'english' # see polyglossia
- 'eo'; 'esperanto' # see polyglossia
- 'et'; 'estonian'
- 'gl'; 'galician'
- 'de'; 'german'
- 'el'; 'greek' #gl ?
- 'he'; 'hebrew'
- 'hi'; 'hindi'
- 'is'; 'icelandic'
- 'ia'; 'interlingua'
- 'ga'; 'irish'
- 'it'; 'italian'
-#''; 'farsi' # polyglossia
- 'fi'; 'finnish'
- 'fr'; 'french'
- 'lo'; 'lao'
- 'la'; 'latin'
- 'lv'; 'latvian'
- 'lt'; 'lithuanian'
-#''; 'lsorbian' # polyglossia
-#''; 'magyar' # polyglossia
- 'ml'; 'malayalam'
- 'mr'; 'marathi'
-#'hu'; 'magyar'
- 'no'; 'norske'
- 'nn'; 'nynorsk'
- 'oc'; 'occitan'
- 'pl'; 'polish'
- 'pt'; 'portuges'
- 'ro'; 'romanian'
- 'ru'; 'russian'
- 'se'; 'samin' #(check sami?)
- 'sa'; 'sanskrit'
- 'sr'; 'serbian'
-#''; 'scottish' # polyglossia (gd (Gaelic (Scots)))
- 'sk'; 'slovak'
- 'sl'; 'slovenian'
- 'es'; 'spanish'
- 'sv'; 'swedish'
- 'ta'; 'tamil'
- 'te'; 'telugu'
- 'th'; 'thai'
- 'tr'; 'turkish'
- 'tk'; 'turkmen'
- 'uk'; 'ukrainian'
- 'ur'; 'urdu'
-#''; 'usorbian' # polyglossia
- 'vi'; 'vietnamese'
- 'cy'; 'welsh'
- 'us'; 'USenglish' # depreciated, see iso-639-2
diff --git a/lib/sisu/v3/hub.rb b/lib/sisu/v3/hub.rb
index 651276cd..5eac0b03 100644
--- a/lib/sisu/v3/hub.rb
+++ b/lib/sisu/v3/hub.rb
@@ -153,7 +153,7 @@ module SiSU
when /^xhtml$/; SiSU_XHTML::Source.new(@opt).read # -b xhtml.rb
when /^xml$/; SiSU_XML_SAX::Source.new(@opt).read # -x xml.rb
when /^xml_dom$/; SiSU_XML_DOM::Source.new(@opt).read # -X xml_dom.rb
- when /^xml_fictionbook$/; SiSU_XML_Fictionbook::Source.new(@opt).read # -f
+ #when /^xml_fictionbook$/; SiSU_XML_Fictionbook::Source.new(@opt).read # -f
when /^xml_scaffold$/; SiSU_XML_scaffold::Source.new(@opt).read # -k xml_scaffold.rb
when /^embedded$/; SiSU_Embedded::Source.new(@opt).read # -m embedded.rb (image and other content) #check
when /^manifest$/; SiSU_Manifest::Source.new(@opt).read # -y manifest.rb
@@ -420,9 +420,9 @@ p "here #{__FILE__} #{__LINE__}" if @opt =~/M/
if @opt.act[:xml_dom] #% --xml-dom, -x xml dom type
op('xml_dom','xml dom')
end
- if @opt.act[:fictionbook] #% --fictionbook, -f fictionbook xml
- op('xml_fictionbook','xml fictionbook')
- end
+ #if @opt.act[:fictionbook] #% --fictionbook, -f fictionbook xml
+ # op('xml_fictionbook','xml fictionbook')
+ #end
if @opt.act[:xhtml] #% --xhtml, -b xhtml
op('xhtml','xhtml sax')
end
diff --git a/lib/sisu/v3/i18n.rb b/lib/sisu/v3/i18n.rb
index 85030697..0666cede 100644
--- a/lib/sisu/v3/i18n.rb
+++ b/lib/sisu/v3/i18n.rb
@@ -294,3 +294,373 @@ module SiSU_text_translation
end
end
end
+#% Language List po4a
+http://www.debian.org/international/l10n/po/
+see polyglossia for subset
+* CSB (Unknown language)
+* KAB (Unknown language)
+* TLH (Unknown language)
+* aa (Afar)
+* ab (Abkhazian)
+* af (Afrikaans)
+* af_ZA (Afrikaans, as spoken in South Africa)
+* am (Amharic)
+* an (Unknown language)
+* ang (Unknown language)
+* ar (Arabic)
+* ar_AR (Arabic, as spoken in Argentina)
+* ar_EG (Arabic, as spoken in Egypt)
+* ar_OM (Arabic, as spoken in Oman)
+* ar_PS (Arabic, as spoken in Palestinian Territory, Occupied)
+* ar_SA (Arabic, as spoken in Saudi Arabia)
+* ar_SY (Arabic, as spoken in Syrian Arab Republic)
+* as (Assamese)
+* ast (Unknown language)
+* ay (Aymara)
+* az (Azerbaijani)
+* az_IR (Azerbaijani, as spoken in Iran)
+* be (Belarusian)
+* be@latin (Unknown language)
+* be@tarask (Unknown language)
+* bem (Unknown language)
+* bg (Bulgarian)
+* bg_BG (Bulgarian, as spoken in Bulgaria)
+* bi (Bislama)
+* bn (Bengali)
+* bn_BD (Bengali, as spoken in Bangladesh)
+* bn_IN (Bengali, as spoken in India)
+* bo (Tibetan)
+* br (Breton)
+* bs (Bosnian)
+* bs_BA (Bosnian, as spoken in Bosnia and Herzegovina)
+* bs_BS (Bosnian, as spoken in Bahamas)
+* byn (Unknown language)
+* ca (Catalan)
+* ca@valencia (Unknown language)
+* ca_AD (Catalan, as spoken in Andorra)
+* ca_ES (Catalan, as spoken in Spain)
+* ca_ES@valencia (Unknown language)
+* ca_FR (Catalan, as spoken in France)
+* ca_IT (Catalan, as spoken in Italy)
+* co (Corsican)
+* crh (Unknown language)
+* cs (Czech)
+* cs_CZ (Czech, as spoken in Czech Republic)
+* csb (Unknown language)
+* cy (Welsh)
+* cy_GB (Welsh, as spoken in Great Britain)
+* cz (Unknown language)
+* da (Danish)
+* da_DK (Danish, as spoken in Denmark)
+* de (German)
+* de_AT (German, as spoken in Austria)
+* de_CH (German, as spoken in Switzerland)
+* de_DE (German, as spoken in Germany)
+* dk (Unknown language)
+* dz (Dzongkha)
+* el (Greek)
+* el_GR (Greek, as spoken in Greece)
+* en (English)
+* en@boldquot (Unknown language)
+* en@quot (Unknown language)
+* en@shaw (Unknown language)
+* en_AU (English, as spoken in Australia)
+* en_CA (English, as spoken in Canada)
+* en_GB (English, as spoken in Great Britain)
+* en_NZ (English, as spoken in New Zealand)
+* en_US (English, as spoken in United States)
+* en_US@piglatin (Unknown language)
+* en_ZA (English, as spoken in South Africa)
+* eo (Esperanto)
+* es (Spanish)
+* es_AR (Spanish, as spoken in Argentina)
+* es_CL (Spanish, as spoken in Chile)
+* es_CO (Spanish, as spoken in Colombia)
+* es_CR (Spanish, as spoken in Costa Rica)
+* es_DO (Spanish, as spoken in Dominican Republic)
+* es_EC (Spanish, as spoken in Ecuador)
+* es_ES (Spanish, as spoken in Spain)
+* es_GA (Spanish, as spoken in Gabon)
+* es_GT (Spanish, as spoken in Guatemala)
+* es_HN (Spanish, as spoken in Honduras)
+* es_LA (Spanish, as spoken in Lao People''s Democratic Republic)
+* es_MX (Spanish, as spoken in Mexico)
+* es_NI (Spanish, as spoken in Nicaragua)
+* es_PA (Spanish, as spoken in Panama)
+* es_PE (Spanish, as spoken in Peru)
+* es_PR (Spanish, as spoken in Puerto Rico)
+* es_SV (Spanish, as spoken in El Salvador)
+* es_UY (Spanish, as spoken in Uruguay)
+* es_VE (Spanish, as spoken in Venezuela)
+* et (Estonian)
+* et_EE (Estonian, as spoken in Estonia)
+* eu (Basque)
+* eu_ES (Basque, as spoken in Spain)
+* fa (Persian)
+* fa_AF (Persian, as spoken in Afghanistan)
+* fa_IR (Persian, as spoken in Iran)
+* fi (Finnish)
+* fi_FI (Finnish, as spoken in Finland)
+* fil (Unknown language)
+* fo (Faeroese)
+* fo_FO (Faeroese, as spoken in Faroe Islands)
+* fr (French)
+* fr_BE (French, as spoken in Belgium)
+* fr_CA (French, as spoken in Canada)
+* fr_CH (French, as spoken in Switzerland)
+* fr_FR (French, as spoken in France)
+* fr_FX (French, as spoken in France, Metropolitan)
+* fr_LU (French, as spoken in Luxembourg)
+* frp (Unknown language)
+* fur (Unknown language)
+* fy (Frisian)
+* fy_NL (Frisian, as spoken in Netherlands)
+* ga (Irish)
+* gd (Gaelic (Scots))
+* gez (Unknown language)
+* gl (Galician)
+* gl_ES (Galician, as spoken in Spain)
+* gn (Guarani)
+* gu (Gujarati)
+* gv (Manx)
+* ha (Hausa)
+* he (Hebrew)
+* he_IL (Hebrew, as spoken in Israel)
+* hi (Hindi)
+* hne (Unknown language)
+* hr (Croatian)
+* hr_HR (Croatian, as spoken in Croatia)
+* ht (Unknown language)
+* hu (Hungarian)
+* hu_HU (Hungarian, as spoken in Hungary)
+* hy (Armenian)
+* ia (Interlingua)
+* id (Indonesian)
+* id_ID (Indonesian, as spoken in Indonesia)
+* ig (Unknown language)
+* io (Unknown language)
+* is (Icelandic)
+* is_IS (Icelandic, as spoken in Iceland)
+* it (Italian)
+* it_CH (Italian, as spoken in Switzerland)
+* it_IT (Italian, as spoken in Italy)
+* iu (Inuktitut)
+* ja (Japanese)
+* ja_JP (Japanese, as spoken in Japan)
+* jv (Unknown language)
+* jv_ID (Unknown language)
+* ka (Georgian)
+* kab (Unknown language)
+* kk (Kazakh)
+* kl (Kalaallisut)
+* km (Khmer)
+* km_KH (Khmer, as spoken in Cambodia)
+* kn (Kannada)
+* ko (Korean)
+* ko_KR (Korean, as spoken in Korea)
+* ks (Kashmiri)
+* ku (Kurdish)
+* kw (Cornish)
+* ky (Kirghiz)
+* la (Latin)
+* lb (Letzeburgesch)
+* lg (Unknown language)
+* li (Unknown language)
+* ln (Lingala)
+* lo (Lao)
+* lt (Lithuanian)
+* lt_LT (Lithuanian, as spoken in Lithuania)
+* lv (Latvian)
+* lv_LV (Latvian, as spoken in Latvia)
+* mai (Unknown language)
+* mal (Unknown language)
+* mg (Malagasy)
+* mi (Maori)
+* mk (Macedonian)
+* mk_MK (Macedonian, as spoken in Macedonia, the Former Yugoslav Republic of)
+* ml (Malayalam)
+* ml_IN (Malayalam, as spoken in India)
+* ml_ML (Malayalam, as spoken in Mali)
+* mn (Mongolian)
+* mr (Marathi)
+* ms (Malay)
+* ms_MY (Malay, as spoken in Malaysia)
+* mt (Maltese)
+* my (Burmese)
+* my_MM (Burmese, as spoken in Myanmar)
+* na (Nauru)
+* nb (Norwegian Bokmål)
+* nb_NO (Norwegian Bokmål, as spoken in Norway)
+* nds (Unknown language)
+* ne (Nepali)
+* new (Unknown language)
+* nl (Dutch)
+* nl_BE (Dutch, as spoken in Belgium)
+* nl_NL (Dutch, as spoken in Netherlands)
+* nn (Norwegian Nynorsk)
+* nn_NO (Norwegian Nynorsk, as spoken in Norway)
+* no (Norwegian)
+* no_NO (Norwegian, as spoken in Norway)
+* nr (Ndebele, South)
+* nso (Unknown language)
+* oc (Occitan (post 1500))
+* oc_FR (Occitan (post 1500), as spoken in France)
+* om (Oromo)
+* or (Oriya)
+* pa (Panjabi)
+* pl (Polish)
+* pl_PL (Polish, as spoken in Poland)
+* pms (Unknown language)
+* ps (Pushto)
+* pt (Portuguese)
+* pt_BR (Portuguese, as spoken in Brazil)
+* pt_PT (Portuguese, as spoken in Portugal)
+* qu (Quechua)
+* rm (Rhaeto-Romance)
+* ro (Romanian)
+* ro_RO (Romanian, as spoken in Romania)
+* ru (Russian)
+* ru_RU (Russian, as spoken in Russia)
+* rw (Kinyarwanda)
+* sa (Sanskrit)
+* sc (Sardinian)
+* sd (Sindhi)
+* se (Sami)
+* se_NO (Sami, as spoken in Norway)
+* si (Sinhalese)
+* si_LK (Sinhalese, as spoken in Sri Lanka)
+* si_SI (Sinhalese, as spoken in Slovenia)
+* sk (Slovak)
+* sk_SK (Slovak, as spoken in Slovakia)
+* sl (Slovenian)
+* sl_SI (Slovenian, as spoken in Slovenia)
+* sl_SL (Slovenian, as spoken in Sierra Leone)
+* so (Somali)
+* sp (Unknown language)
+* sq (Albanian)
+* sq_AL (Albanian, as spoken in Albania)
+* sr (Serbian)
+* sr@Latn (Unknown language)
+* sr@ije (Unknown language)
+* sr@ijekavian (Unknown language)
+* sr@ijekavianlatin (Unknown language)
+* sr@latin (Unknown language)
+* sr_SR (Serbian, as spoken in Suriname)
+* sr_YU (Serbian, as spoken in Yugoslavia)
+* st (Sotho)
+* su (Sundanese)
+* su_ID (Sundanese, as spoken in Indonesia)
+* sv (Swedish)
+* sv_SE (Swedish, as spoken in Sweden)
+* sw (Swahili)
+* ta (Tamil)
+* ta_LK (Tamil, as spoken in Sri Lanka)
+* te (Telugu)
+* tg (Tajik)
+* th (Thai)
+* th_TH (Thai, as spoken in Thailand)
+* ti (Tigrinya)
+* tig (Unknown language)
+* tk (Turkmen)
+* tl (Tagalog)
+* tlh (Unknown language)
+* to (Tonga)
+* tr (Turkish)
+* tr_TR (Turkish, as spoken in Turkey)
+* tt (Tatar)
+* ug (Uighur)
+* ug_CN (Uighur, as spoken in China)
+* uk (Ukrainian)
+* uk_UA (Ukrainian, as spoken in Ukraine)
+* ur (Urdu)
+* ur_PK (Urdu, as spoken in Pakistan)
+* uz (Uzbek)
+* uz@cyrillic (Unknown language)
+* ve (Unknown language)
+* vi (Vietnamese)
+* vi_AR (Vietnamese, as spoken in Argentina)
+* vi_DE (Vietnamese, as spoken in Germany)
+* vi_PL (Vietnamese, as spoken in Poland)
+* vi_TR (Vietnamese, as spoken in Turkey)
+* vi_VN (Vietnamese, as spoken in Vietnam)
+* wa (Unknown language)
+* wal (Unknown language)
+* wo (Wolof)
+* xh (Xhosa)
+* yi (Yiddish)
+* yo (Yoruba)
+* zh (Chinese)
+* zh_CN (Chinese, as spoken in China)
+* zh_HK (Chinese, as spoken in Hong Kong)
+* zh_TW (Chinese, as spoken in Taiwan)
+* zu (Zulu)
+
+ 'sq'; 'albanian'
+ 'am'; 'amharic'
+#'ar'; 'arabic' # see polyglossia
+ 'hy'; 'armenian'
+#''; 'asturian' # polyglossia
+#''; 'bahasai' # polyglossia
+#''; 'bahasam' # polyglossia
+ 'eu'; 'basque'
+ 'bn'; 'bengali'
+ 'pt_BR'; 'brazilian'
+ 'br'; 'breton'
+ 'bg'; 'bulgarian'
+ 'ca'; 'catalan' # see polyglossia
+#''; 'coptic' # polyglossia
+ 'hr'; 'croatian'
+ 'cs'; 'czech'
+ 'da'; 'danish'
+#''; 'divehi' # polyglossia
+ 'nl'; 'dutch' # see polyglossia
+ 'en'; 'english' # see polyglossia
+ 'eo'; 'esperanto' # see polyglossia
+ 'et'; 'estonian'
+ 'gl'; 'galician'
+ 'de'; 'german'
+ 'el'; 'greek' #gl ?
+ 'he'; 'hebrew'
+ 'hi'; 'hindi'
+ 'is'; 'icelandic'
+ 'ia'; 'interlingua'
+ 'ga'; 'irish'
+ 'it'; 'italian'
+#''; 'farsi' # polyglossia
+ 'fi'; 'finnish'
+ 'fr'; 'french'
+ 'lo'; 'lao'
+ 'la'; 'latin'
+ 'lv'; 'latvian'
+ 'lt'; 'lithuanian'
+#''; 'lsorbian' # polyglossia
+#''; 'magyar' # polyglossia
+ 'ml'; 'malayalam'
+ 'mr'; 'marathi'
+#'hu'; 'magyar'
+ 'no'; 'norske'
+ 'nn'; 'nynorsk'
+ 'oc'; 'occitan'
+ 'pl'; 'polish'
+ 'pt'; 'portuges'
+ 'ro'; 'romanian'
+ 'ru'; 'russian'
+ 'se'; 'samin' #(check sami?)
+ 'sa'; 'sanskrit'
+ 'sr'; 'serbian'
+#''; 'scottish' # polyglossia (gd (Gaelic (Scots)))
+ 'sk'; 'slovak'
+ 'sl'; 'slovenian'
+ 'es'; 'spanish'
+ 'sv'; 'swedish'
+ 'ta'; 'tamil'
+ 'te'; 'telugu'
+ 'th'; 'thai'
+ 'tr'; 'turkish'
+ 'tk'; 'turkmen'
+ 'uk'; 'ukrainian'
+ 'ur'; 'urdu'
+#''; 'usorbian' # polyglossia
+ 'vi'; 'vietnamese'
+ 'cy'; 'welsh'
+ 'us'; 'USenglish' # depreciated, see iso-639-2
diff --git a/lib/sisu/v3/options.rb b/lib/sisu/v3/options.rb
index e57bf7fa..96ec3c4a 100644
--- a/lib/sisu/v3/options.rb
+++ b/lib/sisu/v3/options.rb
@@ -64,24 +64,90 @@ module SiSU_commandline
class Options
attr_accessor :cmd,:mod,:act,:dir_structure_by,:f_pths,:files,:base_path,:paths,:lngs,:f_pth,:pth,:fns,:fnb,:fnc,:fncb,:lng,:what
def initialize(a)
- @x=a
@cmd,@f_pth,@pth,@fns,@fnb,@fnc,@fncb,@what,@lng,@base_path='','','','','','','','','','',''
@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?
@@base_path ||=Dir.pwd
@base_path=@@base_path
+ @a=sisu_glob_rules(a)
+ @a.freeze
+ init
+ end
+ def find_all(find_flag,opt)
+ if find_flag
+ pwd_set=Dir.pwd
+ x=Dir.glob('*.ss[tm]')
+ Px[:lng_lst].each do |d|
+ if FileTest.directory?(d)
+ x << Dir.glob("#{d}/*.ss[tm]")
+ end
+ end
+ opt + x.flatten!
+ end
+ end
+ def find_select(find_flag,opt)
+ if find_flag
+ pwd_set=Dir.pwd
+ x=[]
+ if opt.inspect =~/"[a-zA-Z][a-zA-Z0-9._-]+?"/
+ opt.each do |g|
+ x <<=if g =~/.ss[tm]/
+ Dir.glob("*#{g}")
+ else
+ Dir.glob("*#{g}*.ss[tm]")
+ end
+
+ Px[:lng_lst].each do |d|
+ if FileTest.directory?(d)
+ x <<=if g =~/.ss[tm]/
+ Dir.glob("#{d}/*#{g}")
+ else
+ Dir.glob("#{d}/*#{g}*.ss[tm]")
+ end
+ end
+ end
+ end
+ end
+ x.flatten!
+ end
+ end
+ def sisu_glob_rules(a)
+ b=[]
+ f=[]
+ find_flag=false
+ a.each do |y|
+ if y =~ /^-/ \
+ or y =~ /\.ss[tm]$/
+ if y =~/^-/ \
+ && y =~/[fG]|--find|--glob/
+ find_flag=true
+ end
+ b << y
+ end
+ if find_flag \
+ && y !~ /^-/ \
+ && y =~ /\S+/
+ f << y
+ elsif y =~ /^-/
+ b << y
+ end
+ end
r=Px[:lng_lst].join('|')
r.gsub!(/\|en\|/,'|')
@lang_regx=%r{(?:#{r})}
- @a=if a.inspect =~/"(?:-\S+?|--\S+?)"/ \
+ z=if find_flag
+ if f.length > 0
+ b + find_select(find_flag,f)
+ else
+ find_all(find_flag,b)
+ end
+ elsif a.inspect =~/"(?:-\S+?|--\S+?)"/ \
&& a.inspect =~/"#{@lang_regx}\/?"/ \
&& a.inspect =~/"en\/\S+?\.ss[tm]"/
init_selected_lang_dirs(a)
- else @x
+ else b
end
- @a.freeze
- init
end
def init_selected_lang_dirs(a)
@z=[]
diff --git a/lib/sisu/v3/sysenv.rb b/lib/sisu/v3/sysenv.rb
index a35a9eef..944df010 100644
--- a/lib/sisu/v3/sysenv.rb
+++ b/lib/sisu/v3/sysenv.rb
@@ -2068,15 +2068,20 @@ WOK
else "#{http}localhost" end
end
def webserv #web url for local webserv (localhost, or hostname)
- if path.webserv_dir \
+ if defined? @rc['webserv']['url_root'] \
+ and @rc['webserv']['url_root'] =~/http/
+ # needed for alternative output dir structures, fixes manifest url links, check may cause problems elsewhere
+ @rc['webserv']['url_root']
+ elsif path.webserv_dir \
and path.webserv =~ /#{path.webserv_dir}/ #revisit
"#{path.webserv}/#{@stub_pwd}".gsub(/#{path.webserv_dir}/,"#{url.hostname}/#{@stub_pwd}")
elsif defined? @rc['webserv']['webrick_url'] \
and @rc['webserv']['webrick_url']==false
- "file://#{path.webserv}/#{@stub_pwd}"
+ "file://#{path.webserv}"
elsif webserv_port_cgi =~/\S+/
- "#{url.hostname}:#{webserv_port_cgi}/#{@stub_pwd}"
- else "#{url.hostname}/#{@stub_pwd}"
+ "#{url.hostname}:#{webserv_port_cgi}"
+ else
+ url.hostname
end
end
def webserv_base #web url for local webserv (localhost, or hostname)
@@ -3810,8 +3815,7 @@ WOK
"#{@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]}"
+ "#{@env.url.webserv}/#{@md.opt.f_pth[:pth_stub]}"
end
def rel
"./#{@md.opt.f_pth[:pth_stub]}"