Introducing Google Command line Tool
google-opensource.blogspot.com
google-opensource.blogspot.com
alias gm1='curl -u USERNAME:PASSWORD --silent "https://mail.google.com/mail/feed/atom" |
tr -d '\''\n'\'' |
awk -F '\''<entry>'\'' '\''{for (i=2; i<=NF; i++) {print $i}}'\'' |
sed -n "s/<title>\(.*\)<\/title.*name>\(.*\)<\/name>.*/\2 - \1/p" |
sed '\''s/</>/g'\'' '
EDIT and send mail by setting the headers (including MAIL FROM:<USERNAME@gmail.com>) and body (using uuencode for attachments) in email, and then: echo "$email" | netcat ISPs_MAILSERVER 25I'll poke into it when I get more time. I quite like the idea :)
unread="$(wget --secure-protocol=TLSv1 --timeout=3 -t 1 -q -O - \
https://${gmail_login}:${gmail_password}@mail.google.com/mail/feed/atom |
sed -n "s/<fullcount>\(.*\)<\/fullcount>/\1/p")"
unread=${unread:-0}
echo $unread
And also worth checking out
http://groups.google.com/group/emacs-g-client?pli=1 if you are into emacs side of the things. $ cat - > newblogpost.txt
type in what you have to say
^D
Use pandoc to convert the text bits to html bits $ pandoc newblogpost.txt -f markdown -t html -o newblogpost.html --no-wrap
Upload the transformed bits to blogger using the Google Command Line tool. $ google blogger post --title "Hello, world!" newblogpost.html
And you are done!You can see the result here: http://btbytes.blogspot.com/2010/06/how-to-make-quick-blogpo...
$ cat > newblogpost.txt google find .org -type domain -owner "Gawker Media" -pagerank ">4" > ndenton.orgs.list
Would, for instance, find all .org domains registered by gawker media with a pagerank greater than 4. curl -s "http://ajax.googleapis.com/ajax/services/search/web?v=1.0&start=0&rsz=large&q=foo" | sed -e 's/[{}]/''/g' | awk '{n=split($0,s,","); for (i=1; i<=n; i++) print s[i]}' | grep -E "("url"|"titleNoFormatting")" | sed -e s/\"//g | cut -d: -f2-
My notes about : http://www.foo.be/cgi-bin/wiki.pl/2010-06-19_Searching_Googl...We only need API for import export GTalk History, Buzz and Tasks data.
$ google docs edit --title "Shopping list" --editor vim
You had me at hello. Too pretty.Also, and slightly off-topic: I cannot say how much I love Homebrew + Github. I was halfway into writing a new formula for this, when I decided to check. Sure enough, there's already a formula to install. Actually, I think two people already submitted formulas. In any case, if you use Homebrew, you can install it now.
No modifications to file, not uploading.
Not so happy with gvim. Can't use anything that returns immediately or else the code doesn't see what you're doing.Thanks.
#!/usr/bin/env ruby
`gvim -f "#{ARGV.join( ' ' )}"`
Haven't installed google command line on the mac yet #!/bin/sh
mvim -f -c"au VimLeave * !open -a Terminal" $@
The subcommand makes sure that when MacVim exits, focus returns right to the terminal I was in before MacVim opened.EDIT: The pypi package is "googlecl"
It's based on the gdata-python-client library (http://code.google.com/p/gdata-python-client/) for accessing Google Data APIs, and the complete list of them (http://code.google.com/apis/gdata/docs/directory.html) doesn't include Gmail/reader. It does include a bunch of things that this doesn't support yet though.
There is another Perl library on github that supports pretty much everything Reader does.
The Reader API has unofficially existed for awhile, but they don't seem to mind you using it. They just added OAuth support a few months ago as well.
This has me pretty psyched, honestly. The scripting possibilities are tantalizing.
This will make that a lot, lot easier and more automatic.
If you use Vim, see here for the taskpaper.vim syntax script: http://www.vim.org/scripts/script.php?script_id=2027
EDIT: I realized it is python based. So it will work on any system.
Now I can easily hook up my scanner to my Google Docs
CL is reserved for OpenCL, the Open Computing Language.
And this isn't a CLI, of course. In this case, that would be the shell itself.