hardcode a different, easier wikipedia descriptions path

Signed-off-by: zyphlar <zyphlar@gmail.com>
This commit is contained in:
zyphlar
2025-11-02 11:42:37 -08:00
parent a58f1674dc
commit d317286024

View File

@@ -11,6 +11,7 @@ import multiprocessing
import os import os
import shutil import shutil
import tarfile import tarfile
import errno
from collections import defaultdict from collections import defaultdict
from concurrent.futures import ThreadPoolExecutor, as_completed from concurrent.futures import ThreadPoolExecutor, as_completed
from typing import AnyStr from typing import AnyStr
@@ -168,8 +169,18 @@ class StageDownloadDescriptions(Stage):
) )
""" """
src = "/home/planet/descriptions" # The src folder is hardcoded here and must be implemented on the map building machine
src = "/home/planet/wikipedia/descriptions"
# The dest folder will generally become build/*/intermediate_data/descriptions
dest = env.paths.descriptions_path dest = env.paths.descriptions_path
# An empty source folder is a big problem
try:
if os.path.isdir(src):
print("Found %s" % (src))
else:
raise FileNotFoundError(errno.ENOENT, os.strerror(errno.ENOENT), src)
except OSError as e:
print("rmtree error: %s - %s" % (e.filename, e.strerror))
# Empty folder "descriptions" can be already created. # Empty folder "descriptions" can be already created.
try: try:
if os.path.isdir(dest): if os.path.isdir(dest):