Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am wondering wether it is possible to remove a common part from all existing Appointments in my google calender matching a given pattern:

AE [0-9][0-9][0-9][0-9][0-9]-[0-9] [0-9]S:

So that

AE 12345-4 2S xxxxxx

would become

xxxxxx
share|improve this question

2 Answers 2

up vote 0 down vote accepted

Its all the same length the begin with, just remove the first 14 characters. If its variable, you might want to move it all to excel, text to columns by S, just take everything in the second and later columns. Note: this requires exporting the calendar to a .csv first.

share|improve this answer
    
Sorry this is not CLI. Please let me know if I should remove this answer. –  soandos Jun 2 '11 at 14:37

You're not indicating which OS's you have available, but an easy solution would be to use AppleScript in OSX. This assumes you have configured your Google Calendar in iCal (in 10.8 Mountain Lion known as Calendar) over CalDav so that you can edit the calendar.

tell application "Calendar"
    tell calendar "Google Calendar"     
    set theEvents to (every event)
    repeat with current_event in theEvents
        set mySummary to summary of current_event
                    -- cut first 14 characters away
        set summary of current_event to "" & (text items 14 through end of mySummary)
    end repeat      
    end tell
end tell
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.