aboutsummaryrefslogtreecommitdiff
path: root/utils.py
diff options
context:
space:
mode:
authorcedricbonhomme <devnull@localhost>2012-03-09 08:13:21 +0100
committercedricbonhomme <devnull@localhost>2012-03-09 08:13:21 +0100
commit0e8780ff6ba24cc0b370037e71a9c6aa25bca192 (patch)
tree75cea6d48e04faed448a42562bb9a692af1f8442 /utils.py
parentUpdated revision date. (diff)
downloadnewspipe-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-xutils.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/utils.py b/utils.py
index 07f39808..2c16f50c 100755
--- a/utils.py
+++ b/utils.py
@@ -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_\\$\\.\\+\\!\\*\\(\\),;:@&=\\?/~\\#\\%]*[^]'\\.}>\\),\\\"]"), \
bgstack15