Skip to content

Commit

Permalink
v20140218
Browse files Browse the repository at this point in the history
Added:

- Added "Band Info" script. See additional info below.

Fixed:

- Minor issue while retrieving data from "Additional Notes" tab that was causing that "Recording Information" and "Identifiers" sections weren't properly separated from previous sections resulting in a big text block.
- Issue while retrieving "Lyrical Themes" (tag "METAL ARCHIVES LYRICAL THEMES") on "Band Info" script.
- Issue while retrieving "Release date" information from album (tag "METAL ARCHIVES DATE") when original data only contained year, month, or both (e.g., "October 1996", "1999"). See additional info below.

Changed:

- Some destination custom tags (i.e., those without a native ID3v2 tag) on "Band Info" script have been renamed to have them in same "standard" as the ones used on other scripts (i.e., those with "METAL ARCHIVES" as prefix).
- Case in some custom tags to make them follow the "standard" mentioned on previous point, going from Camel Case to UPPER CASE.
  • Loading branch information
antonio-gil committed Feb 18, 2024
1 parent c0f3437 commit 1f434da
Show file tree
Hide file tree
Showing 5 changed files with 163 additions and 19 deletions.
135 changes: 135 additions & 0 deletions Me&tal Archives#Band Info.src
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
# ###################################################################
#
# _____ __ .__ _____ .__ .__
# / \ _____/ |______ | | / _ \_______ ____ | |__ |__|__ __ ____ ______
# / \ / \_/ __ \ __\__ \ | | / /_\ \_ __ \_/ ___\| | \| \ \/ // __ \ / ___/
# / Y \ ___/| | / __ \| |__ / | \ | \/\ \___| Y \ |\ /\ ___/ \___ \
# \____|__ /\___ >__| (____ /____/ \____|__ /__| \___ >___| /__| \_/ \___ >____ >
# \/ \/ \/ \/ \/ \/ \/ \/
#
#
#
# Mp3tag parsing for Metal-Archives.com, created by dano on 2007-12-15 - modified by camzo on 11-09-2017 & 02-12-2017
#
# This file should be in your sources dir.
# On Windows XP it's C:\Documents and Settings\*username*\Application Data\Mp3tag\data\sources
#
# This config is used to gain informations about an ALBUM.
#
# 2009-07-07: Update
# 2011-04-29: Update
# 2017-12-02: Updated again, now shows lists similar to album script, should stop wrong bands with same name being selected.
# 2018-11-24: Changed the index URL as it was causing some 404 errors.
#
# Only search for Metal music, normal music is not on the site
# Also only real Metal. KoRn, Linkin Park or similar is not on the site
#

[Name]=The Metal Archives
[BasedOn]=www.metal-archives.com
# [IndexUrl]=https://www.metal-archives.com/search/ajax-advanced/searching/bands?bandName=%s&&sEcho=1&iColumns=4&sColumns=&iDisplayStart=0&iDisplayLength=100&sNames=%2C%2C%2CbandLabelName=#bands
[IndexUrl]=https://www.metal-archives.com/search/ajax-advanced/searching/bands?bandName=%s
[AlbumUrl]=
[WordSeperator]=+
[IndexFormat]=%Artist%|%_url%|%Genre%|%Country%
[SearchBy]=%artist%
[Encoding]=utf-8


[ParserScriptIndex]=...

# ###################################################################
# I N D E X
# ###################################################################
debug "on" "D:\Projects\mp3tag_temp\debug_MA_Band_Index.txt"
debugwriteinput "D:\Projects\mp3tag_temp\debug_MA_Band_Index_Input.txt"

findline "<a href=\\"
do
# Artist
findinline ">" 1 1
findinline ""
sayuntil "</a"
say "|"

# Url
MoveLine -1
MoveLine 1
findinline "<a"
findinline "href=\\"
MoveChar 1
sayuntil "\\"
say "|"

#Genre
MoveLine 1
replace "\"" ""
replace "," ""
sayuntil ","
Say "|"

#Country
MoveLine 1
replace "\"" ""
replace "," ""
sayuntil "]"
saynewline


findline "<a href=\\" 1 1
unspace

while "\"<a href" 500


[ParserScriptAlbum]=...
# ###################################################################
# B A N D
# ###################################################################
debug "on" "D:\Projects\mp3tag_temp\debug_MA_Band.txt"
debugwriteinput "D:\Projects\mp3tag_temp\debug_MA_Band_Input.txt"


findline "<dl class="float_left">"

# COUNTRY
outputto "Country"
findline "<dd><a href="https://www.metal-archives.com/lists"
findinline "https://www.metal-archives.com/lists/"
findinline ">" 1 1
sayuntil "</a"

# LOCATION
outputto "METAL ARCHIVES LOCATION"
findline "<dt>Location:</dt>"
findline "<dd>"
findinline "dd>"
sayuntil "</dd>"

