256 posts
- Author had a File in an Envato Bundle
- Author had a Free File of the Month
- Author was Featured
- Belgium
- Beta Tester
- Bought between 10 and 49 items
- Exclusive Author
- Has been a member for 3-4 years
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/'
}
669 posts
- Bought between 10 and 49 items
- Contributed a Blog Post
- Exclusive Author
- Grew a moustache for the Envato Movember competition
- Has been a member for 3-4 years
- India
- Referred between 50 and 99 users
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Sold between 1 000 and 5 000 dollars
myjilson
says
Great! Also I just shocked by seeing your balance amount 
