Forgot your password?
typodupeerror
Google Linux Technology

Google Introduces Command-Line Tool For Linux 210

Posted by timothy
from the google-reaches-the-beginning dept.
Lomegor writes "'Ever wanted to upload a folder full of photos to Picasa from a command prompt?' Google introduced today a new project, Google CL, that lets you do that and much more. It's a new command line tool for Linux that acts as an interface with Google services; you can upload videos to YouTube or maybe post a new blog post in Blogger in just one line."
This discussion has been archived. No new comments can be posted.

Google Introduces Command-Line Tool For Linux

Comments Filter:
  • sudo (Score:5, Funny)

    by TheKidWho (705796) on Friday June 18, 2010 @07:01PM (#32620410)

    sudo google Skylab -activate -w -terminate "Humans"

    • Re:sudo (Score:5, Funny)

      by Quarters (18322) on Friday June 18, 2010 @07:14PM (#32620520)
      I'm unclear as to how a defunct and destroyed cut-rate '70's era NASA space station that was built out of Atlas rocket parts would have either a web server or the ability to annihilate humanity.
      • Re:sudo REWIND (Score:3, Informative)

        by interval1066 (668936)

        sudo google SkyNet -activate -w -terminate -prejudice:extreme "Humans" && sudo google -reboot | grep "reality"

        • Re: (Score:3, Funny)

          by Josh04 (1596071)
          I'm unclear as to how a defunct and destroyed cut-rate '70's era British Armed Forces Comms satellite that never made it out of geostationary orbit would have either a web server or the ability to annihilate humanity.
      • Re:sudo (Score:4, Funny)

        by somersault (912633) on Friday June 18, 2010 @07:24PM (#32620628) Homepage Journal

        Me either, but this thing is burning up my village as we spe

      • Re: (Score:3, Interesting)

        I'm unclear as to how a defunct and destroyed cut-rate '70's era NASA space station that was built out of Atlas rocket parts would have either a web server or the ability to annihilate humanity.

        Well, it did rain debris all over Australia. So it's really just a question of accuracy.

        • Re:sudo (Score:5, Funny)

          by Tumbleweed (3706) * on Saturday June 19, 2010 @01:18AM (#32622656)

          Well, it did rain debris all over Australia. So it's really just a question of accuracy.

          Pfft, Australia. Like that's a REAL place. Everyone knows that was just a made-up place for those Crocodile Dundee movies. And then the Simpsons did a great take on it. It was a great joke back in the day, but you guys need to let it go already.

      • Re: (Score:3, Insightful)

        by catmistake (814204)

        cut-rate '70's era NASA space station

        Make a joke, fine, make a point, even better, but you should be old enough to remember SkyLab kicked ass, you insensitive clod!

      • by Kingrames (858416)
        Dude you obviously are not a programmer.
        Every goddamned program out there is capable of annihilating humanity and no matter who designed it, the error is inevitably going to be blamed on you until you fix it.
        • Re: (Score:2, Funny)

          by christian.ost (864585)

          Every goddamned program out there is capable of annihilating humanity and no matter who designed it, the error is inevitably going to be blamed on you until you fix it.

          by whom?

      • cut-rate '70's era NASA space station that was built out of Atlas rocket part

        Not disagreeing with you but skylab was the best US space station. Look at how long it took to get the ISS working properly. Of course skylab had the advantage of pre-dating the shuttle.

      • by shiftless (410350)

        You dont have to know how a gun works in order to be killed by one.

        And if that isnt yet a quote by some smart person, then I claim it.

    • [sudo] password for TheKidWho:
    • by Anonymous Coward on Friday June 18, 2010 @07:23PM (#32620618)

      sudo $(googlecl imfeelinglucky malicious commands)

    • by Sfing_ter (99478)

      I'm sorry Dave, I can't do that.

  • by Rotworm (649729) * on Friday June 18, 2010 @07:03PM (#32620422) Homepage Journal
    I think this is an interesting juxtaposition. I lessly the fonder of Google services because too often it seems things are centralised with the various Google Services. What I liked about Linux was it's decentralisation, that control was distributed to whomever had the capacity and the will to partake.

    I don't suggest it's worthless that I can give content to Google from the command line, but that it seems to ideologically oppose one of the strengths of Linux. And artistic content is one area that is suffering from centralisation. Artistic content builds upon what came before it (I mention that because we're not all Lessig-educated), and copyright is increasingly centralising content to a small number of firms. Giving your content to Google isn't like giving your content to Disney, but it's submitting it to the control of a lessly interested party.
    • by amRadioHed (463061) on Friday June 18, 2010 @08:06PM (#32621020)

      What loss of control with Google services? If you want to store your stuff somewhere else it's usually fairly easy to do [dataliberation.org].

    • Re: (Score:3, Funny)

      by smallfries (601545)

      Well you already seem to be using Google Translate to put your posts into english.

    • You are making it sound like Linux/UNIX encourages decentralization. Quite the opposite. Even the earliest UNIX OSed has support for NFS and it was in wide use.

      In fact the whole UNIX OS is designed around the idea of having large numbers of people share one centralized environment, via terminal sessions.

      Even XWindows is architected this way, implicit remote support built in.

      Only in the past decade as Linux migrated to be a more single-desktop envinroment a-la windows. This is far from "encouraging" decentra

  • yes, but... (Score:3, Insightful)

    by gandhi_2 (1108023) on Friday June 18, 2010 @07:04PM (#32620432) Homepage

    ...does it run anything besides linux?

    a tool like this would rule for any platform.

    i guess you could just roll your own python script or something.

    • Re: (Score:2, Insightful)

      ...does it run anything besides linux?

      Is there something people want to run besides Linux?

      • I sometimes wish I still had my Atari 600XL. I could use a good game of Star Raiders to unwind once in a while.
      • Re: (Score:2, Funny)

        by wolftone (609476)
        Emacs?
      • by gig (78408)

        > Is there something people want to run besides Linux?

        Yeah, Macs. All Mac applications can run shell scripts, and Python is included with every Mac, so a Photoshop-to-Picassa workflow would be very easy to create using Google CL. Or BBEdit-to-Blogger.

      • Re: (Score:2, Insightful)

        by LambdaWolf (1561517)

        ...does it run anything besides linux?

        Is there something people want to run besides Linux?

        And is anyone unable to run Linux?

        No, seriously. Install VirtualBox [virtualbox.org] on your Windows system or whatever, throw Xubuntu [xubuntu.org] on a virtual machine, do whatever you want. The software doesn't cost a dime, you can do it with the hardware you have, and it's not even that difficult for a person of moderate geekiness. Okay, so it takes a lot of hard drive space, but gone are the days when you need to go drop a few hundred dollars on another computer or futz around with dual-booting and accidentally trash your MBR if you

    • Re:yes, but... (Score:5, Informative)

      by Anonymous Coward on Friday June 18, 2010 @07:17PM (#32620544)
  • by Anonymous Coward

    ....someone ought to write a GUI front end for it.

  • Nerd RAGE! (Score:4, Funny)

    by grasshoppa (657393) <skennedy&tpno-co,org> on Friday June 18, 2010 @07:05PM (#32620440) Homepage

    A single tool to do EVERYTHING?

    It's like they don't even USE linux.

    • Re:namespacing (Score:5, Insightful)

      by Lord Bitman (95493) on Friday June 18, 2010 @07:20PM (#32620574) Homepage

      organized into separate modules, but called as "google subcommand" so that you can still have a command called "picassa" and "blogger" and "search"... sounds good to me.

      "do one thing, do it well" doesn't mean "make a thousand poorly-named tools and clutter /usr/bin"

      "google foo" does one thing, does it well.
      "google bar" does one thing, does it well.
      "google" does one thing, does it well (passes commands to a dispatcher)

      you're basically complaining about seeing a space where you pointlessly want a hyphen.

      • Re: (Score:3, Informative)

        by Hurricane78 (562437)

        Protip:
        for C in $GOOGLE_COMMANDS; do echo "google $C $*" > "/usr/local/bin/google-$C"; chmod +x "/usr/local/bin/google-$C" done
        It’s not an appliance UI, but a real OS. Meant to help you automate things and fit like a glove. Use it!

        • by whoever57 (658626)

          Protip:
          for C in $GOOGLE_COMMANDS; do echo "google $C $*" > "/usr/local/bin/google-$C"; chmod +x "/usr/local/bin/google-$C" done

          How about:
          for C in $GOOGLE_COMMANDS; do alias $C="google $C" ; done
          Put in a script that is executed by all users.

        • Re: (Score:3, Informative)

          by value_added (719364)

          Not sure what problem that's meant to solve, but the more standard (and IMHO, manageable) approach to using a shell script that's called by different names would be to use a construct like the following:

          #!/bin/sh
          #
          # ~/bin/myscript - call a script by multiple names
          #

          scriptname=${0##*/}

          case $scriptname in
          foo) echo "You called $scriptname as foo" ;;
          bar) echo "You called $scriptname as bar" ;;
          baz) echo "You called $scriptname as baz" ;;
          esac

          Link script

      • by RichiH (749257)

        > you're basically complaining about seeing a space where you pointlessly want a hyphen.

        A lesson painfully learned by git.

  • Search (Score:3, Interesting)

    by MrEricSir (398214) on Friday June 18, 2010 @07:06PM (#32620446) Homepage

    Too bad it doesn't support Google Search.

    • Too bad it doesn't support Google Search.

      While a Google-produced tool might do something nice as far as the format of the data, there's already a command line program for Google search called wget.

    • by TheSpoom (715771)

      You'll never see Google support extraction of search data from a non-web interface. The reason is because once you have the data, it's all too easy to strip out the sponsored links that provide Google its revenue.

      A shame, too, because a lot of good uses would come from third parties being able to CRUD Google search results. Of course, underground, everyone and their mother uses regular expressions and HTML parsers to grab Google results anyway, but it'll never be officially supported (and I don't count th

  • Not just for Linux (Score:3, Informative)

    by sockonafish (228678) on Friday June 18, 2010 @07:13PM (#32620512)

    It's written in Python and will run on any platform that Python will run on. That's pretty much every platform.

    • by Bottles (1672000) on Friday June 18, 2010 @07:21PM (#32620582)

      Except for actual, living pythons. To be fair, though, they are less a platform and more a series of tubes.

    • by MrHanky (141717)

      Every platform except the closed ones that don't allow you to run an interpreter, of course.

      • by Shados (741919)

        Its rare that someone will say something that makes Windows fall in the "open" category.

      • Re: (Score:2, Insightful)

        by dotgain (630123)

        Every platform except the closed ones that don't allow you to run an interpreter, of course.

        So, basically it runs on everything except the ZX81 [wikipedia.org] and the iPhone

      • by gig (78408)

        He meant "every [PC] platform", obviously. No, you can't run this on a game console or an iPod or a GPS.

        • by IrquiM (471313)

          you can run it on my game console, my GPS, my DVB-S2 tuner and my phone! I don't have an iPod, but if I wanted one, it would be one that could run it as well....

    • Re: (Score:2, Insightful)

      by defaria (741527)
      Just not so. You can write unportable python just as you can with any language. Step one, code in an assumption that is only present on the current platform, e.g. make a call to execute a command such as, say, diff(1) which exists on Linux but not on Windows. Or use a Windows only style pathname (e.g. C:\Windows\Temp) or even rely on functionality that one very similar architecture has but the other doesn't (e.g. execute an ll command, which only works on HP-UX, or a ps command which has different options o
  • For anyone that spends a lot of time on the command line, this is pretty huge.
  • Name clash! (Score:3, Interesting)

    by martin-boundary (547041) on Friday June 18, 2010 @07:28PM (#32620654)
    There's already a "google" command line command bundled with surfraw [debian.org]. You can type google searchstring and it will launch a browser with the results. I use w3m as the browser, which makes it easy to pipe the results into a script if I need to.
    • by Aladrin (926209)

      So some random person made a command with the name of an extremely famous company and you think it's the company's fault for picking that name for the command?

      • Surfraw has been around for ages, and this isn't a new type of naming problem. When Google chose Chromium for its open source browser, there already existed an open source project called Chromium [reptilelabour.com].

        Forgive me if I expect Google's engineers to do a quick google search before picking a name that's already been taken for a few years.

        • by retchdog (1319261)

          I'd frankly rather that Google® crush the waste of disk space and net traffic that comprise that crappy cutrate shmup.

        • surfraw may have been around for ages but I do believe Google should be entitled to use their own name. That game is technically Chromium B.S.U. Not that it matters since no one has probably heard of it until your post.
    • by RichiH (749257)

      Yah, I used to have an alias which would clash, as well.

      To be fair, they kind of have a claim to the name, though.

      Just alias your google binary to gg. apt-file search tells me it's still free :)

  • by nimbius (983462)

    so i didnt RTFA but i cant help wondering if this headline is just better written as "google writes linux script!"

    generally you see people working in a command line, because they have some insight or minimal inclination to program things
    of this nature. one has to wonder what google has achieved here if the majority of command line users in a few hours or days
    could just as easily have crafted the same thing.

    • Um, they saved a majority of command line users a few days or hours, and the minority that couldn't do this themselves now can. Anything else you're wondering about?

    • Re:okay (Score:5, Interesting)

      by Joe Tie. (567096) on Friday June 18, 2010 @08:11PM (#32621064)
      If you're not familiar with google's api it's a pretty large time investment. Partially because of the size, but also because they're often not the most up to date. A lot of the doc api for example doesn't work with docs created under the system that's been up for a few months now. But that fact isn't listed anywhere in their documentation, or even very easy to find by searching because the error message is so generic and uninformative.
      • by nxtw (866177)

        I've found documentation coming out of Google to be somewhat weak. The docs for GWT, for example, are lacking in some areas - they don't even have complete Javadoc coverage AFAIK.

        And using Google to look for GWT information isn't always useful, as it returns a lot of pages that no longer apply to the latest version of GWT. I also get lots of results for old Java documentation - look up anything in the Java libraries, and the results from Sun will probably be for Java 1.5 or 1.4.2 or even earlier, not Java

        • I've found documentation coming out of Google to be somewhat weak. The docs for GWT, for example, are lacking in some areas - they don't even have complete Javadoc coverage AFAIK.

          And using Google to look for GWT information isn't always useful, as it returns a lot of pages that no longer apply to the latest version of GWT. I also get lots of results for old Java documentation - look up anything in the Java libraries, and the results from Sun will probably be for Java 1.5 or 1.4.2 or even earlier, not Java 1.6.

          That's because the Java 5 and maybe even the Java 1.4.2 docs are referenced more often than the more recent releases. Deployed more often, too, so it often makes sense to refer to the Java 5 docs since that's gonna be the runtime environment, anyway. I rarely get anything older than the J2SE5.0 docs, though -- I used to google for "java 5 keyword" to get the correct docs, but these days they are the default top result. Googling for "java 6 keyword" or java 7 keyword" reliably returns those API docs, so the

  • Thank you! (Score:5, Informative)

    by garcia (6573) on Friday June 18, 2010 @07:36PM (#32620714) Homepage

    Google updated Google Docs recently and I found that the new version didn't support some of the Gadgets that the old version did. I became quite concerned that the old and hackalicious python scripts I was using to upload CSV files that power my website's crime dashboards [lazylightning.org]--something which would suck to have to recode.

    I'm going to have to check this out and see if it works much in the same way like allowing me to just replace a Google Docs spreadsheet that already exists something which I require to keep my old code working.

    Nice to see that they are continuing to make their commandline tools easier to use as I have to admit I was having some problems getting the ones I currently use to work but now that they are I certainly don't want to loose that functionality (I am good at using those scripts, just not coding new ones so any of the troll comments which say I should do it myself are not necessary, thanks :))

    • Re: (Score:2, Insightful)

      by garcia (6573)

      Err I was concerned they wouldn't work when Google switched to the full on new version. I need a beer.

  • by sootman (158191) on Friday June 18, 2010 @07:58PM (#32620936) Homepage Journal

    (Crap, hit 'submit' instead of 'preview')
    I used to be on a list and this one guy would always post the worst questions--the kind of stuff where you could google the subject line of his email and get the answer. So I wrote...
    #!/bin/bash
    lynx -dump google.com/search?q=$1+$2+$3+$4+$5 | mail -s "Automated response" list@example.com

    What I really wanted was for the list admin to put a filter on the server that would automatically take his messages and do that to them. Of course I never actually used it. :-) I eventually just filtered him.

  • Nifty, but... (Score:5, Interesting)

    by sootman (158191) on Friday June 18, 2010 @09:34PM (#32621576) Homepage Journal

    ... it'd be equally cool if they had a really open API and you could just use a script with curl to upload.

  • Don't see anything for Voice in there, but thankfully there's already http://code.google.com/p/pygooglevoice/ [google.com]

  • Awesome tools (Score:2, Informative)

    by kokoko1 (833247)
    Just tried the GoogleCL on my Fedora 12 and it works without any issue, personally (its only me) I like the googlecl. For folks want to try it on there Fedora box here is the link to my blog http://askaralikhan.blogspot.com/2010/06/googlecl.html [blogspot.com]
  • by chaoskitty (11449) <john AT sixgirls DOT org> on Saturday June 19, 2010 @05:47AM (#32623756) Homepage

    "Google Introduces Command-Line Tool For Linux"

    is about as relevant as saying

    "Google Introduces Command-Line Tool For Blue Computers" because blue is your favorite color. Sure, it'll run on blue computers, but it wasn't MADE FOR blue computers. Nor were these tools MADE FOR Linux. They'd have to be written as kernel modules to be made for Linux.

    Anyhow, Linux isn't even an OS - it's a kernel. Just try to run Linux sometime without GNU and let me know how that works out for you.

    Sure, so-called "tech journalists" think that every UNIX thing in the world is really a Linux thing, and sure, no "tech journalist" will ever properly call the OS GNU/Linux, but Slashdot? You people have to be a better example for everyone else.

  • Such tools existed for years, thanks to Google's open API. I wrote one of the first example scripts and the idea was then used in many other tools:
    http://wanted.eu.org/en/computers/linux/uploading_photos_to_picasaweb [eu.org]

    I personally like this one best:
    http://code.google.com/p/upload2picasa/ [google.com]

All the evidence concerning the universe has not yet been collected, so there's still hope.

Working...