mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
'v3.3.4.1'
This commit is contained in:
@@ -34,4 +34,4 @@ public class Wmf_dump_itm implements gplx.CompareAble {
|
||||
public int compareTo(Object obj) {Wmf_dump_itm comp = (Wmf_dump_itm)obj; return Bry_.Compare(wiki_abrv, comp.wiki_abrv);}
|
||||
private static byte[] Status_msg_dump_complete = Bry_.new_a7("Dump complete"), Status_msg_dump_in_progress = Bry_.new_a7("Dump in progress");
|
||||
public static final byte Status_tid_complete = 0, Status_tid_working = 1, Status_tid_error = 2;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,9 @@ public class Wmf_dump_list_parser {
|
||||
byte[] href_bry = Bry_.Mid(src, href_bgn_pos + 1, href_end_pos);
|
||||
int date_end = href_bry.length;
|
||||
int date_bgn = Bry_find_.Find_bwd(href_bry, Byte_ascii.Slash); if (date_bgn == Bry_find_.Not_found) return false;
|
||||
byte[] date_bry = Bry_.Mid(href_bry, date_bgn + 1, date_end);
|
||||
byte[] date_bry = Bry_.Mid(href_bry, date_bgn + 1, date_end); if (date_bry.length == 0) return false; // anchors like "/other_static_dumps" should be skipped
|
||||
if (Bry_.Has(date_bry, Bry_.new_u8("legal.html"))) return false;
|
||||
if (Bry_.Has(date_bry, Bry_.new_u8("Privacy_policy"))) return false;
|
||||
DateAdp date = DateAdp_.parse_fmt(String_.new_a7(date_bry), "yyyyMMdd");
|
||||
itm.Dump_date_(date);
|
||||
int abrv_end = date_bgn;
|
||||
|
||||
@@ -41,7 +41,7 @@ public class Wmf_dump_list_parser_tst {
|
||||
, fxt.itm("zh-classicalwiki", "20131128", Wmf_dump_itm.Status_tid_complete, "Dump complete", "2013-11-28 06:08:56")
|
||||
);
|
||||
}
|
||||
// @Test public void Update() { // MAINT:QUARTERLY:2015-08-23; must run C:\xowa\ and update dump status
|
||||
// @Test public void Update() { // MAINT:QUARTERLY:2016-03-17; must run C:\xowa\ and update dump status
|
||||
// Hash_adp_bry excluded_domains = Hash_adp_bry.cs().Add_many_str
|
||||
// ( "advisory.wikipedia.org", "beta.wikiversity.org", "donate.wikipedia.org", "login.wikipedia.org"
|
||||
// , "nostalgia.wikipedia.org", "outreach.wikipedia.org", "quality.wikipedia.org", "sources.wikipedia.org"
|
||||
@@ -80,7 +80,7 @@ public class Wmf_dump_list_parser_tst {
|
||||
// .Add_byte(Byte_ascii.Apos)
|
||||
// .Add_byte(Byte_ascii.Paren_end)
|
||||
// .Add_byte(Byte_ascii.Comma)
|
||||
// .Add_str("--" + String_.new_u8(abrv))
|
||||
// .Add_str_u8("--" + String_.new_u8(abrv))
|
||||
// .Add_byte_nl()
|
||||
// ;
|
||||
// bld_bfr
|
||||
@@ -92,7 +92,7 @@ public class Wmf_dump_list_parser_tst {
|
||||
// .Add_byte_nl()
|
||||
// ;
|
||||
// }
|
||||
// Io_url temp = Io_url_.new_fil_("C:\\import_update.txt");
|
||||
// Io_url temp = Io_url_.new_fil_("C:\\xowa\\user\\import_update.txt");
|
||||
// Io_mgr.Instance.SaveFilBfr(temp, sql_bfr);
|
||||
//// Io_mgr.Instance.AppendFilBfr(temp, bld_bfr);
|
||||
// }
|
||||
|
||||
@@ -23,4 +23,4 @@ public class Wmf_latest_itm {
|
||||
public byte[] Name() {return name;} private final byte[] name;
|
||||
public DateAdp Date() {return date;} private final DateAdp date;
|
||||
public long Size() {return size;} private final long size;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ public class Xow_maint_mgr implements GfoInvkAble {
|
||||
} private DateAdp wiki_dump_date;
|
||||
public boolean Wiki_update_needed() {
|
||||
if (this.Wiki_dump_date() == null) return false; // will be null if a custom wiki (i.e.: not on http://dumps.wikimedia.org/backup-index.html)
|
||||
if (this.Wmf_dump_date() == null) return false; // also null if custom wiki
|
||||
return this.Wmf_dump_date().Diff(this.Wiki_dump_date()).Total_days().To_double() > 1;
|
||||
}
|
||||
public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {
|
||||
|
||||
@@ -19,8 +19,8 @@ package gplx.xowa.bldrs.setups.upgrades; import gplx.*; import gplx.xowa.*; impo
|
||||
import org.junit.*; import gplx.xowa.bldrs.installs.*;
|
||||
public class Upgrader_v00_02_01_tst {
|
||||
@Test public void Run() {
|
||||
Xoae_app app = Xoa_app_fxt.app_();
|
||||
Xowe_wiki wiki = Xoa_app_fxt.wiki_tst_(app);
|
||||
Xoae_app app = Xoa_app_fxt.Make__app__edit();
|
||||
Xowe_wiki wiki = Xoa_app_fxt.Make__wiki__edit(app);
|
||||
Io_url cfg_dir = wiki.Fsys_mgr().Root_dir().GenSubDir("cfg");
|
||||
Io_mgr.Instance.SaveFilStr(cfg_dir.GenSubFil("siteInfo.xml"), Str_siteinfo_xml);
|
||||
Io_mgr.Instance.SaveFilStr(cfg_dir.GenSubFil("wiki.gfs"), Str_wikistats_gfs);
|
||||
|
||||
@@ -19,7 +19,7 @@ package gplx.xowa.bldrs.setups.upgrades; import gplx.*; import gplx.xowa.*; impo
|
||||
import org.junit.*;
|
||||
public class Xoa_upgrade_mgr_tst {
|
||||
@Test public void Run() {
|
||||
Xoae_app app = Xoa_app_fxt.app_();
|
||||
Xoae_app app = Xoa_app_fxt.Make__app__edit();
|
||||
Io_url old_history_dir = app.Usere().Fsys_mgr().App_data_dir();
|
||||
Io_url new_history_dir = app.Usere().Fsys_mgr().App_data_dir().GenSubDir("history");
|
||||
Io_mgr.Instance.SaveFilStr(old_history_dir.GenSubFil("page_history.csv"), "test");
|
||||
|
||||
Reference in New Issue
Block a user