final annotation bot with XMPP implementation

master
bootje 6 years ago
parent 43614212f6
commit e3cc4e32df

@ -1,12 +0,0 @@
Copyright (C) 2006 by Rob Landley <rob@landley.net>
Permission to use, copy, modify, and/or distribute this software for any purpose
with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.

@ -5,7 +5,7 @@ More information: bohyewoo.com<br>
Or send email to here: bohye.woo@gmail.com<br> Or send email to here: bohye.woo@gmail.com<br>
## How to run the code ## How to run the code
python3 annotation-bot.py --jid user@domain --room roomname@domain --nick nickname-of-the-bot python3 annotation-bot.py --jid your-user-name@your-domain-name --room room-name@domain --nick nickname-of-the-bot
## How to comment ## How to comment

@ -33,14 +33,13 @@ def make_numbered_text(input_text, output_html):
x = 1 x = 1
with open(output_html, 'w') as new_html: # open the output_html with writing only as new_html with open(output_html, 'w') as new_html: # open the output_html with writing only as new_html
new_html.write('<html><head><link rel="stylesheet" href="style.css" type="text/css"/><meta ' new_html.write('<html><head><link rel="stylesheet" href="style.css" type="text/css"/><meta charset="utf-8"/><link rel="stylesheet" type="text/css" media="screen" href="https://cdn.conversejs.org/4.2.0/css/converse.min.css"><script src="https://cdn.conversejs.org/4.2.0/dist/converse.min.js" charset="utf-8"></script></head><body>')
'charset="utf-8"/></head><body>')
for line in lines: # for each line in the list of lines for line in lines: # for each line in the list of lines
new_html.write( new_html.write(
'<div class="linenum" id="linenum-{}"><div class="leftcolumn" id="leftcolumn-{}"><div class="linenumber">{}</div><div class="sentence">{}</div></div></div>'.format( '<div class="linenum" id="linenum-{}"><div class="leftcolumn" id="leftcolumn-{}"><div class="linenumber">{}</div><div class="sentence">{}</div></div></div>'.format(
x, x, x, line)) x, x, x, line))
x = x + 1 x = x + 1
new_html.write('</body></html>') new_html.write('</body><script>converse.initialize({bosh_service_url: "https://conversejs.org/http-bind/", show_controlbox_by_default: true});</script></html>')
print('I wrote a file', output_html) print('I wrote a file', output_html)

@ -7,7 +7,7 @@
} }
body{ body{
font-size: 13px; font-size: 17px;
line-height: 1.4em line-height: 1.4em
} }
@ -29,7 +29,7 @@
} }
.comment{ .comment{
width: 30%; width: 40%;
font-size: 10pt; font-size: 10pt;
line-height: 1.5em; line-height: 1.5em;
/* column-count:3; /* column-count:3;
@ -51,13 +51,13 @@
.leftcolumn { .leftcolumn {
font:black; font:black;
width: 30%; float: left; width: 50%; float: left;
display: inline-flex; display: inline-flex;
} }
.rightcolumn { .rightcolumn {
float: right; float: right;
width: 70% width: 50%
} }
/* unvisited link */ /* unvisited link */
@ -90,7 +90,7 @@
} }
img:hover{ img:hover{
max-width: 50%; max-width: 100%;
} }

Loading…
Cancel
Save