tree checksum vpatch file split hunks
all signers: asciilifeform diana_coman
antecedents: logotron_genesis.kv
press order:
logotron_genesis.kv | asciilifeform diana_coman |
multsel_and_datefix.kv | asciilifeform diana_coman |
patch:
(1 . 1)(1 . 2)
5 589248 logotron_genesis "Genesis."
6 589480 multsel_and_datefix "Multiline selections and fix for date arrow."
- F447F004041538581919C4D373FAA6E957D8ED67E273A93704B952802EEEC970213983FB8FBE45E8A913B8831D5C1DBB605D8309DF1F70559969B9B1B9B7685D(44 . 7)(44 . 7)
11 # 3 : Present day.
12
13 # Where the source lives (change to yours)
14 src_url = http://not.yet
15 src_url = http://www.loper-os.org/?p=3452
16
17 # From where index starts for new chan, so to leave room for archive insert
18 newchan_idx = 1000000
- 5DE963EB326E8F107264FB5D2DCEAF715B8DAFF649353295FF19BFAA560946BD856F8970C69B1B6360FB003B7548FA78302423ECF83512A4BFF43CFD3973F628(249 . 7)(249 . 7)- 44D51AAEF738815D01D92CBF6A1D0D44803627579352DBAAFE0257346E5FDFF9D76EC64FD00EBB435E177869502F97C1B72C7322EE6108C6784011D222966BA7
23
24
25 ## Format given log line for display
26 def format_logline(l, highlights = []):
27 def format_logline(l, highlights = [], select=[]):
28 payload = html_escape(l['payload'])
29
30 # Format ordinary links:
(266 . 16)(266 . 25)
32 if l['speaker'] in Bots:
33 bot = " bot"
34
35 # default -- no selection
36 dclass = l['speaker']
37
38 # If selection is given:
39 if select != []:
40 ss, se = select
41 if ss <= l['idx'] <= se:
42 dclass = "highlight"
43
44 # HTMLize the given line :
45 s = ("<div id='{0}' class='{1}{5}'>"
46 s = ("<div id='{0}' class='{6}{5}'>"
47 "<a class='nick' title='{2}'"
48 " href=\"{3}\">{1}</a>: {4}</div>").format(l['idx'],
49 l['speaker'],
50 l['t'],
51 line_url(l),
52 payload,
53 bot)
54
55 bot,
56 dclass)
57 return s
58
59 # Make above callable from inside htm templater:
(316 . 6)(325 . 10)
61 if chan not in Channels:
62 return redirect(url_for('log'))
63
64 # Get possible selection start and end
65 sel_start = request.args.get('ss', default = 0, type = int)
66 sel_end = request.args.get('se', default = 0, type = int)
67
68 # Get current time
69 now = datetime.now()
70
(336 . 6)(349 . 10)
72 # Determine the end of the interval being shown
73 day_end = day_start + timedelta(days=1)
74
75 # Enable 'tail' is day_end is after end of current day
76 if day_end.day > now.day:
77 tail = True
78
79 # Get the loglines from DB
80 lines = query_db(
81 '''select * from loglines where chan=%s
(346 . 6)(363 . 7)
83 return render_template('log.html',
84 chan = chan,
85 loglines = lines,
86 sel = (sel_start, sel_end),
87 date = date,
88 tail = tail)
89
(403 . 8)(421 . 6)
91 tokens_formed,
92 Max_Search_Results], one=False)
93 else:
94 print "from=", from_users
95
96 searchres = query_db(
97 '''select * from loglines where chan=%s
98 and speaker ilike any(%s)
(9 . 7)(9 . 7)
103 <div id='navbar'>{{ generate_navbar(date, tail, chan) | safe }}</div>
104
105 {% for l in loglines %}
106 {{ format_logline(l) | safe }}
107 {{ format_logline(l, [], sel) | safe }}
108 {% endfor %}
109
110 <div id='navbar'>{{ generate_navbar(date, tail, chan) | safe }}</div>