Skip to content

Instantly share code, notes, and snippets.

@nloko
Last active March 9, 2019 14:51
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save nloko/3001053 to your computer and use it in GitHub Desktop.
Save nloko/3001053 to your computer and use it in GitHub Desktop.
Export Rdio playlist as CSV
javascript:(function() {
var bookmarklet = {
init: function() {
this.parse();
},
parse: function() {
page = "";
/* you must be viewing songs ie. http://www.rdio.com/people/nloko/collection/songs/
when exporting a collection and this will only export the songs loaded in view,
not the entire collection. */
$(".Track:visible")
.children(".info")
.each(function() {
line = [];
function buildLine() {
line.push("\"" + $(this).text() + "\"");
}
$(this).children(".name").children("a").each(buildLine);
$(this).children(".metadata").children("a").each(buildLine);
page += line.join(",") + "\r\n";
});
window.open("data:text/plain;charset=utf-8," + encodeURIComponent(page), "");
}
};
if (!window.jQuery) {
load();
} else {
bookmarklet.init();
}
function load() {
var script = document.createElement("script");
script.src = "http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js";
script.async = true;
script.type = "text/javascript";
script.onload = function() { bookmarklet.init(); };
document.body.appendChild(script);
}
})();
@jamuspsi
Copy link

i can't seem to fork this so I'm pasting what I think is updated source for the latest rdio.

javascript:(function() {
var bookmarklet = {
init: function() {
this.parse();
},
parse: function() {
page = "";
$(".collection_items:visible .scrollable_content")
.children(".Track")
.children(".info")
.each(function() {
line = [];
function buildLine() {
line.push(""" + $(this).text() + """);
}

                $(this).children(".name").children("a").each(buildLine);
                $(this).children(".metadata").children("a").each(buildLine);
                page += line.join(",") + "\r\n";

        });
        window.open("data:text/plain;charset=utf-8," + encodeURIComponent(page), "");
    }
};

if (!window.jQuery) {
    load();
} else {
    bookmarklet.init();
}

function load() {
    var script = document.createElement("script");
    script.src = "http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js";
    script.async = true;
    script.type = "text/javascript";
    script.onload = function() { bookmarklet.init(); };
    document.body.appendChild(script);
}

})();

@tbeseda
Copy link

tbeseda commented Oct 30, 2012

My fork creates a list compatible with Ivy to allow Spotify playlist creation from Rdio lists.

@supermensa
Copy link

There's also a Chrome plugin that adds the 'Export to csv' functionality to the web version of Rdio, this exports the entire playlist. Rdio enhancer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment