Beispiel #1
0
    def __init__(self, src):
        self.origin = ndict(
            fpath=str(),
            content=src
        )
        self.soup = BeautifulSoup(markdown(src), 'html.parser')

        self.handler = ndict(
            author=str(),
            title=str(),
            hnodes=None
        )

        self.settings = ndict(
            drawcode=False,
            show_directory_number=False
        )
Beispiel #2
0
# encoding:utf-8
from copy import deepcopy
import os.path
import logging

from ndict import ndict


PROJECT_PATH = os.path.dirname(os.path.abspath(__file__))

# New
CONFIG = ndict()
CONFIG.NAME = 'DEFAULT_CONFIG'
CONFIG.DEBUG = True
CONFIG.TESTING = False
CONFIG.PROJECT_PATH = os.path.dirname(os.path.abspath(__file__))

CONFIG.LOGGER = ndict()
CONFIG.LOGGER.LEVEL = logging.DEBUG
CONFIG.LOGGER.FORMAT = '%(asctime)s %(filename)s[%(lineno)d] %(name)s: %(message)s'
CONFIG.LOGGER.OUTPUT_DIRECTORY = os.path.join(PROJECT_PATH, 'output')

CONFIG.REDIS = ndict()
CONFIG.REDIS.HOST = '115.28.143.67'
CONFIG.REDIS.PASSWORD = '******'

CONFIG.RABBITMQ = ndict()
CONFIG.RABBITMQ.USER = '******'
CONFIG.RABBITMQ.PASSWD = 'fd2015'

CONFIG.TORNADO = ndict()
Beispiel #3
0
def echo_config(dict, prefix='CONFIG'):
    for item in dict.items():
        if isinstance(item[1], type(ndict())):
            echo_config(item[1], prefix + '.' + item[0])
        else:
            root_log.debug(prefix + '.' + str(item[0] + ': ' + str(item[1])))
Beispiel #4
0
# -*- coding: utf-8 -*-

import logging
from os import path
from copy import deepcopy

from ndict import ndict


PROJECT_PATH = path.dirname(path.dirname(path.abspath(__file__)))

CONFIG = ndict()
CONFIG.NAME = 'DEFAULT_CONFIG'
CONFIG.DEBUG = True
CONFIG.TESTING = False

CONFIG.LOGGER = ndict()
CONFIG.LOGGER.FORMAT = '%(asctime)s %(filename)s[%(lineno)d] %(name)s: %(message)s'
CONFIG.LOGGER.LEVEL = logging.DEBUG
CONFIG.LOGGER.OUTPUT_DIR = path.join(PROJECT_PATH, 'output')

CONFIG.SQLALCHEMY = ndict()
CONFIG.SQLALCHEMY.URL = r'sqlite:///%s' % path.join(PROJECT_PATH, 'magnolia.sqlite')

CONFIG.MYSQL = ndict()
CONFIG.MYSQL.HOST = '115.28.143.67'
CONFIG.MYSQL.PORT = 3306
CONFIG.MYSQL.USER = '******'
CONFIG.MYSQL.PASSWORD = '******'
CONFIG.MYSQL.DATABASE = 'fddb'
Beispiel #5
0
# encoding:utf-8
from copy import deepcopy
import os.path
import logging

from ndict import ndict

PROJECT_PATH = os.path.dirname(os.path.abspath(__file__))

# New
CONFIG = ndict()
CONFIG.NAME = 'DEFAULT_CONFIG'
CONFIG.DEBUG = True
CONFIG.TESTING = False
CONFIG.PROJECT_PATH = os.path.dirname(os.path.abspath(__file__))

CONFIG.LOGGER = ndict()
CONFIG.LOGGER.LEVEL = logging.DEBUG
CONFIG.LOGGER.FORMAT = '%(asctime)s %(filename)s[%(lineno)d] %(name)s: %(message)s'
CONFIG.LOGGER.OUTPUT_DIRECTORY = os.path.join(PROJECT_PATH, 'output')

CONFIG.REDIS = ndict()
CONFIG.REDIS.HOST = '115.28.143.67'
CONFIG.REDIS.PASSWORD = '******'

CONFIG.RABBITMQ = ndict()
CONFIG.RABBITMQ.USER = '******'
CONFIG.RABBITMQ.PASSWD = 'fd2015'

CONFIG.TORNADO = ndict()
CONFIG.TORNADO.PORT = '8887'
Beispiel #6
0
# -*- coding: utf-8 -*-

from ndict import ndict

# shopaccount service status
# 1-等待审核,2-正常使用,3-欠费停用,4-审核未通过,5-服务到期(续年费)
SERVICE_STATUS = ndict()
SERVICE_STATUS.WAIT_AUDIT = 1
SERVICE_STATUS.NORMAL = 2
SERVICE_STATUS.TUITION = 3
SERVICE_STATUS.AUDIT_NOT_PASS = 4
SERVICE_STATUS.EXPIRATION_DATA = 5
Beispiel #7
0
def echo_config(dict, prefix='CONFIG'):
    for item in dict.items():
        if isinstance(item[1], type(ndict())):
            echo_config(item[1], prefix + '.' + item[0])
        else:
            root_log.debug(prefix + '.' + str(item[0] + ': ' + str(item[1])))
Beispiel #8
0
 def echo_config(dict, prefix='CONFIG'):
     for item in dict.items():
         if isinstance(item[1], type(ndict())):
             echo_config(item[1], prefix + '.' + item[0])
         else:
             root_logger.debug('%s.%s: %s' % (prefix, item[0], item[1]))