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", {host, "jmc.localhost",
[{password, "secret"}]}]} [{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 : Usage :
@@ -22,28 +23,29 @@ Feedback :
Send me feedback and comments to dax at happycoders dot org Send me feedback and comments to dax at happycoders dot org
Utils : Utils (in src/utils directory) :
- backend_converter.py convert from one storage type to another. - 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. -> give you the list of supported types.
example of usage :
$ python utils/backend_converter.py \ Example of usage :
$ python jmc_converter.py \
DBM \ DBM \
registered.db \ registered.db \
SQLite \ SQLite \
registered.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 (registered.sqlite). Once converted, the new file copied in
${spool_dir}/${service}/registered.db where ${spool_dir} and ${spool_dir}/${service}/registered.db where ${spool_dir} and
${service} are defined in jmc.xml configuration file. ${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> <secret>secret</secret>
<service>jmc.localhost</service> <service>jmc.localhost</service>
<connectsleep>5</connectsleep> <connectsleep>5</connectsleep>
<!-- check jabber/lang.py for available languages --> <!-- check jmc/utils/lang.py for available languages -->
<language>fr</language> <language>fr</language>
<vCard> <vCard>
<FN>Jabber Mail Component</FN> <FN>Jabber Mail Component</FN>

View File

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

View File

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