Beispiel #1
0
from os import path

from ometa.grammar import OMeta
from ometa.runtime import OMetaBase
from parsley import wrapGrammar

from activate import cy_path


with open(cy_path('cyder/search/compiler/search.parsley')) as g:
    B = OMeta.makeGrammar(g.read()).createParserClass(OMetaBase, globals())


class ICompiler(B):
    def directive(self, d, v):
        raise NotImplemented()

    def mac_addr(self, addr):
        raise NotImplemented()

    def regexpr(self, r):
        raise NotImplemented()

    def text(self, t):
        raise NotImplemented()

    def compile(self, initial, values):
        raise NotImplemented()

    def OR_op(self, a, b):
        raise NotImplemented()
Beispiel #2
0
HAS_SYSLOG = True
SYSLOG_TAG = 'cyder'  # Change this after you fork.
LOGGING_CONFIG = None
LOGGING = {}

# CEF Logging
CEF_PRODUCT = 'Cyder'
CEF_VENDOR = 'Oregon State University'
CEF_VERSION = '0'
CEF_DEVICE_VERSION = '0'

## Accepted locales

# Tells the product_details module where to find our local JSON files.
# This ultimately controls how LANGUAGES are constructed.
PROD_DETAILS_DIR = cy_path('lib/product_details_json')

# On dev instances, the list of accepted locales defaults to the contents of
# the `locale` directory within a project module or, for older Playdoh apps,
# the root locale directory.  A localizer can add their locale in the l10n
# repository (copy of which is checked out into `locale`) in order to start
# testing the localization on the dev server.
try:
    DEV_LANGUAGES = [
        path.basename(loc).replace('_', '-') for loc in itertools.chain(
            glob.iglob(cy_path('locale/*')),  # old style
            glob.iglob(cy_path('*/locale/*')))
        if path.isdir(loc) and path.basename(loc) != 'templates'
    ]
except OSError:
    DEV_LANGUAGES = ('en-US', )
Beispiel #3
0
from os import path

from ometa.grammar import OMeta
from ometa.runtime import OMetaBase
from parsley import wrapGrammar

from activate import cy_path

with open(cy_path('cyder/search/compiler/search.parsley')) as g:
    B = OMeta.makeGrammar(g.read()).createParserClass(OMetaBase, globals())


class ICompiler(B):
    def directive(self, d, v):
        raise NotImplemented()

    def mac_addr(self, addr):
        raise NotImplemented()

    def regexpr(self, r):
        raise NotImplemented()

    def text(self, t):
        raise NotImplemented()

    def compile(self, initial, values):
        raise NotImplemented()

    def OR_op(self, a, b):
        raise NotImplemented()
Beispiel #4
0
HAS_SYSLOG = True
SYSLOG_TAG = 'cyder'  # Change this after you fork.
LOGGING_CONFIG = None
LOGGING = {}

# CEF Logging
CEF_PRODUCT = 'Cyder'
CEF_VENDOR = 'Oregon State University'
CEF_VERSION = '0'
CEF_DEVICE_VERSION = '0'

## Accepted locales

# Tells the product_details module where to find our local JSON files.
# This ultimately controls how LANGUAGES are constructed.
PROD_DETAILS_DIR = cy_path('lib/product_details_json')

# On dev instances, the list of accepted locales defaults to the contents of
# the `locale` directory within a project module or, for older Playdoh apps,
# the root locale directory.  A localizer can add their locale in the l10n
# repository (copy of which is checked out into `locale`) in order to start
# testing the localization on the dev server.
try:
    DEV_LANGUAGES = [
        path.basename(loc).replace('_', '-')
        for loc in itertools.chain(
            glob.iglob(cy_path('locale/*')),  # old style
            glob.iglob(cy_path('*/locale/*')))
        if path.isdir(loc) and path.basename(loc) != 'templates'
    ]
except OSError: