-
Notifications
You must be signed in to change notification settings - Fork 0
nadaoneal/gapps_python_whatever
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Note: As of 2011-08-18, I'm creating a "gdata-api-v1" branch to store the code created against version 1 of the gdata python client. http://code.google.com/p/gdata-python-client/ The main branch is now tested against version 2.14 with the patch described in http://code.google.com/p/gdata-python-client/issues/detail?id=268#c27 manually added. There are still a number of places where the code is unfortunately a bit rough. Additionally, there are a number of places where I'm still using calendar.service instead of calendar.client because it seems like .service gives you access to domain-wide functions where .client doesn't. So I'm also using contacts service instead of contacts client, apps service, etc. It's a little annoying because the authentication is clumsier - now that I know how to do it, it would be easier to use oauth, with .client, everywhere. *** I'll be pushing up scripts that we use for our EDU "Google Apps for your Domain" domain. Mostly, these are calendar and contacts scripts. I was motivated to do this because I think the documentation for the domain-wide functions, especially for the python api, is not all that great. So the scripts I'm sharing are ALSO not all that great, but I'm hoping that you'll find them useful as you harvest them for specific syntax examples. *** FILES: ** settings.ini.changeme ** Rename this to settings.ini, put it someplace nice - all the other programs can refer to it. (Thanks, ConfigParser!) ** backup.py ** Backs up the domain-wide contact list, sets a temporary bypass htpasswd password in order to back up every user's calendars via http. (to avoid API limits) Backup.py has been less-rewritten than other scripts below, and is a bit messier/crappier. ** subscribe.py ** Subscribes everyone (except accounts you exclude) on the domain to a given calendar. Doesn't have any user interaction, probably should. ** abook_audit.py ** * deleting domain-wide addresses * domain-wide contacts query * has user interaction To delete addresses out of the domain-wide address book. (You will need this if e.g. fundcodes.py below creates extraneous calendars). The 1.0 branch version was specific to fund codes - this version takes a string (a regex, really) from the command line, shows you all the matching entries, verifies that you want to delete before proceeding. *** The rest of the scripts have to do with a local "fund codes" application. The application is written up here: http://hdl.handle.net/10022/AC:P:9978 ** fundcodes.py ** * accessing user-created calendar feeds to create events in non-default calendars * creating domain-wide contacts * sharing user-created calendars with the domain Solves a specific situation - moves expenditure data for electonic resource renewals, currently stored in text exports on a server to which I have limited access, into Google Calendar, and provides 3- and 5-month reminders for next year's renewal. The expenditure data is updated biweekly, but put into cumulative files. Each fund code is in its own directory. Each fund code needs its own calendar. This script makes calendars under an admin account, shares those calendars with the domain, then adds them to the domain-wide addressbook. Then, for each "Fund Code" calendar, looks to see if there's any data for it; if so, adds any new events. ** listsub.py ** * what calendars are users subscribed to? Finds all users subscribed to a Fund Code calendar, emails interested people. ** emptycals.py ** Empties all events from calendars whose titles are in a set you create, or that match a regex. This script is fairly old/messy. ** selective-empty.py ** Deletes selected events from selected calendars. Necessary when the app owners wanted to change the business logic of which events were added to the calendar, and which got reminders.
About
Random python scripts I use for our EDU "Google Apps for Your Domain"
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published