google(1) - Linux man page
Name
google - command-line access to (some) Google services
Synopsis
google [picasa|blogger|youtube|docs|contacts|calendar] TASK [options]
Description
This program provides command-line access to (some) google services via their gdata APIs. Called without a service name, it starts an interactive session.
Available tasks for service picasa: 'get', 'create', 'list', 'list-albums', 'tag', 'post', 'delete'
- get: Download albums
Requires: none Optional: title, owner, format Arguments: LOCATION
create: Create an album
Requires: title Optional: date, summary, tags Arguments: PATH_TO_PHOTOS
list: List photos
Requires: delimiter Optional: title, query, owner
list-albums: List albums
Requires: delimiter Optional: title, owner
tag: Tag photos
Requires: tags AND (title OR query) Optional: owner
post: Post photos to an album
Requires: title Optional: tags, owner Arguments: PATH_TO_PHOTOS
delete: Delete photos or albums
Requires: (title OR query)
- Available tasks for service blogger: 'post', 'tag', 'list', 'delete'
- post: Post content.
Requires: none Optional: blog, title, tags Arguments: PATH_TO_CONTENT or CONTENT
tag: Label posts
Requires: tags AND title Optional: blog
list: List posts in a blog
Requires: delimiter Optional: blog, title, owner
delete: Delete a post.
Requires: title Optional: blog
- Available tasks for service youtube: 'post', 'tag', 'list', 'delete'
- post: Post a video.
Requires: category AND devkey Optional: title, summary, tags Arguments: PATH_TO_VIDEO
tag: Add tags to a video and/or change its category.
Requires: devkey AND title AND (category OR tags)
list: List videos by user.
Requires: delimiter Optional: title, owner
delete: Delete videos.
Requires: devkey Optional: title
- Available tasks for service docs: 'edit', 'delete', 'list', 'upload', 'get'
- edit: Edit a document
Requires: title Optional: format, editor, folder
delete: Delete documents
Requires: none Optional: title
list: List documents
Requires: delimiter Optional: title, folder
upload: Upload a document
Requires: none Optional: title, folder, format Arguments: PATH_TO_FILE
get: Download a document
Requires: (title OR folder) Optional: format Arguments: LOCATION
- Available tasks for service contacts: 'list', 'list-groups', 'add', 'add-groups', 'delete-groups', 'delete'
- list: List contacts
Requires: none Arguments: Fields to show (example: name,email)
list-groups: List contact groups
Requires: none Arguments: Specific groups to list (if any)
add: Add contacts
Requires: none Arguments: "name,email" pair or CSV filename
add-groups: Add contact group(s)
Requires: none Arguments: Group name(s)
delete-groups: Delete contact group(s)
Requires: none Arguments: Group name(s)
delete: Delete contacts
Requires: none Arguments: names of contact(s) to delete (e.g. "John Doe" "Jane Doe")
- Available tasks for service calendar: 'add', 'list', 'today', 'delete'
- add: Add event to a calendar
Requires: none Optional: cal Arguments: QUICK_ADD_TEXT
list: List events on a calendar
Requires: delimiter Optional: title, query, date, cal
today: List events for the next 24 hours
Requires: delimiter Optional: title, query, cal
delete: Delete event from a calendar
Requires: (title OR query) Optional: date, cal
Options
--version
- show program's version number and exit
- -h, --help
- show this help message and exit
- --blog=BLOG
- Blogger only - specify a blog other than your primary.
- --cal=CAL
- Calendar only - specify a calendar other than your primary.
- -c CATEGORY, --category=CATEGORY
- YouTube only - specify video categories as a commaseparated list, e.g. "Film, Travel"
- --config=CONFIG
- Specify location of config file.
- --devtags=DEVTAGS
- YouTube only - specify developer tags as a commaseparated list.
- --devkey=DEVKEY
- YouTube only - specify a developer key
- -d DATE, --date=DATE
- Date in YYYY-MM-DD format. Picasa only - sets the date of the album Calendar only - date of the event to add / look for. Can also specify a range with a comma: "YYYY-MM-DD", events between date and future. "YYYYMM-DD,YYYY-MM-DD" events between two dates.
- --debug
- Enable all debugging output, including HTTP data
- --delimiter=DELIMITER
- Specify a delimiter for the output of the list task.
- --draft
- Blogger only - post as a draft
- --editor=EDITOR
- Docs only - editor to use on a file.
- -f FOLDER, --folder=FOLDER
- Docs only - specify folder(s) to upload to / search in.
- --format=FORMAT
- Docs only - format to download documents as.
- --hostid=HOSTID
- Label the machine being used.
- -n TITLE, --title=TITLE
- Title of the item
- --no-convert
- Google Apps Premier only - do not convert the file on upload. (Else converts to native Google Docs format)
- -o OWNER, --owner=OWNER
- Username or ID of the owner of the resource. For example, 'picasa list-albums -o bob' to list bob's albums
- -q QUERY, --query=QUERY
- Full text query string for specifying items. Searches on titles, captions, and tags.
- --quiet
- Print only prompts and error messages
- --reminder=REMINDER
- Calendar only - specify time for added event's reminder, e.g. "10m", "3h", "1d"
- -s SUMMARY, --summary=SUMMARY
- Description of the upload, or file containing the description.
- -t TAGS, --tags=TAGS
- Tags for item, e.g. "Sunsets, Earth Day"
- -u USER, --user=USER
- Username to log in with for the service.
- -v, --verbose
- Print all messages.
Examples
google blogger post --title 'foo' 'command line posting' google calendar add 'Lunch with Jim at noon tomorrow' google contacts list name,email >contacts.csv google docs edit --title 'Shopping list' google.py picasa create --title 'Cat Photos' ~/photos/cats/*.jpg google youtube post --category Education killer_robots.avi