Skip to content

Commit 20b2d88

Browse files
committed
Default aliases.yaml; Test aliases feature
1 parent ff36dd2 commit 20b2d88

File tree

2 files changed

+402
-1
lines changed

2 files changed

+402
-1
lines changed

beetsplug/lastgenre/aliases.yaml

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
# Default genre aliases for the lastgenre plugin.
2+
#
3+
# Keys are canonical names and support \g<N> back-references to pattern groups.
4+
# Patterns are case-insensitive full-matches. Order matters: first match wins.
5+
6+
# ---------------------------------------------------------------------------
7+
# Ampersands / Delimiters
8+
# ---------------------------------------------------------------------------
9+
10+
# drum and bass (d&b, dnb, drum n bass, ...)
11+
drum and bass:
12+
- d(rum)?[ &n/]*b(ass)?
13+
14+
# rhythm and blues (r&b, rnb, ...)
15+
rhythm and blues:
16+
- r(hythm)?[ &n/]*b(lues)?
17+
18+
# rock and roll (rock & roll, rock'n'roll, rock-n-roll, ...)
19+
rock and roll:
20+
- rock[ '‐&n/ \-]*roll
21+
22+
# ---------------------------------------------------------------------------
23+
# Consistent Delimiters (Hyphenation)
24+
# ---------------------------------------------------------------------------
25+
26+
27+
# Hyphenate j-pop, k-pop, c-pop, post-rock, etc.
28+
# Matches: kpop, k pop -> k-pop; j rock -> j-rock; post rock -> post-rock
29+
#
30+
# Hyphenate neo-soul, euro-house, tech-house, etc.
31+
# (Negative lookaheads exclude 'european' and 'techno'/'technic*'.)
32+
\g<1>-\g<2>:
33+
- (c|k|j)[ /-]*(folk|goth|hip hop|pop|rock|ska|trance)
34+
- (euro(?!p[ae]+n?)|neo|post|tech(?!n[io]))[ /-]*(\w+)
35+
36+
# lo-fi, glo-fi (lofi, lo fi -> lo-fi)
37+
lo-fi:
38+
- (g?lo)[ /-]*fi
39+
40+
# p-funk, g-funk, etc. (p funk -> p-funk)
41+
\g<1>-funk:
42+
- (p|g)[ /-]*funk
43+
44+
# synthpop, synthwave, etc. (synth pop -> synthpop)
45+
synth\g<1>:
46+
- synth[ /-]+(\w+)
47+
48+
# avant-garde (avantgarde, avant gard, avant-gard)
49+
avant-garde:
50+
- avant[ /-]*(gard(e)?)?
51+
- avant-gard
52+
- avant
53+
54+
# ---------------------------------------------------------------------------
55+
# Nu- Genre Spelling (nu jazz, nu-disco, etc.)
56+
# ---------------------------------------------------------------------------
57+
58+
# Matches: nu-jazz -> nu jazz; nu disco -> nu disco
59+
# Note: 'nu-disco' is hyphenated in the tree but 'nu jazz' isn't in genres.txt
60+
nu \g<1>:
61+
- nu[ /-]*(disco|jazz|metal|soul)
62+
63+
# ---------------------------------------------------------------------------
64+
# Terminology / Synonym / Translation fixes
65+
# ---------------------------------------------------------------------------
66+
67+
# electronic (electronic music, elektronika)
68+
electronic:
69+
- electronic[ /]music
70+
- elektronika
71+
72+
# downtempo (downbeat)
73+
downtempo:
74+
- down[ /-]*beat
75+
76+
# shoegaze (shoegazer, shoegazing)
77+
shoegaze:
78+
- shoegaze?r?
79+
- shoegazing
80+
81+
# ---------------------------------------------------------------------------
82+
# Form Fixes (Hip Hop, Trip Hop, etc.)
83+
# ---------------------------------------------------------------------------
84+
85+
# Normalized spacing: hip-hop, hiphop -> hip hop
86+
\g<1> hop:
87+
- (glitch|hip|jazz|trip)y?([ /-]*hip)?[ /-]*hop
88+
89+
# ---------------------------------------------------------------------------
90+
# Abbreviations & International Spellings
91+
# ---------------------------------------------------------------------------
92+
93+
# alternative rock (alt, alternative, alt rock, ...)
94+
alternative rock:
95+
- alt([ /-]*rock)?
96+
- alternative([ /-]*rock)?
97+
- alternatv[ /-]*rock
98+
99+
# gothic rock (goth, goth rock) - doesn't catch gothic metal
100+
gothic rock:
101+
- goth(?!ic)([ /-]*rock)?
102+
- gothic[ /-]*rock
103+
104+
# progressive rock (prog, prog rock, progressive rock)
105+
# Note: mapping standalone 'progressive' is avoided to prevent catching 'progressive metal', etc.
106+
progressive rock:
107+
- prog([ /-]*rock)?
108+
- progressive[ /-]*rock
109+
110+
# traditional folk (trad, traditional)
111+
# Note: avoids matching 'trad jazz' or 'traditional country'.
112+
traditional folk:
113+
- trad(/|ition(/|al)?)?-?

0 commit comments

Comments
 (0)