build detritus should not have gotten in there
authorAndrew Sutherland <asutherland@asutherland.org>
Sat, 10 Jan 2009 04:58:00 -0800
changeset 2 890da575d7b0cd3d340e4c2ad84a404a15890dd8
parent 1 d331fe76fbda9a052dc617db58df359a5d3e24e9
child 3 84f4b77c4e159eefacca9355e31cf30428727fe6
push id1
push userroot
push dateWed, 08 Apr 2009 01:46:05 +0000
build detritus should not have gotten in there
server/python/build/lib/junius/__init__.py
server/python/build/lib/junius/bootstrap.py
server/python/build/lib/junius/getmail.py
server/python/build/lib/junius/model.py
deleted file mode 100644
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()