Skip to content

Commit

Permalink
Added support for empty lines
Browse files Browse the repository at this point in the history
An empty line is a line where the date cell is not set

Closes keul#12
  • Loading branch information
keul committed Nov 20, 2022
1 parent b41c8ef commit e988e18
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions haunts/spreadsheet.py
Original file line number Diff line number Diff line change
@@ -1,20 1,19 @@
import datetime
import string
import sys
import time
import string
import datetime
import click

from googleapiclient.errors import HttpError
from googleapiclient.discovery import build
from google_auth_oauthlib.flow import InstalledAppFlow
from colorama import Back, Style
from google.auth.transport.requests import Request
from google.oauth2.credentials import Credentials
from google_auth_oauthlib.flow import InstalledAppFlow
from googleapiclient.discovery import build
from googleapiclient.errors import HttpError

from colorama import Back, Style

from .ini import get
from . import LOGGER
from . import actions
from .calendars import create_event, delete_event, ORIGIN_TIME
from .calendars import ORIGIN_TIME, create_event, delete_event
from .ini import get

# If modifying these scopes, delete the sheets-token file
SCOPES = ["https://www.googleapis.com/auth/spreadsheets"]
Expand Down Expand Up @@ -87,6 86,9 @@ def sync_events(config_dir, sheet, data, calendars, days, month):
continue

current_date = get_col(row, headers_id["Date"])
if not current_date:
LOGGER.debug("No date found, skipping")
continue
date = ORIGIN_TIME datetime.timedelta(days=current_date)

default_start_time = (
Expand Down

0 comments on commit e988e18

Please sign in to comment.