8 ms·
Introducing Google Command line Tool
- d0m 16y agooutch, I think I'll soon be ready to say bye bye to my own little todo application in command line. However, there are still some details that I will miss by switching to google calendar :(
- cmatthias 16y agoThis is a nice little utility. It'd be good if it supported more google services (reader, gmail?) but hopefully they'll add to it as time goes on.
- samdk 16y agoIt'd be nice, but I wouldn't count on it happening too soon: the necessary APIs don't seem to exist. It's based on the gdata-python-client library (http://code.google.com/p/gdata-python-client/ 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 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.
- briandoll 16y agoYea, I saw that too and thought it was a bit short-sighted to base it on that library. The calendar command is nice if you're integrating with something that doesn't play nicely with .ics, but other than that this is pretty ho-hum at the moment.
- SandB0x 16y agoApologies for a clumsy touch-screen downvote.
- askedrelic 16y agoI've put a bit of work into a python library for Google Reader: http://github.com/askedrelic/libgreader http://github.com/askedrelic/libgreader 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.
- nudded 16y agoI've created a basic ruby version for google reader. http://github.com/nudded/GoogleReaderAPI http://github.com/nudded/GoogleReaderAPI
- Ixiaus 16y agoEmacs org-mode + Google Calendar... Here I come!
- mark_h 16y agoThere's gcal support already in emacspeak (Raman is a google employee): http://emacspeak.googlecode.com/svn/trunk/lisp/g-client/gcal.el http://emacspeak.googlecode.com/svn/trunk/lisp/g-client/gcal... http://bc.tech.coop/blog/070306.html http://bc.tech.coop/blog/070306.html
- lowkey 16y agoThat's cute, but Goosh (www.goosh.org) is better. I'm not affiliated with goosh, just a fan. Check it out!
- travisp 16y agoGoosh is neat, but isn't it actually browser-oriented (i.e. doesn't actually work in your command line)? Also, they cover completely different services (AFAIK). For example, Goosh does search and gmail. GoogleCL does picasa, blogger, post youtube videos, docs, contacts, and calendar.
- 10ren 16y agoI use this to check my gmail from the command line (they don't include gmail in the examples). Ugly but fun: 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 25
- stretchwithme 16y agoNow that is a hacker! excellent.
- Groxx 16y agoInteresting and fun, but it doesn't spit out any info for me, despite the atom having an email appearing in it. I'll poke into it when I get more time. I quite like the idea :)
- surki 16y agoI use wget for the same. I usually call it from gnu screen, to update the status line with the no. of unread mails 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 http://groups.google.com/group/emacs-g-client?pli=1 if you are into emacs side of the things.
- sammyo 16y agoQuite cool but there isn't there just one rather obvious google service that is missing. Nudge nudge, wink wink? Wouldn't it be handy to run an internet wide grep with all the various search arguments and a nice filterable output?
- olefoo 16y agoGoogle Grep would be awesome, but Google Find would be more useful, especially if were augmented with a rich and extensible set of semantic switches. 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.
- Jun8 16y agoNot quite a command line tool but you can try 80legs API (http://80legs.com/ http://80legs.com/) for that sort of thing.
- J_McQuade 16y agoMakes me wonder how many other web services could offer useful amounts of their (usually unintuitive (for non-web programmers)) API's functionality with a simple, unixy, command-line tool. This is going to save fans of scripting languages a whole lot of doc-crawling.
- spicyj 16y agoI have a feeling that normal people don't dream of having "simple" and "unixy" in the same sentence.
- yellowbkpk 16y agoI have a feeling that normal people don't care about a website's API unless they also care (or at least use) command line tools.
- snprbob86 16y agoI really love how the sub-command names work with the script name to mirror the full names of the Google products. Google's "Google Foo" naming scheme was mandated from the top and was a good call for sooo many reasons (legal, marketing, etc.) which now includes "makes for an awesome command line tool".
- moxiemk1 16y agoClean living and good apis in your products makes writing awesome little apps like this not to hard... which makes life good for all of us. This has me pretty psyched, honestly. The scripting possibilities are tantalizing.
- InclinedPlane 16y agoOne big cost of poor architecture and design is that you miss out on a lot of serendipity. When every new use case comes at the cost of a long, hard slog uphill over a mountain of design and implementation defects you choose your destinations carefully, so you miss out on a lot of potential wins (both big and small) just because you don't have the data to justify the changes.
- sublemonic 16y agoLooks like gmail is in the works: http://code.google.com/p/googlecl/issues/detail?id=37#c0 http://code.google.com/p/googlecl/issues/detail?id=37#c0
- yellowbkpk 16y agoThat one's specific to tasks. Here's one for mail itself: http://code.google.com/p/googlecl/issues/detail?id=43 http://code.google.com/p/googlecl/issues/detail?id=43
- est 16y agoI think IMAP, POP3 and SMTP are APIs. We only need API for import export GTalk History, Buzz and Tasks data.
- btbytes 16y agoQuick recipe to make a blog post from the command line. $ 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-blogpost-to-blogger_6658.html http://btbytes.blogspot.com/2010/06/how-to-make-quick-blogpo...
- K3G 16y agoThis is wonderful! At what point will it be ported to OSX?
- johngunderman 16y agoIt will work on any unix compatible system, which basically means Macs and Linux. EDIT: I realized it is python based. So it will work on any system.
- asenchi 16y agoUpdate your homebrew and: 'brew install googlecl'
- dlib 16y agoThanks, it works like a charm Now I can easily hook up my scanner to my Google Docs
- growt 16y agothis was my take on command line google _search_ with perl: http://stefan.grothkopp.com/googlepl-command-line-google-search-in-a-shel http://stefan.grothkopp.com/googlepl-command-line-google-sea...
- deleted 16y ago[deleted]
- telemachos 16y ago$ 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.
- jamesbritt 16y agoNo 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.
- spicyj 16y agoYou should be able to use "gvim -f" as your editor and it won't detach itself from the terminal.
- jamesbritt 16y agoSweet! I had to wrap it in a script to get it to work, but it's rolling now. Thanks.
- telemachos 16y agoCare to share the script? I haven't been able to make it work with mvim yet. Thanks.
- jamesbritt 16y agoThis is on my Ubuntu box #!/usr/bin/env ruby `gvim -f "#{ARGV.join( ' ' )}"` Haven't installed google command line on the mac yet
- telemachos 16y ago
- telemachos 16y agoI just thought of another use for this. I've been using takspaper.vim and git to manage a todo list with TaskPaper-like syntax, but without the overhead of an application devoted just to a todo list. (I feel about programs the way Alton Brown does about cooking tools: use as few unitaskers as possible.) 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 http://www.vim.org/scripts/script.php?script_id=2027
- xenonite 16y agoshould be named GoogleCLI for Google Command Line Interface. CL is reserved for OpenCL, the Open Computing Language.
- muuh-gnu 16y agoIt was kinda used by OpenCL, to actually "reserve" something takes a lot more work. And even then I would suppose that the abbrev CL was reserved by Common Lisp during the last 25 years.
- studer 16y agoTo add to that list: Changelist. Chile TLD. Microsoft's C compiler (which is roughly as old as Common Lisp). IBM's Control Language. And probably a whole bunch of other things. And this isn't a CLI, of course. In this case, that would be the shell itself.
- adulau 16y agoThe Google Command Line Tool is interesting but it's missing the search (is that intentional from Google? I don't know). I made a quick and dirty one liner replace foo by your search query: 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_Google_From_The_Command_Line http://www.foo.be/cgi-bin/wiki.pl/2010-06-19_Searching_Googl...
- morbidkk 16y agohave to figure out using this can one get daily digest of all google services one is using