Beispiel #1
0
def cb_start(args):
    request = args["request"]
    config = request.getConfiguration()
    logdir = config.get("logdir", "/tmp")
    logfile = os.path.normpath(logdir + os.sep + "metaweblog.log")

    tools.make_logger(logfile)
def cb_start(args):
    request = args["request"]
    config = request.getConfiguration()
    logdir = config.get("logdir", "/tmp")
    logfile = os.path.normpath(logdir + os.sep + "metaweblog.log")

    tools.make_logger(logfile)
Beispiel #3
0
def cb_start_deactivate(args):
    """if you want to activate a log for debugging, remove the "_deactivate"
    from the name of this function and edit the file names below to your 
    liking. Then simply put a log('mystring') call anywhere you want in this
    or any other pyblosxom file.
    """
    global log
    if sys.platform == 'win32':
        tools.make_logger('c:/code/web/blox_devel/pyblosxom/log/pi.out')
        log = tools.log
    else:
        tools.make_logger('/c/code/web/cleanblox/log/npi.out')
        log = tools.log
def cb_start_deactivate(args):
    """if you want to activate a log for debugging, remove the "_deactivate"
    from the name of this function and edit the file names below to your 
    liking. Then simply put a log('mystring') call anywhere you want in this
    or any other pyblosxom file.
    """
    global log
    if sys.platform == 'win32':
        tools.make_logger('c:/code/web/blox_devel/pyblosxom/log/pi.out')
        log = tools.log
    else:
        tools.make_logger('/c/code/web/cleanblox/log/npi.out')
        log = tools.log
Beispiel #5
0
def cb_start(args):
    request = args["request"]
    config = request.getConfiguration()
    logdir = config.get("logdir", "/tmp/")

    logfile = os.path.normpath(logdir + os.sep + "comments.log")
    tools.make_logger(logfile)

    if not config.has_key('comment_dir'):
        config['comment_dir'] = os.path.join(config['datadir'], 'comments')
    if not config.has_key('comment_ext'):
        config['comment_ext'] = 'cmt'
    if not config.has_key('comment_draft_ext'):
        config['comment_draft_ext'] = config['comment_ext']
Beispiel #6
0
def cb_start(args):
    request = args["request"]
    config = request.getConfiguration()
    logdir = config.get("logdir", "/tmp/")

    logfile = os.path.normpath(logdir + os.sep + "comments.log")
    tools.make_logger(logfile)

    if not config.has_key('comment_dir'):
        config['comment_dir'] = os.path.join(config['datadir'],'comments')
    if not config.has_key('comment_ext'):
        config['comment_ext'] = 'cmt'
    if not config.has_key('comment_draft_ext'):
        config['comment_draft_ext'] = config['comment_ext']
Beispiel #7
0

import re, sgmllib, sys, urllib, xmlrpclib
from xml.sax import parseString, SAXParseException
from xml.sax.handler import ContentHandler
import cPickle, os, os.path

# Get our pyblosxom specifics here
from Pyblosxom import tools
from Pyblosxom.pyblosxom import blosxom_entry_parser
from Pyblosxom.Request import Request
import config

logdir = config.get("logdir", "/tmp")
logfile = os.path.normpath(logdir + os.sep + "autoping.log")
tools.make_logger(logfile)

def excerpt(filename, title, body, blogname):
    """ filename,title,body => url,args

    Excerpt the body and urlencode the trackback arguments.
    """

    body = re.split('<div\s+class="excerpt">(.*?)<\/div>',body)[:2][-1]

    body = re.sub('\n',' ',body)
    body = re.sub('&nbsp;',' ',body)
    body = re.sub('^(<p>)?<a\s+href="\S+">[\w\s\.]+<\/a>:\s*','',body)
    body = re.sub('<em>.*?<\/em>\.?\s*','',body)
    body = re.sub('<.*?>','',body)
Beispiel #8
0
py['meta_dir'] directory, as meta does not yet (v0.1) notice if files have
been updated.

There are no configuration options for this plugin."""

__author__ = "Bill Mill - [email protected]"
__version__ = "0.1"
__url__ = "http://llimllib.f2o.org/blog"
__description__ = "Allows you to change a blog entry's time"

from meta import metasearch
from Pyblosxom import tools
import time, sys

if sys.platform == 'win32':
    tools.make_logger('c:/code/web/newf2o/blog/log/log.out')
    log = tools.log
else:
    log = lambda x: None


def cb_prepare(args):
    """Checks to see if an entry has its time set inside the file. If it does,
    set the time correctly and reorder the files to be displayed.

    @param args: The pyBlosxom request object
    @type args: Dictionary

    @return: stores data in the request.data['entry_list'] list
    """
    log('prepare')
Beispiel #9
0
py['meta_dir'] directory, as meta does not yet (v0.1) notice if files have
been updated.

There are no configuration options for this plugin."""

__author__ = "Bill Mill - [email protected]"
__version__ = "0.1"
__url__ = "http://llimllib.f2o.org/blog"
__description__ = "Allows you to change a blog entry's time"

from meta import metasearch
from Pyblosxom import tools
import time, sys

if sys.platform == 'win32':
    tools.make_logger('c:/code/web/newf2o/blog/log/log.out')
    log = tools.log
else: log = lambda x: None

def cb_prepare(args):
    """Checks to see if an entry has its time set inside the file. If it does,
    set the time correctly and reorder the files to be displayed.

    @param args: The pyBlosxom request object
    @type args: Dictionary

    @return: stores data in the request.data['entry_list'] list
    """
    log('prepare')
    request = args["request"]
    data = request.getData()