Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

13
LINES

< > BotCompany Repo | #1008013 // downloadSimpleWikipedia

JavaX fragment (include)

sbool downloadSimpleWikipedia_print = true;

static File downloadSimpleWikipedia() {
  File f = getProgramFile(#1008009, "simplewiki-latest-pages-articles.xml.bz2");
  if (fileSize(f) == 0)
    loadBinaryPageToFile(
"https://dumps.wikimedia.org/simplewiki/latest/simplewiki-latest-pages-articles.xml.bz2", f);
  if (downloadSimpleWikipedia_print) {
    downloadSimpleWikipedia_print = false;
    print("Wikipedia downloaded. Got " + fileSize(f) + " bytes.");
  }
  ret f;
}

Author comment

Began life as a copy of #1008009

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1008013
Snippet name: downloadSimpleWikipedia
Eternal ID of this version: #1008013/9
Text MD5: 1da8d91c7fa3831f2f87341b7f0c4595
Author: stefan
Category: javax / a.i. / networking
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-04-15 14:32:27
Source code size: 485 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 482 / 526
Version history: 8 change(s)
Referenced in: [show references]