256 posts
  • Author had a File in an Envato Bundle
  • Author had a Free File of the Month
  • Belgium
  • Beta Tester
  • Bought between 10 and 49 items
  • Elite Author
  • Exclusive Author
+4 more
Sitebase says

If you are like me and you have your Mac terminal always open than this is a very cool snippet that you can paste in your .bash_profile. Now you can type in envato to get your current Envato balance from within your terminal.

Here you can see a little video of the result: http://www.screenr.com/MuHs

Below is the snippet that you need to past into your .bash_profile file:
envato() {
        username="your_envato_username" 
        apikey="your_envato_apikey" 
        url="http://marketplace.envato.com/api/v2/$username/$apikey/vitals.xml" 

        # Download API result to tmp file
        curl --silent $url > /tmp/envato.xml

        # Get tag value
    echo $ `get_data balance /tmp/envato.xml`

        # Delete temp file
        rm /tmp/envato.xml

}

# Get a specific tag value
get_data () {
    local tag=$1
    local xml=$2
    grep $tag $xml | \
        tr '\011' '\040' | \
        sed -e 's/^[ ]*//' \
            -e 's/^<.*>\([^<].*\)<.*>$/\1/'
}
748 posts
  • Beta Tester
  • Exclusive Author
  • Bought between 10 and 49 items
  • Sold between 1 000 and 5 000 dollars
  • Referred between 50 and 99 users
  • Canada
  • Contributed a Blog Post
  • Grew a moustache for the Envato Movember competition
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
+1 more
myjilson says

Great! Also I just shocked by seeing your balance amount :P

by
by
by
by
by
by