당직근무 0.15.5 (웹 2026-11-25.9): 다른 달력 연동에 일반근무 날 빼기, 기본은 앱과 같게

사용자 지시(2026-11-25): 구글 달력 연동 옵션에 일반근무 빼는 기능(일반근무 날 통째로 빼기), 기본은 어플과 같게, 내 계정에 적용.

- 구독 주소 options.skipRegular: 켜면 일반근무 날은 이름까지 보내지 않는다. 없으면 끔.
- 끄면 앱 달력과 같게: 근무 순서 이름 줄마다 표시를 따르고 일반근무 글자 숨기기(hideRegular)를 켜면 이름만 보내며 이름이 없으면 그날 근무 일정을 만들지 않는다(앱 ShiftNames.externalTitle, 서버 calendar_export.project).
- 웹 달력 연동: 일반근무 날 빼기 칸과 항목만 바꾸기(주소 그대로, action update).
- 앱 기본 달력 자동 반영: 일반근무 날 빼기 칸(기기 설정 calendar_mirror.skipRegular).
- 기기 시험 CalendarBridgeCheck에 일반근무 빼기·앱과 같게 단계 추가.
- 앱 0.15.5 / 설치 번호 29. APK 877370바이트, SHA-256 819342ea62e549fc8ceb2dff1c30082b45e031b49d2d232c98beda0a00032f29
This commit is contained in:
블리어 committed 2026-11-25 05:44:32 +00:00
1 parent f7aaa68fd0
commit eccce7adb0
20 files changed
+139 -42

No files matched your search

+15 -5
View File
@@ -27,7 +27,10 @@ def options(data):
raise ValueError('내보낼 항목을 확인해 주세요.')
if not any(data[key] for key in ('rotation','events','anniversaries')):
raise ValueError('근무표와 일정 및 기념일 중 하나 이상 선택해 주세요.')
return {key:data[key] for key in OPTIONS}
# skipRegular(0.15.5): 다른 달력(구글 등)에 일반근무 날을 통째로 보내지 않는다. 없으면 끔이고 끄면 앱 달력과 같게 보낸다.
if 'skipRegular' in data and type(data['skipRegular']) is not bool:
raise ValueError('일반근무 빼기 선택을 확인해 주세요.')
return {**{key:data[key] for key in OPTIONS},'skipRegular':data.get('skipRegular') is True}
def shift(data,day):
return plan_shift(data,day)
@@ -69,13 +72,18 @@ def project(state,chosen,today,holidays):
labels=LABELS
# 근무 순서에 넣은 이름은 이름 줄마다 고른 표시 방법(근무만 · 이름만 · 둘 다)을 따른다. 고른 적이 없으면 예전 공통 선택이다.
mode=next((item['data'].get('nameDisplay') for item in items if item['kind']=='preferences'),None) or 'both'
# 기본은 앱 달력과 같게 보낸다(2026-11-25 사용자 지시). 앱에서 일반근무 글자를 숨기면 다른 달력에도 근무 글자를 빼고 이름만 보낸다.
hide_regular=next((item['data'].get('hideRegular') for item in items if item['kind']=='preferences'),None) is True
skip_regular=chosen.get('skipRegular') is True
def put(key,title,notes,start,end,all_day):
output[key]={'key':key,'title':title,'notes':notes,'start':start,'end':end,'allDay':all_day}
if len(output)>10000:raise ValueError('내보낼 일정이 10,000개를 넘습니다. 선택 항목을 줄여 주세요.')
for offset in range((last-first).days+1):
day=first+timedelta(days=offset)
if chosen['rotation'] and rotation:
own=shift(rotation,day);names=[]
own=shift(rotation,day) if chosen['rotation'] and rotation else None
# 일반근무 빼기를 켜면 일반근무 날은 이름까지 통째로 보내지 않는다.
if own and not (skip_regular and own=='REGULAR'):
names=[]
if chosen['names']:
holiday=bool(holidays.get(str(day.year),{}).get(day.isoformat()))
for rule in rules:
@@ -84,8 +92,10 @@ def project(state,chosen,today,holidays):
name=person['name'] if rule['mode']=='PERSON' else rule['name']
if name not in names:names.append(name)
slot=name_on(rotation,day);slot_mode=name_mode_on(rotation,day,mode) if slot else mode
title=labels[own] if not slot or slot_mode=='shift' else slot if slot_mode=='name' else labels[own]+'('+slot+')'
put('rotation:'+day.isoformat(),title+(' · '+' · '.join(names) if names else ''),'',day,day+timedelta(days=1),True)
if own=='REGULAR' and hide_regular:title=slot if slot and slot_mode!='shift' else ''
else:title=labels[own] if not slot or slot_mode=='shift' else slot if slot_mode=='name' else labels[own]+'('+slot+')'
text=' · '.join([title]+names if title else names)
if text:put('rotation:'+day.isoformat(),text,'',day,day+timedelta(days=1),True)
if chosen['anniversaries']:
for item in items:
d=item['data']