Last active
April 22, 2025 18:15
-
-
Save cavedave/b731785a9c43cd3ff76c36870249e7f1 to your computer and use it in GitHub Desktop.
Bats have crazy words for them in languages I started with this https://www.reddit.com/media?url=https%3A%2F%2Fi.redd.it%2Fapnha37a0fk51.jpg from a university. and added some more languages. Code is a copy of https://github.com/cainesap/mapMakeR/tree/master/etymologyMaps updated for new python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lang | iso | word | translation | meaning_group | color | source | |
---|---|---|---|---|---|---|---|
Spanish | spa | murciélago | little blind mouse | blind_mouse | lightblue | https://en.wiktionary.org/wiki/murciélago | |
Portuguese | por | morcego | little blind mouse | blind_mouse | lightblue | https://en.wiktionary.org/wiki/morcego | |
Catalan | cat | ratpenat | winged rat | winged_rat | yellow | https://en.wiktionary.org/wiki/ratpenat | |
Galician | glg | morcego | little blind mouse | blind_mouse | lightblue | https://en.wiktionary.org/wiki/morcego#Galician | |
Basque | eus | saguzar | old mouse | old_mouse | skyblue | https://en.wiktionary.org/wiki/saguzar | |
French | fra | chauve-souris | bald mouse | bald_mouse | skyblue | https://en.wiktionary.org/wiki/chauve-souris | |
Italian | ita | pipistrello | evening creature | evening_creature | orange | https://en.wiktionary.org/wiki/pipistrello | |
Romansh | roh | utschè mezmiur | unknown | grey | https://en.wiktionary.org/wiki/utschè_mezmiur | ||
German | deu | Fledermaus | flutter mouse | flutter_mouse | lemonchiffon | https://en.wiktionary.org/wiki/Fledermaus | |
Austrian German | de-at | Fledermaus | flutter mouse | flutter_mouse | lemonchiffon | https://en.wiktionary.org/wiki/Fledermaus | |
Dutch | nld | vleermuis | Flutter mouse | flutter_mouse | skyblue | https://en.wiktionary.org/wiki/vleermuis | |
Luxembourgish | ltz | Fliedermaus | flutter mouse | flutter_mouse | lemonchiffon | https://en.wiktionary.org/wiki/Fliedermaus | |
Flemish (Belgium) | vls | vleermuis | wing mouse | wing_mouse | skyblue | https://en.wiktionary.org/wiki/vleermuis | |
Danish | dan | flagermus | flutter mouse | flutter_mouse | lemonchiffon | https://en.wiktionary.org/wiki/flagermus | |
Swedish | swe | fladdermus | flutter mouse | flutter_mouse | lemonchiffon | https://en.wiktionary.org/wiki/fladdermus | |
Norwegian | nor | flaggermus | flutter mouse | flutter_mouse | lemonchiffon | https://en.wiktionary.org/wiki/flaggermus | |
Icelandic | isl | leðurblaka | leather flapper | leather_flapper | green | https://en.wiktionary.org/wiki/leðurblaka | |
Finnish | fin | lepakko | fluttering one | fluttering_one | khaki | https://en.wiktionary.org/wiki/lepakko | |
Polish | pol | nietoperz | night flyer | night_flyer | lightgreen | https://en.wiktionary.org/wiki/nietoperz | |
Czech | ces | netopýr | night flyer | night_flyer | lightgreen | https://en.wiktionary.org/wiki/netopýr | |
Slovak | slk | netopier | night flyer | night_flyer | lightgreen | https://en.wiktionary.org/wiki/netopier | |
Hungarian | hun | bóregér | Skin mouse | skin_mouse | lightgreen | https://en.wiktionary.org/wiki/b%C5%91reg%C3%A9r | |
Romanian | ron | liliac | skin thing | skin_thing | palevioletred | https://en.wiktionary.org/wiki/liliac from https://en.wiktionary.org/wiki/%D0%BB%D0%B8%D0%BB%D1%8F%D0%BA#Bulgarian | |
Serbian | srp | šišmiš | blind mouse | blind_mouse | lightgreen | https://en.wiktionary.org/wiki/šišmiš | |
Croatian | hrv | šišmiš | flutter mouse | flutter_mouse | lemonchiffon | https://en.wiktionary.org/wiki/šišmiš | |
Slovene | slv | netopir | night flyer | night_flyer | lightgreen | https://en.wiktionary.org/wiki/netopir | |
Macedonian | mkd | лилјак | night demon | night_demon | salmon | https://en.wiktionary.org/wiki/лилјак | |
Albanian | sqi | lakuriq nate | naked night one | naked_night_one | salmon | https://en.wiktionary.org/wiki/lakuriq_nate | |
Estonian | est | nahkhiir | skin mouse | skin_mouse | skyblue | https://en.wiktionary.org/wiki/nahkhiir | |
Latvian | lav | ādas spārns | leather wing | leather_wing | red | https://en.wiktionary.org/wiki/ādas_spārns | |
Lithuanian | lit | šikšnosparnis | leather wing | leather_wing | red | https://en.wiktionary.org/wiki/šikšnosparnis | |
Armenian | hye | մաշկաթեւ | wing of skin | wing_of_skin | grey | https://en.wiktionary.org/wiki/%D5%B4%D5%A1%D5%B7%D5%AF%D5%A1%D5%A9%D6%87 | |
Georgian | kat | ღამის ფრინველი | night one | night_one | salmon | https://en.wiktionary.org/wiki/ღამის_ფრინველი | |
Azerbaijani | aze | yarasa | unknown | orange | https://en.wiktionary.org/wiki/yarasa | ||
Russian | rus | летучая мышь | flying mouse | flying_mouse | dodgerblue | https://en.wiktionary.org/wiki/летучая_мышь | |
Ukrainian | ukr | кажан | leather one | leather_one | turquoise | https://en.wiktionary.org/wiki/кажан | |
Belarusian | bel | кажан | leather one | leather_one | turquoise | https://en.wiktionary.org/wiki/кажан#Belarusian | |
Turkish | tur | yarasa | unknown | orange | https://en.wiktionary.org/wiki/yarasa | ||
Kazakh | kaz | жарқанат | cliff wing | cliff_wing | grey | https://en.wiktionary.org/wiki/жарқанат | |
Bashkir | bak | ярмәкәй | unknown | orange | https://en.wiktionary.org/wiki/ярмәкәй | ||
Northern Sami | sme | Girdisáhpán | plane mouse | dark_bird | dodgerblue | https://fr.wiktionary.org/wiki/girdis%C3%A1hp%C3%A1n | |
Abkhaz | abk | апша | unknown | grey | https://abkhazworld.com/aw/publications/linguistics/1078-abkhaz-english-dictionary-george-hewitt | ||
Arabic | ara | وطواط | wa-TWAAT wa-TWAAT (flapping sound) | onomatopoeic_flap | grey | https://en.wiktionary.org/wiki/وطواط | |
Bosnian | bos | šišmiš | blind mouse | blind_mouse | lightgreen | https://en.wiktionary.org/wiki/šišmiš#Bosnian | |
Breton | bre | logod-noz | wing skin | leather_wing | lightblue | https://en.wiktionary.org/wiki/askell-groc%27hen | |
Bulgarian | bul | прилеп | sticking one | sticking_one | blue | https://en.wiktionary.org/wiki/прилеп#Bulgarian | |
Cornish | cor | logosen-negh | winged mouse | winged_mouse | skyblue | https://en.wiktionary.org/wiki/logosen-negh | |
Welsh | cym | ystlum | unknown | red | https://en.wiktionary.org/wiki/ystlum | ||
Greek | ell | νυχτερίδα | night one | night_one | red | https://en.wiktionary.org/wiki/νυχτερίδα | |
English | eng | bat | bat | bat | green | https://en.wiktionary.org/wiki/bat#English | |
Faroese | fao | flagurmús | flap mouse | flap_mouse | skyblue | https://en.wiktionary.org/wiki/flagurmús | |
West Frisian | fry | flapmûs | flap mouse | flap_mouse | skyblue | https://en.wiktionary.org/wiki/flapm%C3%BBs | |
Maltese | mlt | farfarata tal-lejl | butterfly of the night | butterfly_of_the_night | red | https://en.wiktionary.org/wiki/farfarata_tal-lejl | |
Gagauz | gag | yarasa | unknown | orange | https://en.wiktionary.org/wiki/yarasa | ||
Scottish Gaelic | gla | ialtag | unknown | red | https://en.wiktionary.org/wiki/ialtag | ||
Scots | sco | baukie-bird | bat | bat | green | http://www.dsl.ac.uk/entry/snd/backie_n4 | |
Ligurian | lig | rattopenûgo | winged rat | winged_rat | yellow | https://en.wiktionary.org/wiki/Category:Terms_with_Ligurian_translations | |
Piedmontese | pms | ratavolòira | flying rat | flying_rat | grey | https://en.wikipedia.org/wiki/Piedmontese_language#Lexical_comparison | |
Occitan | occ | ratapenada | winged rat | winged_rat | yellow | https://en.wiktionary.org/wiki/ratapenada | |
Sicilian | sic | taḍḍarita | bat | grey | https://en.wiktionary.org/wiki/taḍḍarita | ||
Neapolitan | nap | taddarita | bat | grey | https://glosbe.com/en/scn/bat | ||
Venetian | ven | barbastréjo | bat | grey | https://en.wiktionary.org/wiki/barbastr%C3%A9jo | ||
Irish | gle | bás dorcha | dark death | red | https://corknaturenetwork.ie/our-nature-insights/bats-in-ireland/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spa """little blind mouse""" lightblue | |
por """little blind mouse""" lightblue | |
cat """winged rat""" yellow | |
glg """""" | |
krl """""" | |
sar """""" | |
eus """old mouse""" skyblue | |
fra """bald mouse""" skyblue | |
ita """evening creature""" orange | |
roh """""" grey | |
deu """flutter mouse""" lemonchiffon | |
de-at """flutter mouse""" lemonchiffon | |
nld """flutter mouse""" skyblue | |
ltz """flutter mouse""" lemonchiffon | |
vls """wing mouse""" skyblue | |
dan """flutter mouse""" lemonchiffon | |
swe """flutter mouse""" lemonchiffon | |
nor """flutter mouse""" lemonchiffon | |
isl """leather flapper""" green | |
fin """fluttering one""" khaki | |
pol """night flyer""" lightgreen | |
ces """night flyer""" lightgreen | |
slk """night flyer""" lightgreen | |
hun """skin mouse""" lightgreen | |
ron """skin thing""" palevioletred | |
srp """blind mouse""" lightgreen | |
hrv """flutter mouse""" lemonchiffon | |
slv """night flyer""" lightgreen | |
mkd """night demon""" salmon | |
sqi """naked night one""" salmon | |
est """skin mouse""" skyblue | |
lav """leather wing""" red | |
lit """leather wing""" red | |
hye """wing of skin""" grey | |
kat """night one""" salmon | |
aze """""" orange | |
rus """flying mouse""" dodgerblue | |
ukr """leather one""" turquoise | |
bel """leather one""" turquoise | |
tur """""" orange | |
kaz """cliff wing""" grey | |
bak """""" orange | |
sme """plane mouse""" dodgerblue | |
abk """""" grey | |
ara """watwat watwat (flapping sound)""" grey | |
bos """blind mouse""" lightgreen | |
bre """wing skin""" lightblue | |
bul """sticking one""" blue | |
cor """winged mouse""" skyblue | |
cym """""" red | |
ell """night one""" red | |
eng """Bat""" green | |
fao """flap mouse""" skyblue | |
fry """flap mouse""" skyblue | |
mlt """butterfly of the night""" red | |
gag """""" orange | |
gla """""" red | |
sco """""" | |
lig """winged rat""" yellow | |
pms """flying rat""" grey | |
occ """winged rat""" yellow | |
sic """""" grey | |
nap """""" grey | |
ven """""" grey | |
gle """dark death""" green |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Updated for Python 3 compatibility and quoted word support | |
# This script takes one argument: the name of a file organized in the following way: | |
# ara ? grey | |
# aze alman yellow | |
# spa "little blind mouse" lightblue | |
# ... | |
# and replaces the labels and colors in an SVG template map accordingly. | |
import sys | |
import shlex | |
import xml.etree.ElementTree as ET | |
# Compute output map filename | |
outputMap = sys.argv[1].replace('dictionary', 'map').replace('.txt', '.svg') | |
template_path = 'resources/europe_template.svg' | |
# Load the SVG template | |
with open(template_path, 'r', encoding='utf-8') as f: | |
theMapSource = f.read() | |
# Original color definitions in the template (language code, hex color) | |
language, color = zip(*([ | |
['abk', '168d4f'], | |
['ara', 'ffffb1'], | |
# ... include all original pairs ... | |
['ukr', 'c1ff00'] | |
])) | |
# Read the user dictionary | |
languageDic = [] | |
wordDic = [] | |
colorDic = [] | |
def read_dict(path): | |
try: | |
with open(path, 'r', encoding='utf-8') as f: | |
return f.readlines() | |
except FileNotFoundError: | |
print(f"Dictionary file not found: {path}") | |
sys.exit(1) | |
lines = read_dict(sys.argv[1]) | |
for line in lines: | |
# use shlex to handle quoted multi-word entries | |
parts = shlex.split(line) | |
if not parts or line.strip().startswith('#'): | |
continue | |
lang = parts[0] | |
languageDic.append(lang) | |
# Word may be missing or quoted | |
word = '' | |
if len(parts) > 1 and parts[1] != '?': | |
word = parts[1] | |
wordDic.append(word) | |
# Color may be missing or in third position | |
col = parts[2] if len(parts) > 2 else 'grey' | |
colorDic.append(col) | |
# 1) parse the freshly generated SVG | |
tree = ET.parse(outputMap) | |
root = tree.getroot() | |
ns = {'svg': 'http://www.w3.org/2000/svg'} | |
# 2) find the <text> element for Russia by its language code | |
# in the mapMakeR template, that text usually has id="rus" | |
russ_txt = root.find(".//svg:text[@id='rus']", ns) | |
if russ_txt is not None: | |
# 3) read its current x/y (strings), convert to float | |
print(float(russ_txt.get('x', 0))) | |
print(float(russ_txt.get('y', 0))) | |
x = float(russ_txt.get('x', 0)) | |
y = float(russ_txt.get('y', 0)) | |
# 4) apply your westward shift — e.g. 100 units | |
russ_txt.set('x', str(x - 100.0)) | |
russ_txt.set('y', str(y)) # you can also tweak y if you like | |
# 5) write it back out | |
tree.write(outputMap, encoding='utf-8') | |
# Map named colors to hex using ColorBrewer palette | |
color_map_names = { | |
'turquoise': '#8dd3c7', 'yellow': '#ffffb3', 'purple': '#bebada', | |
'red': '#fb8072', 'blue': '#80b1d3', 'orange': '#fdb462', | |
'green': '#b3de69', 'pink': '#fccde5', 'grey': '#d9d9d9', | |
'white': '#ffffff', 'darkgrey': '#999999' | |
} | |
for i, col in enumerate(colorDic): | |
colorDic[i] = color_map_names.get(col, col) | |
# Replace placeholders in the SVG | |
# for lang, w, col in zip(languageDic, wordDic, colorDic): | |
# print(f'Replacing {lang}: word="{w}", color="{col}"') | |
# replace word placeholder | |
# theMapSource = theMapSource.replace(f'${lang}', w) | |
# replace color placeholder | |
# try: | |
# orig = color[language.index(lang)] | |
# theMapSource = theMapSource.replace(f'#{orig}', col) | |
# except ValueError: | |
# pass # skip languages not in original list | |
for lang, w, col in zip(languageDic, wordDic, colorDic): | |
# 1) Always strip out the $placeholder | |
theMapSource = theMapSource.replace(f'${lang}', w) | |
# 2) If there's no word, skip coloring for this lang | |
if not w: | |
print(f"Skipping color for {lang} because no word was provided.") | |
continue | |
# 3) Otherwise, apply the color swap as before | |
try: | |
orig = color[language.index(lang)] | |
theMapSource = theMapSource.replace(f'#{orig}', col) | |
except ValueError: | |
# language not in the original template colour list, ignore | |
pass | |
# Write the new SVG | |
with open(outputMap, 'w', encoding='utf-8') as f: | |
f.write(theMapSource) | |
print(f"Generated map: {outputMap}") | |
import xml.etree.ElementTree as ET | |
try: | |
tree = ET.parse(outputMap) | |
root = tree.getroot() | |
vb = root.get('viewBox') | |
if vb: | |
x, y, w, h = map(float, vb.split()) | |
new_w = 1060.0 # ← adjust this to crop further east or west | |
root.set('viewBox', f"{x} {y} {new_w} {h}") | |
# optionally also shrink the width attribute if present: | |
if root.get('width'): | |
root.set('width', str(new_w)) | |
tree.write(outputMap, encoding='utf-8') | |
except Exception as e: | |
print("Warning: could not crop viewBox:", e) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment