Merge branch 'master' of github.com:gillescastel/university-setup

This commit is contained in:
Gilles Castel 2020-05-19 17:53:59 +02:00
commit ce67d74415
4 changed files with 15 additions and 5 deletions

View file

@ -1,6 +1,7 @@
# Managing LaTeX lecture notes # Managing LaTeX lecture notes
This repository complements my [third blog post about my note taking setup](https://castel.dev/post/lecture-notes-3). This repository complements my [third blog post about my note taking setup](https://castel.dev/post/lecture-notes-3).
## A quick overview: ## A quick overview:
### File structure ### File structure

View file

@ -9,6 +9,8 @@
\usepackage{booktabs} \usepackage{booktabs}
\usepackage{enumitem} \usepackage{enumitem}
\pdfminorversion=7
% Don't indent paragraphs, leave some space between them % Don't indent paragraphs, leave some space between them
\usepackage{parskip} \usepackage{parskip}
@ -247,7 +249,6 @@
% Figure support as explained in my blog post. % Figure support as explained in my blog post.
\usepackage{import} \usepackage{import}
\usepackage{xifthen} \usepackage{xifthen}
\pdfminorversion=7
\usepackage{pdfpages} \usepackage{pdfpages}
\usepackage{transparent} \usepackage{transparent}
\newcommand{\incfig}[1]{% \newcommand{\incfig}[1]{%

View file

@ -4,6 +4,13 @@ from pathlib import Path
def get_week(d=datetime.today()): def get_week(d=datetime.today()):
return (int(d.strftime("%W")) + 52 - 5) % 52 return (int(d.strftime("%W")) + 52 - 5) % 52
# default is 'primary', if you are using a separate calendar for your course schedule,
# your calendarId (which you can find by going to your Google Calendar settings, selecting
# the relevant calendar and scrolling down to Calendar ID) probably looks like
# xxxxxxxxxxxxxxxxxxxxxxxxxg@group.calendar.google.com
# example:
# USERCALENDARID = 'xxxxxxxxxxxxxxxxxxxxxxxxxg@group.calendar.google.com'
USERCALENDARID = 'primary'
CURRENT_COURSE_SYMLINK = Path('~/current_course').expanduser() CURRENT_COURSE_SYMLINK = Path('~/current_course').expanduser()
CURRENT_COURSE_ROOT = CURRENT_COURSE_SYMLINK.resolve() CURRENT_COURSE_ROOT = CURRENT_COURSE_SYMLINK.resolve()
CURRENT_COURSE_WATCH_FILE = Path('/tmp/current_course').resolve() CURRENT_COURSE_WATCH_FILE = Path('/tmp/current_course').resolve()

View file

@ -21,6 +21,7 @@ from google_auth_oauthlib.flow import InstalledAppFlow
from google.auth.transport.requests import Request from google.auth.transport.requests import Request
from courses import Courses from courses import Courses
from config import USERCALENDARID
courses = Courses() courses = Courses()
@ -186,7 +187,7 @@ def main():
if 'dateTime' in event['start'] if 'dateTime' in event['start']
] ]
events = get_events('primary') events = get_events(userCalendarId)
# events = get_events('primary') + get_events('school-calendar@import.calendar.google.com') # events = get_events('primary') + get_events('school-calendar@import.calendar.google.com')
print('Done') print('Done')