]> apps.delaporte.us Git - dotfiles.git/blobdiff - invoke/school/tasks.py
Update install to check installs
[dotfiles.git] / invoke / school / tasks.py
index d311f61cb2439b2322203c6f18fb35b35180a8d0..03610dd3557e4ef086e750baa529f53381734504 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
 from invoke import task
 from pandas_ods_reader import read_ods
 import pandas as pd
@@ -28,8 +27,8 @@ def code(c, path):
 
 def folder(c, path):
     # c.run(f'dolphin {path}', asynchronous=True)
 
 def folder(c, path):
     # c.run(f'dolphin {path}', asynchronous=True)
-    # c.run(f"nemo {path}")
-    c.run(f'konsole --workdir {path}',asynchronous=True)
+    c.run(f"nemo {path}", asynchronous=True)
+    # c.run(f'konsole --workdir {path}',asynchronous=True)
 
 
 @task
 
 
 @task
@@ -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)
 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}')
 
         if not 'All Day Event' in today['subject'].values and not subject in today['subject'].values:
             print(f'Missing {subject} for {person} on {day}')
 
@@ -134,26 +133,30 @@ def print_day(c, person, date):
     for subject, row in today.groupby('subject'):
         print()
         print()
     for subject, row in today.groupby('subject'):
         print()
         print()
-        print(f'### {row["subject"].values[0]}')
+        subject = row['subject'].values[0]
+        minutes = int(row['minutes'].values[0])
+        print(f'### {subject} - {minutes} minutes')
         print()
         for task in row['task'].values:
             print()
             print(f'- [ ] {task}')
         if(len(row['tip'].values) > 0):
             for tip in row['tip'].values:
         print()
         for task in row['task'].values:
             print()
             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()
-                    print(f'> Tip: {tip}')
+                    print(f'> Tip: {tip.strip()}')
 
         if(len(row['when_done'].values) > 0):
             for tip in row['when_done'].values:
 
         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()
-                    print(f'**When done**: {tip}')
+                    print(f'**When done**: {tip.strip()}')
 
 @task
 def files(c):
 
 @task
 def files(c):
-    c.run('dolphin .')
+    folder(c, '.')
 
 
 @task
 
 
 @task
@@ -170,8 +173,12 @@ def fresh_week(c):
 @task
 def checklist(c):
     print('- [ ] `fresh-week` to clean up old files.')
 @task
 def checklist(c):
     print('- [ ] `fresh-week` to clean up old files.')
+    print('- [ ] update `Assignments/motd.txt` with an encouraging message for the week.')
     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('- [ ] 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.')
+    print('- [ ] share the PDF files in the family chat thrad.')
+