GithubHelp home page GithubHelp logo

pennphyscal's Introduction

UPennPhysCal

A nasty but easy way to keep your GCal updated with department colloquia. Depends on bs4, colorama, and google-api-python-client.

The Calendar

I have this script run once a day, adding events to a UPenn Physics Events calendar. You can add it to your own calendar by clicking the "+" icon in the bottom right of this page.

Usage

You will need to create an Oauth2 credential in Google Cloud to let the script edit your calendar, which can be done by visiting creating a project, enabling the Google Calendar API, and creating credentials for a Desktop Application. Make sure your scope in your credential includes https://www.googleapis.com/auth/calendar.

To connect your Oauth2 credential to your computer download credentials.json. Create a file named cal.json with the Google Calendar ID of the calendar you want to add to in this format:

{
"calendarId": "<id here>"
}

Or, alternatively, if you'd like to add to your main calendar, set calendarId to main.

Then, run events.py, give calendar access to your program, and sit still for a bit while events are added.

Example

>>> python event.py
    On page 1
    Please visit this URL to authorize this application: https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=...
    Event created: Astronomy and Astrophysics Seminar: Large Scale Structure Beyond the 2-Point Function
    Event created: Condensed and Living Matter Seminar: "Interlayer Excitons and Magneto-Exciton Condensation in van der Waals Heterostructures"
    Event created: HET Seminar: Peter Adshead (University of Illinois at Urbana-Champaign)
    Event created: Physics and Astronomy Colloquium: "Biological tissues as mechanical metamaterials"
    Event created: HET Seminar: Manki Kim (MIT)
    Event created: Astronomy and Astrophysics Seminar: Meng-Xiang Lin (Chicago)
    Event created: Condensed and Living Matter Seminar: "Quantum optics meets correlated electrons"
    Event created: HET Seminar: Yifan Wang (Harvard)
    Event created: Condensed and Living Matter Seminar: "Twisting nodal superconductors"
    Event created: HET Seminar: David E. Kaplan (JHU)
    On page 2
    Event created: Astronomy and Astrophysics Seminar: Jose Maria Ezquiaga (Chicago)
    Event created: Condensed and Living Matter Seminar: "TBA"
    Event created: HET Seminar: An Introduction to the Lattice-Continuum Correspondence
    ...
    28 events created! Final date is 2022-09-21 15:30:00

pennphyscal's People

Contributors

youngsm avatar

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.