deleted file mode 100644
--- a/server/python/build/lib/junius/bootstrap.py
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/usr/bin/env python
-
-'''
-Setup the CouchDB server so that it is fully usable and what not.
-'''
deleted file mode 100644
--- a/server/python/build/lib/junius/getmail.py
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/usr/bin/env python
-
-from gocept.imapapi.account import Account
-
-import junius.model as model
-
-'''
-Fetch new mail.
-'''
-
-class JuniusAccount(object):
- def __init__(self, *args):
- self.acct = Account(*args)
-
- def sync(self):
- inbox = self.acct.folders['INBOX']
- print 'Folder', inbox
- for m in inbox.messages.values():
- print m
- self.grok_part(m, m.body)
-
- def grok_part(self, msg, part, depth=0):
- ct = part['content_type']
- if ct.startswith('multipart/'):
- print '..' * depth, ct, part
- for subpart in part.parts:
- self.grok_part(msg, subpart, depth+1)
- elif ct.startswith('text/'):
- print ' ' * depth, ct, part
- elif ct == 'message/rfc822':
- print ' ' * depth, ct, part.headers
- else:
- print '00' * depth, ct, part
-
-if __name__ == '__main__':
- import os
- #acct = JuniusAccount('localhost', 8143, os.environ['USER'], 'pass')
- acct = JuniusAccount('localhost', 10143, 'test', 'bsdf')
- acct.sync()
deleted file mode 100644
--- a/server/python/build/lib/junius/model.py
+++ /dev/null
@@ -1,51 +0,0 @@
-from couchdb import schema
-
-class Account(schema.document):
- kind = schema.TextField()
- host = schema.TextField()
- port = schema.IntegerField()
- username = schema.TextField()
- password = schema.TextField()
- ssl = schema.BooleanField()
-
-class Contact(schema.Document):
- name = schema.TextField()
- identities = schema.ListField(Schema.build(
- kind = schema.TextField(),
- value = schema.TextField()
- ))
- #: expose contacts by their identities
- by_identity = View('by_identity', '''\
- function(doc) {
- for each (var identity in doc.identities) {
- emit([identity.kind, identity.value], doc);
- }
- }''')
- #: expose all suffixes of the contact name and identity values
- by_suffix = View('by_suffix', '''\
- function(doc) {
- var i;
- for each (i = 0; i < doc.name.length; i++)
- emit(doc.name.substring(i), doc._id);
- for each (var identity in doc.identities) {
- for each (i = 0; i < identity.value.length; i++) {}
- emit(identity.value.substring(i), doc._id);
- }
- }
- }''')
-
-class Message(schema.Document):
- from_contact_id = schema.TextField()
- to_contact_ids = schema.ListField(schema.TextField())
- cc_contact_ids = schema.ListField(schema.TextField())
-
- message_id = schema.TextField()
-
- conversation_id = schema.TextField()
-
- date = schema.DateTimeField()
- ts = schema.IntegerField()
-
- headers = schema.DictField(Schema.build())
- parts = schema.ListField(Schema.build())
- raw = schema.TextField()