示例#1
0
def clean_list(listin):
    """Remove empty lines at the beginning and end of a list."""
    listout = copy.copy(listin)
    while (len(listout) > 0) and (not listout[0]):
        listout.pop(0)
    while (len(listout) > 0) and (not listout[-1]):
        listout.pop()
    return listout


mysecdec = rst_creator.rst_section_level_3()

group_dir = rwkos.FindFullPath('siue/classes/482/2009/group_grades')
group_name = 'group_list.csv'
group_path = os.path.join(group_dir, group_name)
group_list_482_F09 = spreadsheet.group_list(group_path)
email_path = rwkos.FindFullPath('siue/classes/482/2009/class_list.csv')
email_list = spreadsheet.email_list(email_path)


class section(txt_mixin.txt_list):
    def __init__(self, raw_list):
        #print('raw_list=')
        #print('\n'.join(raw_list))
        self.title = raw_list.pop(0)
        self.dec_line = raw_list.pop(0)
        clean_content = clean_list(raw_list)
        self.content = txt_mixin.txt_list(clean_content)
        grade_inds = self.content.findall(':grade:`')
        if len(grade_inds) > 0:
            grades = None
示例#2
0
                 'Beverage Launching Refrigerator', \
                 'Green Refrigeration', \
                 'Upright Wheelchair', \
                 'Swirl Generator']

wednesday_groups = ['Mechanized Tree Stand', \
                    'Autonomous Vehicle', \
                    'Simplified Water Purification',\
                    'Cougar Baja', \
                    'Green Pedaling', \
                    'Hydraulic Bicycle Transmission']

all_groups = monday_groups + wednesday_groups

class_folder = rwkos.FindFullPath('siue/classes/484/2010')
group_path = os.path.join(class_folder, 'group_list.csv')
group_list = spreadsheet.group_list(group_path)

alts = {'Trutter':'Ben','Herren':'Zach', 'Schelp':'Tim', \
        'Tolbert':'Chris', 'Bailey':'Matt', \
        'Schutte':'Joe','Knepper':'Nick', 'Niccum':'Jake', \
        'Sansone':'Vinnie', 'Loucks':'Nate'}

email_path = os.path.join(class_folder, 'class_list.csv')
email_list = spreadsheet.email_list(email_path)


def make_filename(projectname):
    filename = projectname.replace(' ','_') + '.rst'
    return filename
示例#3
0
import os, rwkos, spreadsheet

import group_rst_parser

reload(group_rst_parser)

class_folder = rwkos.FindFullPath("siue/classes/482/2009/group_grades")
group_path = os.path.join(class_folder, "group_list.csv")
group_list = spreadsheet.group_list(group_path)

alts = {
    "Trutter": "Ben",
    "Herren": "Zach",
    "Schelp": "Tim",
    "Tolbert": "Chris",
    "Bailey": "Matt",
    "Schutte": "Joe",
    "Knepper": "Nick",
}

email_path = rwkos.FindFullPath("siue/classes/482/2009/class_list.csv")
email_list = spreadsheet.email_list(email_path)

from IPython.core.debugger import Pdb


def file_name_from_group_name(group_name, ext=".rst"):
    filename = group_name.replace(" ", "_") + ext
    return filename

def clean_list(listin):
    """Remove empty lines at the beginning and end of a list."""
    listout = copy.copy(listin)
    while (len(listout) > 0) and (not listout[0]):
        listout.pop(0)
    while (len(listout) > 0) and (not listout[-1]):
        listout.pop()
    return listout


mysecdec = rst_creator.rst_section_level_3()

group_dir = rwkos.FindFullPath('siue/classes/482/2009/group_grades')
group_name = 'group_list.csv'
group_path = os.path.join(group_dir, group_name)
group_list_482_F09 = spreadsheet.group_list(group_path)
email_path = rwkos.FindFullPath('siue/classes/482/2009/class_list.csv')
email_list = spreadsheet.email_list(email_path)

class section(txt_mixin.txt_list):
    def __init__(self, raw_list):
        #print('raw_list=')
        #print('\n'.join(raw_list))
        self.title = raw_list.pop(0)
        self.dec_line = raw_list.pop(0)
        clean_content = clean_list(raw_list)
        self.content = txt_mixin.txt_list(clean_content)
        grade_inds = self.content.findall(':grade:`')
        if len(grade_inds) > 0:
            grades = None
            for ind in grade_inds: