aboutsummaryrefslogtreecommitdiff
path: root/backend/hist_data/enwiki/gen_dump_index_db.py
diff options
context:
space:
mode:
Diffstat (limited to 'backend/hist_data/enwiki/gen_dump_index_db.py')
-rwxr-xr-xbackend/hist_data/enwiki/gen_dump_index_db.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/backend/hist_data/enwiki/gen_dump_index_db.py b/backend/hist_data/enwiki/gen_dump_index_db.py
index 8872171..e4a0fbe 100755
--- a/backend/hist_data/enwiki/gen_dump_index_db.py
+++ b/backend/hist_data/enwiki/gen_dump_index_db.py
@@ -11,8 +11,10 @@ import re
import bz2
import sqlite3
-INDEX_FILE = 'enwiki-20220501-pages-articles-multistream-index.txt.bz2' # Had about 22e6 lines
-DB_FILE = 'dump_index.db'
+ENWIKI_DIR = os.path.dirname(os.path.realpath(__file__))
+INDEX_FILE = os.path.join(ENWIKI_DIR, 'enwiki-20220501-pages-articles-multistream-index.txt.bz2')
+ # Had about 22e6 lines
+DB_FILE = os.path.join(ENWIKI_DIR, 'dump_index.db')
def genData(indexFile: str, dbFile: str) -> None:
if os.path.exists(dbFile):