# ACTIVE?
outputto "METAL ARCHIVES STATUS"
findline "<dt>Status:</dt>"
findline "<dd class="
findinline ">"
sayuntil "</dd"

#FORMATION YEAR
outputto "METAL ARCHIVES FORMATION YEAR"
findline "<dt>Formed in:</dt>"
findline "<dd>"
findinline ">"
sayuntil "</"

#GENRE
outputto "Genre"
findline "<dt>Genre:</dt>"
findline "<dd>"
findinline "<dd>"
sayuntil "</dd>"

#LYRICAL THEMES
outputto "METAL ARCHIVES LYRICAL THEMES"
findline "<dt>Themes:</dt>"
findline "<dd>"
findinline "<dd>"
sayuntil "</dd>"
10 changes: 6 additions & 4 deletions Me&tal Archives#Search by Album.src
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ regexpreplace "<a[^>]+>" ""
sayuntil "</"

# Type
outputto "Metal Archives Type"
outputto "METAL ARCHIVES TYPE"
findline "<dt>Type:</dt>"
moveline 1 1
regexpreplace "<[^>]+>" "" #kt
Expand All @@ -132,7 +132,7 @@ regexpreplace "<[^>]+>" "" #kt
sayregexp "\d\d\d\d"

# Date
outputto "Metal Archives Date"
outputto "METAL ARCHIVES DATE"
replace "January " "-01-"
replace "February " "-02-"
replace "March " "-03-"
Expand All @@ -147,6 +147,8 @@ replace "November " "-11-"
replace "December " "-12-"
regexpreplace "(\d+)[a-z,]+\s*" "$1-"
regexpreplace "-(\d)-" "-0$1-"
regexpreplace "^(\d\d\d\d)$" "-01-01-$1"
regexpreplace "-(\d\d)-(\d\d\d\d)" "-$1-01-$2"
regexpreplace "-(\d\d)-(\d\d)-(\d\d\d\d)" "$3-$1-$2"
sayregexp "\d\d\d\d-\d\d-\d\d"

Expand All @@ -165,7 +167,7 @@ regexpreplace "<[^>]+>" "" #kt
sayrest

# Album Rating
outputto "Metal Archives Rating"
outputto "METAL ARCHIVES RATING"
findline "<dt>Reviews:</dt>"
moveline 1 1
joinuntil "</dd>"
Expand Down Expand Up @@ -262,7 +264,7 @@ if "<div id="

regexpreplace "[^\S\r\n]{2,}" ""
regexpreplace "<p[^>]*>" ""
regexpreplace "</p>" "\r\n"
regexpreplace "</p>" "\r\n\r\n"
regexpreplace "<a href[^>]*>" ""

regexpreplace ">\r" ">"
Expand Down
17 changes: 10 additions & 7 deletions Me&tal Archives#Search by Band + Album.src
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
# ###################################################################
# I N D E X
# ###################################################################
# debug "on" "D:\Projects\mp3tag_temp\debug_MA-Google-Album-EXT_A.txt"
# debugwriteinput "D:\Projects\mp3tag_temp\Metal-Archives Album A.txt"
# debug "on" "D:\Projects\mp3tag_temp\debug_MA_Index.txt"
# debugwriteinput "D:\Projects\mp3tag_temp\debug_MA_Index_Input.txt"


findline "<a href=\\\""
Expand Down Expand Up @@ -82,7 +82,8 @@ while "\"<a href" 500
# ###################################################################
# A L B U M
# ###################################################################
# debug "on" "D:\Projects\mp3tag_temp\debug_MA-Album_EXT-B.txt"
# debug "on" "D:\Projects\mp3tag_temp\debug_MA_Album.txt"
# debugwriteinput "D:\Projects\mp3tag_temp\debug_MA_Album_Input.txt"


findline "id=\"album_sidebar\">"
Expand Down Expand Up @@ -118,7 +119,7 @@ regexpreplace "<a[^>]+>" ""
sayuntil "</"

# Type
outputto "Metal Archives Type"
outputto "METAL ARCHIVES TYPE"
findline "<dt>Type:</dt>"
moveline 1 1
regexpreplace "<[^>]+>" "" #kt
Expand All @@ -132,7 +133,7 @@ regexpreplace "<[^>]+>" "" #kt
sayregexp "\d\d\d\d"

# Date
outputto "Metal Archives Date"
outputto "METAL ARCHIVES DATE"
replace "January " "-01-"
replace "February " "-02-"
replace "March " "-03-"
Expand All @@ -147,6 +148,8 @@ replace "November " "-11-"
replace "December " "-12-"
regexpreplace "(\d+)[a-z,]+\s*" "$1-"
regexpreplace "-(\d)-" "-0$1-"
regexpreplace "^(\d\d\d\d)$" "-01-01-$1"
regexpreplace "-(\d\d)-(\d\d\d\d)" "-$1-01-$2"
regexpreplace "-(\d\d)-(\d\d)-(\d\d\d\d)" "$3-$1-$2"
sayregexp "\d\d\d\d-\d\d-\d\d"

