def caption(self): self.case.firstParty.gathered self.case.secondParty.gathered output = "" output += "[BOLDCENTER] " + (word("In the") + " " + self.case.court.name).upper() + "\n\n" output += "[BEGIN_CAPTION]" output += ( comma_and_list( self.case.firstParty.elements, comma_string=",[NEWLINE]", and_string=word("and"), before_and=" ", after_and="[NEWLINE]", ) + ",[NEWLINE]" ) output += "[TAB][TAB]" + word(self.case.firstParty.as_noun()).capitalize() + "[NEWLINE] " output += "[SKIPLINE][TAB]" + word("v.") + " [NEWLINE][SKIPLINE] " output += ( comma_and_list( self.case.secondParty.elements, comma_string=",[NEWLINE]", and_string=word("and"), before_and=" ", after_and="[NEWLINE]", ) + ",[NEWLINE]" ) output += "[TAB][TAB]" + word(self.case.secondParty.as_noun()).capitalize() output += "[VERTICAL_LINE]" output += word("Case No.") + " " + self.case.case_id output += "[END_CAPTION]\n\n" if self.title is not None: output += "[BOLDCENTER] " + self.title.upper() + "\n" return output
def caption(self): """Returns a case caption for the case, for inclusion in documents.""" self.case.firstParty.gathered self.case.secondParty.gathered output = "" output += "[BOLDCENTER] " + (word("In the") + " " + self.case.court.name).upper() + "\n\n" output += "[BEGIN_CAPTION]" output += comma_and_list(self.case.firstParty.elements, comma_string=",[NEWLINE]", and_string=word('and'), before_and=" ", after_and='[NEWLINE]') + ",[NEWLINE]" output += "[TAB][TAB]" + word(self.case.firstParty.as_noun()).capitalize() + "[NEWLINE] " output += "[SKIPLINE][TAB]" + word('v.') + " [NEWLINE][SKIPLINE] " output += comma_and_list(self.case.secondParty.elements, comma_string=",[NEWLINE]", and_string=word('and'), before_and=" ", after_and='[NEWLINE]') + ",[NEWLINE]" output += "[TAB][TAB]" + word(self.case.secondParty.as_noun()).capitalize() output += "[VERTICAL_LINE]" output += word('Case No.') + " " + self.case.case_id output += "[END_CAPTION]\n\n" if self.title is not None: output += "[BOLDCENTER] " + self.title.upper() + "\n" return(output)
def comma_and_list(self): if not self.gathering: self.gathered return comma_and_list(self.elements)
def comma_and_list(self): if not self.gathering: self.gathered return comma_and_list(self.elements)
def documents_name(self): return comma_and_list( [y.info['name'] for y in self.list_of_documents()])
def comma_and_list(self, **kwargs): """Returns the items in the set, separated by commas, with "and" before the last item.""" if not self.gathering: self.gathered return comma_and_list(sorted(map(str, self.elements)), **kwargs)
def comma_and_list(self, **kwargs): """Returns the keys of the list, separated by commas, with "and" before the last key.""" if not self.gathering: self.gathered return comma_and_list(sorted(self.elements.keys()), **kwargs)
def comma_and_list(self, **kwargs): """Returns the elements of the list, separated by commas, with "and" before the last element.""" if not self.gathering: self.gathered return comma_and_list(self.elements, **kwargs)
def __str__(self): return comma_and_list([tool.show() for tool in self.elements])