1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2024-10-27 20:34:16 +00:00

Page_history: Add option to log all page visits to a separate file

This commit is contained in:
gnosygnu 2016-11-05 07:33:37 -04:00
parent e346afeea1
commit 5ff9b8d08a
3 changed files with 8 additions and 1 deletions

View File

@ -32,7 +32,7 @@ public class Xoa_app_ {
}
}
public static final String Name = "xowa";
public static final String Version = "3.10.4.3";
public static final String Version = "3.10.4.4";
public static String Build_date = "2012-12-30 00:00:00";
public static String Op_sys_str;
public static String User_agent = "";

View File

@ -30,6 +30,8 @@ public class Xoapi_addon implements Gfo_invk {
else if (ctx.Match(k, Invk__wikis__ctgs__hidden_enabled_)) wikis__ctgs__hidden_enabled = m.ReadYn("v");
else if (ctx.Match(k, Invk__app__scripting__enabled)) return Yn.To_str(app__scripting__enabled);
else if (ctx.Match(k, Invk__app__scripting__enabled_)) app__scripting__enabled = m.ReadYn("v");
else if (ctx.Match(k, Invk__app__page_history__log_all)) return Yn.To_str(app__page_history__log_all);
else if (ctx.Match(k, Invk__app__page_history__log_all_)) app__page_history__log_all = m.ReadYn("v");
else return Gfo_invk_.Rv_unhandled;
return this;
}
@ -38,5 +40,8 @@ public class Xoapi_addon implements Gfo_invk {
, Invk__wikis__ctgs__hidden_enabled_ = "wikis__ctgs__hidden_enabled_"
, Invk__app__scripting__enabled = "app__scripting__enabled"
, Invk__app__scripting__enabled_ = "app__scripting__enabled_"
, Invk__app__page_history__log_all = "app__page_history__log_all"
, Invk__app__page_history__log_all_ = "app__page_history__log_all_"
;
public static boolean app__page_history__log_all;
}

View File

@ -65,6 +65,8 @@ public class Xou_history_mgr implements Gfo_invk {
itm = new Xou_history_itm(url.Wiki_bry(), To_full_db_w_qargs(url, ttl));
itms.Add(key, itm);
}
if (gplx.xowa.apps.apis.xowa.Xoapi_addon.app__page_history__log_all)
Io_mgr.Instance.AppendFilStr(history_fil.GenNewNameAndExt("log_all.csv"), String_.Format("{0}|{1}|{2}\n", Datetime_now.Get().XtoStr_fmt_iso_8561_w_tz(), itm.Wiki(), itm.Page()));
itm.Tally();
}
private byte[] To_full_db_w_qargs(Xoa_url url, Xoa_ttl ttl) {