Beispiel #1
0
    def __init__(self, myinfra, name):
        self.name = name
        self.instancedir = os.path.join(myinfra.wikidir, name)
        self.configdir = os.path.join(self.instancedir, 'config')
        sys.path.insert(0, self.configdir)

        from MoinMoin import log

        log.load_config(myinfra.logconf)
Beispiel #2
0
"""

import sys, os

# a) Configuration of Python's code search path
#    If you already have set up the PYTHONPATH environment variable for the
#    stuff you see below, you don't need to do a1) and a2).

# a1) Path of the directory where the MoinMoin code package is located.
#     Needed if you installed with --prefix=PREFIX or you didn't use setup.py.
#sys.path.insert(0, 'PREFIX/lib/python2.4/site-packages')

# a2) Path of the directory where wikiconfig.py / farmconfig.py is located.
moinpath = os.path.abspath(os.path.normpath(os.path.dirname(sys.argv[0])))
sys.path.insert(0, moinpath)
os.chdir(moinpath)

# b) Configuration of moin's logging
#    If you have set up MOINLOGGINGCONF environment variable, you don't need this!
#    You also don't need this if you are happy with the builtin defaults.
#    See wiki/config/logging/... for some sample config files.
from MoinMoin import log
log.load_config('wikiserverlogging.conf')

from MoinMoin.script import MoinScript

if __name__ == '__main__':
    sys.argv = ["moin.py", "server", "standalone"]
    MoinScript().run()

Beispiel #3
0
    @copyright: 2014 Ossi Salmi
    @license: MIT <http://www.opensource.org/licenses/mit-license.php>
"""

import os
import sys
import errno
import posix
import pwd

from collabbackend import CollabBackend

backend = CollabBackend()

from MoinMoin import log
log.load_config(backend.logconf)

import MoinMoin.web.contexts
from MoinMoin.user import User
from MoinMoin.config import multiconfig

from graphingwiki import RequestCLI


class CollabRequest(object):
    def __init__(self, collab=None, user=None, backend=backend):
        farmconf = backend.config.get("collab", "farmconf")
        self.farmconfdir = os.path.dirname(farmconf)
        self.request = None

        if collab:
Beispiel #4
0
# a1) Path of the directory where the MoinMoin code package is located.
#     Needed if you installed with --prefix=PREFIX or you didn't use setup.py.
# sys.path.insert(0, 'PREFIX/lib/python2.3/site-packages')

# a2) Path of the directory where wikiconfig.py / farmconfig.py is located.
moinpath = os.path.abspath(os.path.normpath(os.path.dirname(sys.argv[0])))
sys.path.insert(0, moinpath)
os.chdir(moinpath)

# b) Configuration of moin's logging
#    If you have set up MOINLOGGINGCONF environment variable, you don't need this!
#    You also don't need this if you are happy with the builtin defaults.
#    See wiki/config/logging/... for some sample config files.
from MoinMoin import log

log.load_config("wikiserverlogging.conf")

# Debug mode - show detailed error reports
# os.environ['MOIN_DEBUG'] = '1'

from MoinMoin.script import MoinScript

if __name__ == "__main__":
    # sys.argv = ["moin.py", "server", "standalone"]
    # MoinScript().run()
    #
    # Cleaner version that doesn't pollute sys.argv -- steve.yen
    #
    MoinScript(["server", "standalone"]).run()