diff options
author | cedricbonhomme <devnull@localhost> | 2012-03-09 08:13:21 +0100 |
---|---|---|
committer | cedricbonhomme <devnull@localhost> | 2012-03-09 08:13:21 +0100 |
commit | 0e8780ff6ba24cc0b370037e71a9c6aa25bca192 (patch) | |
tree | 75cea6d48e04faed448a42562bb9a692af1f8442 /utils.py | |
parent | Updated revision date. (diff) | |
download | newspipe-0e8780ff6ba24cc0b370037e71a9c6aa25bca192.tar.gz newspipe-0e8780ff6ba24cc0b370037e71a9c6aa25bca192.tar.bz2 newspipe-0e8780ff6ba24cc0b370037e71a9c6aa25bca192.zip |
MongoDB configuration (address, port, username and password) is loaded at launch.
Diffstat (limited to 'utils.py')
-rwxr-xr-x | utils.py | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -72,15 +72,24 @@ try: except: config.read("./cfg/pyAggr3g470r.cfg-sample") path = os.path.abspath(".") + +MONGODB_ADDRESS = config.get('MongoDB', 'address') +MONGODB_PORT = int(config.get('MongoDB', 'port')) +MONGODB_USER = config.get('MongoDB', 'user') +MONGODB_PASSWORD = config.get('MongoDB', 'password') + sqlite_base = os.path.abspath(config.get('global', 'sqlitebase')) + MAX_NB_ARTICLES = int(config.get('global', 'max_nb_articles')) -DIASPORA_POD = config.get('misc', 'diaspora_pod') + mail_from = config.get('mail','mail_from') mail_to = config.get('mail','mail_to') smtp_server = config.get('mail','smtp') username = config.get('mail','username') password = config.get('mail','password') +DIASPORA_POD = config.get('misc', 'diaspora_pod') + # regular expression to chech URL url_finders = [ \ re.compile("([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}|(((news|telnet|nttp|file|http|ftp|https)://)|(www|ftp)[-A-Za-z0-9]*\\.)[-A-Za-z0-9\\.]+)(:[0-9]*)?/[-A-Za-z0-9_\\$\\.\\+\\!\\*\\(\\),;:@&=\\?/~\\#\\%]*[^]'\\.}>\\),\\\"]"), \ |