256 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 100+ members
  • Has sold $125,000+ on Envato Market
  • Located in Belgium
+9 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/'
}
749 posts
  • Has referred 50+ members
  • Has sold $1,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 10+ items on Envato Market
+6 more
myjilson says

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

by
by
by
by
by
by