2016-03-14 07:52:18 +00:00
// ==UserScript==
// @name Import Takealot releases to MusicBrainz
// @description Add a button to import Takealot releases to MusicBrainz
2016-03-24 10:42:35 +00:00
// @version 2016.03.15.2
2016-03-15 16:59:40 +00:00
// @namespace https://github.com/murdos/musicbrainz-userscripts
2016-03-14 07:52:18 +00:00
// @include http*://www.takealot.com/*
2016-03-15 19:49:17 +00:00
// @downloadURL https://raw.github.com/murdos/musicbrainz-userscripts/master/takealot_importer.user.js
// @updateURL https://raw.github.com/murdos/musicbrainz-userscripts/master/takealot_importer.user.js
2016-03-14 07:52:18 +00:00
// @require https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js
2016-03-15 19:41:14 +00:00
// @require lib/mbimport.js
// @require lib/logger.js
// @require lib/mblinks.js
// @require lib/mbimportstyle.js
2016-03-14 07:52:18 +00:00
// @icon https://raw.githubusercontent.com/murdos/musicbrainz-userscripts/master/assets/images/Musicbrainz_import_logo.png
// @grant none
// ==/UserScript==
// prevent JQuery conflicts, see http://wiki.greasespot.net/@grant
this . $ = this . jQuery = jQuery . noConflict ( true ) ;
if ( ! unsafeWindow ) unsafeWindow = window ;
2016-03-15 16:59:40 +00:00
var DEBUG = false ;
2016-03-24 10:57:54 +00:00
//DEBUG = true;
2016-03-14 07:52:18 +00:00
if ( DEBUG ) {
2016-03-14 12:17:50 +00:00
LOGGER . setLevel ( 'debug' ) ;
2016-03-14 07:52:18 +00:00
}
2016-03-14 12:17:50 +00:00
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2016-03-14 07:52:18 +00:00
/ *
* Test cases :
2016-03-15 16:59:40 +00:00
* - http : //www.takealot.com/theuns-jordaan-roeper-cd/PLID17284867 - working (Single artist release)
* - http : //www.takealot.com/various-artists-still-the-one-3cd/PLID40723650 - a dirty example
* - http : //www.takealot.com/now-71-various-artists-cd/PLID40688034 - working (Various Artists and Multi Disc)
2016-03-24 10:57:54 +00:00
* - http : //www.takealot.com/various-clubtraxxx-15-cd/PLID41391268 - working - do check if tracklist not in product info then look if tracklist in description
2016-03-14 07:52:18 +00:00
* /
2016-03-14 12:17:50 +00:00
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2016-03-14 07:52:18 +00:00
$ ( document ) . ready ( function ( ) {
LOGGER . info ( "Document Ready & Takealot Userscript executing" ) ;
2016-03-14 12:17:50 +00:00
var TakealotRelease = ParseTakealotPage ( ) ;
2016-03-14 07:52:18 +00:00
insertMBSection ( TakealotRelease ) ;
} ) ;
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2016-03-14 12:17:50 +00:00
// Insert MusicBrainz section into Takealot page //
2016-03-14 07:52:18 +00:00
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function insertMbUI ( mbUI ) {
2016-03-14 12:17:50 +00:00
var e ;
if ( ( e = $ ( "div.section.box-summary" ) ) && e . length ) {
e . after ( mbUI ) ;
} else if ( ( e = $ ( '#buybox' ) ) && e . length ) {
e . before ( mbUI ) ;
} else if ( ( e = $ ( "div.section.more-choices" ) ) && e . length ) {
e . before ( mbUI ) ;
}
2016-03-14 07:52:18 +00:00
}
2016-04-11 10:33:37 +00:00
// Insert links to high res image in Takealot page
function insertIMGlinks ( ) {
var imghref = $ ( '#slideshow a.jqzoom' ) . attr ( 'href' ) ;
LOGGER . debug ( "insertIMGlink Firing" , imghref ) ;
$ ( '#slideshow' ) . append ( '<p><img src="//musicbrainz.org/favicon.ico" /><a href="' + imghref + '">MB High Res Image</a></p>' ) ;
}
2016-03-14 07:52:18 +00:00
// Insert links in Takealot page
function insertMBSection ( release ) {
2016-03-24 10:57:54 +00:00
//LOGGER.debug("insertMBsection Firing");
2016-03-14 12:17:50 +00:00
var mbUI = $ ( '<div class="section musicbrainz"><h3>MusicBrainz</h3></div>' ) . hide ( ) ;
if ( DEBUG ) mbUI . css ( {
'border' : '1px dotted red'
} ) ;
var mbContentBlock = $ ( '<div class="section_content"></div>' ) ;
mbUI . append ( mbContentBlock ) ;
2016-04-11 10:42:07 +00:00
if ( release . maybe _buggy ) {
var warning _buggy = $ ( '<p><small><b>Warning</b>: this release is buggy, please check twice the data you import.</small><p' ) . css ( {
'color' : 'red' ,
'margin-top' : '4px' ,
'margin-bottom' : '4px'
} ) ;
mbContentBlock . prepend ( warning _buggy ) ;
}
2016-03-14 12:17:50 +00:00
// Form parameters
var edit _note = MBImport . makeEditNote ( window . location . href , 'Takealot' ) ;
2016-03-14 13:25:05 +00:00
LOGGER . debug ( "Edit Note: " , edit _note ) ;
2016-03-14 12:17:50 +00:00
var parameters = MBImport . buildFormParameters ( release , edit _note ) ;
2016-03-14 13:25:05 +00:00
// LOGGER.debug("*** Form parameters: ", parameters);
2016-03-14 12:17:50 +00:00
// Build form + search button
var innerHTML = '<div id="mb_buttons">' + MBImport . buildFormHTML ( parameters ) + MBImport . buildSearchButton ( release ) + '</div>' ;
mbContentBlock . append ( innerHTML ) ;
insertMbUI ( mbUI ) ;
2016-04-11 10:33:37 +00:00
insertIMGlinks ( ) ;
2016-03-14 12:17:50 +00:00
$ ( '#mb_buttons' ) . css ( {
display : 'inline-block' ,
width : '100%'
} ) ;
$ ( 'form.musicbrainz_import' ) . css ( {
width : '49%' ,
display : 'inline-block'
} ) ;
$ ( 'form.musicbrainz_import_search' ) . css ( {
'float' : 'right'
} )
$ ( 'form.musicbrainz_import > button' ) . css ( {
width : '100%' ,
'box-sizing' : 'border-box'
} ) ;
mbUI . slideDown ( ) ;
2016-03-14 07:52:18 +00:00
}
// Analyze Takealot data and return a release object
2016-03-14 12:17:50 +00:00
function ParseTakealotPage ( ) {
2016-03-14 07:52:18 +00:00
LOGGER . debug ( "ParseTakealotPage function firing" ) ;
var releasebarcode = "" ;
var releasecountry = "" ;
var releasedaterel = "" ;
var releaselanguage = "" ;
var releasetitle = "" ;
2016-04-11 10:50:05 +00:00
var releaselabel = [ ] ;
var releaseformat = "" ;
2016-04-11 10:42:07 +00:00
var release _maybe _buggy = false ;
2016-03-14 07:52:18 +00:00
2016-03-15 19:41:27 +00:00
// Select all DL data in the "Product Info" div id = second div class = details
2016-03-14 07:52:18 +00:00
var allinfolist = document . querySelectorAll ( "div#second > div.details > dl > *" ) ;
// Iterate all over the lines
for ( var i = 0 ; i < allinfolist . length ; i ++ ) {
2016-03-14 12:17:50 +00:00
var artistitemlabel = allinfolist [ i ] ;
if ( artistitemlabel . tagName == "DT" ) {
var artistitem = artistitemlabel . textContent . toLowerCase ( ) ;
switch ( artistitem ) {
case "barcode" : // use these cases to select the spesific text values
releasebarcode = artistitemlabel . nextSibling . textContent . trim ( ) ;
LOGGER . debug ( 'The value is :' + artistitem + ' > ' + releasebarcode ) ;
break ;
case "country" : // use these cases to select the spesific text values
releasecountry = artistitemlabel . nextSibling . textContent . trim ( ) ;
LOGGER . debug ( 'The value is :' + artistitem + ' > ' + releasecountry ) ;
break ;
2016-03-14 13:25:05 +00:00
case "artists" : // use these cases to select the spesific text values
releaseartist = artistitemlabel . nextSibling . textContent . trim ( ) ;
LOGGER . debug ( 'The value is :' + artistitem + ' > ' + releaseartist ) ;
break ;
2016-04-11 10:50:05 +00:00
case "label" : // use these cases to select the spesific text values
releaselabel . push ( {
name : artistitemlabel . nextSibling . textContent . trim ( )
} ) ;
LOGGER . debug ( 'The value is :' + artistitem + ' > ' + releaselabel ) ;
break ;
2016-03-14 12:17:50 +00:00
case "date released" : // use these cases to select the spesific text values
releasedaterel = artistitemlabel . nextSibling . textContent . trim ( ) ;
LOGGER . debug ( 'The value is :' + artistitem + ' > ' + releasedaterel ) ;
break ;
2016-04-11 10:50:05 +00:00
case "format" : // use these cases to select the spesific text values
releaseformat = artistitemlabel . nextSibling . textContent . trim ( ) ;
LOGGER . debug ( 'The value is :' + artistitem + ' > ' + releaseformat ) ;
break ;
2016-03-14 12:17:50 +00:00
case "language" : // use these cases to select the spesific text values
releaselanguage = artistitemlabel . nextSibling . textContent . trim ( ) ;
LOGGER . debug ( 'The value is :' + artistitem + ' > ' + releaselanguage ) ;
break ;
case "title" : // use these cases to select the spesific text values
releasetitle = artistitemlabel . nextSibling . textContent . trim ( ) ;
LOGGER . debug ( 'The value is :' + artistitem + ' > ' + releasetitle ) ;
break ;
case "tracks" : // use these cases to select the spesific text values
LOGGER . debug ( 'The label chosen is :' + artistitem ) ;
// Iterate over all the tracks - changed * to li to try and only catch tracks
var alltracklist = document . querySelectorAll ( "div#second > div.details > dl > dd > ol:last-child > li" ) ;
LOGGER . debug ( " *** Dump the tracks nodeList to see what is going on ***" ) ;
LOGGER . debug ( alltracklist ) ;
// Tracks
var tracklistarray = new Array ( ) ; // create the tracklist array to use later
2016-03-14 13:25:05 +00:00
// var releaseartist = alltracklist[0].textContent.trim();
2016-03-14 12:17:50 +00:00
// The format on Takealot changed and Artist is not the first element in li anymore but last
// remember this is a nodeList and not an array
var releaseartist = alltracklist [ alltracklist . length - 1 ] . textContent . trim ( ) ;
LOGGER . debug ( 'The album artist:' + releaseartist ) ;
2016-03-15 13:21:43 +00:00
// Last track to find last disc number
var lasttrack = alltracklist [ alltracklist . length - 2 ] . textContent . trim ( ) ;
LOGGER . debug ( 'The last track:' + lasttrack ) ;
lastdiscnumberregex = /\[ Disc (.*) Track./ ; // regex to match disc number from last track
var lastdiscnumbermatch = lasttrack . match ( lastdiscnumberregex ) ;
var lastdiscnumber = parseInt ( lastdiscnumbermatch [ 1 ] ) ;
LOGGER . debug ( "Last Disc Number: " , lastdiscnumber ) ;
// Discs
var disclistarray = new Array ( ) ; // create the tracklist array to use later
for ( var k = 1 ; k < lastdiscnumber + 1 ; k ++ ) { // start at 1 to keep array in sync with disc numbers
2016-03-15 16:59:40 +00:00
LOGGER . debug ( "Disc iterate: " , k ) ;
2016-03-15 13:21:43 +00:00
// Tracks
var tracklistarray = new Array ( ) ; // create the track list array
for ( var j = 0 ; j < alltracklist . length - 1 ; j ++ ) { // changed j to 0 and length-1 as Artist is at end
2016-03-15 16:59:40 +00:00
// do regex here and if current disc listed in track = k then push the track into the array for that disc
2016-03-15 13:21:43 +00:00
var trackdetails = alltracklist [ j ] . textContent . trim ( ) ;
disctracktitleregex = /\[ Disc (\d{2}) Track.(\b\d{2}) \] (.*)/ ;
var disctracktitle = trackdetails . match ( disctracktitleregex ) ;
var currentdiscnumber = parseInt ( disctracktitle [ 1 ] ) ;
if ( currentdiscnumber == k ) {
var track = new Object ( ) ;
track . number = parseInt ( disctracktitle [ 2 ] ) ;
track . title = disctracktitle [ 3 ] ;
LOGGER . debug ( "The track object: " , currentdiscnumber + ' - ' + track . number + " - " + track . title ) ;
tracklistarray . push ( track ) ;
}
}
disclistarray . push ( tracklistarray ) ;
2016-03-14 12:17:50 +00:00
}
2016-03-15 13:21:43 +00:00
LOGGER . debug ( "** Disclist Array *** " , disclistarray ) ;
2016-03-14 12:17:50 +00:00
break ;
}
}
2016-03-14 13:25:05 +00:00
}
2016-03-15 13:21:43 +00:00
// Logic added to derive the release title from the heading if missing from product info
2016-03-14 13:25:05 +00:00
if ( releasetitle == "" ) {
var MediaHeading = document . querySelectorAll ( "h1.fn" ) ;
var TitleStr = MediaHeading [ 0 ] . innerText ;
var TitleRegex = /(.*)-(.*)+\s\(([^)]+)\)/ ;
var HeadArray = TitleStr . match ( TitleRegex ) ;
if ( HeadArray [ 1 ] . trim ( ) == releaseartist ) {
2016-03-15 16:59:40 +00:00
LOGGER . debug ( 'matched title equal the releaseartist therefore swapped' ) ;
2016-03-14 13:25:05 +00:00
releasetitle = HeadArray [ 2 ] . trim ( ) ;
} else {
2016-03-15 16:59:40 +00:00
LOGGER . debug ( 'matched title equal the title therefore not swapped' ) ;
2016-03-14 13:25:05 +00:00
releasetitle = HeadArray [ 1 ] . trim ( ) ;
}
2016-03-15 16:59:40 +00:00
LOGGER . debug ( "Release Title from heading:" , releasetitle ) ;
2016-03-24 10:57:54 +00:00
}
var thediscnumber = 0 ;
var descriptionarray = [ ] ;
if ( lastdiscnumber > 0 ) {
LOGGER . debug ( "** Tracklist present in Product Info tab **" ) ;
} else {
LOGGER . debug ( " ** No tracks in Product Info tab let's have a look in description tab" ) ;
// Select all data in the "Description" div id = prod-desc
var allprodinfo = document . querySelectorAll ( "div#prod-desc > br" ) ;
for ( var k = 0 ; k < allprodinfo . length - 1 ; k ++ ) {
descriptionrow = allprodinfo [ k ] . nextSibling . textContent . trim ( ) ;
// LOGGER.debug("PROD-INFO > BR > ",descriptionrow);
// regex to find Disc 1 and add 1 to a group ^Disc+(.\d)
descriptionrowregex = /^Disc+(.\d)/ ;
var founddisc = descriptionrow . match ( descriptionrowregex ) ;
// LOGGER.debug(" **** DISC FOUND ****", founddisc);
if ( founddisc != null ) {
var thediscnumber = parseInt ( founddisc [ 1 ] ) ;
// LOGGER.debug(" **** DISC FOUND NUMBER ****", thediscnumber);
}
// LOGGER.debug("PROD-INFO > BR > ",thediscnumber + '-' + descriptionrow);
// regex to split the description row into track, title and artist (^\d).(.*)-(.*)
var descriptionrowregex = /(^\d+).(.*)-(.*)/ ;
var descriptionrow _tracktitleartist = descriptionrow . match ( descriptionrowregex ) ;
// do the same as in tracklist and push the disc numbers into an array
descriptiontrack = new Object ( ) ;
if ( descriptionrow _tracktitleartist != null ) {
descriptiontrack . disc = thediscnumber ;
descriptiontrack . track = descriptionrow _tracktitleartist [ 1 ] ;
descriptiontrack . title = descriptionrow _tracktitleartist [ 2 ] ;
descriptiontrack . artist = descriptionrow _tracktitleartist [ 3 ] ;
//to get the last disc number via iterate
var description _lastdisc = parseInt ( thediscnumber ) ;
descriptionarray . push ( descriptiontrack ) ;
}
}
2016-03-15 16:59:40 +00:00
2016-03-24 10:57:54 +00:00
// Discs
var disclistarray = new Array ( ) ; // create the tracklist array to use later
for ( var desc _discs = 0 ; desc _discs < description _lastdisc ; desc _discs ++ ) {
var tracklistarray = new Array ( ) ;
for ( var desc _ _track = 0 ; desc _ _track < descriptionarray . length ; desc _ _track ++ ) {
var desc _currentdiscnumber = descriptionarray [ desc _ _track ] . disc ;
if ( desc _currentdiscnumber == desc _discs + 1 ) {
var track = new Object ( ) ;
var track _artist _credit = new Array ( ) ;
track . number = descriptionarray [ desc _ _track ] . track ;
track . title = descriptionarray [ desc _ _track ] . title ;
var track _artist _credit _object = new Object ( ) ;
track _artist _credit _object . artist _name = descriptionarray [ desc _ _track ] . artist ;
track _artist _credit . push ( track _artist _credit _object ) ;
//track_artist_credit.artist_name = descriptionarray[desc__track].artist;
track . artist _credit = track _artist _credit ;
tracklistarray . push ( track ) ;
}
}
disclistarray . push ( tracklistarray ) ;
}
lastdiscnumber = description _lastdisc ;
2016-03-14 07:52:18 +00:00
}
2016-04-11 10:42:07 +00:00
// do final checks to determine if it may be buggy information
if ( releaseartist == null ) {
release _maybe _buggy = true ;
}
2016-03-24 10:57:54 +00:00
2016-03-14 07:52:18 +00:00
release = new Object ( ) ;
2016-03-14 12:17:50 +00:00
2016-04-11 10:42:07 +00:00
// Release buggy
release . maybe _buggy = release _maybe _buggy ;
2016-03-14 12:17:50 +00:00
// Release artist credit
release . artist _credit = new Array ( ) ;
var artist _name = releaseartist ;
release . artist _credit . push ( {
'artist_name' : artist _name
} ) ;
// Release title
release . title = releasetitle ;
2016-03-14 07:52:18 +00:00
// Release Barcode
2016-03-14 12:17:50 +00:00
release . barcode = releasebarcode ;
// Default status is official
release . status = 'official' ;
// Other hard-coded info
release . script = 'Latn' ;
release . country = Countries [ releasecountry ] ;
release . language = Languages [ releaselanguage ] ;
2016-03-15 13:21:43 +00:00
release . discs = new Array ( ) ;
for ( var l = 0 ; l < lastdiscnumber ; l ++ ) {
2016-03-24 10:57:54 +00:00
// LOGGER.debug("Disc position:", l + 1);
// LOGGER.debug("Tracklist for the selected disc: ", disclistarray[l]);
2016-03-15 13:21:43 +00:00
var disc = {
'position' : l + 1 ,
'tracks' : disclistarray [ l ]
} ;
release . discs . push ( disc ) ;
}
2016-03-14 12:17:50 +00:00
release . labels = [ ] ;
// Release URL
release . urls = new Array ( ) ;
release . urls . push ( {
'url' : window . location . href ,
2016-03-24 10:57:54 +00:00
'link_type' : MBImport . URL _TYPES . purchase _for _mail _order
2016-03-14 12:17:50 +00:00
} ) ; //type 74 is purchase for download
2016-03-24 10:57:54 +00:00
// TODO check if CD then add purchase medium
2016-03-14 12:17:50 +00:00
// Release date
var releasedate = releasedaterel ;
if ( typeof releasedate != "undefined" && releasedate != "" ) {
var tmp = releasedate . split ( '-' ) ;
if ( tmp [ 0 ] != "undefined" && tmp [ 0 ] != "" ) {
release . year = parseInt ( tmp [ 0 ] , 10 ) ;
if ( tmp [ 1 ] != "undefined" && tmp [ 1 ] != "" ) {
release . month = parseInt ( tmp [ 1 ] , 10 ) ;
if ( tmp [ 2 ] != "undefined" && tmp [ 2 ] != "" ) {
release . day = parseInt ( tmp [ 2 ] , 10 ) ;
}
}
}
}
LOGGER . info ( "Release:" , release ) ;
2016-03-14 07:52:18 +00:00
2016-03-14 12:17:50 +00:00
return release ;
}
2016-03-14 07:52:18 +00:00
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Takealot -> MusicBrainz mapping //
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
var Languages = new Array ( ) ;
Languages [ "Afrikaans" ] = "afr" ;
var Countries = new Array ( ) ;
Countries [ "Afghanistan" ] = "AF" ;
Countries [ "Albania" ] = "AL" ;
Countries [ "Algeria" ] = "DZ" ;
Countries [ "American Samoa" ] = "AS" ;
Countries [ "Andorra" ] = "AD" ;
Countries [ "Angola" ] = "AO" ;
Countries [ "Anguilla" ] = "AI" ;
Countries [ "Antarctica" ] = "AQ" ;
Countries [ "Antigua and Barbuda" ] = "AG" ;
Countries [ "Argentina" ] = "AR" ;
Countries [ "Armenia" ] = "AM" ;
Countries [ "Aruba" ] = "AW" ;
Countries [ "Australia" ] = "AU" ;
Countries [ "Austria" ] = "AT" ;
Countries [ "Azerbaijan" ] = "AZ" ;
Countries [ "Bahamas" ] = "BS" ;
Countries [ "Bahrain" ] = "BH" ;
Countries [ "Bangladesh" ] = "BD" ;
Countries [ "Barbados" ] = "BB" ;
Countries [ "Belarus" ] = "BY" ;
Countries [ "Belgium" ] = "BE" ;
Countries [ "Belize" ] = "BZ" ;
Countries [ "Benin" ] = "BJ" ;
Countries [ "Bermuda" ] = "BM" ;
Countries [ "Bhutan" ] = "BT" ;
Countries [ "Bolivia" ] = "BO" ;
Countries [ "Croatia" ] = "HR" ;
Countries [ "Botswana" ] = "BW" ;
Countries [ "Bouvet Island" ] = "BV" ;
Countries [ "Brazil" ] = "BR" ;
Countries [ "British Indian Ocean Territory" ] = "IO" ;
Countries [ "Brunei Darussalam" ] = "BN" ;
Countries [ "Bulgaria" ] = "BG" ;
Countries [ "Burkina Faso" ] = "BF" ;
Countries [ "Burundi" ] = "BI" ;
Countries [ "Cambodia" ] = "KH" ;
Countries [ "Cameroon" ] = "CM" ;
Countries [ "Canada" ] = "CA" ;
Countries [ "Cape Verde" ] = "CV" ;
Countries [ "Cayman Islands" ] = "KY" ;
Countries [ "Central African Republic" ] = "CF" ;
Countries [ "Chad" ] = "TD" ;
Countries [ "Chile" ] = "CL" ;
Countries [ "China" ] = "CN" ;
Countries [ "Christmas Island" ] = "CX" ;
Countries [ "Cocos (Keeling) Islands" ] = "CC" ;
Countries [ "Colombia" ] = "CO" ;
Countries [ "Comoros" ] = "KM" ;
Countries [ "Congo" ] = "CG" ;
Countries [ "Cook Islands" ] = "CK" ;
Countries [ "Costa Rica" ] = "CR" ;
Countries [ "Virgin Islands, British" ] = "VG" ;
Countries [ "Cuba" ] = "CU" ;
Countries [ "Cyprus" ] = "CY" ;
Countries [ "Czech Republic" ] = "CZ" ;
Countries [ "Denmark" ] = "DK" ;
Countries [ "Djibouti" ] = "DJ" ;
Countries [ "Dominica" ] = "DM" ;
Countries [ "Dominican Republic" ] = "DO" ;
Countries [ "Ecuador" ] = "EC" ;
Countries [ "Egypt" ] = "EG" ;
Countries [ "El Salvador" ] = "SV" ;
Countries [ "Equatorial Guinea" ] = "GQ" ;
Countries [ "Eritrea" ] = "ER" ;
Countries [ "Estonia" ] = "EE" ;
Countries [ "Ethiopia" ] = "ET" ;
Countries [ "Falkland Islands (Malvinas)" ] = "FK" ;
Countries [ "Faroe Islands" ] = "FO" ;
Countries [ "Fiji" ] = "FJ" ;
Countries [ "Finland" ] = "FI" ;
Countries [ "France" ] = "FR" ;
Countries [ "French Guiana" ] = "GF" ;
Countries [ "French Polynesia" ] = "PF" ;
Countries [ "French Southern Territories" ] = "TF" ;
Countries [ "Gabon" ] = "GA" ;
Countries [ "Gambia" ] = "GM" ;
Countries [ "Georgia" ] = "GE" ;
Countries [ "Germany" ] = "DE" ;
Countries [ "Ghana" ] = "GH" ;
Countries [ "Gibraltar" ] = "GI" ;
Countries [ "Greece" ] = "GR" ;
Countries [ "Greenland" ] = "GL" ;
Countries [ "Grenada" ] = "GD" ;
Countries [ "Guadeloupe" ] = "GP" ;
Countries [ "Guam" ] = "GU" ;
Countries [ "Guatemala" ] = "GT" ;
Countries [ "Guinea" ] = "GN" ;
Countries [ "Guinea-Bissau" ] = "GW" ;
Countries [ "Guyana" ] = "GY" ;
Countries [ "Haiti" ] = "HT" ;
Countries [ "Virgin Islands, U.S." ] = "VI" ;
Countries [ "Honduras" ] = "HN" ;
Countries [ "Hong Kong" ] = "HK" ;
Countries [ "Hungary" ] = "HU" ;
Countries [ "Iceland" ] = "IS" ;
Countries [ "India" ] = "IN" ;
Countries [ "Indonesia" ] = "ID" ;
Countries [ "Wallis and Futuna" ] = "WF" ;
Countries [ "Iraq" ] = "IQ" ;
Countries [ "Ireland" ] = "IE" ;
Countries [ "Israel" ] = "IL" ;
Countries [ "Italy" ] = "IT" ;
Countries [ "Jamaica" ] = "JM" ;
Countries [ "Japan" ] = "JP" ;
Countries [ "Jordan" ] = "JO" ;
Countries [ "Kazakhstan" ] = "KZ" ;
Countries [ "Kenya" ] = "KE" ;
Countries [ "Kiribati" ] = "KI" ;
Countries [ "Kuwait" ] = "KW" ;
Countries [ "Kyrgyzstan" ] = "KG" ;
Countries [ "Lao People's Democratic Republic" ] = "LA" ;
Countries [ "Latvia" ] = "LV" ;
Countries [ "Lebanon" ] = "LB" ;
Countries [ "Lesotho" ] = "LS" ;
Countries [ "Liberia" ] = "LR" ;
Countries [ "Libyan Arab Jamahiriya" ] = "LY" ;
Countries [ "Liechtenstein" ] = "LI" ;
Countries [ "Lithuania" ] = "LT" ;
Countries [ "Luxembourg" ] = "LU" ;
Countries [ "Montserrat" ] = "MS" ;
Countries [ "Macedonia, The Former Yugoslav Republic of" ] = "MK" ;
Countries [ "Madagascar" ] = "MG" ;
Countries [ "Malawi" ] = "MW" ;
Countries [ "Malaysia" ] = "MY" ;
Countries [ "Maldives" ] = "MV" ;
Countries [ "Mali" ] = "ML" ;
Countries [ "Malta" ] = "MT" ;
Countries [ "Marshall Islands" ] = "MH" ;
Countries [ "Martinique" ] = "MQ" ;
Countries [ "Mauritania" ] = "MR" ;
Countries [ "Mauritius" ] = "MU" ;
Countries [ "Mayotte" ] = "YT" ;
Countries [ "Mexico" ] = "MX" ;
Countries [ "Micronesia, Federated States of" ] = "FM" ;
Countries [ "Morocco" ] = "MA" ;
Countries [ "Monaco" ] = "MC" ;
Countries [ "Mongolia" ] = "MN" ;
Countries [ "Mozambique" ] = "MZ" ;
Countries [ "Myanmar" ] = "MM" ;
Countries [ "Namibia" ] = "NA" ;
Countries [ "Nauru" ] = "NR" ;
Countries [ "Nepal" ] = "NP" ;
Countries [ "Netherlands" ] = "NL" ;
Countries [ "Netherlands Antilles" ] = "AN" ;
Countries [ "New Caledonia" ] = "NC" ;
Countries [ "New Zealand" ] = "NZ" ;
Countries [ "Nicaragua" ] = "NI" ;
Countries [ "Niger" ] = "NE" ;
Countries [ "Nigeria" ] = "NG" ;
Countries [ "Niue" ] = "NU" ;
Countries [ "Norfolk Island" ] = "NF" ;
Countries [ "Northern Mariana Islands" ] = "MP" ;
Countries [ "Norway" ] = "NO" ;
Countries [ "Oman" ] = "OM" ;
Countries [ "Pakistan" ] = "PK" ;
Countries [ "Palau" ] = "PW" ;
Countries [ "Panama" ] = "PA" ;
Countries [ "Papua New Guinea" ] = "PG" ;
Countries [ "Paraguay" ] = "PY" ;
Countries [ "Peru" ] = "PE" ;
Countries [ "Philippines" ] = "PH" ;
Countries [ "Pitcairn" ] = "PN" ;
Countries [ "Poland" ] = "PL" ;
Countries [ "Portugal" ] = "PT" ;
Countries [ "Puerto Rico" ] = "PR" ;
Countries [ "Qatar" ] = "QA" ;
Countries [ "Reunion" ] = "RE" ;
Countries [ "Romania" ] = "RO" ;
Countries [ "Russian Federation" ] = "RU" ;
Countries [ "Russia" ] = "RU" ;
Countries [ "Rwanda" ] = "RW" ;
Countries [ "Saint Kitts and Nevis" ] = "KN" ;
Countries [ "Saint Lucia" ] = "LC" ;
Countries [ "Saint Vincent and The Grenadines" ] = "VC" ;
Countries [ "Samoa" ] = "WS" ;
Countries [ "San Marino" ] = "SM" ;
Countries [ "Sao Tome and Principe" ] = "ST" ;
Countries [ "Saudi Arabia" ] = "SA" ;
Countries [ "Senegal" ] = "SN" ;
Countries [ "Seychelles" ] = "SC" ;
Countries [ "Sierra Leone" ] = "SL" ;
Countries [ "Singapore" ] = "SG" ;
Countries [ "Slovenia" ] = "SI" ;
Countries [ "Solomon Islands" ] = "SB" ;
Countries [ "Somalia" ] = "SO" ;
Countries [ "South Africa" ] = "ZA" ;
Countries [ "Spain" ] = "ES" ;
Countries [ "Sri Lanka" ] = "LK" ;
Countries [ "Sudan" ] = "SD" ;
Countries [ "Suriname" ] = "SR" ;
Countries [ "Swaziland" ] = "SZ" ;
Countries [ "Sweden" ] = "SE" ;
Countries [ "Switzerland" ] = "CH" ;
Countries [ "Syrian Arab Republic" ] = "SY" ;
Countries [ "Tajikistan" ] = "TJ" ;
Countries [ "Tanzania, United Republic of" ] = "TZ" ;
Countries [ "Thailand" ] = "TH" ;
Countries [ "Togo" ] = "TG" ;
Countries [ "Tokelau" ] = "TK" ;
Countries [ "Tonga" ] = "TO" ;
Countries [ "Trinidad and Tobago" ] = "TT" ;
Countries [ "Tunisia" ] = "TN" ;
Countries [ "Turkey" ] = "TR" ;
Countries [ "Turkmenistan" ] = "TM" ;
Countries [ "Turks and Caicos Islands" ] = "TC" ;
Countries [ "Tuvalu" ] = "TV" ;
Countries [ "Uganda" ] = "UG" ;
Countries [ "Ukraine" ] = "UA" ;
Countries [ "United Arab Emirates" ] = "AE" ;
Countries [ "UK" ] = "GB" ;
Countries [ "US" ] = "US" ;
Countries [ "United States Minor Outlying Islands" ] = "UM" ;
Countries [ "Uruguay" ] = "UY" ;
Countries [ "Uzbekistan" ] = "UZ" ;
Countries [ "Vanuatu" ] = "VU" ;
Countries [ "Vatican City State (Holy See)" ] = "VA" ;
Countries [ "Venezuela" ] = "VE" ;
Countries [ "Viet Nam" ] = "VN" ;
Countries [ "Western Sahara" ] = "EH" ;
Countries [ "Yemen" ] = "YE" ;
Countries [ "Zambia" ] = "ZM" ;
Countries [ "Zimbabwe" ] = "ZW" ;
Countries [ "Taiwan" ] = "TW" ;
Countries [ "[Worldwide]" ] = "XW" ;
Countries [ "Europe" ] = "XE" ;
Countries [ "Soviet Union (historical, 1922-1991)" ] = "SU" ;
Countries [ "East Germany (historical, 1949-1990)" ] = "XG" ;
Countries [ "Czechoslovakia (historical, 1918-1992)" ] = "XC" ;
Countries [ "Congo, The Democratic Republic of the" ] = "CD" ;
Countries [ "Slovakia" ] = "SK" ;
Countries [ "Bosnia and Herzegovina" ] = "BA" ;
Countries [ "Korea (North), Democratic People's Republic of" ] = "KP" ;
Countries [ "North Korea" ] = "KP" ;
Countries [ "Korea (South), Republic of" ] = "KR" ;
Countries [ "South Korea" ] = "KR" ;
Countries [ "Montenegro" ] = "ME" ;
Countries [ "South Georgia and the South Sandwich Islands" ] = "GS" ;
Countries [ "Palestinian Territory" ] = "PS" ;
Countries [ "Macao" ] = "MO" ;
Countries [ "Timor-Leste" ] = "TL" ;
Countries [ "<85>land Islands" ] = "AX" ;
Countries [ "Guernsey" ] = "GG" ;
Countries [ "Isle of Man" ] = "IM" ;
Countries [ "Jersey" ] = "JE" ;
Countries [ "Serbia" ] = "RS" ;
Countries [ "Saint Barthélemy" ] = "BL" ;
Countries [ "Saint Martin" ] = "MF" ;
Countries [ "Moldova" ] = "MD" ;
Countries [ "Yugoslavia (historical, 1918-2003)" ] = "YU" ;
Countries [ "Serbia and Montenegro (historical, 2003-2006)" ] = "CS" ;
Countries [ "Côte d'Ivoire" ] = "CI" ;
Countries [ "Heard Island and McDonald Islands" ] = "HM" ;
Countries [ "Iran, Islamic Republic of" ] = "IR" ;
Countries [ "Saint Pierre and Miquelon" ] = "PM" ;
Countries [ "Saint Helena" ] = "SH" ;
2016-04-11 10:33:37 +00:00
Countries [ "Svalbard and Jan Mayen" ] = "SJ" ;