X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=Robots%2Fbkmk_rforking_sub.py;h=9b25b5b98e5bd28d514c84c21f735ae5f9d77ae7;hb=HEAD;hp=73956e246d6b02342e3256248bc7e90639c8b501;hpb=9d989c8c9ebd7f13e9f0fdc95fa139c99ed83387;p=bookmarks_db.git diff --git a/Robots/bkmk_rforking_sub.py b/Robots/bkmk_rforking_sub.py deleted file mode 100755 index 73956e2..0000000 --- a/Robots/bkmk_rforking_sub.py +++ /dev/null @@ -1,49 +0,0 @@ -#! /usr/bin/env python -"""Subprocess for the forking robot - check URL using bkmk_rurlib robot - -This file is a part of Bookmarks database and Internet robot. - -""" - -__author__ = "Oleg Broytman " -__copyright__ = "Copyright (C) 1999-2014 PhiloSoft Design" -__license__ = "GNU GPL" - -__all__ = [] - - -import sys, os - -lib_dir = os.path.normpath(os.path.dirname(sys.argv[0]) + os.sep + os.pardir) -sys.path.append(lib_dir) # for bkmk_objects.py - -try: - import cPickle - pickle = cPickle -except ImportError: - import pickle - -from subproc import RecordFile - - -def run(): - bkmk_in = RecordFile(sys.stdin) - bkmk_out = RecordFile(sys.stdout) - - from m_lib.flog import openlog - log = openlog("check2.log") - from bkmk_rurllib import robot_urllib - robot = robot_urllib(log) - - while 1: - bookmark = pickle.loads(bkmk_in.read_record()) - log(bookmark.href) - robot.check_url(bookmark) - bkmk_out.write_record(pickle.dumps(bookmark)) - log.outfile.flush() - - log.close() - - -if __name__ == '__main__': - run()