# Commands to transform RPI calendar data into single calendar model. # Useful as an example of how this might be done # ######################################################################### # ######################################################################### # First create the new calendar collection under the folder cals # ######################################################################### create collection folder "/public" cals create collection calendar "/public/cals" MainCal # ######################################################################### # Now create any missing categories # ######################################################################### create category "Alumni Events" create category "Arts" create category "Theater" create category "Athletics" create category "Conferences_Meetings" create category "General Calendars" create category "Alerts" create category "Room Closings" create category "Scheduled openings_closings" create category "Service outages_changes" create category "Lectures_Seminars" create category "Other Events" create category "College Fairs" create category "Social Events" create category "Gaming" create category "Religious_Spiritual" create category "Training" # ######################################################################### # Move the events out of the old collections into the new one. # addcats sets the categories based on the path # setname ensures the name is uid+".ics" # alias adds an x-property to signify which alias will retrieve the events # These aliases will be created later. # ######################################################################### move events addcats setname alias="/user/public-user/Alumni Events" "/public/Alumni Events" "/public/cals/MainCal" move events addcats setname alias="/user/public-user/Arts" "/public/Arts/Concerts" "/public/cals/MainCal" move events addcats setname alias="/user/public-user/Arts" "/public/Arts/Dance" "/public/cals/MainCal" move events addcats setname alias="/user/public-user/Arts" "/public/Arts/Exhibits" "/public/cals/MainCal" move events addcats setname alias="/user/public-user/Arts" "/public/Arts/Films" "/public/cals/MainCal" move events addcats setname alias="/user/public-user/Arts" "/public/Arts/Readings" "/public/cals/MainCal" move events addcats setname alias="/user/public-user/Arts" "/public/Arts/Theater" "/public/cals/MainCal" move events addcats setname alias="/user/public-user/Athletics" "/public/Athletics" "/public/cals/MainCal" move events addcats setname alias="/user/public-user/Conferences_Meetings" "/public/Conferences_Meetings/Conferences" "/public/cals/MainCal" move events addcats setname alias="/user/public-user/Conferences_Meetings" "/public/Conferences_Meetings/Discussions" "/public/cals/MainCal" move events addcats setname alias="/user/public-user/Conferences_Meetings" "/public/Conferences_Meetings/Forums" "/public/cals/MainCal" move events addcats setname alias="/user/public-user/Conferences_Meetings" "/public/Conferences_Meetings/Meetings" "/public/cals/MainCal" move events addcats setname alias="/user/public-user/Academic Calendar" "/public/General Calendars/Academic Calendar" "/public/cals/MainCal" move events addcats setname alias="/user/public-user/Alerts" "/public/General Calendars/Alerts" "/public/cals/MainCal" move events addcats setname alias="/user/public-user/Commencement" "/public/General Calendars/Commencement" "/public/cals/MainCal" move events addcats setname alias="/user/public-user/Construction" "/public/General Calendars/Construction" "/public/cals/MainCal" move events addcats setname alias="/user/public-user/Deadlines" "/public/General Calendars/Deadlines" "/public/cals/MainCal" move events addcats setname alias="/user/public-user/Facilities" "/public/General Calendars/Facilities" "/public/cals/MainCal" move events addcats setname alias="/user/public-user/Holidays" "/public/General Calendars/Holidays" "/public/cals/MainCal" move events addcats setname alias="/user/public-user/Parking" "/public/General Calendars/Parking" "/public/cals/MainCal" move events addcats setname alias="/user/public-user/Room Closings" "/public/General Calendars/Room Closings" "/public/cals/MainCal" move events addcats setname alias="/user/public-user/Scheduled openings_closings" "/public/General Calendars/Scheduled openings_closings" "/public/cals/MainCal" move events addcats setname alias="/user/public-user/School Closings" "/public/General Calendars/School Closings" "/public/cals/MainCal" move events addcats setname alias="/user/public-user/Service outages_changes" "/public/General Calendars/Service outages_changes" "/public/cals/MainCal" move events addcats setname alias="/user/public-user/Lectures_Seminars" "/public/Lectures_Seminars/Lectures" "/public/cals/MainCal" move events addcats setname alias="/user/public-user/Lectures_Seminars" "/public/Lectures_Seminars/Seminars" "/public/cals/MainCal" move events addcats setname alias="/user/public-user/College Fairs" "/public/Other Events/College Fairs" "/public/cals/MainCal" move events addcats setname alias="/user/public-user/Employee Events" "/public/Other Events/Employee Events" "/public/cals/MainCal" move events addcats setname alias="/user/public-user/Fund Raising" "/public/Other Events/Fund Raising" "/public/cals/MainCal" move events addcats setname alias="/user/public-user/Health Services" "/public/Other Events/Health Services" "/public/cals/MainCal" move events addcats setname alias="/user/public-user/Open Houses" "/public/Other Events/Open Houses" "/public/cals/MainCal" move events addcats setname alias="/user/public-user/Other" "/public/Other Events/Other" "/public/cals/MainCal" move events addcats setname alias="/user/public-user/Sales" "/public/Other Events/Sales" "/public/cals/MainCal" move events addcats setname alias="/user/public-user/Special Events" "/public/Other Events/Special Events" "/public/cals/MainCal" move events addcats setname alias="/user/public-user/Tours" "/public/Other Events/Tours" "/public/cals/MainCal" move events addcats setname alias="/user/public-user/University Governance" "/public/Other Events/University Governance" "/public/cals/MainCal" move events addcats setname alias="/user/public-user/Social Events" "/public/Social Events/Gaming" "/public/cals/MainCal" move events addcats setname alias="/user/public-user/Social Events" "/public/Social Events/Receptions" "/public/cals/MainCal" move events addcats setname alias="/user/public-user/Social Events" "/public/Social Events/Recognitions" "/public/cals/MainCal" move events addcats setname alias="/user/public-user/Social Events" "/public/Social Events/Religious_Spiritual" "/public/cals/MainCal" move events addcats setname alias="/user/public-user/Social Events" "/public/Social Events/Social Gatherings" "/public/cals/MainCal" move events addcats setname alias="/user/public-user/Social Events" "/public/Social Events/Volunteer Opportunities" "/public/cals/MainCal" move events addcats setname alias="/user/public-user/Training" "/public/Training/Short Courses" "/public/cals/MainCal" move events addcats setname alias="/user/public-user/Training" "/public/Training/Student Career Development" "/public/cals/MainCal" move events addcats setname alias="/user/public-user/Training" "/public/Training/Training" "/public/cals/MainCal" move events addcats setname alias="/user/public-user/Training" "/public/Training/Workshops" "/public/cals/MainCal" # ######################################################################### # Restructure the emptied collections to be aliases # ######################################################################### # ####################################################### # Delete the empty collections # ####################################################### delete collection "/public/Alumni Events" delete collection "/public/Arts/Concerts" delete collection "/public/Arts/Dance" delete collection "/public/Arts/Exhibits" delete collection "/public/Arts/Films" delete collection "/public/Arts/Readings" delete collection "/public/Arts/Theater" delete collection "/public/Arts" delete collection "/public/Athletics" delete collection "/public/Conferences_Meetings/Conferences" delete collection "/public/Conferences_Meetings/Discussions" delete collection "/public/Conferences_Meetings/Forums" delete collection "/public/Conferences_Meetings/Meetings" delete collection "/public/Conferences_Meetings" delete collection "/public/General Calendars/Academic Calendar" delete collection "/public/General Calendars/Alerts" delete collection "/public/General Calendars/Commencement" delete collection "/public/General Calendars/Construction" delete collection "/public/General Calendars/Deadlines" delete collection "/public/General Calendars/Facilities" delete collection "/public/General Calendars/Holidays" delete collection "/public/General Calendars/Parking" delete collection "/public/General Calendars/Room Closings" delete collection "/public/General Calendars/Scheduled openings_closings" delete collection "/public/General Calendars/School Closings" delete collection "/public/General Calendars/Service outages_changes" delete collection "/public/General Calendars" delete collection "/public/Lectures_Seminars/Lectures" delete collection "/public/Lectures_Seminars/Seminars" delete collection "/public/Lectures_Seminars" delete collection "/public/Other Events/College Fairs" delete collection "/public/Other Events/Employee Events" delete collection "/public/Other Events/Fund Raising" delete collection "/public/Other Events/Health Services" delete collection "/public/Other Events/Open Houses" delete collection "/public/Other Events/Other" delete collection "/public/Other Events/Sales" delete collection "/public/Other Events/Special Events" delete collection "/public/Other Events/Tours" delete collection "/public/Other Events/University Governance" delete collection "/public/Other Events" delete collection "/public/Social Events/Gaming" delete collection "/public/Social Events/Receptions" delete collection "/public/Social Events/Recognitions" delete collection "/public/Social Events/Religious_Spiritual" delete collection "/public/Social Events/Social Gatherings" delete collection "/public/Social Events/Volunteer Opportunities" delete collection "/public/Social Events" delete collection "/public/Training/Short Courses" delete collection "/public/Training/Student Career Development" delete collection "/public/Training/Training" delete collection "/public/Training/Workshops" delete collection "/public/Training" # ####################################################### # Create public aliases # ####################################################### create collection folder "/public" "aliases" create collection alias "/public/aliases" "Alumni Events" "/public/cals/MainCal" filter on category="Alumni Events" category="Alumni Events" create collection folder "/public/aliases" "Arts" category="Arts" create collection alias "/public/aliases/Arts" Concerts "/public/cals/MainCal" filter on category="Concerts" category="Concerts" create collection alias "/public/aliases/Arts" Dance "/public/cals/MainCal" filter on category="Dance" category="Dance" create collection alias "/public/aliases/Arts" Exhibits "/public/cals/MainCal" filter on category="Exhibits" category="Exhibits" create collection alias "/public/aliases/Arts" Films "/public/cals/MainCal" filter on category="Films" category="Films" create collection alias "/public/aliases/Arts" Readings "/public/cals/MainCal" filter on category="Readings" category="Readings" create collection alias "/public/aliases/Arts" Theater "/public/cals/MainCal" filter on category="Theater" category="Theater" create collection alias "/public/aliases" "Athletics" "/public/cals/MainCal" filter on category="Athletics" category="Athletics" create collection folder "/public/aliases" "Conferences_Meetings" category="Conferences_Meetings" create collection alias "/public/aliases/Conferences_Meetings" Conferences "/public/cals/MainCal" filter on category="Conferences" category="Conferences" create collection alias "/public/aliases/Conferences_Meetings" Discussions "/public/cals/MainCal" filter on category="Discussions" category="Discussions" create collection alias "/public/aliases/Conferences_Meetings" Forums "/public/cals/MainCal" filter on category="Forums" category="Forums" create collection alias "/public/aliases/Conferences_Meetings" Meetings "/public/cals/MainCal" filter on category="Meetings" category="Meetings" create collection folder "/public/aliases" "General Calendars" category="General Calendars" create collection alias "/public/aliases/General Calendars" "Academic Calendar" "/public/cals/MainCal" filter on category="Academic Calendar" category="Academic Calendar" create collection alias "/public/aliases/General Calendars" Alerts "/public/cals/MainCal" filter on category="Alerts" category="Alerts" create collection alias "/public/aliases/General Calendars" Commencement "/public/cals/MainCal" filter on category="Commencement" category="Commencement" create collection alias "/public/aliases/General Calendars" Construction "/public/cals/MainCal" filter on category="Construction" category="Construction" create collection alias "/public/aliases/General Calendars" Deadlines "/public/cals/MainCal" filter on category="Deadlines" category="Deadlines" create collection alias "/public/aliases/General Calendars" Facilities "/public/cals/MainCal" filter on category="Facilities" category="Facilities" create collection alias "/public/aliases/General Calendars" Holidays "/public/cals/MainCal" filter on category="Holidays" category="Holidays" create collection alias "/public/aliases/General Calendars" Parking "/public/cals/MainCal" filter on category="Parking" category="Parking" create collection alias "/public/aliases/General Calendars" "Room Closings" "/public/cals/MainCal" filter on category="Room Closings" category="Room Closings" create collection alias "/public/aliases/General Calendars" "Scheduled openings_closings" "/public/cals/MainCal" filter on category="Scheduled openings_closings" category="Scheduled openings_closings" create collection alias "/public/aliases/General Calendars" "School Closings" "/public/cals/MainCal" filter on category="School Closings" category="School Closings" create collection alias "/public/aliases/General Calendars" "Service outages_changes" "/public/cals/MainCal" filter on category="Service outages_changes" category="Service outages_changes" create collection folder "/public/aliases" "Lectures_Seminars" category="Lectures_Seminars" create collection alias "/public/aliases/Lectures_Seminars" Lectures "/public/cals/MainCal" filter on category="Lectures" category="Lectures" create collection alias "/public/aliases/Lectures_Seminars" Seminars "/public/cals/MainCal" filter on category="Seminars" category="Seminars" create collection folder "/public/aliases" "Other Events" category= create collection alias "/public/aliases/Other Events" "College Fairs" "/public/cals/MainCal" filter on category="College Fairs" category="College Fairs" create collection alias "/public/aliases/Other Events" "Employee Events" "/public/cals/MainCal" filter on category="Employee Events" category="Employee Events" create collection alias "/public/aliases/Other Events" "Fund Raising" "/public/cals/MainCal" filter on category="Fund Raising" category="Fund Raising" create collection alias "/public/aliases/Other Events" "Health Services" "/public/cals/MainCal" filter on category="Health Services" category="Health Services" create collection alias "/public/aliases/Other Events" "Open Houses" "/public/cals/MainCal" filter on category="Open Houses" category="Open Houses" create collection alias "/public/aliases/Other Events" Other "/public/cals/MainCal" filter on category="Other" category="Other" create collection alias "/public/aliases/Other Events" Sales "/public/cals/MainCal" filter on category="Sales" category="Sales" create collection alias "/public/aliases/Other Events" "Special Events" "/public/cals/MainCal" filter on category="Special Events" category="Special Events" create collection alias "/public/aliases/Other Events" Tours "/public/cals/MainCal" filter on category="Tours" category="Tours" create collection alias "/public/aliases/Other Events" "University Governance" "/public/cals/MainCal" filter on category="University Governance" category="University Governance" create collection folder "/public/aliases" "Social Events" category="Social Events" create collection alias "/public/aliases/Social Events" Gaming "/public/cals/MainCal" filter on category="Gaming" category="Gaming" create collection alias "/public/aliases/Social Events" Receptions "/public/cals/MainCal" filter on category="Receptions" category="Receptions" create collection alias "/public/aliases/Social Events" Recognitions "/public/cals/MainCal" filter on category="Recognitions" category="Recognitions" create collection alias "/public/aliases/Social Events" Religious_Spiritual "/public/cals/MainCal" filter on category="Religious_Spiritual" category="Religious_Spiritual" create collection alias "/public/aliases/Social Events" "Social Gatherings" "/public/cals/MainCal" filter on category="Social Gatherings" category="Social Gatherings" create collection alias "/public/aliases/Social Events" "Volunteer Opportunities" "/public/cals/MainCal" filter on category="Volunteer Opportunities" category="Volunteer Opportunities" create collection folder "/public/aliases" "Training" category="Training" create collection alias "/public/aliases/Training" "Short Courses" "/public/cals/MainCal" filter on category="Short Courses" category="Short Courses" create collection alias "/public/aliases/Training" "Student Career Development" "/public/cals/MainCal" filter on category="Student Career Development" category="Student Career Development" create collection alias "/public/aliases/Training" Training "/public/cals/MainCal" filter on category="Training" category="Training" create collection alias "/public/aliases/Training" Workshops "/public/cals/MainCal" filter on category="Workshops" category="Workshops" # ####################################################### # Create main campus calendar suite aliases # ####################################################### # ######################################################################### # Delete the aliases to the now deleted collections # ######################################################################### delete collection "/user/public-user/Academic Calendar" delete collection "/user/public-user/Alerts" delete collection "/user/public-user/Alumni Events" delete collection "/user/public-user/Arts" delete collection "/user/public-user/Athletics" delete collection "/user/public-user/Commencement" delete collection "/user/public-user/Conferences_Meetings" delete collection "/user/public-user/Construction" delete collection "/user/public-user/Deadlines" delete collection "/user/public-user/Employee Events" delete collection "/user/public-user/Facilities" delete collection "/user/public-user/Fund Raising" delete collection "/user/public-user/Health Services" delete collection "/user/public-user/Holidays" delete collection "/user/public-user/Lectures_Seminars" delete collection "/user/public-user/Open Houses" delete collection "/user/public-user/Other" delete collection "/user/public-user/Parking" delete collection "/user/public-user/Room Closings" delete collection "/user/public-user/Sales" delete collection "/user/public-user/Scheduled openings_closings" delete collection "/user/public-user/School Closings" delete collection "/user/public-user/Service outages_changes" delete collection "/user/public-user/Social Events" delete collection "/user/public-user/Special Events" delete collection "/user/public-user/Tours" delete collection "/user/public-user/Training" delete collection "/user/public-user/University Governance" # ######################################################################### # Create aliases to the public aliases # ######################################################################### create collection alias "/user/public-user" "Alumni Events" "/public/aliases/Alumni Events" create collection alias "/user/public-user" "Arts" "/public/aliases/Arts" create collection alias "/user/public-user" "Athletics" "/public/aliases/Athletics" create collection alias "/user/public-user" "Conferences_Meetings" "/public/aliases/Conferences_Meetings" create collection alias "/user/public-user" "Academic Calendar" "/public/aliases/General Calendars/Academic Calendar" create collection alias "/user/public-user" "Alerts" "/public/aliases/General Calendars/Alerts" create collection alias "/user/public-user" "Commencement" "/public/aliases/General Calendars/Commencement" create collection alias "/user/public-user" "Construction" "/public/aliases/General Calendars/Construction" create collection alias "/user/public-user" "Deadlines" "/public/aliases/General Calendars/Deadlines" create collection alias "/user/public-user" "Facilities" "/public/aliases/General Calendars/Facilities" create collection alias "/user/public-user" "Holidays" "/public/aliases/General Calendars/Holidays" create collection alias "/user/public-user" "Parking" "/public/aliases/General Calendars/Parking" create collection alias "/user/public-user" "Room Closings" "/public/aliases/General Calendars/Room Closings" create collection alias "/user/public-user" "Scheduled openings_closings" "/public/aliases/General Calendars/Scheduled openings_closings" create collection alias "/user/public-user" "School Closings" "/public/aliases/General Calendars/School Closings" create collection alias "/user/public-user" "Service outages_changes" "/public/aliases/General Calendars/Service outages_changes" create collection alias "/user/public-user" "Lectures_Seminars" "/public/aliases/Lectures_Seminars" create collection alias "/user/public-user" "College Fairs" "/public/aliases/Other Events/College Fairs" create collection alias "/user/public-user" "Employee Events" "/public/aliases/Other Events/Employee Events" create collection alias "/user/public-user" "Fund Raising" "/public/aliases/Other Events/Fund Raising" create collection alias "/user/public-user" "Health Services" "/public/aliases/Other Events/Health Services" create collection alias "/user/public-user" "Open Houses" "/public/aliases/Other Events/Open Houses" create collection alias "/user/public-user" "Other" "/public/aliases/Other Events/Other" create collection alias "/user/public-user" "Sales" "/public/aliases/Other Events/Sales" create collection alias "/user/public-user" "Special Events" "/public/aliases/Other Events/Special Events" create collection alias "/user/public-user" "Tours" "/public/aliases/Other Events/Tours" create collection alias "/user/public-user" "University Governance" "/public/aliases/Other Events/University Governance" create collection alias "/user/public-user" "Social Events" "/public/aliases/Social Events" create collection alias "/user/public-user" "Training" "/public/aliases/Training"