2019-09-15 20:42:11 +02:00
|
|
|
from datetime import datetime
|
|
|
|
from pathlib import Path
|
|
|
|
|
2021-09-16 18:30:54 +02:00
|
|
|
|
2019-09-15 20:42:11 +02:00
|
|
|
def get_week(d=datetime.today()):
|
|
|
|
return (int(d.strftime("%W")) + 52 - 5) % 52
|
|
|
|
|
2021-09-16 18:30:54 +02:00
|
|
|
|
2020-05-18 20:42:34 +02:00
|
|
|
# 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'
|
2019-09-15 20:42:11 +02:00
|
|
|
CURRENT_COURSE_SYMLINK = Path('~/current_course').expanduser()
|
|
|
|
CURRENT_COURSE_ROOT = CURRENT_COURSE_SYMLINK.resolve()
|
|
|
|
CURRENT_COURSE_WATCH_FILE = Path('/tmp/current_course').resolve()
|
2021-09-16 12:06:07 +02:00
|
|
|
ROOT = Path('~/Uni/semester-5').expanduser()
|
2021-09-16 13:27:58 +02:00
|
|
|
DATE_FORMAT = '%a %d %b %Y'
|
2021-09-16 12:05:44 +02:00
|
|
|
LOCALE = "de_DE.utf8"
|
2021-09-16 12:34:32 +02:00
|
|
|
COURSE_IGNORE_FILE = '.courseignore'
|
2021-09-16 18:30:54 +02:00
|
|
|
COURSE_INFO_FILE = 'info.yaml'
|
2021-09-16 13:08:05 +02:00
|
|
|
DEFAULT_MASTER_FILE_NAME = 'master.tex'
|
2021-09-16 15:27:35 +02:00
|
|
|
MAX_LEN = 40
|
2021-09-16 20:03:41 +02:00
|
|
|
LECTURE_START_MARKER = 'start lectures'
|
|
|
|
LECTURE_END_MARKER = 'end lectures'
|
|
|
|
DEFAULT_NEW_LECTURE_HEADER = r'\lecture{{{number}}}{{{date}}}{{}}'
|