mirror of
https://github.com/gnosygnu/xowa.git
synced 2024-10-27 20:34:16 +00:00
DownloadCentral: Add option to generate text packages (for wikidata)
This commit is contained in:
parent
37a72e6ad4
commit
e55e3971d9
@ -29,5 +29,6 @@ public class Xobc_import_type {
|
||||
, Tid__fsdb__delete = 8
|
||||
, Tid__wiki__ctg = 9
|
||||
, Tid__misc = 10
|
||||
, Tid__wiki__wbase = 11
|
||||
;
|
||||
}
|
||||
|
@ -25,7 +25,6 @@ public class Pack_file_cfg implements Gfo_invk {
|
||||
public boolean Pack_fsdb_delete() {return pack_fsdb_delete;} private boolean pack_fsdb_delete;
|
||||
public boolean Pack_custom() {return pack_custom_files != null;}
|
||||
public String Pack_custom_files() {return pack_custom_files;} private String pack_custom_files;
|
||||
public String Pack_custom_types() {return pack_custom_types;} private String pack_custom_types;
|
||||
public String Pack_custom_name() {return pack_custom_name;} private String pack_custom_name;
|
||||
public DateAdp Pack_file_cutoff() {return pack_file_cutoff;} private DateAdp pack_file_cutoff = null;
|
||||
|
||||
@ -38,13 +37,12 @@ public class Pack_file_cfg implements Gfo_invk {
|
||||
else if (ctx.Match(k, Invk__pack_fsdb_delete_)) pack_fsdb_delete = m.ReadYn("v");
|
||||
else if (ctx.Match(k, Invk__pack_custom_name_)) pack_custom_name = m.ReadStr("v");
|
||||
else if (ctx.Match(k, Invk__pack_custom_files_)) pack_custom_files = m.ReadStr("v"); // pack_custom {files='en.wikipedia.org-core.xowa|en.wikipedia.org-html-ns.008.xowa'}}
|
||||
else if (ctx.Match(k, Invk__pack_custom_types_)) pack_custom_types = m.ReadStr("v"); // pack_custom {types='core|srch|html';}
|
||||
else return Gfo_invk_.Rv_unhandled;
|
||||
return this;
|
||||
}
|
||||
private static final String Invk__deploy_dir_ = "deploy_dir_"
|
||||
, Invk__pack_text_ = "pack_text_", Invk__pack_html_ = "pack_html_", Invk__pack_file_ = "pack_file_", Invk__pack_file_cutoff_ = "pack_file_cutoff_"
|
||||
, Invk__pack_fsdb_delete_ = "pack_fsdb_delete_"
|
||||
, Invk__pack_custom_name_ = "pack_custom_name_", Invk__pack_custom_files_ = "pack_custom_files_", Invk__pack_custom_types_ = "pack_custom_types_"
|
||||
, Invk__pack_custom_name_ = "pack_custom_name_", Invk__pack_custom_files_ = "pack_custom_files_"
|
||||
;
|
||||
}
|
||||
|
@ -51,6 +51,8 @@ public class Pack_file_mgr {
|
||||
}
|
||||
|
||||
// build tasks
|
||||
if (cfg.Pack_text()) // right now, only for wikidata
|
||||
Make_task(tmp_bfr, wiki, wiki_date, bc_db, hash, "text", Xobc_import_type.Tid__file__core, Xobc_import_type.Tid__wiki__text, Xobc_import_type.Tid__wiki__ctg, Xobc_import_type.Tid__wiki__wbase);
|
||||
if (cfg.Pack_html())
|
||||
Make_task(tmp_bfr, wiki, wiki_date, bc_db, hash, "html", Xobc_import_type.Tid__wiki__core, Xobc_import_type.Tid__wiki__srch, Xobc_import_type.Tid__wiki__html, Xobc_import_type.Tid__wiki__ctg);
|
||||
if (cfg.Pack_file())
|
||||
|
@ -105,6 +105,7 @@ class Pack_hash_bldr {
|
||||
case Xow_db_file_.Tid__file_solo:
|
||||
case Xow_db_file_.Tid__file_data: return Xobc_import_type.Tid__file__data;
|
||||
case Xow_db_file_.Tid__text: return Xobc_import_type.Tid__wiki__text;
|
||||
case Xow_db_file_.Tid__wbase: return Xobc_import_type.Tid__wiki__wbase;
|
||||
default: return Xobc_import_type.Tid__ignore;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user