timdoug's tidbits


Quickly and easily sum your Bandcamp purchases

This will give per-currency totals. Tested in Safari, Firefox, and Chrome.

  1. Log in to your Bandcamp account and visit the purchases page, i.e., https://bandcamp.com/[your username]/purchases
  2. Scroll to the bottom and click "view all NNN purchases"
  3. Keep scrolling down until all purchases have loaded
  4. Right-click on the page and select "Inspect" in Firefox/Chrome, or "Inspect Element" in Safari
  5. Click the "Console" tab in the inspector
    • Firefox only: type allow pasting to enable execution of the following snippet
  6. Paste the following into the console and hit return:

    totals = {}; $('div.purchases-item-total').each(function (){ res = $(this).text().match(/(\d+\.\d+) (\w+)/); if (!totals.hasOwnProperty(res[2])) { totals[res[2]] = 0 }; totals[res[2]] += parseFloat(res[1]); }); totals
It should look something like this (floating point math is quirky, elide tiny subcent portions if present):

[/music] permanent link

© 2006-24 timdoug | email: "me" at this domain
So necessary