1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00
This commit is contained in:
gnosygnu
2014-08-10 23:10:23 -04:00
parent fb8c06c560
commit 67b04263a7
131 changed files with 2285 additions and 1355 deletions

View File

@@ -1,71 +0,0 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero 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 Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa; import gplx.*;
import gplx.html.*;
import gplx.xowa.html.modules.*;
public class Xoa_html_data {
private OrderedHash ctg_hash;
public Xoh_module_mgr Module_mgr() {return module_mgr;} private Xoh_module_mgr module_mgr = new Xoh_module_mgr();
public byte[] Content_sub() {return html_content_sub;} public void Content_sub_(byte[] v) {html_content_sub = v;} private byte[] html_content_sub;
public Bry_bfr Portal_div_xtn() {return portal_div_xtn;} private Bry_bfr portal_div_xtn = Bry_bfr.reset_(255);
public int Lnke_autonumber_next() {return lnke_autonumber++;} private int lnke_autonumber = 1;
public String Bmk_pos() {return html_bmk_pos;} public void Bmk_pos_(String v) {html_bmk_pos = v;} private String html_bmk_pos;
public boolean Restricted() {return html_restricted;} private boolean html_restricted = true;
public void Restricted_(boolean v) {html_restricted = v;} public void Restricted_n_() {Restricted_(Bool_.N);} public void Restricted_y_() {Restricted_(Bool_.Y);}
public byte[] Edit_preview_w_dbg() {return Bry_.Add(dbg, edit_preview);} public void Edit_preview_(byte[] v) {edit_preview = v;} private byte[] edit_preview = Bry_.Empty;
public byte[] Search_text() {return search_text;} public void Search_text_(byte[] v) {search_text = v;} private byte[] search_text = Bry_.Empty;
public byte[] Custom_html() {return custom_html;} public Xoa_html_data Custom_html_(byte[] v) {custom_html = v; return this;} private byte[] custom_html;
public byte[] Custom_name() {return custom_name;} public Xoa_html_data Custom_name_(byte[] v) {custom_name = v; return this;} private byte[] custom_name;
public byte[] Custom_head_end() {return custom_head_end;}
public byte[] Dbg() {return dbg;} public void Dbg_(byte[] v) {dbg = Bry_.Add(dbg, v);} private byte[] dbg = Bry_.Empty;
public boolean Gallery_packed_exists() {return gallery_packed_exists;} public void Gallery_packed_exists_y_() {gallery_packed_exists = true;} private boolean gallery_packed_exists;
public int Imap_id_next() {return ++imap_id_next;} private int imap_id_next;
public ListAdp Related_sites() {return related_sites;} private ListAdp related_sites = ListAdp_.new_();
public void Custom_head_end_concat(byte[] v) {
if (v == null)
custom_head_end = v;
else
custom_head_end = Bry_.Add(custom_head_end, v);
} private byte[] custom_head_end;
public byte[] Custom_html_end() {return custom_html_end;}
public void Custom_html_end_concat(byte[] v) {
if (v == null)
custom_html_end = v;
else
custom_html_end = Bry_.Add(custom_html_end, v);
} private byte[] custom_html_end;
public void Clear() {
if (ctg_hash != null) ctg_hash.Clear();
gallery_packed_exists = false;
module_mgr.Clear();
lnke_autonumber = 1;
html_restricted = true;
html_content_sub = Bry_.Empty;
search_text = Bry_.Empty;
custom_html_end = custom_head_end = custom_html = custom_name = null;
imap_id_next = 0;
related_sites.Clear();
}
public byte[][] Ctgs_to_ary() {return ctg_hash == null ? Bry_.Ary_empty : (byte[][])ctg_hash.XtoAry(byte[].class);}
public void Ctgs_add(Xoa_ttl ttl) {
if (ctg_hash == null) ctg_hash = OrderedHash_.new_bry_();
byte[] ttl_bry = ttl.Page_txt();
if (ctg_hash.Has(ttl_bry)) return;
ctg_hash.Add(ttl_bry, ttl_bry);
}
}

View File