Expand All @@ -165,7 +168,7 @@ regexpreplace "<[^>]+>" "" #kt
sayrest

# Album Rating
outputto "Metal Archives Rating"
outputto "METAL ARCHIVES RATING"
findline "<dt>Reviews:</dt>"
moveline 1 1
joinuntil "</dd>"
Expand Down Expand Up @@ -262,7 +265,7 @@ if "<div id="

regexpreplace "[^\S\r\n]{2,}" ""
regexpreplace "<p[^>]*>" ""
regexpreplace "</p>" "\r\n"
regexpreplace "</p>" "\r\n\r\n"
regexpreplace "<a href[^>]*>" ""

regexpreplace ">\r" ">"
Expand Down
10 changes: 6 additions & 4 deletions Me&tal Archives#Search by Band.src
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ regexpreplace "<a[^>]+>" ""
sayuntil "</"

# Type
outputto "Metal Archives Type"
outputto "METAL ARCHIVES TYPE"
findline "<dt>Type:</dt>"
moveline 1 1
regexpreplace "<[^>]+>" "" #kt
Expand All @@ -132,7 +132,7 @@ regexpreplace "<[^>]+>" "" #kt
sayregexp "\d\d\d\d"

# Date
outputto "Metal Archives Date"
outputto "METAL ARCHIVES DATE"
replace "January " "-01-"
replace "February " "-02-"
replace "March " "-03-"
Expand All @@ -147,6 +147,8 @@ replace "November " "-11-"
replace "December " "-12-"
regexpreplace "(\d+)[a-z,]+\s*" "$1-"
regexpreplace "-(\d)-" "-0$1-"
regexpreplace "^(\d\d\d\d)$" "-01-01-$1"
regexpreplace "-(\d\d)-(\d\d\d\d)" "-$1-01-$2"
regexpreplace "-(\d\d)-(\d\d)-(\d\d\d\d)" "$3-$1-$2"
sayregexp "\d\d\d\d-\d\d-\d\d"

Expand All @@ -165,7 +167,7 @@ regexpreplace "<[^>]+>" "" #kt
sayrest

# Album Rating
outputto "Metal Archives Rating"
outputto "METAL ARCHIVES RATING"
findline "<dt>Reviews:</dt>"
moveline 1 1
joinuntil "</dd>"
Expand Down Expand Up @@ -262,7 +264,7 @@ if "<div id="

regexpreplace "[^\S\r\n]{2,}" ""
regexpreplace "<p[^>]*>" ""
regexpreplace "</p>" "\r\n"
regexpreplace "</p>" "\r\n\r\n"
regexpreplace "<a href[^>]*>" ""

regexpreplace ">\r" ">"
Expand Down
10 changes: 6 additions & 4 deletions Me&tal Archives#Search by URL.src
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ regexpreplace "<a[^>]+>" ""
sayuntil "</"

# Type
outputto "Metal Archives Type"
outputto "METAL ARCHIVES TYPE"
findline "<dt>Type:</dt>"
moveline 1 1
regexpreplace "<[^>]+>" "" #kt
Expand All @@ -82,7 +82,7 @@ regexpreplace "<[^>]+>" "" #kt
sayregexp "\d\d\d\d"

# Date
outputto "Metal Archives Date"
outputto "METAL ARCHIVES DATE"
replace "January " "-01-"
replace "February " "-02-"
replace "March " "-03-"
Expand All @@ -97,6 +97,8 @@ replace "November " "-11-"
replace "December " "-12-"
regexpreplace "(\d+)[a-z,]+\s*" "$1-"
regexpreplace "-(\d)-" "-0$1-"
regexpreplace "^(\d\d\d\d)$" "-01-01-$1"
regexpreplace "-(\d\d)-(\d\d\d\d)" "-$1-01-$2"
regexpreplace "-(\d\d)-(\d\d)-(\d\d\d\d)" "$3-$1-$2"
sayregexp "\d\d\d\d-\d\d-\d\d"

Expand All @@ -115,7 +117,7 @@ regexpreplace "<[^>]+>" "" #kt
sayrest

# Album Rating
outputto "Metal Archives Rating"
outputto "METAL ARCHIVES RATING"
findline "<dt>Reviews:</dt>"
moveline 1 1
joinuntil "</dd>"
Expand Down Expand Up @@ -212,7 +214,7 @@ if "<div id="

regexpreplace "[^\S\r\n]{2,}" ""
regexpreplace "<p[^>]*>" ""
regexpreplace "</p>" "\r\n"
regexpreplace "</p>" "\r\n\r\n"
regexpreplace "<a href[^>]*>" ""

regexpreplace ">\r" ">"
Expand Down

0 comments on commit 1f434da

Please sign in to comment.