Changeset 58

Show
Ignore:
Timestamp:
10/09/06 21:47:39 (7 years ago)
Author:
max
Message:

Revised gconf-builder.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • util/gconf-builder

    r53 r58  
    1616 
    1717die "I don't think so.\n" if ($grabber eq 'shepherd'); 
     18 
     19print   "\nCATEGORY: Grabber Type\n\n" . 
     20        "Grabbers generally fall into two categories:\n" . 
     21        "(1) Grabbers that fetch detailed data by downloading one page\n" . 
     22        "    per show\n" . 
     23        "(2) Grabbers that either cannot fetch detailed data, or fetch\n" . 
     24        "    it for many shows with each download (e.g. one download\n" . 
     25        "    per day, or one download for all shows)\n" . 
     26        "Category 1 grabbers tend to be slow and use relatively large\n" . 
     27        "amounts of bandwidth. Category 2 grabbers are quite fast\n" . 
     28        "and download relatively few files.\n\n"; 
     29$config->{category} = ask("Which category is $grabber?"); 
    1830 
    1931print   "\nCATEGORY: Channels Supported\n\n" . 
     
    2941 
    3042print   "\nCATEGORY: Days Supported\n\n" . 
    31         "Enter the maximum number of days into the future $grabber\n" . 
    32         "can retrieve. The current day is considered to be day 1.\n\n"; 
     43        "Enter how many days of data $grabber can retrieve. The current\n" . 
     44        "day is considered to be day 1.\n\n"; 
    3345 
    3446$config->{max_days} = ask("Days supported? [default=7]"); 
    3547$config->{max_days} ||= 7; 
     48 
     49print   "\nSome grabbers aren't always able to retrieve the maximum number\n" . 
     50        "of days, because sometimes the datasource isn't topped up. Enter\n" . 
     51        "the minimum number of days of data that $grabber can reliably fetch,\n" . 
     52        "where today is day 1.\n\n"; 
     53 
     54$config->{min_days} = ask("Minimum days supported? [default=7]"); 
     55$config->{min_days} ||= 7; 
    3656 
    3757print   "\nCATEGORY: Configuration Requirements\n\n" . 
     
    4060 
    4161$config->{config_reqd} = ask_boolean("Requires manual configuration? "); 
     62 
     63if ($config->{config_reqd}) 
     64{ 
     65    print   "\nShepherd needs a way of detecting whether $grabber has been\n" . 
     66            "correctly configured or not. Please enter a command-line option\n" . 
     67            "that will cause $grabber to exit with status 0 if it is configured\n" . 
     68            "correctly, and exit with another status if it is not.\n\n"; 
     69    $config->{option_ready} = ask("Command-line option for readiness? [default=--ready]"); 
     70    $config->{option_ready} ||= '--ready'; 
     71} 
     72else 
     73{ 
     74    print   "\nShepherd needs a way to run $grabber just to check that it compiles\n" . 
     75            "on the user's system. Please enter a command-line option that will cause\n" . 
     76            "$grabber to exit with status 0 as quickly as possible, i.e. preferably\n" . 
     77            "without fetching any data.\n\n"; 
     78    $config->{option_ready} = ask("Command-line option for compilation check? " . 
     79            "[default=--version]"); 
     80    $config->{option_read} ||= '--version'; 
     81} 
    4282 
    4383print   "\nCATEGORY: Niceness\n\n" .