Giter Site home page Giter Site logo

google-apps-script-library's Introduction

Hi there, I'm Derek

Some things about me:

  • I'm avid outdoorsman: rock climbing πŸ§— , hiking (PCT 2015) πŸ”οΈ , camping πŸ•οΈ - you name it!
  • My biggest hobby is programming πŸ’» and building programs that simplify or automate workflows. If you have a common, tedious workflow that you'd like to automate - send me an email!
  • I dabble a bit in 3D printing - mostly functional printing (adapters, containers, and other small solutions for around the house)
  • I enjoy cooking 🍳 and foods such as ginger beer, root beer, and ice cream!
  • I've been to Turkey three times (so far) and enjoyed it so much that I'm trying to learn Turkish (TΓΌrkΓ§e) & share the culture with others

Some of my biggest & most popular projects:

  • πŸ“… Bulk Edit Calendar Events - a desktop program for editing Google Calendar events in bulk
  • MountainProject - an HTML scraper and reddit bot to link MountainProject.com and various climbing subreddits, replying automatically to posts with climbing information
  • GAS-ICS-Sync - a script for syncing ics/ical calendars to Google Calendar faster than the 12 hour cadence provided natively by Google Calendar

derekantrican's GitHub stats

Top Langs

google-apps-script-library's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

google-apps-script-library's Issues

Script timeout

The main function will always time-out (after around 360secs) once coming to this line:
var events = component.getAllSubcomponents("vevent").map(ConvertToCustomEvent);
Can you please help?

ical/ics url Caching issue

This is a great library to use for continuous sync with google calendar. I was using it and found few issues. Don't know whether these issues are general or only for me. One of these issues is : The URL that I am using to profile ical/ics file, got cached in this script. I noticed this issue while i was testing by adding new events in file and trying to sync it with Google Calendar. New events are not captured.

I found and applied a solution for this. I would like to share and discuss it with you. If you allow me to commit my updates to your repo that would be help full to someone too. And we can discuss and solve issues further. :)

Again this script is Nice and saved lots of my time. Thanks!

ICAL/ICS fails to parse some dates

Relevant file

Example VEVENT:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Teamup Solutions AG//Teamup Calendar//EN
METHOD:PUBLISH
X-WR-CALNAME:Sitona Management | Heleen
X-WR-CALDESC:Administrator-4696524
X-PUBLISHED-TTL:PT15M
BEGIN:VTIMEZONE
TZID:Africa/Johannesburg
TZURL:http://tzurl.org/zoneinfo-outlook/Africa/Johannesburg
X-LIC-LOCATION:Africa/Johannesburg
BEGIN:STANDARD
TZOFFSETFROM:+0200
TZOFFSETTO:+0200
TZNAME:SAST
DTSTART:19700101T000000
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
UID:TU175134705
DTSTART;TZID=Africa/Johannesburg:20180314T100000
SEQUENCE:0
TRANSP:OPAQUE
DTEND;TZID=Africa/Johannesburg:20180314T120000
URL:https://teamup.com/event/show/key/ksh5ryh1avutrvp3ar/event_id/175134705
LOCATION:Head Office
SUMMARY:Disciplinary Hearings (Koos Prinsloo\, Archie August)
CLASS:PUBLIC
DESCRIPTION:Description: Drivers and operators\n---\n
CATEGORIES:Heleen
DTSTAMP:20180312T173247Z
CREATED:20180309T123514Z
X-TEAMUP-WHO:Koos Prinsloo\, Archie August
END:VEVENT

Notice how the DTSTART elements instead have a ; after them and contain the Timezone ID. This should be incorporated and fixed according to this documentation

ICS/ICAL sync timezone issue

The following function is having trouble parsing timezones and needs to be improved:

function GetUTCTime(parameter){
  parameter = parameter.substr(1); //Remove leading ; or : character
  if (parameter.includes("TZID")){
    var tzid = parameter.split("TZID=")[1].split(":")[0];
    var time = parameter.split(":")[1];
    return Moment.moment.tz(time,tzid).tz("Etc/UTC").format("YYYYMMDDTHHmmss") + "Z";    
  }
  else
    return parameter;
}

The solution is to use regex to parse out the parts of the string. Here is documentation on how this parameter is formatted: https://www.kanzaki.com/docs/ical/dtstart.html

ical sync script for (webcal?) facebook on google cal?

Hello,

I'm trying to use the ics/ical sync script:
https://script.google.com/a/redhat.com/d/1QeZFLSM1EkuFvYcryECI_xH-IZVe1-IxGRq_n6OoXp1CmVtSeTeigEx4/edit?usp=drive_web

To sync my Facebook calendar (more frequently) into my google calendar. (atm it does it once every 6-12 hours).

From FB, I get a url like this:
webcal://www.facebook.com/ical/u.php?uid=1000......

But when I try to run the script with the above url, it tells me that it's not valid url.

Is there away to get this to work?

ICS/ICAL parsing issue (multiple lines, "\n" not being accounted for)

ICS link: http://msdwarren.blob.core.windows.net/calendar/sports-all.ics

Resulting event:
image

BEGIN:VEVENT
CREATED;VALUE=DATE:19000101
DESCRIPTION:Start Time: 5:30 PM\nEnd Time: 7:30 PM\nSport: Baseball\nGender
 : Male\nClass(es): V\nLocation: Lawrence North\nOpponent(s): Lawrence Nort
 h High School
DTEND:20190410T233000Z
DTSTART:20190410T213000Z
DTSTAMP:20180404T055405Z
LAST-MODIFIED;VALUE=DATE:19000101
LOCATION:Lawrence North
SEQUENCE:0
SUMMARY:Baseball\, Varsity @ Lawrence North
TRANSP:Transparent
UID:e3020681
END:VEVENT

My program parses the ics file line by line, so that's why the description is getting cut off (because the ics file here has the description split onto multiple lines). I can probably look into adjusting the program to account for this. I'll also look into why the \n isn't getting treated properly.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.