def one_or_more_lines_multicolor(note): note = n2vals(note) lines = ca.note_lines(note) if type(lines) == dict: val = lines['note_lines'] else: val = lines[1] if val == 1: return 'black' if val in [2, 3, 4, 5]: return 'blue' if val in range(6, 12): return 'orange' return 'red'
def one_or_more_lines_multicolor(note): note = n2vals(note) lines = ca.note_lines(note) if type(lines) == dict: val = lines['note_lines'] else: val = lines[1] if val == 1: return 'black' if val in [2,3,4,5]: return 'blue' if val in range(6,12): return 'orange' return 'red'
for jid, when in max_deletes.iteritems() ]) return njidtodel[n.owner.email].get(n.jid, None) juxtapose_n_props = lambda i, n_created, n_text, n: "".join([ ("<td>%s</td>" % repr(x)) for x in [ i, int(n.jid), exporter.makedate_usec(float(n_created)), (time_till_deletion(n) / (24 * 60 * 60 * 1000) if time_till_deletion(n) is not None else "-?-") if n.deleted else "NOT DELETED", len(n_text) if n_text is not None else 0, ca.note_words(text2vals(n_text))[1] if n_text is not None else 0, ca.note_lines(text2vals(n_text))[1] if n_text is not None else 0, ca.note_changed_edits(n2vals(n))[1], htmlesc(n_text) ] ]) njidtosave = {} def juxtapose_note(i, n): ## cache all the note-saves, build chronological revision array { user.id : { noteid: (when, contents), (when, contents) , ... } } global njidtosave if n.owner.email not in njidtosave: person = {} for when, noteid, contents, action in ActivityLog.objects.filter( owner=n.owner,
return njidtodel[n.owner.email].get(n.jid, None) juxtapose_n_props = lambda i, n_created, n_text, n: "".join( [ ("<td>%s</td>" % repr(x)) for x in [ i, int(n.jid), exporter.makedate_usec(float(n_created)), (time_till_deletion(n) / (24 * 60 * 60 * 1000) if time_till_deletion(n) is not None else "-?-") if n.deleted else "NOT DELETED", len(n_text) if n_text is not None else 0, ca.note_words(text2vals(n_text))[1] if n_text is not None else 0, ca.note_lines(text2vals(n_text))[1] if n_text is not None else 0, ca.note_changed_edits(n2vals(n))[1], htmlesc(n_text), ] ] ) njidtosave = {} def juxtapose_note(i, n): ## cache all the note-saves, build chronological revision array { user.id : { noteid: (when, contents), (when, contents) , ... } } global njidtosave if n.owner.email not in njidtosave: person = {} for when, noteid, contents, action in ActivityLog.objects.filter(