Compare commits
2 Commits
1f3e2a414d
...
8c46d7519c
Author | SHA1 | Date | |
---|---|---|---|
8c46d7519c | |||
|
b7053c221c |
@ -2,4 +2,8 @@
|
|||||||
A tool to add a 6-day schedule to calendar apps.
|
A tool to add a 6-day schedule to calendar apps.
|
||||||
Outputs in csv format.
|
Outputs in csv format.
|
||||||
|
|
||||||
An example config is available in docs/config.py
|
An example config is available in docs/config.py.
|
||||||
|
|
||||||
|
**Note from future me:**
|
||||||
|
The code quality is garbage on this but the tool has faithfully served me for 2 years now 👍
|
||||||
|
Thank you past me
|
||||||
|
4
main.py
4
main.py
@ -3,7 +3,7 @@ import datetime
|
|||||||
from config import *
|
from config import *
|
||||||
|
|
||||||
step = datetime.timedelta(days = 1)
|
step = datetime.timedelta(days = 1)
|
||||||
day = 1;
|
day = 1
|
||||||
for i in range(offset):
|
for i in range(offset):
|
||||||
start_date += step
|
start_date += step
|
||||||
|
|
||||||
@ -31,7 +31,7 @@ current_date = start_date-step
|
|||||||
|
|
||||||
while True:
|
while True:
|
||||||
current_date += step
|
current_date += step
|
||||||
school = True;
|
school = True
|
||||||
for vacation in vacation_days:
|
for vacation in vacation_days:
|
||||||
if(len(vacation)>1):
|
if(len(vacation)>1):
|
||||||
if current_date >= vacation[0] and current_date <= vacation[1]:
|
if current_date >= vacation[0] and current_date <= vacation[1]:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user