|
Πρόσβαση σε υπηρεσίες της Google με το command tool GoogleCL - Εκτυπώσιμη Μορφή +- WNA (http://www.wna.gr/forum) +-- Forum: Γενικά (http://www.wna.gr/forum/forum-4.html) +--- Forum: Νέα (http://www.wna.gr/forum/forum-42.html) +---- Forum: Ειδήσεις από άλλες ιστοσελίδες (http://www.wna.gr/forum/forum-61.html) +---- Θέμα: Πρόσβαση σε υπηρεσίες της Google με το command tool GoogleCL (/thread-2202.html) |
Πρόσβαση σε υπηρεσίες της Google με το command tool GoogleCL - admin - 20-06-2010 Δεν είναι πολύ πιθανό να είστε ανάμεσα σε αυτούς που θέλησαν κάποτε να ανεβάσουν φωτογραφίες στο Picasa ή να αναζητήσουν ένα βίντεο στο Youtube μέσω γραμμής εντολών (command tool), ωστόσο η Google προνόησε και δημιούργησε ένα τέτοιο εργαλείο. Το GoogleCL είναι ένα εργαλείο το οποίο προσφέρει εντολές για τον έλεγχο του περιεχομένου σε site όπως το YouTube, το Blogger, το Picasa καθώς και τα Google Apps όπως το Docs, το Calendar και το Contacts. Aσφαλώς κάτι τέτοιο δεν είναι για τον καθένα, αφού δεν είναι οτι ευκολότερο να γράφει κανείς google youtube post --category Education --devtags GoogleCL killer_robots.avi για να δει ένα βίντεο στο youtube. Ειδικά όταν μπορεί να το κάνει με πολύ απλές κινήσεις, όπως όλοι οι κανονικοί χρήστες. Το GoogleCL απευθύνεται σε μία ειδική κατηγορία χρηστών που είτε βολεύονται από την χρήση command line είτε θέλουν να ταξιδέψουν πίσω στην δεκαετία του 80. Μερικά παραδείγματα εντολών είναι τα ακόλουθα: Κώδικας: Blogger google blogger post --tags "GoogleCL, awesome" --title "Test Post" "I'm posting from the command line" google blogger post blogpost.txt google blogger list title,url-site # List posts google blogger delete --title "Test Post" google delete --title "Silly post number [0-9]*" # Delete posts matching regex google tag --title "Dev post" --tags "Python, software" # label an existing post Calendar google calendar add "Dinner party with George today at 6pm" # add event to calendar google calendar today # List events for today only. google calendar list --date 2010-06-01,2010-06-30 # List events. google calendar delete --title "Dinner party with George" # Delete an event. Contacts google contacts add "J. Random Hacker, jrandom@example.com" google contacts list name,email --title "J. Random Hacker" google contacts delete --title "J. Random Hacker" Docs google docs delete --title "Evidence" google docs list title,url-direct --delimiter ": " # list docs google docs upload the_bobs.csv ~/work/docs_to_share/* gdata-python-client >= 1.3.0 ONLY google docs edit --title "Shopping list" --editor vim google docs get --title "Homework [0-9]*" Picasa google picasa create --title "Vermont Test" --tags Vermont vermont.jpg google picasa get --title "Vermont Test" /path/to/download/folder google picasa list title,url-direct --query "A tag" google picasa post --title "Vermont Test" ~/old_photos/*.jpg # Add to an album google picasa tag --title "Vermont Test" --tags "places" google picasa delete --title "Vermont Test" # delete entire album Youtube google youtube post --category Education --devtags GoogleCL killer_robots.avi google youtube delete --title "killer_robots.avi" google youtube list # list my videos google youtube tag -n ".*robot.*" --tags robot Το εργαλείο GoogleCL είναι γραμμένο σε Python και ως εκ τούτου χρησιμοποιεί τις Python gdata libraries προκειμένου να λειτουργήσει. Πηγές: Google-Opensource.blogspot.com, Google και Cnet Posted on Sun, 20 Jun 2010 17:55:44 GMT at http://www.adslgr.com/forum/showthread.php?t=401990&goto=newpost |