]> apps.delaporte.us Git - dotfiles.git/blobdiff - invoke/school/tasks.py
Fix for NaN text from ods reader
[dotfiles.git] / invoke / school / tasks.py
index d311f61cb2439b2322203c6f18fb35b35180a8d0..d7c89e6c34787b3d8836667300962ff969a4f14f 100644 (file)
@@ -1,4 +1,3 @@
-# This file is meant to sit in ~ for use from all shells.
 from invoke import task
 from pandas_ods_reader import read_ods
 import pandas as pd
@@ -100,7 +99,7 @@ def get_todays_assignments(df, date, person):
 def missing_on_day(c, person, day):
     df = read_ods(ODS_FILE)
     today = get_todays_assignments(df, day, person)
-    for subject in ['College Prep', 'Life Skills', 'Job Prep', 'Health']:
+    for subject in ['College Prep', 'Life Skills', 'Job Prep', 'Health Science']:
         if not 'All Day Event' in today['subject'].values and not subject in today['subject'].values:
             print(f'Missing {subject} for {person} on {day}')
 
@@ -141,15 +140,17 @@ def print_day(c, person, date):
             print(f'- [ ] {task}')
         if(len(row['tip'].values) > 0):
             for tip in row['tip'].values:
-                if tip:
+                # Sometimes a float.
+                if hasattr(tip, 'strip'):
                     print()
-                    print(f'> Tip: {tip}')
+                    print(f'> Tip: {tip.strip()}')
 
         if(len(row['when_done'].values) > 0):
             for tip in row['when_done'].values:
-                if tip:
+                # Sometimes a float.
+                if hasattr(tip, 'strip'):
                     print()
-                    print(f'**When done**: {tip}')
+                    print(f'**When done**: {tip}.strip()')
 
 @task
 def files(c):
@@ -173,5 +174,6 @@ def checklist(c):
     print('- [ ] start libreoffice and open `assignements.ods`')
     print('- [ ] copy a previous sheet to be the new first sheet, and update the date Monday date.')
     print('- [ ] `invoke missing YYYY.MM.DD` the .ods file.')
-    print('- [ ] `invoke preview-all YYYY.MM.DD`')
+    print('- [ ] `invoke make-all YYYY.MM.DD` to generate PDF files')
+    print('- [ ] review the PDF files and recreate if needed.')