Slashdot Mirror


Google Introduces Command-Line Tool For Linux

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."

55 of 210 comments (clear)

  1. sudo by TheKidWho · · Score: 5, Funny

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

    1. Re:sudo by Quarters · · Score: 5, Funny

      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.

    2. Re:sudo by somersault · · Score: 3, Funny

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

      --
      which is totally what she said
    3. Re:sudo by Anonymous+Psychopath · · Score: 2, 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.

      --

      Eagles may soar, but weasels don't get sucked into jet engines.

    4. Re:sudo by ClickOnThis · · Score: 4, Informative

      Atlas? I thought they used a Saturn V that was supposed to be for another Moon mission for it - which made much easier to put it on the Saturn V that put into orbit.

      Actually it was a modified S-IVB stage -- the third stage used in the launches of the Apollo moon missions. On Apollo, the S-IVB was used for the insertion of the command and lunar modules into earth orbit, and for their trans-lunar injection.

      --
      If it weren't for deadlines, nothing would be late.
    5. Re:sudo by catmistake · · Score: 2, Insightful

      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!

    6. Re:sudo by Tumbleweed · · Score: 4, Funny

      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.

    7. Re:sudo by christian.ost · · Score: 2, Funny

      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?

  2. The Lesser Controlled by Rotworm · · Score: 3, Interesting

    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.

    1. Re:The Lesser Controlled by amRadioHed · · Score: 3, Informative

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

      --
      We hope your rules and wisdom choke you / Now we are one in everlasting peace
    2. Re:The Lesser Controlled by smallfries · · Score: 2, Funny

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

      --
      Slashdot: where don knuth is an idiot because he cant grasp the awesome power of php
  3. yes, but... by gandhi_2 · · Score: 2, Insightful

    ...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.

    1. Re:yes, but... by WrongSizeGlass · · Score: 2, Insightful

      ...does it run anything besides linux?

      Is there something people want to run besides Linux?

    2. Re:yes, but... by Anonymous Coward · · Score: 5, Informative
    3. Re:yes, but... by SwedishPenguin · · Score: 4, Insightful

      Well apparently it's just a python script, so it is available for Windows. Though the last time I tried to use python from the CLI (what little there is) in Windows was a really big hassle, and I ended up just going for an unofficial prepackaged installer for that particular application which bundled Cygwin.

    4. Re:yes, but... by wolftone · · Score: 2, Funny

      Emacs?

    5. Re:yes, but... by obarthelemy · · Score: 5, Insightful
      --
      The Cloud - because you don't care if your apps and data are up in the air.
    6. Re:yes, but... by LambdaWolf · · Score: 2, Insightful

      ...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 on your Windows system or whatever, throw Xubuntu 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 want a Linux system in addition to your current setup.

      --
      "This algorithm runs in constant time. Come on, 2,147,483,648 is a constant..."
    7. Re:yes, but... by drinkypoo · · Score: 2, Informative

      install python from http://www.activestate.com/activepython/downloads
      download gdata from http://code.google.com/p/gdata-python-client/downloads/detail?name=gdata-2.0.10.zip&can=2&q=
      download googlecl from http://code.google.com/p/googlecl/downloads/detail?name=googlecl-0.9.5.tar.gz&can=2&q=
      unpack gdata and googlecl into their own dirs (I used 7zip)
      in gdata and then googlecl dirs run python setup.py install
      googlecl will be in c:\python26\scripts
      the rest is left as an exercise to the reader but wrapping it in a cmd script is trivial

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    8. Re:yes, but... by h4rr4r · · Score: 4, Insightful

      You said good. Lack of bash = not good.

    9. Re:yes, but... by iserlohn · · Score: 3, Insightful

      Yeah, but Powershell is to shells like Esperanto is to languages.

    10. Re:yes, but... by mjwx · · Score: 3, Informative

      If you think PS rips off Bash, then you haven't used one or the other. There are a bunch of things I *don't* like about PS (and actually I don't really use it, but I don't do sysadmin stuff either), but the object piping is awesome.

      You've just invalidated your own point. I'm normally a sarcastic bastard when people do this but I've just had breakfast so I'll go easy on you.

      I do use PS and BASH on a daily basis, I am a Linux and Exch 2007 sysadmin so I need to have an understanding of Powershell and BASH (PS is required for Exch 07). PS is trying to be a CLI for a GUI only environment the same as BASH is a CLI for a CLI environment. Both are meant to handle sysamin task and enable scripting. PS is trying to be BASH by centralising all admin and conf tasks, but PS fails because between different programs the syntax and commands are inconsistent and it's overly convoluted. Further more, PS is useless for MS SQL, realistically I only use PS to call SQLCMD.

      Also on Server2008, PS is not installed by default. This is a major screw up if you're really trying to introduce a CLI.

      I'm currently in the Philippines, breakfast here has a high chance of bricking in my digestive system.

      --
      Calling someone a "hater" only means you can not rationally rebut their argument.
    11. Re:yes, but... by nxtw · · Score: 2, Funny

      I don't get it - what is this supposed to mean?

      • Do you think I'm a German? I'm not, although I do have significant German ancestry.
      • Do you think I'm a Serbian? I'm not.
      • Do you think I have some interest in the German national team? I don't.
      • Do you think I have some interest in the Serbian national team? I don't.
      • Do you think I have some interest in the World Cup as a whole? The only match I've watched in full was last Saturday's between ENG and USA; I haven't even turned on a TV to display a GER match in the background.
      • Do you think I understand German? I identified "nicht" and "war" as words in the German language, but I couldn't recall the meaning of the phrase "nicht war". It's not great that I couldn't figure it out without computer translation, but it's ultimately insignificant. To quote the postmodern philosopher Jules Winnfield: "English, motherfucker! Do you speak it?"
    12. Re:yes, but... by fredboboss · · Score: 2, Interesting

      I don't get your point, you should develop a little further.

      The Python installer for windows is rather painless, launch setup.exe and it's done.

      Plus though the cmd.exe console is rather minimalistic a few Python scripts would offer you a minimum of the command line expressiveness.

      At my workplace we are stuck by microsoft lock-in, I bless the possibility I've had to develop a bunch of Python scripts over the years for to ease the burden of having to work in a windows environment.

    13. Re:yes, but... by sandoval88419 · · Score: 2, Insightful

      I don't understand how do you get your mod points for such misleading advertisement. Power shell proves ms is really far from mastering the concepts that make an efficient CLI.

  4. Cool, but... by Anonymous Coward · · Score: 2, Funny

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

    1. Re:Cool, but... by wiredlogic · · Score: 5, Funny

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

      Make it web based at that.

      --
      I am becoming gerund, destroyer of verbs.
  5. Nerd RAGE! by grasshoppa · · Score: 3, Funny

    A single tool to do EVERYTHING?

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

    --
    Mod me down with all of your hatred and your journey towards the dark side will be complete!
  6. Search by MrEricSir · · Score: 2, Interesting

    Too bad it doesn't support Google Search.

    --
    There's no -1 for "I don't get it."
  7. Not just for Linux by sockonafish · · Score: 2, Informative

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

    1. Re:Not just for Linux by Bottles · · Score: 5, Funny

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

    2. Re:Not just for Linux by MrHanky · · Score: 2

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

    3. Re:Not just for Linux by dotgain · · Score: 2, Insightful

      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 and the iPhone

    4. Re:Not just for Linux by defaria · · Score: 2, Insightful

      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 on different OSes or say an ls --auto=color on Solaris). Just because the language exists on an architecture does not mean that you cannot foolishly doing something in that language that is architecturally dependent on a specific architecture, thus rending your script non-portable and non-operational on other architectures.

  8. Re:namespacing by Lord+Bitman · · Score: 5, Insightful

    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.

    --
    -- 'The' Lord and Master Bitman On High, Master Of All
  9. Re:sudo REWIND by interval1066 · · Score: 2, Informative

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

    --
    Python: 'And then suddenly you have a language which says "we're all stuck with whatever the whiniest coder wants".'
  10. Works really well by itamblyn · · Score: 2, Funny

    For anyone that spends a lot of time on the command line, this is pretty huge.

  11. google roullette is now complete by Anonymous Coward · · Score: 4, Interesting

    sudo $(googlecl imfeelinglucky malicious commands)

    1. Re:google roullette is now complete by shiftless · · Score: 2, Funny

      i type this in my console an it formmated my hard drive u dick

  12. Name clash! by martin-boundary · · Score: 2, Interesting

    There's already a "google" command line command bundled with surfraw. 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.

  13. Thank you! by garcia · · Score: 4, Informative

    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--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 :))

    1. Re:Thank you! by garcia · · Score: 2, Insightful

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

  14. Re:namespacing by dotgain · · Score: 2, Informative

    You need to look into bash-completion. Tab-completion works for command line params too. Fairly well, anyway.

  15. Re:namespacing by Hurricane78 · · Score: 2, Informative

    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!

    --
    Any sufficiently advanced intelligence is indistinguishable from stupidity.
  16. I wrote a Google CLI tool once by sootman · · Score: 4, Funny

    (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.

    --
    Dear Slashdot: next time you want to mess with the site, add a rich-text editor for comments.
  17. Re:okay by Joe+Tie. · · Score: 4, Interesting

    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.

    --
    Everything will be taken away from you.
  18. Re:sudo REWIND by Josh04 · · Score: 3, Funny

    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.

  19. Nifty, but... by sootman · · Score: 4, Interesting

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

    --
    Dear Slashdot: next time you want to mess with the site, add a rich-text editor for comments.
  20. Sadly, no Google Voice support, but.. by az1324 · · Score: 2, Interesting

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

  21. Re:can you... by xororand · · Score: 2, Informative

    I'm not sure but there's GMailfs, a FUSE filesystem that uses GMail's IMAP interface.

  22. Re:namespacing by value_added · · Score: 2, Informative

    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 scriptname to foo, bar and baz, and Bob's yer uncle. And if relying on bash, no aliases or functions to clutter up bash's cluttered namespace. Then again, the above is probably similar to what Google's Python script does, so I'm not really sure WTF either of us are talking about. ;-)

    A note to the OP: before commenting on how Real Unixy Tools work, have a look at the manpage for openssl(1).

  23. Awesome tools by kokoko1 · · Score: 2, Informative

    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

    --
    http://askaralikhan.blogspot.com/
  24. Linux isn't UNIX. It's not even an OS. by chaoskitty · · Score: 4, Informative

    "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.

  25. upload to picasa from command line by wanted · · Score: 2, Interesting

    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

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

  26. Re:Works for Android or iPhone? by paulbiz · · Score: 2, Informative

    You are correct, I untarred the source on my Nokia N900, built and installed and it works fine.

    Dunno about the other phones, but if they have a CLI, python interpreter & can use puthon-gdata then you should be good.