Update wiki indexer
This commit is contained in:
parent
67a9ab1930
commit
fe1011d68d
3 changed files with 8 additions and 4 deletions
|
@ -30,6 +30,7 @@ import org.xml.sax.helpers.DefaultHandler;
|
|||
import net.osmand.Algoritms;
|
||||
import net.osmand.LogUtil;
|
||||
import net.osmand.MapCreatorVersion;
|
||||
import net.osmand.data.IndexConstants;
|
||||
import net.osmand.data.preparation.IndexCreator;
|
||||
import net.osmand.impl.ConsoleProgressImplementation;
|
||||
|
||||
|
@ -133,7 +134,12 @@ public class WikiIndexer {
|
|||
ic.setIndexAddress(false);
|
||||
ic.generateIndexes(outFile, new ConsoleProgressImplementation(3), null, null, null, log);
|
||||
// final step
|
||||
new File(workPath, ic.getMapFileName()).renameTo(new File(targetPath, ic.getMapFileName()));
|
||||
String targetMapFileName = ic.getMapFileName();
|
||||
targetMapFileName =
|
||||
targetMapFileName.substring(0, targetMapFileName.length() - IndexConstants.BINARY_MAP_INDEX_EXT.length()) +
|
||||
"_" + IndexConstants.BINARY_MAP_VERSION + IndexConstants.BINARY_MAP_INDEX_EXT;
|
||||
|
||||
new File(workPath, ic.getMapFileName()).renameTo(new File(targetPath, targetMapFileName));
|
||||
}
|
||||
}
|
||||
} catch (WikiIndexerException e) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
function download {
|
||||
echo "Start download $2";
|
||||
wget --quiet --output-document="$2"_wiki_1."$1".xml.bz2 http://dumps.wikimedia.org/"$1"wiki/latest/"$1"wiki-latest-pages-articles.xml.bz2
|
||||
wget --quiet --output-document="$2"_wiki."$1".xml.bz2 http://dumps.wikimedia.org/"$1"wiki/latest/"$1"wiki-latest-pages-articles.xml.bz2
|
||||
}
|
||||
cd ~/wiki/src;
|
||||
download en English;
|
||||
|
|
|
@ -76,5 +76,3 @@ download_coord hu;
|
|||
download_coord te;
|
||||
download_coord ht;
|
||||
download_coord ceb;
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue