1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00

Mw_parse: Mass checkin of various mediawiki parse files

This commit is contained in:
gnosygnu
2017-01-25 01:27:18 -05:00
parent 6a5c114998
commit cef2d7e2f6
81 changed files with 6723 additions and 485 deletions

View File

@@ -1,27 +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.addons.apps.cfgs.mgrs.dflts; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*; import gplx.xowa.addons.apps.cfgs.*; import gplx.xowa.addons.apps.cfgs.mgrs.*;
class Xocfg_dflt_itm__static implements Gfo_invk {
private final String val;
public Xocfg_dflt_itm__static(String val) {
this.val = val;
}
public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {
return val;
}
}

View File

@@ -46,3 +46,12 @@ public class Xocfg_dflt_mgr {
gfs_mgr.Run_url(url);
}
}
class Xocfg_dflt_itm__static implements Gfo_invk {
private final String val;
public Xocfg_dflt_itm__static(String val) {
this.val = val;
}
public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {
return val;
}
}

View File

@@ -17,6 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.addons.bldrs.updates.files; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.bldrs.*; import gplx.xowa.addons.bldrs.updates.*;
import gplx.xowa.bldrs.*; import gplx.xowa.bldrs.wkrs.*;
import gplx.xowa.files.*;
public class Xodel_small_cmd extends Xob_cmd__base {
public Xodel_small_cmd(Xob_bldr bldr, Xowe_wiki wiki) {super(bldr, wiki);}
private final int[] ext_max_ary = Xobldr__fsdb_db__delete_small_files_.New_ext_max_ary();
@@ -31,3 +32,20 @@ public class Xodel_small_cmd extends Xob_cmd__base {
public static final Xob_cmd Prototype = new Xodel_small_cmd(null, null);
@Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xodel_small_cmd(bldr, wiki);}
}
class Xobldr__fsdb_db__delete_small_files_ {
public static int[] New_ext_max_ary() {
int[] rv = new int[Xof_ext_.Id__max];
Ext_max_(rv, 35, Xof_ext_.Id_svg);
Ext_max_(rv, 40, Xof_ext_.Id_gif);
Ext_max_(rv, 100, Xof_ext_.Id_png, Xof_ext_.Id_jpg, Xof_ext_.Id_jpeg);
Ext_max_(rv, 500, Xof_ext_.Id_tif, Xof_ext_.Id_tiff);
Ext_max_(rv, 500, Xof_ext_.Id_xcf);
Ext_max_(rv, 1000, Xof_ext_.Id_bmp);
Ext_max_(rv, 700, Xof_ext_.Id_webm);
Ext_max_(rv, 1000, Xof_ext_.Id_ogv);
Ext_max_(rv, 400, Xof_ext_.Id_pdf);
Ext_max_(rv, 700, Xof_ext_.Id_djvu);
return rv;
}
private static void Ext_max_(int[] ary, int max, int... exts) {for (int ext : exts) ary[ext] = max;}
}

View File

@@ -19,6 +19,7 @@ package gplx.xowa.addons.bldrs.updates.files; import gplx.*; import gplx.xowa.*;
import gplx.dbs.*;
import gplx.xowa.bldrs.*;
import gplx.fsdb.*; import gplx.fsdb.meta.*; import gplx.xowa.files.*;
import gplx.xowa.bldrs.wkrs.*;
class Xodel_small_mgr {
public void Exec(Xowe_wiki wiki, int[] ext_max_ary) {
wiki.Init_assert();
@@ -53,20 +54,3 @@ class Xodel_small_mgr {
);
}
}
class Xobldr__fsdb_db__delete_small_files_ {
public static int[] New_ext_max_ary() {
int[] rv = new int[Xof_ext_.Id__max];
Ext_max_(rv, 35, Xof_ext_.Id_svg);
Ext_max_(rv, 40, Xof_ext_.Id_gif);
Ext_max_(rv, 100, Xof_ext_.Id_png, Xof_ext_.Id_jpg, Xof_ext_.Id_jpeg);
Ext_max_(rv, 500, Xof_ext_.Id_tif, Xof_ext_.Id_tiff);
Ext_max_(rv, 500, Xof_ext_.Id_xcf);
Ext_max_(rv, 1000, Xof_ext_.Id_bmp);
Ext_max_(rv, 700, Xof_ext_.Id_webm);
Ext_max_(rv, 1000, Xof_ext_.Id_ogv);
Ext_max_(rv, 400, Xof_ext_.Id_pdf);
Ext_max_(rv, 700, Xof_ext_.Id_djvu);
return rv;
}
private static void Ext_max_(int[] ary, int max, int... exts) {for (int ext : exts) ary[ext] = max;}
}