Milka's Exports - Sorting

I have been using Milka's export - html simple album overview found here - milka's exports for several years now and it just the best for showing an artists total albums. I was wondering if there is a way to make the list sort by year? It usually sorts by default in alphabetical form. This way the albums are listed in the order the artist made them.

There are so many.
You have to look for the $loop() which loops around the album. Insert a $loop(%year%) before that and a $loopend() behind the loopend() that closes teh loop for album.

It's the one named milkaSimple_01_html_Album_Overview.zip

The following Mp3tag export script can be used simply as is, or can be used as the framework for extensions.
If you have the need for special HTML code, then you need to add it.

01: $filename($getEnv('USERPROFILE')'\Desktop\Test.Artist.Year.Album.txt',UTF-8)$puts(

02: )$loop(1,1)$puts(crlf,$char(13)$char(10))$puts(br,'{br}')$loopend()$replace(
03:
04: $loop(%ARTIST%,1)$replace(
05:
06: %ARTIST%$get(br)
07:
08: $loop(%YEAR%%ALBUM%,1)$replace(
09:
10: ' ('$left(%YEAR%,4)') '%ALBUM%$get(br)
11:
12: $loop($num(%DISCNUMBER%,3)$num(%TRACK%,3))$replace(
13:
14: $repeat(' ',10)$num(%TRACK%,2)' - '%TITLE%$get(br)
15:
16: ,$get(crlf),,$get(br),$get(crlf))$loopend()$get(br)
17: ,$get(crlf),,$get(br),$get(crlf))$loopend()
18: ,$get(crlf),,$get(br),$get(crlf))$loopend()
19: ,$get(crlf),,$get(br),$get(crlf))

Shortened output example

Dan Gibson
   (1993) Rocky Mountain Suite (Solitudes)
          01 - The Runoff
          02 - Glacier Lake
          03 - The Foothills

   (1994) Appalachian Mountain Suite (Solitudes)
          01 - Arrival Of Spring
          02 - Marshlands
          03 - Forest Ridge

   (1996) Island Paradise
          01 - White Sand
          02 - Beachcombing
          03 - Cool Rain

   (1997) Stream Of Dreams (Solitudes)
          01 - Morning Light
          02 - Sheltered Shore
          03 - Pool Of Mirrors

David Bowie
   (1970) Happy Birthday Mr Bowie (disc 1)
          09 - The Man Who Sold the World

   (1990) Changesbowie
          12 - "Heroes"

   (1993) The Singles 1969-1993
          01 - Space Oddity

   (1997) 50th Birthday Concert
          01 - Under Pressure

   (2003) Club Bowie
          01 - The Scumfrog vs Bowie / Loving The Alien

   (2008) Best of Rock: The 50 Biggest Songs of History
          10 - "Heroes"

DD.20150307.1152.CET

Awesome! Thank you very much! This probably gives me enough to play around with and get it figured out! I really appreciate the time you took as I am not up on all the code as well as some. Thanks again