X-Git-Url: https://git.phdru.name/?p=bookmarks_db.git;a=blobdiff_plain;f=robots.py;h=3efb8f02de8dcee0a4b3429a474c160992b8d8d6;hp=c979f93ea9c7753b47598510549b1f4a4650bb63;hb=96e39d55c791326368ff14d538850e14ba5a2c97;hpb=fb5c3b2b91aeeb615d6d6d890491af3fdff69556 diff --git a/robots.py b/robots.py index c979f93..3efb8f0 100644 --- a/robots.py +++ b/robots.py @@ -1,10 +1,20 @@ -""" - Thin wrapper for module Robots. Provides "default" robot +"""Thin wrapper for module Robots. Provides "default" robot + +This file is a part of Bookmarks database and Internet robot. + """ +__author__ = "Oleg Broytman " +__copyright__ = "Copyright (C) 1997-2014 PhiloSoft Design" +__license__ = "GNU GPL" + +__all__ = ['import_robot', 'robot'] + from os import environ -robot_name = environ.get("BKMK_ROBOT", "forking") +from bkmk_objects import parse_params, set_params + +robot_name, robot_params = parse_params(environ.get("BKMK_ROBOT", "forking")) def import_robot(robot_name): exec "from Robots import bkmk_r%s" % robot_name @@ -12,3 +22,4 @@ def import_robot(robot_name): return robot robot = import_robot(robot_name) +set_params(robot, robot_params)