mirror of
https://github.com/gnosygnu/xowa.git
synced 2024-10-27 20:34:16 +00:00
Download_central: Comment support for wikitext downloads
This commit is contained in:
parent
aaa8ebadd7
commit
60d752723b
@ -28,7 +28,6 @@ public class Xobc_skip_mgr implements Gfo_invk {
|
||||
}
|
||||
public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {
|
||||
if (ctx.Match(k, Cfg__namespaces_category)) category_enabled = m.ReadBool("v");
|
||||
else if (ctx.Match(k, Cfg__namespaces_category)) category_enabled = m.ReadBool("v");
|
||||
else return Gfo_invk_.Rv_unhandled;
|
||||
return this;
|
||||
}
|
||||
|
@ -53,8 +53,8 @@ public class Pack_file_mgr {
|
||||
Make_task(tmp_bfr, wiki, wiki_date, bc_db, hash, Xobc_task_regy_itm.Type__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, Xobc_import_type.Tid__wiki__lucene);
|
||||
if (cfg.Pack_file())
|
||||
Make_task(tmp_bfr, wiki, wiki_date, bc_db, hash, Xobc_task_regy_itm.Type__file, Xobc_import_type.Tid__file__core, Xobc_import_type.Tid__file__data); // , Xobc_import_type.Tid__fsdb__delete
|
||||
if (cfg.Pack_text()) // right now, only for wikidata
|
||||
Make_task(tmp_bfr, wiki, wiki_date, bc_db, hash, Xobc_task_regy_itm.Type__text, Xobc_import_type.Tid__wiki__text, Xobc_import_type.Tid__wiki__wbase); // , Xobc_import_type.Tid__file__core, Xobc_import_type.Tid__wiki__ctg
|
||||
if (cfg.Pack_text()) // NOTE: will only add wikitext and wikibase packs; wikidata needs to pack html also; DATE:2017-04-09
|
||||
Make_task(tmp_bfr, wiki, wiki_date, bc_db, hash, Xobc_task_regy_itm.Type__text, Xobc_import_type.Tid__wiki__text, Xobc_import_type.Tid__wiki__wbase);
|
||||
if (cfg.Pack_custom())
|
||||
Make_task(tmp_bfr, wiki, wiki_date, bc_db, hash, cfg.Pack_custom_name(), Xobc_import_type.Tid__misc);
|
||||
bc_conn.Txn_end();
|
||||
|
@ -27,6 +27,8 @@ class Pack_hash {
|
||||
hash.Add(list_tid, list);
|
||||
}
|
||||
Pack_itm itm = new Pack_itm(list_tid, pack_url, raw_urls);
|
||||
|
||||
// check if file exists; needed for wikitext packs which add same urls as html packs; DATE:2017-04-09
|
||||
if (list.Has(pack_url))
|
||||
return itm;
|
||||
list.Add(itm);
|
||||
|
@ -47,7 +47,7 @@ class Pack_hash_bldr {
|
||||
for (int i = 0; i < len; ++i) {
|
||||
Xow_db_file file = db_mgr.Dbs__get_at(i);
|
||||
int pack_tid = Get_pack_tid(file.Tid());
|
||||
if (pack_tid == Xobc_import_type.Tid__ignore) continue;
|
||||
if (pack_tid == Xobc_import_type.Tid__ignore) continue; // NOTE: will try to add same urls as html, but noops b/c rv.Add checks for unique urls; DATE:2017-04-09
|
||||
rv.Add(zip_name_bldr, pack_tid, file.Url());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user