use txt instead of csv and add credits
This commit is contained in:
2
untitled/assets/CREDITS.txt
Normal file
2
untitled/assets/CREDITS.txt
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
Owen Feldman: Programmer, and basically everything else
|
||||||
|
Austin Animal Services - Austin Animal Center Intakes database: cat name list for name generation (June 24, 2026)
|
||||||
6971
untitled/assets/cat_names.txt
Normal file
6971
untitled/assets/cat_names.txt
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,3 @@
|
|||||||
import csv
|
|
||||||
import random
|
import random
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
|
|
||||||
@@ -72,22 +71,9 @@ def generate_name():
|
|||||||
|
|
||||||
def _load_raw_names():
|
def _load_raw_names():
|
||||||
names = []
|
names = []
|
||||||
with open("untitled/assets/nameset.csv", newline="", encoding="utf-8") as file:
|
with open("untitled/assets/cat_names.txt") as f:
|
||||||
reader = csv.reader(file)
|
for name in f.readlines():
|
||||||
|
names.append(name.strip())
|
||||||
next(reader)
|
|
||||||
for row in reader:
|
|
||||||
name = row[5].lower()
|
|
||||||
if (
|
|
||||||
name == "name not provided"
|
|
||||||
or name == "untitled"
|
|
||||||
or name == "unknown"
|
|
||||||
or name == "kitten"
|
|
||||||
or not name
|
|
||||||
):
|
|
||||||
continue
|
|
||||||
if name.isalpha():
|
|
||||||
names.append(name)
|
|
||||||
return names
|
return names
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user