some other refactoring

darcs-hash:20060731213234-86b55-5cfb1336e4fe7c680cd01427f19dc425805ea4d1.gz
This commit is contained in:
David Rousselie
2006-07-31 23:32:34 +02:00
parent 8c7fc43a4b
commit f8d0151c85
6 changed files with 17 additions and 15 deletions

22
README
View File

@@ -9,7 +9,8 @@ Installation :
{host, "jmc.localhost",
[{password, "secret"}]}]}
- then run python jmc.py -c jmc.xml (-D to get debug)
- then run (in src directory):
$ python jmc.py -c jmc.xml (-D to get debug)
Usage :
@@ -22,28 +23,29 @@ Feedback :
Send me feedback and comments to dax at happycoders dot org
Utils :
- backend_converter.py convert from one storage type to another.
Utils (in src/utils directory) :
- jmc_converter.py convert from one storage type to another.
$ python utils/backend_converter.py
$ python jmc_converter.py
give you the list of supported types.
example of usage :
-> give you the list of supported types.
$ python utils/backend_converter.py \
Example of usage :
$ python jmc_converter.py \
DBM \
registered.db \
SQLite \
registered.sqlite
converts a DBM file (registered.db) to a SQLite file
-> converts a DBM file (registered.db) to a SQLite file
(registered.sqlite). Once converted, the new file copied in
${spool_dir}/${service}/registered.db where ${spool_dir} and
${service} are defined in jmc.xml configuration file.
- backend_dump.py dump a db file. example :
- jmc_dump.py dump a db file. example :
$ python utils/backend_dump.py DBM registered.db
$ python jmc_dump.py DBM registered.db

View File

@@ -5,7 +5,7 @@
<secret>secret</secret>
<service>jmc.localhost</service>
<connectsleep>5</connectsleep>
<!-- check jabber/lang.py for available languages -->
<!-- check jmc/utils/lang.py for available languages -->
<language>fr</language>
<vCard>
<FN>Jabber Mail Component</FN>

View File

@@ -29,10 +29,9 @@ import logging
reload(sys)
sys.setdefaultencoding('utf-8')
del sys.setdefaultencoding
from jmc import mailconnection
from jmc.component import MailComponent, ComponentFatalError
from jmc.config import Config
from jmc.email import mailconnection
from jmc.jabber.component import MailComponent, ComponentFatalError
from jmc.utils.config import Config
def main(config_file = "jmc.xml", isDebug = 0):
try:

View File

@@ -32,6 +32,7 @@ import os
import time
import traceback
import jmc.email.mailconnection as mailconnection
from jmc.email.mailconnection import *
from jmc.jabber.x import *
from jmc.utils.storage import *