@@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa; import gplx.*;
import gplx.xowa.gui.*; import gplx.xowa.gui.views.*; import gplx.xowa.html.*;
import gplx.xowa.gui.*; import gplx.xowa.gui.views.*; import gplx.xowa.html.*; import gplx.xowa.pages.*;
import gplx.xowa.files.*; import gplx.xowa.xtns.cite.*; import gplx.xowa.xtns.wdatas.*; import gplx.xowa.parsers.lnkis.redlinks.*; import gplx.xowa.html.tocs.*;
import gplx.xowa.html.modules.popups.*;
public class Xoa_page {
@@ -31,7 +31,7 @@ public class Xoa_page {
public Xow_wiki Wiki() {return wiki;} private Xow_wiki wiki;
public Xol_lang Lang() {return lang;} public Xoa_page Lang_(Xol_lang v) {lang = v; return this;} private Xol_lang lang;
public Xoa_revision_data Revision_data() {return revision_data;} private Xoa_revision_data revision_data = new Xoa_revision_data();
public Xoa_html_data Html_data() {return html_data;} private Xoa_html_data html_data = new Xoa_html_data();
public Xopg_html_data Html_data() {return html_data;} private Xopg_html_data html_data = new Xopg_html_data();
public Xoa_ttl Ttl() {return ttl;} public Xoa_page Ttl_(Xoa_ttl v) {ttl = v; url.Wiki_bry_(wiki.Domain_bry()).Page_bry_(v.Full_url()); return this;} private Xoa_ttl ttl;
public Xoa_url Url() {return url;} public Xoa_page Url_(Xoa_url v) {url = v; return this;} private Xoa_url url = Xoa_url.blank_();
public Xog_tab_itm Tab() {return tab;} public void Tab_(Xog_tab_itm v) {tab = v;} private Xog_tab_itm tab;
@@ -41,7 +41,6 @@ public class Xoa_page {
public ListAdp Redirected_ttls() {return redirected_ttls;} private ListAdp redirected_ttls = ListAdp_.new_();
public byte[] Redirected_src() {return redirected_src;} public void Redirected_src_(byte[] v) {this.redirected_src = v;} private byte[] redirected_src;
public byte Edit_mode() {return edit_mode;} private byte edit_mode; public void Edit_mode_update_() {edit_mode = Xoa_page_.Edit_mode_update;}
public byte[] Display_ttl() {return display_ttl;} public Xoa_page Display_ttl_(byte[] v) {display_ttl = v; return this;} private byte[] display_ttl;
public Xop_root_tkn Root() {return root;} public Xoa_page Root_(Xop_root_tkn v) {root = v; return this;} private Xop_root_tkn root;
public byte[] Data_raw() {return data_raw;} public Xoa_page Data_raw_(byte[] v) {data_raw = v; return this;} private byte[] data_raw = Bry_.Empty;
public Xow_hdr_mgr Hdr_mgr() {return hdr_mgr;} private Xow_hdr_mgr hdr_mgr;
@@ -54,7 +53,6 @@ public class Xoa_page {
public Xop_lnki_logger_redlinks_mgr Lnki_redlinks_mgr() {return lnki_redlinks_mgr;} private Xop_lnki_logger_redlinks_mgr lnki_redlinks_mgr;
public Ref_itm_mgr Ref_mgr() {return ref_mgr;} private Ref_itm_mgr ref_mgr = new Ref_itm_mgr();
public Xopg_popup_mgr Popup_mgr() {return popup_mgr;} private Xopg_popup_mgr popup_mgr = new Xopg_popup_mgr();
public Xoh_xtn_mgr Xtn_mgr() {return xtn_mgr;} private Xoh_xtn_mgr xtn_mgr = new Xoh_xtn_mgr();
public ListAdp Xwiki_langs() {return xwiki_langs;} private ListAdp xwiki_langs = ListAdp_.new_();
public boolean Lang_convert_content() {return lang_convert_content;} public Xoa_page Lang_convert_content_(boolean v) {lang_convert_content = v; return this;} private boolean lang_convert_content = true;
public boolean Lang_convert_title() {return lang_convert_title;} public Xoa_page Lang_convert_title_(boolean v) {lang_convert_title = v; return this;} private boolean lang_convert_title = true;
@@ -84,7 +82,6 @@ public class Xoa_page {
wdata_external_lang_links.Reset();
gplx.xowa.xtns.scribunto.Scrib_core.Core_page_changed(this);
lang_convert_content = lang_convert_title = true;
xtn_mgr.Clear();
xwiki_langs.Clear();
html_data.Clear();
lnki_file_mgr.Clear();