1
0
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:
gnosygnu
2016-03-27 23:44:59 -04:00
parent de67253a9c
commit baaef32df2
903 changed files with 13339 additions and 8695 deletions

View File

@@ -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;
}
}

View File

@@ -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;

View File

@@ -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);
// }

View File

@@ -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;
}
}

View File

@@ -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) {