Added be-mbox-to-xml.
authorW. Trevor King <wking@drexel.edu>
Sun, 12 Jul 2009 12:38:40 +0000 (08:38 -0400)
committerW. Trevor King <wking@drexel.edu>
Sun, 12 Jul 2009 12:38:40 +0000 (08:38 -0400)
commit76d552e5401df990a601f245f30f45d7c13cdd1e
tree5c510a12e8cb3df1dd5d30cd5aebb6b7938e2ceb
parenta65b273fa14df2a085342bac14abb8a2167ff98a
Added be-mbox-to-xml.

Reworked to allow "be comment" to handle unicode strings (see bug
e4ed63f6-9000-4d0b-98c3-487269140141).  The solution was to escape all
the unicode to produce and ASCII string before calling
ElementTree.XML, and then converting back to unicode afterwards.

Added a unicode-containing comment to the end of bug
f7ccd916-b5c7-4890-a2e3-8c8ace17ae3a so that there's a handy unicode
comment for testing.

XML headers (e.g. '<?xml version="1.0" encoding="UTF-8" ?>') are
now added to all xml output from be.

Switched non-text/* encoding library to base64 instead of
email.encoders, which makes that code in libbe/comment.py simpler.

Changed libbe/mapfile.py error encoding from string_escape to
unicode_escape so it can handle unicode.

Everything's still untested, and be-xml-to-mbox doesn't handle unicode
yet, but I felt this commit was getting a bit unwieldy ;).
21 files changed:
.be/bugs/e4ed63f6-9000-4d0b-98c3-487269140141/comments/07fc448f-c42e-4846-929a-8924de485766/body [new file with mode: 0644]
.be/bugs/e4ed63f6-9000-4d0b-98c3-487269140141/comments/07fc448f-c42e-4846-929a-8924de485766/values [new file with mode: 0644]
.be/bugs/e4ed63f6-9000-4d0b-98c3-487269140141/comments/520a9829-8d90-43ce-be64-868b8321e5b0/body [new file with mode: 0644]
.be/bugs/e4ed63f6-9000-4d0b-98c3-487269140141/comments/520a9829-8d90-43ce-be64-868b8321e5b0/values [new file with mode: 0644]
.be/bugs/e4ed63f6-9000-4d0b-98c3-487269140141/comments/8b54e56e-c693-4594-998f-5bd6c1f385d7/body [new file with mode: 0644]
.be/bugs/e4ed63f6-9000-4d0b-98c3-487269140141/comments/8b54e56e-c693-4594-998f-5bd6c1f385d7/values [new file with mode: 0644]
.be/bugs/e4ed63f6-9000-4d0b-98c3-487269140141/comments/bb124fd9-08f5-4f82-a035-6355e8403075/body [new file with mode: 0644]
.be/bugs/e4ed63f6-9000-4d0b-98c3-487269140141/comments/bb124fd9-08f5-4f82-a035-6355e8403075/values [new file with mode: 0644]
.be/bugs/e4ed63f6-9000-4d0b-98c3-487269140141/comments/faa686bf-c0eb-48bf-8a0b-d9a2e02bd132/body [new file with mode: 0644]
.be/bugs/e4ed63f6-9000-4d0b-98c3-487269140141/comments/faa686bf-c0eb-48bf-8a0b-d9a2e02bd132/values [new file with mode: 0644]
.be/bugs/e4ed63f6-9000-4d0b-98c3-487269140141/values [new file with mode: 0644]
.be/bugs/f7ccd916-b5c7-4890-a2e3-8c8ace17ae3a/comments/028d2e8d-5b0f-4c43-a913-35a1709b2276/values
.be/bugs/f7ccd916-b5c7-4890-a2e3-8c8ace17ae3a/comments/15602c0c-25e4-4c2c-9e24-79bdb90721b1/values
.be/bugs/f7ccd916-b5c7-4890-a2e3-8c8ace17ae3a/comments/3f556a48-c538-4569-8609-3e829b561d78/values
.be/bugs/f7ccd916-b5c7-4890-a2e3-8c8ace17ae3a/comments/f376debf-9f7e-4347-807f-00e7263487c7/body [new file with mode: 0644]
.be/bugs/f7ccd916-b5c7-4890-a2e3-8c8ace17ae3a/comments/f376debf-9f7e-4347-807f-00e7263487c7/values [new file with mode: 0644]
becommands/comment.py
becommands/show.py
libbe/comment.py
libbe/mapfile.py
xml/be-mbox-to-xml [new file with mode: 0755]