aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2022-06-08 00:09:21 +1000
committerTerry Truong <terry06890@gmail.com>2022-06-08 00:09:21 +1000
commita530aa601336d8b5fd25fff14ff4cb3dae4d930b (patch)
tree206c6052a400cb5c03e71f23cf83f56c23ee4633 /backend
parent27361479b3615a0f1156be3a97579df7f128d993 (diff)
Fix small bugs in enwiki-desc generation
Diffstat (limited to 'backend')
-rwxr-xr-xbackend/data/genEnwikiDescData.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/backend/data/genEnwikiDescData.py b/backend/data/genEnwikiDescData.py
index 3e11871..ce715d3 100755
--- a/backend/data/genEnwikiDescData.py
+++ b/backend/data/genEnwikiDescData.py
@@ -1,6 +1,6 @@
#!/usr/bin/python3
-import sys, re
+import sys, re, os
import sqlite3
usageInfo = f"usage: {sys.argv[0]}\n"
@@ -29,14 +29,14 @@ if os.path.exists(namesToSkipFile):
with open(namesToSkipFile) as file:
for line in file:
namesToSkip.add(line.rstrip())
- print("Read in {len(namesToSkip)} names to skip")
+ print(f"Read in {len(namesToSkip)} names to skip")
if os.path.exists(titlesToUseFile):
with open(titlesToUseFile) as file:
for line in file:
title = line.rstrip()
name = titleToUseRegex.sub(r"\1", title) # Remove parens
nameToPickedTitle[name.lower()] = title
-print("Read in {len(titlesToUse)} titles to use for certain names")
+print(f"Read in {len(nameToPickedTitle)} titles to use for certain names")
# Get node names without descriptions
print("Getting node names")
nodeNames = set()