diff --git a/README b/README index 63d60fc..505ee71 100644 --- a/README +++ b/README @@ -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 diff --git a/jmc.xml b/jmc.xml index b4515e3..a34aad1 100644 --- a/jmc.xml +++ b/jmc.xml @@ -5,7 +5,7 @@ secret jmc.localhost 5 - + fr Jabber Mail Component diff --git a/src/jmc/jmc.py b/src/jmc.py similarity index 95% rename from src/jmc/jmc.py rename to src/jmc.py index bc0802e..1b5aec1 100755 --- a/src/jmc/jmc.py +++ b/src/jmc.py @@ -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: diff --git a/src/jmc/jabber/component.py b/src/jmc/jabber/component.py index 8bf22c4..8616602 100644 --- a/src/jmc/jabber/component.py +++ b/src/jmc/jabber/component.py @@ -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 * diff --git a/src/utils/backend_converter.py b/src/utils/jmc_converter.py similarity index 100% rename from src/utils/backend_converter.py rename to src/utils/jmc_converter.py diff --git a/src/utils/backend_dump.py b/src/utils/jmc_dump.py similarity index 100% rename from src/utils/backend_dump.py rename to src/utils/jmc_dump.py