Exemple #1
0
    def test_practical(self):
        config = "/Users/ecco/APPS/resydes/resydes/conf2/config.txt"
        sources = "/Users/ecco/APPS/resydes/desmap.txt"
        task = "discover"
        once = True

        runner = DesRunner(config_filename=config)
        runner.run(sources, task, once)
Exemple #2
0
    def test_practical(self):
        config = "/Users/ecco/APPS/resydes/resydes/conf2/config.txt"
        sources = "/Users/ecco/APPS/resydes/desmap.txt"
        task = "discover"
        once = True

        runner = DesRunner(config_filename=config)
        runner.run(sources, task, once)
Exemple #3
0
    def test_inject_dependencies(self):
        Config.__set_config_filename__("test-files/config.txt")
        Config().__set_prop__(
            Config.key_des_processor_listeners,
            "des.processor_listener.SitemapWriter, des.processor.ProcessorListener"
        )

        runner = DesRunner()
        self.assertEqual(2, len(des.processor.processor_listeners))
Exemple #4
0
#! /usr/bin/env python3
# -*- coding: utf-8 -*-

import argparse
from des.desrunner import DesRunner

print("================= Resydes version 0.1 =================")

task_choices = ['discover', 'wellknown', 'capability']
parser = argparse.ArgumentParser(description="Run a ResourceSync Destination.",
                                     formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument("-s", "--sources", help="the name of the file with source urls", default="conf/sources.txt")
parser.add_argument("-c", "--config", help="the configuration filename", default="conf/config.txt", metavar="")
parser.add_argument("-t", "--task", help="the task that should be run. " + str(task_choices), default="discover",
                        choices=task_choices, metavar="")
parser.add_argument("-o", "--once", help="explore source urls once and exit", action="store_true")

args = parser.parse_args()

runner = DesRunner(config_filename=args.config)
runner.run(args.sources, args.task, args.once)

Exemple #5
0
print("================= Resydes version 0.1 =================")

task_choices = ['discover', 'wellknown', 'capability']
parser = argparse.ArgumentParser(
    description="Run a ResourceSync Destination.",
    formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument("-s",
                    "--sources",
                    help="the name of the file with source urls",
                    default="conf/sources.txt")
parser.add_argument("-c",
                    "--config",
                    help="the configuration filename",
                    default="conf/config.txt",
                    metavar="")
parser.add_argument("-t",
                    "--task",
                    help="the task that should be run. " + str(task_choices),
                    default="discover",
                    choices=task_choices,
                    metavar="")
parser.add_argument("-o",
                    "--once",
                    help="explore source urls once and exit",
                    action="store_true")

args = parser.parse_args()

runner = DesRunner(config_filename=args.config)
runner.run(args.sources, args.task, args.once)