Skip to content

Commit b855016

Browse files
committed
Add README and LICENSE.
1 parent f62645b commit b855016

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Copyright (c) 2013 Victor Vasiliev
2+
3+
Permission is hereby granted, free of charge, to any person obtaining
4+
a copy of this software and associated documentation files (the
5+
"Software"), to deal in the Software without restriction, including
6+
without limitation the rights to use, copy, modify, merge, publish,
7+
distribute, sublicense, and/or sell copies of the Software, and to
8+
permit persons to whom the Software is furnished to do so, subject to
9+
the following conditions:
10+
11+
The above copyright notice and this permission notice shall be included
12+
in all copies or substantial portions of the Software.
13+
14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21+

README

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
== pydiscuss ==
2+
3+
pydiscuss is a pure-Python implementation of Project Athena forum protocol
4+
called discuss. It aims to work well with the existing servers, although
5+
as a clean-start implementation it may not handle several edge cases correctly.
6+
7+
=== Example code ===
8+
9+
import discuss
10+
11+
# Open connection to the server
12+
cl = discuss.Client("charon.mit.edu")
13+
14+
# Pick our meeting
15+
mtg = discuss.Meeting(cl, "/var/spool/discuss/vasilvv-test")
16+
17+
# Read the description
18+
mtg.load_info()
19+
print mtg.long_name
20+
21+
# Read all the transaction headers and print them
22+
for trn in mtg.transactions():
23+
print "[%i] %s <%s (%s)>" % (trn.number, trn.subject, trn.signature, trn.author)
24+
25+
# Print the text of the last one
26+
print "----- Text -----"
27+
print mtg.get_transaction(mtg.last).get_text()
28+

0 commit comments

Comments
 (0)