-
Notifications
You must be signed in to change notification settings - Fork 0
/
generate_stubs.sh
executable file
·44 lines (42 loc) · 1.79 KB
/
generate_stubs.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
# Reads entities from the text file next to it named entities.txt and
# creates dendron notes for them as empty markdown stubs. Assumes that
# entities list was generated by Nifty tool by Josiah Jack.
#
# This is also written by Josiah Jack, 4/19/2023.
while IFS= read -r entity; do
if [[ "$entity" == monster_* ]]; then
dendron_title="enemies.${entity}"
elif [[ "$entity == item_* ]]; then
dendron_title="items.${entity}"
elif [[ "$entity == weapon_* ]]; then
dendron_title="weapons.${entity}"
elif [[ "$entity == trap_* ]]; then
dendron_title="traps.${entity}"
elif [[ "$entity == ltrail_* ]]; then
dendron_title="traps.${entity}"
elif [[ "$entity == trigger_* ]]; then
dendron_title="brush-entities.triggers.${entity}"
elif [[ "$entity == t_effector_* ]]; then
dendron_title="brush-entities.triggers.${entity}"
elif [[ "$entity == func_* ]]; then
dendron_title="brush-entities.${entity}"
elif [[ "$entity == fx_* ]]; then
dendron_title="point-entities.effects-and-decorations.${entity}"
elif [[ "$entity == tele_* ]]; then
dendron_title="point-entities.effects-and-decorations.${entity}"
elif [[ "$entity == env_* ]]; then
dendron_title="point-entities.effects-and-decorations.${entity}"
elif [[ "$entity == misc_* ]]; then
dendron_title="point-entities.effects-and-decorations.${entity}"
elif [[ "$entity == corpse_* ]]; then
dendron_title="point-entities.effects-and-decorations.${entity}"
elif [[ "$entity == obj_* ]]; then
dendron_title="point-entities.effects-and-decorations.${entity}"
elif [[ "$entity == ambient_* ]]; then
dendron_title="point-entities.ambients-and-sound-effects.${entity}"
else
dendron_title="point-entities.${entity}"
fi
npx dendron note write --fname "${dendron_title}"
done < ./entities.txt