Using wget to receive an XML atom feed of your Gmail inbox

wget -O - '' --no-check-certificate
I use this command in my Conky script to display the number of messages in my Gmail inbox and to list the from: and subject: fields.
Sample Output
?xml version="1.0" encoding="UTF-8"?>
<feed version="0.3" xmlns="">
<title>Gmail - Inbox for</title>
<tagline>New messages in your Gmail Inbox</tagline>
<link rel="alternate" href="" type="text/html" />
<title>Your Order with</title>
<summary> Logo Thanks for your order, Patrick L Archibald! Want to manage your order online? If ...</summary>
<link rel="alternate" href=";message_id=12b496e5d987360c&amp;view=conv&amp;extsrc=atom" type="text/html" />

2010-09-26 14:47:13

What Others Think

For people using funny caracters in their password (such as @ #?or $ ... ) consider using ASCII HEX equivalent to make this work
snaguber · 619 weeks and 6 days ago
how to extract xml data by just hitting the url eg: this is the url i want to extract the xml data of it.. like PistonHeads (Motoring News) Motoring News Bowler Nemesis Joins Spyker At CPP Plans confired for Nemesis EXR road car to be built in Coventry Monday, 14 March 2011 GMT wat is the command to get the xml output from the url ??
planet100 · 595 weeks and 6 days ago
Saw your question Planet100 try using curl, you might need some sed/awk magic, which I cannot help with, but that is a start at least. With curl and some extra effort you could also make the titles clickable links, I think there are other possibly better ways to do it though.
tomjrace · 577 weeks and 4 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this? is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.


Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: